Search and remove mails in exchange accounts

Search and remove mails in exchange accounts
In this post, I will show you how to, in the case of receiving a spam message that has been sent to all accounts within our tenant, search for that message and remove it from the mailboxes. As I mentioned in the previous post, we first need to import the ExchangeOnline module and log in to PowerShell…

Wyszukiwanie i usuwanie maili w kontach ExchangeOnline – PowerShell

Wyszukiwanie i usuwanie maili w kontach ExchangeOnline – PowerShell
W tym wpisie pokażę Wam jak w przypadku otrzymania wiadomości będącej spamem, która została przesłana do wszystkich kont wewnątrz naszego tenanta wyszukać tę wiadomość i usunąć ze skrzynek. Tak jak pisałem w poprzednim wpisie, najpierw musimy zaimportować moduł ExchangeOnline oraz zalogować się w PS kontem administracyjnym Office365. [crayon-6a3ecc4846f0e070537768/] Teraz możemy przystąpić do wyszukiwania maili. Przed rozpoczęciem wyszukiwania…

Search for ExchangeOnline mail rules – PowerShell

Search for ExchangeOnline mail rules – PowerShell
Today's post was inspired by a recent incident where a user clicked on a malicious link, logged in, and as a result, their login credentials were compromised. The attacker, upon gaining access to the mailbox (most likely through automation), creates rules that either delete specific emails, typically those from the IT department or the sender of the…

Wyszukiwanie reguł ExchangeOnline – Powershell

Wyszukiwanie reguł ExchangeOnline – Powershell
Do dzisiejszego wpisu natchnął mnie przypadek, gdzie użytkownik kliknął w złośliwy link, zalogował się przez co jego dane logowania wyciekły. Atakujący po zalogowaniu się na skrzynkę (zapewne przy pomocy automatu) tworzą reguły, które albo usuwają określone maile - z reguły są to maile od IT oraz od nadawcy złośliwego maila. Nazwa tych reguł ma wartość "." -…

How to create and configure linux service

How to create and configure linux service
In the previous post, we wrote an HTTP server script that has one drawback - it doesn't start automatically and doesn't work as a service. Here are the steps to configure it as a service in Linux. Script: We already have a startup script named web-server.py. Save it in the directory where it will be permanently stored.…

Jak utworzyć i skonfigurować usługi w Linuxie

Jak utworzyć i skonfigurować usługi w Linuxie
W poprzednim wpisie napisaliśmy skrypt serwera HTTP, który ma jedną wadę - nie uruchamia się automatycznie i nie dziala jako usługa. Po kolei teraz przedstawię kroki jak skonfigurować usługę w linuxie. Skrypt: Mamy już skrypt startowy, pod nazwą web-server.py. Zapisujemy go w katalogu, w którym będzie przechowywany na stałe. Ja wkleiłem go do ścieżki /root/ Uprawnienia do…

Simple HTTP server with 208 redirect in Python

Simple HTTP server with 208 redirect in Python
In today's post, I will show you how to start a simple web server that will be accessible within your network, and when users enter its address, they will be redirected to an external address. I created my web server on Debian, and it's written in Python. I used the Flask framework. The server will perform a…

Prosty serwer HTTP w Pythonie z przekierowaniem 308

Prosty serwer HTTP w Pythonie z przekierowaniem 308
W dzisiejszym wpisie pokażę wam jak uruchomić prosty web serwer, który będzie dostępny wewnątrz sieci i po wpisaniu jego adresu użytkownik zostanie przekierowany na adres zewnętrzny. Ja zrobiłem swój web serwer na Debianie i jest napisany w pythonie. Posłużyłem się frameworkiem Flask. Serwer będzie wykonywał przekierowanie na podany adres zewnętrzny. Na początek musimy zainstalować Python ( jeśli…

Uptime report – PowerShell

Uptime report – PowerShell
Following the post about the Defender status report in PowerShell, I decided to create a script that will generate a list of servers based on Active Directory data, just like in the previous case, and gather information about the current UpTime and last boot time. In the first step, we need to retrieve a list of computers…

Raport UpTime – PowerShell

Raport UpTime – PowerShell
Idąc w ślad za wpisem Raport ze statusem ochrony Defender w PowerShell postanowiłem zrobić skrypt, który przygotuje listę serwerów na podstawie danych z AD tak jak w poprzednim przypadku oraz pozyska informację o aktualnym UpTime oraz ostatnim czasie uruchomienia. W pierwszym kroku musimy pobrać listę komputerów lub serwerów. Jeśli mamy to gdzieś w pliku to możemy tej…