brianspells00/HoneyPot-Incident-Response
GitHub: brianspells00/HoneyPot-Incident-Response
一个基于Azure云资源构建虚拟蜜罐并结合NIST事件响应流程进行攻击检测、分析与恢复的安全实验项目。
Stars: 0 | Forks: 0
描述
在这个实验中,我使用 Microsoft Azure 资源创建了一个虚拟蜜罐,用于监控和分析安全事件日志,并使用 NIST 事件响应计划来检测、缓解安全漏洞并从中恢复。使用的语言、实用程序和服务
- Microsoft Azure - Remote Desktop Protocol - Windows Defender Firewall使用的虚拟环境
- Windows 10项目演练:
First I created a Microsoft Azure account :
I then made a Resource Group as a place to store the resource I’ll be creating and configuring. Then confirmed it was created properly:
Then I created a Virtual Network (Vnet-SOC-HP-Lab) ensuring that the region of the Network is the same as the region of my Resource Group. Then confirmed its deployment:
Now I’ll be creating a virtual machine to act as a honeypot. I named the VM “ENT-EAST-3” selected Windows 10 as the OS, I created a username and password, selected the disk size and type for the OS. I then created the VM and confirmed the deployment:
Now when I navigate to the Resource Group I can see that a Public IP address, Network Security Group, Network Interface, and Disk were added into the group:
Since my goal is to be discovered I’ll need to modify the Network security rules. First I’ll delete the RDP rule and add a rule to allow all ports to be reached:
Now that all inbound traffic is allowed I now have to disable the firewall on the VM. I’ll be gaining access to the VM via using the public IP address and Remote Desktop Protocol. Once I was logged into the VM I navigated to Windows Defender Firewall properties and turned off the firewall state for the Domain, Private, and Public profiles:
I opened the Windows cmd and ran the prompt ping 40.76.120.54 to ensure that the machine could be reached:
I then disconnected from the VM and purposely entered the wrong login credentials. Then I login and navigate to the Event Viewer, click Windows Logs and then click Security:
I clicked on the code 4652 which is login related and viewed the event. The event was logged as a fail, indicating that the login attempt was unsuccessful:
Now that I know the logs are active and accurate I’ll create a log repository using Log Analytics workspaces in Azure:
Now I’ll add the Log Analytics workspace that I created to Microsoft Sentinel which acts as a SIEM:
Once it has finished being deployed I’ll go to configuration then select Data connectors and select Windows Security Events via AMA to install:
With that now installed we can set up data collection rules by clicking “Open connector page” Name the collector, select the resource group, ensure the VM is selected and create the collector:
To confirm the connection I verified that “AzureMonitorWindowsAgent” appeared under Extensions + applications of the VM and also went to the “Log Analytics workspaces” went to the Log tab and ran the command “SecurityEvent” to display the logged events:
Now with everything connected I’d like to set up an alert for failed log in attempts which can be done on the same KQL page by clicking the three dots on the top right of the query and selecting add rule. I set the parameters to every 5 minutes in order to collect a larger sample size. Also the severity of the alert was set to information rather than a lower number which would indicate a larger problem such as a successful login attempt from an unknown IP address:
Upon configuring the alert I noticed that my VM logs increased from 17 to 45, then to 75 but the logins were successful, however I hadn’t attempted to log into the VM since I disabled the firewall. That indicated to me that the VM was successfully infiltrated. I immediately checked the logs to see if I could obtain an IP of the attacker but the field returned no data:
I then ran the query SecurityEvent | project TimeGenerated, TargetUserName, Activity, TargetAccount, TargetDomainName, TargetSid,CallerProcessName, Process, IpAddress, EventID
To analyze the information together to make an informed decision as to what the attacker(s) are doing in the system.
I then checked to see what the attacker(s) did once they gained access which is the following; Attacker “S-1-5-32” gave themselves escalated privileges, executed “svchost.exe” in “System32” which may have contained a malware, and then created a path for themselves to regain access to the system via remote desktop via a created guest account “GuestAgent_2.7.41491.1225_2026-06-06_015419” which ran “WaAppAgent.exe”.
Attacker “S-1-5-21” also gave themselves escalated privileges, executed “WaAppAgent.exe, WmiPrvSE.exe and CompatTelRunner.exe” which led me to believe they we moving laterally in the system to retain access to it for potential future use.
:
I then disabled the allow all inbound traffic rule on the Network Security group and made a deny all inbound and outbound traffic. Since there were no other VMs on the subnet to gain access to I did not have to revoke any accounts and ultimately deleted the machine after verifying that the other components of the Resource group were not compromised:
随后我重建并部署了该 VM,这次启用了适当的防火墙以及安全入站端口,以降低再次被成功入侵的可能性: