Spaces:
Sleeping
Sleeping
Update data.py
Browse files
data.py
CHANGED
|
@@ -10,14 +10,14 @@ EVENT_DATABASE = [
|
|
| 10 |
"Source": "Security",
|
| 11 |
"Description": "An account failed to log on.",
|
| 12 |
"Win_R": "eventvwr.msc",
|
| 13 |
-
"PowerShell": "Get-WinEvent -FilterHashtable @{LogName='Security';ID=4625} -MaxEvents 20",
|
| 14 |
"MITRE": "T1110 (Brute Force)",
|
| 15 |
-
"Logic": "High frequency of failures (10+ per minute) suggests
|
| 16 |
-
"Investigation_Steps": "1. Win+R
|
| 17 |
-
"Scenario": "Attacker
|
| 18 |
"Response": "Block Source IP at firewall. Check if the account is now locked.",
|
| 19 |
-
"Remediation": "
|
| 20 |
-
"Tips": "Logon Type 3
|
| 21 |
},
|
| 22 |
{
|
| 23 |
"ID": "4624",
|
|
@@ -27,33 +27,15 @@ EVENT_DATABASE = [
|
|
| 27 |
"Source": "Security",
|
| 28 |
"Description": "An account was successfully logged on.",
|
| 29 |
"Win_R": "eventvwr.msc",
|
| 30 |
-
"PowerShell": "Get-WinEvent -FilterHashtable @{LogName='Security';ID=4624} -MaxEvents
|
| 31 |
"MITRE": "T1078 (Valid Accounts)",
|
| 32 |
-
"Logic": "
|
| 33 |
-
"Investigation_Steps": "1. Filter
|
| 34 |
-
"Scenario": "
|
| 35 |
-
"Response": "
|
| 36 |
-
"Remediation": "Enforce
|
| 37 |
-
"Tips": "Check '
|
| 38 |
},
|
| 39 |
-
{
|
| 40 |
-
"ID": "4672",
|
| 41 |
-
"Name": "Admin Privs Assigned",
|
| 42 |
-
"Category": "Authentication",
|
| 43 |
-
"Severity": "Medium",
|
| 44 |
-
"Source": "Security",
|
| 45 |
-
"Description": "Special privileges assigned to a new logon.",
|
| 46 |
-
"Win_R": "secpol.msc",
|
| 47 |
-
"PowerShell": "Get-WinEvent -FilterHashtable @{LogName='Security';ID=4672}",
|
| 48 |
-
"MITRE": "T1078.002 (Domain Accounts)",
|
| 49 |
-
"Logic": "Triggered when an admin logs in. Suspicious if triggered by a standard user account.",
|
| 50 |
-
"Investigation_Steps": "1. Filter for 4672.\n2. Cross-reference with 4624 to see the source of the login.",
|
| 51 |
-
"Scenario": "Privilege escalation where a normal user gains admin rights.",
|
| 52 |
-
"Response": "Audit the user's group memberships immediately.",
|
| 53 |
-
"Remediation": "Use Privileged Access Management (PAM) tools.",
|
| 54 |
-
"Tips": "Look for 'SeDebugPrivilege' which is often used by attackers."
|
| 55 |
-
},
|
| 56 |
-
|
| 57 |
# --- PROCESS & EXECUTION ---
|
| 58 |
{
|
| 59 |
"ID": "4688",
|
|
@@ -65,12 +47,12 @@ EVENT_DATABASE = [
|
|
| 65 |
"Win_R": "taskmgr",
|
| 66 |
"PowerShell": "Get-WinEvent -FilterHashtable @{LogName='Security';ID=4688} -MaxEvents 50",
|
| 67 |
"MITRE": "T1059 (Command Execution)",
|
| 68 |
-
"Logic": "
|
| 69 |
-
"Investigation_Steps": "1.
|
| 70 |
-
"Scenario": "
|
| 71 |
-
"Response": "Kill the process and isolate the host.",
|
| 72 |
-
"Remediation": "Enable
|
| 73 |
-
"Tips": "
|
| 74 |
},
|
| 75 |
{
|
| 76 |
"ID": "1 (Sysmon)",
|
|
@@ -82,14 +64,13 @@ EVENT_DATABASE = [
|
|
| 82 |
"Win_R": "services.msc",
|
| 83 |
"PowerShell": "Get-WinEvent -LogName 'Microsoft-Windows-Sysmon/Operational' | Where {$_.ID -eq 1}",
|
| 84 |
"MITRE": "T1204 (User Execution)",
|
| 85 |
-
"Logic": "
|
| 86 |
-
"Investigation_Steps": "1.
|
| 87 |
-
"Scenario": "User
|
| 88 |
-
"Response": "
|
| 89 |
-
"Remediation": "
|
| 90 |
-
"Tips": "Sysmon
|
| 91 |
},
|
| 92 |
-
|
| 93 |
# --- POWERSHELL ---
|
| 94 |
{
|
| 95 |
"ID": "4104",
|
|
@@ -97,68 +78,51 @@ EVENT_DATABASE = [
|
|
| 97 |
"Category": "PowerShell",
|
| 98 |
"Severity": "Critical",
|
| 99 |
"Source": "PowerShell/Ops",
|
| 100 |
-
"Description": "
|
| 101 |
"Win_R": "eventvwr.msc",
|
| 102 |
-
"PowerShell": "Get-WinEvent -LogName 'Microsoft-Windows-PowerShell/Operational' | Where {$_.ID -eq 4104}",
|
| 103 |
"MITRE": "T1059.001 (PowerShell)",
|
| 104 |
-
"Logic": "
|
| 105 |
-
"Investigation_Steps": "1. Go to PowerShell/Operational log.\n2. Filter ID 4104.\n3.
|
| 106 |
-
"Scenario": "Fileless malware
|
| 107 |
-
"Response": "
|
| 108 |
"Remediation": "Set Execution Policy to 'AllSigned'.",
|
| 109 |
-
"Tips": "
|
| 110 |
},
|
| 111 |
-
|
| 112 |
-
# --- NETWORK & SYSTEM ---
|
| 113 |
{
|
| 114 |
"ID": "5156",
|
| 115 |
"Name": "Network Connection",
|
| 116 |
"Category": "Network",
|
| 117 |
"Severity": "Medium",
|
| 118 |
"Source": "Security",
|
| 119 |
-
"Description": "Windows
|
| 120 |
"Win_R": "wf.msc",
|
| 121 |
"PowerShell": "Get-WinEvent -FilterHashtable @{LogName='Security';ID=5156} -MaxEvents 50",
|
| 122 |
"MITRE": "T1041 (Exfiltration)",
|
| 123 |
-
"Logic": "
|
| 124 |
-
"Investigation_Steps": "1.
|
| 125 |
-
"Scenario": "Malware
|
| 126 |
-
"Response": "Block the destination IP at the perimeter
|
| 127 |
-
"Remediation": "
|
| 128 |
-
"Tips": "
|
| 129 |
-
},
|
| 130 |
-
{
|
| 131 |
-
"ID": "6416",
|
| 132 |
-
"Name": "USB Device Plugged",
|
| 133 |
-
"Category": "System",
|
| 134 |
-
"Severity": "Low",
|
| 135 |
-
"Source": "Security",
|
| 136 |
-
"Description": "A new external device was recognized.",
|
| 137 |
-
"Win_R": "devmgmt.msc",
|
| 138 |
-
"PowerShell": "Get-WinEvent -FilterHashtable @{LogName='Security';ID=6416}",
|
| 139 |
-
"MITRE": "T1200 (Hardware Additions)",
|
| 140 |
-
"Logic": "Detection of unauthorized USB storage usage.",
|
| 141 |
-
"Investigation_Steps": "1. Filter ID 6416.\n2. Identify the 'Device Description'. Is it a mass storage device?",
|
| 142 |
-
"Scenario": "Insider threat stealing data via a thumb drive.",
|
| 143 |
-
"Response": "Identify what files were accessed during the USB session (ID 4663).",
|
| 144 |
-
"Remediation": "Disable USB ports for non-authorized users via GPO.",
|
| 145 |
-
"Tips": "Useful for Data Loss Prevention (DLP) investigations."
|
| 146 |
},
|
|
|
|
| 147 |
{
|
| 148 |
"ID": "4720",
|
| 149 |
"Name": "User Created",
|
| 150 |
"Category": "User Management",
|
| 151 |
"Severity": "High",
|
| 152 |
"Source": "Security",
|
| 153 |
-
"Description": "A user account was created.",
|
| 154 |
"Win_R": "lusrmgr.msc",
|
| 155 |
"PowerShell": "Get-WinEvent -FilterHashtable @{LogName='Security';ID=4720}",
|
| 156 |
"MITRE": "T1136 (Create Account)",
|
| 157 |
-
"Logic": "
|
| 158 |
-
"Investigation_Steps": "1.
|
| 159 |
-
"Scenario": "Attacker
|
| 160 |
-
"Response": "Disable the
|
| 161 |
-
"Remediation": "
|
| 162 |
-
"Tips": "
|
| 163 |
}
|
| 164 |
]
|
|
|
|
| 10 |
"Source": "Security",
|
| 11 |
"Description": "An account failed to log on.",
|
| 12 |
"Win_R": "eventvwr.msc",
|
| 13 |
+
"PowerShell": "Get-WinEvent -FilterHashtable @{LogName='Security';ID=4625} -MaxEvents 20 | Select-Object TimeCreated, @{N='User';E={$_.Properties[5].Value}}, @{N='IP';E={$_.Properties[19].Value}}",
|
| 14 |
"MITRE": "T1110 (Brute Force)",
|
| 15 |
+
"Logic": "High frequency of failures (10+ per minute) suggests brute force.",
|
| 16 |
+
"Investigation_Steps": "1. Press **Win+R**, type `eventvwr.msc`.\n2. Go to **Security Log** > **Filter Current Log**.\n3. Type `4625` in the Event ID box.\n4. Scroll down to 'Network Information' to see the Source IP address.",
|
| 17 |
+
"Scenario": "Attacker trying a wordlist against the Administrator account.",
|
| 18 |
"Response": "Block Source IP at firewall. Check if the account is now locked.",
|
| 19 |
+
"Remediation": "Enable Account Lockout Policy in `secpol.msc`.",
|
| 20 |
+
"Tips": "Logon Type 3 = Network; Type 10 = RDP."
|
| 21 |
},
|
| 22 |
{
|
| 23 |
"ID": "4624",
|
|
|
|
| 27 |
"Source": "Security",
|
| 28 |
"Description": "An account was successfully logged on.",
|
| 29 |
"Win_R": "eventvwr.msc",
|
| 30 |
+
"PowerShell": "Get-WinEvent -FilterHashtable @{LogName='Security';ID=4624} -MaxEvents 10",
|
| 31 |
"MITRE": "T1078 (Valid Accounts)",
|
| 32 |
+
"Logic": "Monitor for RDP logins (Type 10) at unusual hours.",
|
| 33 |
+
"Investigation_Steps": "1. Open Event Viewer.\n2. Filter Security log for `4624`.\n3. Look for 'Logon Type'. Type 2 is local; Type 3 is network share; Type 10 is RDP.",
|
| 34 |
+
"Scenario": "Lateral movement using stolen credentials.",
|
| 35 |
+
"Response": "Verify with the user if they authorized this login.",
|
| 36 |
+
"Remediation": "Enforce MFA for all remote access.",
|
| 37 |
+
"Tips": "Check 'Logon ID' to link this to other events by the same user."
|
| 38 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
# --- PROCESS & EXECUTION ---
|
| 40 |
{
|
| 41 |
"ID": "4688",
|
|
|
|
| 47 |
"Win_R": "taskmgr",
|
| 48 |
"PowerShell": "Get-WinEvent -FilterHashtable @{LogName='Security';ID=4688} -MaxEvents 50",
|
| 49 |
"MITRE": "T1059 (Command Execution)",
|
| 50 |
+
"Logic": "Suspicious if Office apps (Word/Excel) spawn PowerShell or CMD.",
|
| 51 |
+
"Investigation_Steps": "1. Press **Win+R**, type `taskmgr` to see live processes.\n2. In Event Viewer, filter for ID `4688`.\n3. Check the 'Process Command Line' field to see the exact command executed.",
|
| 52 |
+
"Scenario": "Malicious macro launching a reverse shell.",
|
| 53 |
+
"Response": "Kill the process tree and isolate the host.",
|
| 54 |
+
"Remediation": "Enable GPO: 'Include command line in process creation events'.",
|
| 55 |
+
"Tips": "Essential for catching 'Living off the Land' (LotL) attacks."
|
| 56 |
},
|
| 57 |
{
|
| 58 |
"ID": "1 (Sysmon)",
|
|
|
|
| 64 |
"Win_R": "services.msc",
|
| 65 |
"PowerShell": "Get-WinEvent -LogName 'Microsoft-Windows-Sysmon/Operational' | Where {$_.ID -eq 1}",
|
| 66 |
"MITRE": "T1204 (User Execution)",
|
| 67 |
+
"Logic": "New executables running from `Temp` or `AppData` folders.",
|
| 68 |
+
"Investigation_Steps": "1. Navigate to **Applications and Services > Microsoft > Windows > Sysmon > Operational**.\n2. Filter for ID `1`.\n3. Copy the SHA256 hash and check it on VirusTotal.",
|
| 69 |
+
"Scenario": "User executes a renamed malware binary.",
|
| 70 |
+
"Response": "If the hash is malicious, perform memory forensics.",
|
| 71 |
+
"Remediation": "Use AppLocker to restrict unsigned code.",
|
| 72 |
+
"Tips": "Sysmon provides the ParentCommandLine, which is vital for context."
|
| 73 |
},
|
|
|
|
| 74 |
# --- POWERSHELL ---
|
| 75 |
{
|
| 76 |
"ID": "4104",
|
|
|
|
| 78 |
"Category": "PowerShell",
|
| 79 |
"Severity": "Critical",
|
| 80 |
"Source": "PowerShell/Ops",
|
| 81 |
+
"Description": "Full code executed by PowerShell.",
|
| 82 |
"Win_R": "eventvwr.msc",
|
| 83 |
+
"PowerShell": "Get-WinEvent -LogName 'Microsoft-Windows-PowerShell/Operational' | Where {$_.ID -eq 4104} | Select -ExpandProperty Message",
|
| 84 |
"MITRE": "T1059.001 (PowerShell)",
|
| 85 |
+
"Logic": "Search for 'Base64', 'IEX', or 'DownloadString'.",
|
| 86 |
+
"Investigation_Steps": "1. Go to **PowerShell/Operational** log in Event Viewer.\n2. Filter ID `4104`.\n3. Examine the 'ScriptBlock Text'. This captures code even if run in memory.",
|
| 87 |
+
"Scenario": "Fileless malware executing a Cobalt Strike beacon.",
|
| 88 |
+
"Response": "Analyze the URL/IP the script is trying to connect to.",
|
| 89 |
"Remediation": "Set Execution Policy to 'AllSigned'.",
|
| 90 |
+
"Tips": "This log de-obfuscates scripts automatically."
|
| 91 |
},
|
| 92 |
+
# --- NETWORK ---
|
|
|
|
| 93 |
{
|
| 94 |
"ID": "5156",
|
| 95 |
"Name": "Network Connection",
|
| 96 |
"Category": "Network",
|
| 97 |
"Severity": "Medium",
|
| 98 |
"Source": "Security",
|
| 99 |
+
"Description": "Windows Firewall permitted a connection.",
|
| 100 |
"Win_R": "wf.msc",
|
| 101 |
"PowerShell": "Get-WinEvent -FilterHashtable @{LogName='Security';ID=5156} -MaxEvents 50",
|
| 102 |
"MITRE": "T1041 (Exfiltration)",
|
| 103 |
+
"Logic": "Outbound connections to unknown IPs on non-standard ports (e.g. 4444).",
|
| 104 |
+
"Investigation_Steps": "1. Press **Win+R**, type `wf.msc` to check Firewall rules.\n2. In Event Viewer, filter Security log for `5156`.\n3. Identify the 'Destination Address'.",
|
| 105 |
+
"Scenario": "Malware communicating with a C2 server.",
|
| 106 |
+
"Response": "Block the destination IP at the perimeter.",
|
| 107 |
+
"Remediation": "Enable Egress filtering.",
|
| 108 |
+
"Tips": "Requires 'Audit Filtering Platform Connection' to be enabled."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
},
|
| 110 |
+
# --- USER & SYSTEM ---
|
| 111 |
{
|
| 112 |
"ID": "4720",
|
| 113 |
"Name": "User Created",
|
| 114 |
"Category": "User Management",
|
| 115 |
"Severity": "High",
|
| 116 |
"Source": "Security",
|
| 117 |
+
"Description": "A new user account was created.",
|
| 118 |
"Win_R": "lusrmgr.msc",
|
| 119 |
"PowerShell": "Get-WinEvent -FilterHashtable @{LogName='Security';ID=4720}",
|
| 120 |
"MITRE": "T1136 (Create Account)",
|
| 121 |
+
"Logic": "Unauthorized account creation for persistence.",
|
| 122 |
+
"Investigation_Steps": "1. Press **Win+R**, type `lusrmgr.msc` to view local users.\n2. Filter Security log for ID `4720`.\n3. Check 'Subject' (who created the user).",
|
| 123 |
+
"Scenario": "Attacker creating a backdoor account.",
|
| 124 |
+
"Response": "Disable the account and audit the creator's activity.",
|
| 125 |
+
"Remediation": "Limit account creation rights to specific admins.",
|
| 126 |
+
"Tips": "Look for names that mimic system accounts (e.g., 'SytemAdmin')."
|
| 127 |
}
|
| 128 |
]
|