# Generated by detectlab from the Sigma rules in this repository. Do not edit by hand. [AWS AdministratorAccess Policy Attached to an Identity] description = Detects the AWS managed AdministratorAccess policy being attached to a user, group or role, a fast way to escalate a foothold to full account control. (Sigma id febcb7c5-6f60-4f26-8212-89d5871dd42d) search = sourcetype="aws:cloudtrail" eventSource="iam.amazonaws.com" eventName IN ("AttachUserPolicy", "AttachGroupPolicy", "AttachRolePolicy") requestParameters.policyArn="*:policy/AdministratorAccess" NOT errorCode=* cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 4 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1098.003"]} [AWS CloudTrail Logging Stopped or Trail Deleted] description = Detects successful StopLogging or DeleteTrail calls. Disabling CloudTrail blinds the audit trail for every following API call in the account. (Sigma id da86cf4e-2f93-416f-8dbd-3b6116c2f84e) search = sourcetype="aws:cloudtrail" eventSource="cloudtrail.amazonaws.com" eventName IN ("StopLogging", "DeleteTrail") NOT errorCode=* cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 4 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1562.008"]} [AWS Root Account Console Login] description = Detects a successful AWS Management Console sign-in with the root user. Day-to-day work should never use root, so every login deserves a look. (Sigma id 64d77121-1019-4887-a803-54b3d56cd1f3) search = sourcetype="aws:cloudtrail" eventName="ConsoleLogin" userIdentity.type="Root" responseElements.ConsoleLogin="Success" cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 4 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1078.004"]} [SSH Authorized Keys File Modified] description = Detects writes to authorized_keys files outside of known provisioning tools. Adding a key gives an attacker password-less SSH access that survives password resets. (Sigma id 5262f814-c8b6-4816-acad-e968396c6de9) search = sourcetype="sysmon:linux" TargetFilename IN ("*/.ssh/authorized_keys", "*/.ssh/authorized_keys2") NOT (Image IN ("*/cloud-init", "*/google_guest_agent", "*/waagent")) cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 3 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1098.004"]} [Cron Job Installed That Downloads or Decodes a Payload] description = Detects a crontab being written from a shell pipeline that also fetches or decodes content, the typical persistence step of Linux cryptominers and botnets. (Sigma id 9bb620c0-5a79-4530-bb5c-fb6e5f963d5f) search = sourcetype="sysmon:linux" CommandLine="*crontab*" CommandLine IN ("*curl *", "*wget *", "*/dev/tcp/*", "*base64 -d*", "*base64 --decode*") cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 4 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1053.003"]} [Reverse Shell Command Line on Linux] description = Detects common reverse shell one-liners - bash redirection to /dev/tcp or /dev/udp, and netcat binding a shell with -e/-c. (Sigma id 95c33114-d86b-46a0-991c-a88c190dcb4c) search = sourcetype="sysmon:linux" CommandLine IN ("*/dev/tcp/*", "*/dev/udp/*") OR (Image IN ("*/nc", "*/ncat", "*/netcat", "*/nc.traditional") CommandLine IN ("* -e /bin/sh*", "* -e /bin/bash*", "* -c /bin/sh*", "* -c /bin/bash*", "* -e sh*", "* -e bash*")) cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 4 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1059.004"]} [Path Traversal or Local File Inclusion Attempt in a Web Request] description = Detects directory traversal sequences (plain or URL-encoded) and requests for well-known sensitive files in the URI of web server access logs. (Sigma id ffe90572-ec84-4176-8163-cc83448eb75b) search = uri_query IN ("*../*", "*..\\*", "*..%2f*", "*..%5c*", "*%2e%2e%2f*", "*%2e%2e/*", "*..%252f*") OR uri_query IN ("*/etc/passwd*", "*/etc/shadow*", "*/proc/self/environ*", "*win.ini*", "*boot.ini*") cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 3 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1190"]} [Web Shell Command Execution via Query Parameter] description = Detects requests to server-side script pages whose query string passes a reconnaissance command (whoami, id, uname, ipconfig, hostname) in a cmd/exec style parameter. (Sigma id 179db1ef-ef21-49ba-aaf1-bd537fd20abc) search = uri_path IN ("*.php", "*.jsp", "*.jspx", "*.asp", "*.aspx", "*.ashx") \ | regex uri_query=".*(cmd|exec|command|execute|run)=(whoami|id|uname|ipconfig|ifconfig|hostname).*" cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 4 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1505.003"]} [Security Event Log Cleared] description = Detects event 1102 (the audit log was cleared). Attackers clear the Security log to remove evidence of logons and privilege use. (Sigma id eb402ed1-9e53-4fde-a2f1-82fe783bddea) search = source="WinEventLog:Security" EventCode=1102 Provider_Name="Microsoft-Windows-Eventlog" cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 4 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1070.001"]} [Kerberos Service Ticket Requested With RC4 Encryption] description = Detects successful TGS requests (event 4769) using RC4-HMAC (0x17) for a user service account. Kerberoasting tools request RC4 tickets because they are much faster to crack offline than AES ones. (Sigma id 1919ec4f-a56d-437c-b6de-adbdaec8c7eb) search = source="WinEventLog:Security" EventCode=4769 TicketEncryptionType="0x17" Status="0x0" NOT (ServiceName IN ("*$", "krbtgt")) cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 3 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1558.003"]} [Account Added to the Local Administrators Group] description = Detects event 4732 where the target group is BUILTIN\Administrators (SID S-1-5-32-544), excluding changes made by the machine account during provisioning. (Sigma id 1e50b0b6-9f18-4058-bb22-c3ffc59f7c18) search = source="WinEventLog:Security" EventCode=4732 TargetSid="S-1-5-32-544" NOT SubjectUserName="*$" cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 3 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1098"]} [Certutil Used to Download a File] description = Detects certutil.exe fetching a remote URL with -urlcache or -verifyctl, a classic living-off-the-land download technique. (Sigma id f1ca80c3-ee2e-4167-8245-ade13c81c910) search = Image="*\\certutil.exe" OR OriginalFileName="CertUtil.exe" CommandLine="*-urlcache *" OR CommandLine="*/urlcache *" OR CommandLine="*–urlcache *" OR CommandLine="*—urlcache *" OR CommandLine="*―urlcache *" OR CommandLine="*-verifyctl *" OR CommandLine="*/verifyctl *" OR CommandLine="*–verifyctl *" OR CommandLine="*—verifyctl *" OR CommandLine="*―verifyctl *" CommandLine IN ("*http://*", "*https://*", "*ftp://*") cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 4 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1105"]} [LSASS Memory Dumped With comsvcs.dll MiniDump] description = Detects rundll32 calling the MiniDump export of comsvcs.dll (by name or ordinal 24), which is used to dump LSASS memory for offline credential extraction. (Sigma id 7b0cee57-e8b6-4137-b20a-4c86f3c40a61) search = Image="*\\rundll32.exe" OR OriginalFileName="RUNDLL32.EXE" CommandLine="*comsvcs*" CommandLine IN ("*minidump*", "*#24*", "*#+24*") cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 5 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1003.001"]} [PowerShell Launched With an Encoded Command] description = Detects PowerShell started with -EncodedCommand (or one of its abbreviations such as -enc / -e / -ec). Base64-encoded command lines are a common way for loaders and malicious macros to hide what they run. (Sigma id fe5675ae-2a88-4ae8-a66d-d6ea9a44fbf3) search = Image IN ("*\\powershell.exe", "*\\pwsh.exe") OR OriginalFileName IN ("PowerShell.EXE", "pwsh.dll") CommandLine="* -e *" OR CommandLine="* /e *" OR CommandLine="* –e *" OR CommandLine="* —e *" OR CommandLine="* ―e *" OR CommandLine="* -en *" OR CommandLine="* /en *" OR CommandLine="* –en *" OR CommandLine="* —en *" OR CommandLine="* ―en *" OR CommandLine="* -enc *" OR CommandLine="* /enc *" OR CommandLine="* –enc *" OR CommandLine="* —enc *" OR CommandLine="* ―enc *" OR CommandLine="* -enco *" OR CommandLine="* /enco *" OR CommandLine="* –enco *" OR CommandLine="* —enco *" OR CommandLine="* ―enco *" OR CommandLine="* -ec *" OR CommandLine="* /ec *" OR CommandLine="* –ec *" OR CommandLine="* —ec *" OR CommandLine="* ―ec *" OR CommandLine="* -encodedcommand *" OR CommandLine="* /encodedcommand *" OR CommandLine="* –encodedcommand *" OR CommandLine="* —encodedcommand *" OR CommandLine="* ―encodedcommand *" cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 3 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1059.001", "T1027"]} [Regsvr32 Loading a Remote or Scriptlet COM Object] description = Detects regsvr32 with a /i switch pointing at a URL or scrobj.dll ("Squiblydoo"), used to run script code through a signed Microsoft binary. (Sigma id 16c8ef39-51aa-47c1-a998-a4958e47c26e) search = Image="*\\regsvr32.exe" OR OriginalFileName="REGSVR32.EXE" CommandLine="*-i:*" OR CommandLine="*/i:*" OR CommandLine="*–i:*" OR CommandLine="*—i:*" OR CommandLine="*―i:*" CommandLine IN ("*http://*", "*https://*", "*scrobj.dll*") cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 4 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1218.010"]} [Scheduled Task Created to Run From a User-Writable Folder] description = Detects schtasks /create where the task action points into Temp, Public, ProgramData or AppData, a common persistence pattern for droppers. (Sigma id bd8f2b9f-c6c3-46ad-b68b-cc4c5ae289d9) search = Image="*\\schtasks.exe" CommandLine="*-create *" OR CommandLine="*/create *" OR CommandLine="*–create *" OR CommandLine="*—create *" OR CommandLine="*―create *" CommandLine IN ("*\\AppData\\Local\\Temp\\*", "*\\AppData\\Roaming\\*", "*\\Users\\Public\\*", "*\\ProgramData\\*", "*%TEMP%*", "*%APPDATA%*", "*%PUBLIC%*") NOT (ParentImage IN ("C:\\Windows\\System32\\*", "C:\\Program Files\\*", "C:\\Program Files (x86)\\*")) cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 3 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1053.005"]} [Volume Shadow Copies or Backup Catalog Deleted] description = Detects vssadmin, wmic or wbadmin being used to delete shadow copies or the backup catalog. Ransomware does this right before encryption so that victims cannot roll files back. (Sigma id d64da330-1afb-40a3-a9a2-d40a4b5ff0f5) search = (Image="*\\vssadmin.exe" CommandLine="*delete*" CommandLine="*shadows*") OR (Image="*\\wmic.exe" CommandLine="*shadowcopy*" CommandLine="*delete*") OR (Image="*\\wbadmin.exe" CommandLine="*delete*" CommandLine="*catalog*") cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 4 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1490"]} [WMIC Remote Process Creation] description = Detects wmic.exe starting a process on another host (/node: process call create), a lateral execution technique that needs no extra tooling. (Sigma id 9ea64786-ad5a-41a5-86f8-da28530ca023) search = Image="*\\wmic.exe" OR OriginalFileName="wmic.exe" CommandLine="*-node:*" OR CommandLine="*/node:*" OR CommandLine="*–node:*" OR CommandLine="*—node:*" OR CommandLine="*―node:*" CommandLine="*process*" CommandLine="*call*" CommandLine="*create*" NOT (CommandLine="*-node:localhost *" OR CommandLine="*/node:localhost *" OR CommandLine="*–node:localhost *" OR CommandLine="*—node:localhost *" OR CommandLine="*―node:localhost *" OR CommandLine="*-node:127.0.0.1 *" OR CommandLine="*/node:127.0.0.1 *" OR CommandLine="*–node:127.0.0.1 *" OR CommandLine="*—node:127.0.0.1 *" OR CommandLine="*―node:127.0.0.1 *" OR CommandLine="*-node:\"localhost\"*" OR CommandLine="*/node:\"localhost\"*" OR CommandLine="*–node:\"localhost\"*" OR CommandLine="*—node:\"localhost\"*" OR CommandLine="*―node:\"localhost\"*") cron_schedule = */10 * * * * dispatch.earliest_time = -10m@m dispatch.latest_time = now enableSched = 0 counttype = number of events relation = greater than quantity = 0 alert.severity = 3 alert.track = 1 action.correlationsearch.annotations = {"mitre_attack": ["T1047"]}