Skip to content

Anthonymiranda/Azure-SIEM-Sentinel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Failed RDP to IP Geolocation Information

Made a Honeypot on Azure cloud running a Windows 10 Virtual Machine with all ports open to draw on brute force attacks and parse the logs via the SIEM

Description

The Powershell script in this repository is responsible for parsing out Windows Event Log information for failed RDP attacks and using a third-party API to collect geographic information about the attackers' location.

The script is used in this demo where I set up Azure Sentinel (SIEM) and connect it to a live virtual machine acting as a honey pot. We will observe live attacks (RDP Brute Force) from all around the world. I will use a custom PowerShell script to Look up the attackers' Geolocation information and plot it on an Azure Sentinel Map!

This is the Query used to parse the log data and extract the location, usernames, passwords, and other fields from the log:

Languages Used

PowerShell: Extract RDP failed logon logs from Windows Event Viewer Utilities

Utilities Used

ipgeolocation.io: IP Address to Geolocation API

World map of incoming attacks so far (built custom logs including geodata)

Screenshot 2024-01-23 at 9 44 10

Steps Breakdown

Some steps are simple, like creating a virtual machine so I have skipped with the assumption that it's pretty easy for anyone to logging into Azure and click "create virtual machine"

After creating a virtual machine, it is time to make it open to the word. For this, I created a new network security group with inbound rules allowing all traffic.

I further proceeded to turn off the firewall in the machine to make it easy discoverable via pings.

Soon after that, I started getting failed authentication logs in event viewer:

Screenshot 2024-01-18 at 10 53 54

I wanted to know where the attacks where coming from so I created a custom log in Log Analytics Workspace for this (This is now under the "Tables" section:

Log analytics worspace created and connected to the virtual machine Screenshot 2024-01-18 at 11 18 10
Creating "Table" which is the new way to create "custom logs" in Azure. Screenshot 2024-01-18 at 11 40 43


To create this custom log, I had to let Azure know what the logs would look like, so I copy the logs from the virtual machine and uploaded the sample to Azure to teach it what a failed authenticaton event would look like:

Screenshot 2024-01-18 at 11 26 21
Screenshot 2024-01-18 at 11 34 06

Azure is now logging failed authentication and providing me with the logs necessary for further investigation:

honeypot log analytics without parsing Screenshot 2024-01-19 at 10 40 57

Now, I want to programatically get the IP addresses from the logs and use the geolocation capabilities of "ipgeolocation.io" to get the lattitude and longitude of the attackers:

audit failure with the geoplocation Screenshot 2024-01-18 at 10 56 16

usign powershell to programatically get geolocations of attackers Screenshot 2024-01-18 at 11 15 51

Here we can see visually where the attackers are coming from:
Screenshot 2024-01-19 at 11 31 47

About

Windows 10 Virtual Machine running with all ports open and the firewall off as a honeypot. Azure Sentinel was used as the SIEM to collect data and parse the data into workable info like a visual map of where the attacker are coming from, username and passwords tried, their IP addresses, etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors