Azure Honeypot - Failed RDP
HOME LAB
Brandon Nerios
5 min read
For this lab I decided to recreate Josh Madakor's (https://www.youtube.com/@JoshMadakor) cyber security lab in the cloud. In this lab we will setup Azure Sentinel as well as a honeypot virtual machine which we will monitor and collect the logs from to display a dashboard of failed RDP attempts on a world map.
The first thing we will need to do is setup the virtual machine honeypot in azure since typically this will take a while to create. We will go out to portal.azure.com once we are logged in there we will need to go over to the virtual machine section and click on the + icon to add a machine.
When creating the machine, you will need to remove all the default networking rules and setup a custom rule to allow anything to come in or out. This will make the machine discovered quickly and attempt to attack it will begin to flow in.
Once you add the custom network security rule you will then want to click on review and create. Now we will move on to setting up the Log Analytics Workspace. This workspace will ingest the logs from the honeypot.
At the top of your screen search for Log and it should pop up (Log Analytics Workspace). We will again click on the + icon to create an instance.
Once you have filled out the information above for the Log Analytics workspace you will want to click Review and create. Next, we will go to the security center to enable the ability to grab logs from the virtual machine. We will want to turn Defender on and enable it for just servers.
Next, we will setup Azure Sentinel. Again, click on the create button and select our honeypot workspace to initiate the creation. This will take some time you can just let it run in the background.
Now we should be able to login to the virtual machine via RDP. We will want to do that now so that we can turn off the windows defender firewall. We will want to login with the admin credentials we created in the setup. Also purposely mistyped my password so we could check the event viewer to see that log to make sure everything was working correctly.
Logging in via RDP
Checking event viewer for failed login attempt
Turning off windows defender firewall
Now that we have turned off the firewall. We will want to download the custom script from GitHub that will take the IP address of the logs and turn it into geolocation information such as country, state, city, etc. This script will save the information gathered at the location C:\ProgramData\failed_RDP.log
https://github.com/joshmadakor1/Sentinel-Lab/blob/main/Custom_Security_Log_Exporter.ps1