A hands-on Security Operations Center (SOC) lab built on Microsoft Sentinel. This project simulates a real-world endpoint compromise scenario and demonstrates end-to-end threat detection using KQL queries, custom analytics rules, automated incident generation, and monitoring workbooks.
Platform: Microsoft Azure / Microsoft Sentinel
Workspace: Sentinel-Workspace
Endpoint: DESKTOP-JL0Q094 (Windows)
Simulated User: Philip Price
Attack Scenario: Insider/endpoint threat — recon, credential abuse, and PowerShell evasion
The lab covers the full detection lifecycle:
- Generating suspicious activity on an endpoint
- Querying raw logs with KQL
- Writing analytics rules to automate detection
- Triaging generated incidents
- Visualizing trends in custom workbooks
The simulated attacker ran classic discovery commands on the endpoint.
KQL Query — Recon Commands (Event ID 4688):
SecurityEvent
| where EventID == 4688
| where CommandLine has_any ("whoami", "ipconfig", "net user", "net localgroup")
| project TimeGenerated, Account, CommandLine
| sort by TimeGenerated descResults: Three recon commands detected — whoami, whoami.exe, and ipconfig /all — all executed by Philip Price within seconds of each other.
An encoded PowerShell command was executed, a common technique to obfuscate malicious payloads (MITRE T1027 / T1059.001).
KQL Query:
SecurityEvent
| where EventID == 4688
| where CommandLine has "EncodedCommand"
| project TimeGenerated, Computer, Account, NewProcessName, CommandLine
| sort by TimeGenerated descResults: One hit — WindowsPowerShell launched with -EncodedCommand flag by Philip Price on DESKTOP-JL0Q094.
The attacker used -ep bypass to circumvent PowerShell's execution policy restrictions.
KQL Query:
SecurityEvent
| where EventID == 4688
| where CommandLine has "-ep bypass"
| project TimeGenerated, Computer, Account, NewProcessName, CommandLine
| sort by TimeGenerated descResults: Confirmed powershell.exe -ep bypass executed by Philip Price.
Repeated failed logins (Event ID 4625) were observed, consistent with credential stuffing or brute force behavior.
KQL Query:
SecurityEvent
| where EventID == 4625
| summarize FailedAttempts = count() by Account, Computer, bin(TimeGenerated, 5m)
| where FailedAttempts >= 5
| sort by FailedAttempts descResults: Philip Price on DESKTOP-JL0Q094 recorded 6 failed attempts within a 5-minute window.
A broad query was used to baseline all process creation activity on the endpoint, revealing 451 events including the PowerShell encoded command and bypass executions among normal system processes.
KQL Query:
SecurityEvent
| where EventID == 4688
| project TimeGenerated, Computer, Account, NewProcessName, CommandLine
| sort by TimeGenerated descTwo scheduled analytics rules were created in Microsoft Sentinel to automatically generate incidents from the detected patterns.
| Rule Name | Severity | Type | Status |
|---|---|---|---|
| Suspicious Encoded PowerShell Execution | High | Scheduled | Enabled |
| Multiple Failed Login Attempts Detected | Medium | Scheduled | Enabled |
Initial rule deployment (1 rule):
After adding the failed login rule (2 rules active):
The first two incidents were both High severity — Suspicious Encoded PowerShell Execution — generated automatically by the analytics rule.
After both rules ran over time, the incident queue grew to 27 open incidents: 12 High (PowerShell) and 15 Medium (Failed Logins).
A custom SOC Threat Monitoring Dashboard workbook was built in Sentinel to visualize key signals over time.
28 total failed logins visualized in a time-series chart. Peak observed at ~7:00 PM.
30 total PowerShell executions plotted in a bar chart over several hours, showing sustained activity.
Most frequent process creations ranked by count, dominated by conhost.exe 0xffffffff -ForceV1 (195 executions) and RuntimeBroker.exe -Embedding (79).
Combined view showing all three panels in the SOC dashboard.
All detection queries used in this lab are saved in the /KQL-Queries folder:
recon_detection.kql— Detects whoami, ipconfig, net user, net localgroupencoded_command_detection.kql— Detects PowerShell-EncodedCommandflagep_bypass_detection.kql— Detects PowerShell-ep bypassflagfailed_login_detection.kql— Detects brute force patterns via Event ID 4625
- Microsoft Azure
- Microsoft Sentinel (SIEM/SOAR)
- Log Analytics Workspace
- KQL (Kusto Query Language)
- Windows Security Event Logs (Event IDs: 4625, 4688)
- Sentinel Workbooks
- Sentinel Analytics Rules
| Technique | ID | Description |
|---|---|---|
| Command and Scripting Interpreter: PowerShell | T1059.001 | PowerShell used for execution |
| Obfuscated Files or Information | T1027 | Encoded command to hide payload |
| Impair Defenses: Disable or Modify Tools | T1562 | Execution Policy Bypass (-ep bypass) |
| System Owner/User Discovery | T1033 | whoami command |
| System Network Configuration Discovery | T1016 | ipconfig /all command |
| Brute Force: Password Guessing | T1110.001 | Repeated failed login attempts |
- All activity was performed in a controlled Azure lab environment.
- No real systems were compromised.
- The endpoint
DESKTOP-JL0Q094and userPhilip Priceare simulated identities.












