{"author": ["Dave"], "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.", "enabled": false, "false_positives": ["Break-glass role setup through infrastructure as code; exclude the deployment role by userIdentity.arn."], "from": "now-6m", "index": ["logs-aws.cloudtrail-*", "filebeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "AWS AdministratorAccess Policy Attached to an Identity", "query": "(event.provider:iam.amazonaws.com AND (event.action:(AttachUserPolicy OR AttachGroupPolicy OR AttachRolePolicy)) AND aws.cloudtrail.flattened.request_parameters.policyArn:*\\:policy\\/AdministratorAccess) AND (NOT _exists_:aws.cloudtrail.error_code)", "references": ["https://attack.mitre.org/techniques/T1098/003/", "https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachUserPolicy.html"], "risk_score": 73, "rule_id": "febcb7c5-6f60-4f26-8212-89d5871dd42d", "severity": "high", "tags": ["detection-as-code", "ATT&CK T1098.003"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0003", "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/"}, "technique": [{"id": "T1098", "name": "Account Manipulation", "reference": "https://attack.mitre.org/techniques/T1098/", "subtechnique": [{"id": "T1098.003", "name": "Additional Cloud Roles", "reference": "https://attack.mitre.org/techniques/T1098/003/"}]}]}, {"framework": "MITRE ATT&CK", "tactic": {"id": "TA0004", "name": "Privilege Escalation", "reference": "https://attack.mitre.org/tactics/TA0004/"}, "technique": [{"id": "T1098", "name": "Account Manipulation", "reference": "https://attack.mitre.org/techniques/T1098/", "subtechnique": [{"id": "T1098.003", "name": "Additional Cloud Roles", "reference": "https://attack.mitre.org/techniques/T1098/003/"}]}]}], "type": "query", "version": 1} {"author": ["Dave"], "description": "Detects successful StopLogging or DeleteTrail calls. Disabling CloudTrail blinds the audit trail for every following API call in the account.", "enabled": false, "false_positives": ["Planned trail migration by the cloud platform team."], "from": "now-6m", "index": ["logs-aws.cloudtrail-*", "filebeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "AWS CloudTrail Logging Stopped or Trail Deleted", "query": "(event.provider:cloudtrail.amazonaws.com AND (event.action:(StopLogging OR DeleteTrail))) AND (NOT _exists_:aws.cloudtrail.error_code)", "references": ["https://attack.mitre.org/techniques/T1562/008/", "https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_StopLogging.html"], "risk_score": 73, "rule_id": "da86cf4e-2f93-416f-8dbd-3b6116c2f84e", "severity": "high", "tags": ["detection-as-code", "ATT&CK T1562.008"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0005", "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/"}, "technique": [{"id": "T1562", "name": "Impair Defenses", "reference": "https://attack.mitre.org/techniques/T1562/", "subtechnique": [{"id": "T1562.008", "name": "Disable or Modify Cloud Logs", "reference": "https://attack.mitre.org/techniques/T1562/008/"}]}]}], "type": "query", "version": 1} {"author": ["Dave"], "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.", "enabled": false, "false_positives": ["The few tasks that genuinely require root (closing the account, changing support plan); expect them to be announced."], "from": "now-6m", "index": ["logs-aws.cloudtrail-*", "filebeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "AWS Root Account Console Login", "query": "event.action:ConsoleLogin AND aws.cloudtrail.user_identity.type:Root AND aws.cloudtrail.flattened.response_elements.ConsoleLogin:Success", "references": ["https://attack.mitre.org/techniques/T1078/004/", "https://docs.aws.amazon.com/IAM/latest/UserGuide/root-user-best-practices.html"], "risk_score": 73, "rule_id": "64d77121-1019-4887-a803-54b3d56cd1f3", "severity": "high", "tags": ["detection-as-code", "ATT&CK T1078.004"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0001", "name": "Initial Access", "reference": "https://attack.mitre.org/tactics/TA0001/"}, "technique": [{"id": "T1078", "name": "Valid Accounts", "reference": "https://attack.mitre.org/techniques/T1078/", "subtechnique": [{"id": "T1078.004", "name": "Cloud Accounts", "reference": "https://attack.mitre.org/techniques/T1078/004/"}]}]}, {"framework": "MITRE ATT&CK", "tactic": {"id": "TA0005", "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/"}, "technique": [{"id": "T1078", "name": "Valid Accounts", "reference": "https://attack.mitre.org/techniques/T1078/", "subtechnique": [{"id": "T1078.004", "name": "Cloud Accounts", "reference": "https://attack.mitre.org/techniques/T1078/004/"}]}]}, {"framework": "MITRE ATT&CK", "tactic": {"id": "TA0003", "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/"}, "technique": [{"id": "T1078", "name": "Valid Accounts", "reference": "https://attack.mitre.org/techniques/T1078/", "subtechnique": [{"id": "T1078.004", "name": "Cloud Accounts", "reference": "https://attack.mitre.org/techniques/T1078/004/"}]}]}, {"framework": "MITRE ATT&CK", "tactic": {"id": "TA0004", "name": "Privilege Escalation", "reference": "https://attack.mitre.org/tactics/TA0004/"}, "technique": [{"id": "T1078", "name": "Valid Accounts", "reference": "https://attack.mitre.org/techniques/T1078/", "subtechnique": [{"id": "T1078.004", "name": "Cloud Accounts", "reference": "https://attack.mitre.org/techniques/T1078/004/"}]}]}], "type": "query", "version": 1} {"author": ["Dave"], "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.", "enabled": false, "false_positives": ["Users adding their own keys with an editor or ssh-copy-id; consider lowering severity for non-root home directories."], "from": "now-6m", "index": ["logs-endpoint.events.file-*", "auditbeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "SSH Authorized Keys File Modified", "query": "(file.path:(*\\/.ssh\\/authorized_keys OR *\\/.ssh\\/authorized_keys2)) AND (NOT (process.executable:(*\\/cloud\\-init OR *\\/google_guest_agent OR *\\/waagent)))", "references": ["https://attack.mitre.org/techniques/T1098/004/"], "risk_score": 47, "rule_id": "5262f814-c8b6-4816-acad-e968396c6de9", "severity": "medium", "tags": ["detection-as-code", "ATT&CK T1098.004"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0003", "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/"}, "technique": [{"id": "T1098", "name": "Account Manipulation", "reference": "https://attack.mitre.org/techniques/T1098/", "subtechnique": [{"id": "T1098.004", "name": "SSH Authorized Keys", "reference": "https://attack.mitre.org/techniques/T1098/004/"}]}]}, {"framework": "MITRE ATT&CK", "tactic": {"id": "TA0004", "name": "Privilege Escalation", "reference": "https://attack.mitre.org/tactics/TA0004/"}, "technique": [{"id": "T1098", "name": "Account Manipulation", "reference": "https://attack.mitre.org/techniques/T1098/", "subtechnique": [{"id": "T1098.004", "name": "SSH Authorized Keys", "reference": "https://attack.mitre.org/techniques/T1098/004/"}]}]}], "type": "query", "version": 1} {"author": ["Dave"], "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.", "enabled": false, "false_positives": ["Configuration management bootstrap scripts; they normally run from a known parent such as cloud-init."], "from": "now-6m", "index": ["logs-endpoint.events.process-*", "auditbeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "Cron Job Installed That Downloads or Decodes a Payload", "query": "process.command_line:*crontab* AND (process.command_line:(*curl\\ * OR *wget\\ * OR *\\/dev\\/tcp\\/* OR *base64\\ \\-d* OR *base64\\ \\-\\-decode*))", "references": ["https://attack.mitre.org/techniques/T1053/003/"], "risk_score": 73, "rule_id": "9bb620c0-5a79-4530-bb5c-fb6e5f963d5f", "severity": "high", "tags": ["detection-as-code", "ATT&CK T1053.003"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0002", "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/"}, "technique": [{"id": "T1053", "name": "Scheduled Task/Job", "reference": "https://attack.mitre.org/techniques/T1053/", "subtechnique": [{"id": "T1053.003", "name": "Cron", "reference": "https://attack.mitre.org/techniques/T1053/003/"}]}]}, {"framework": "MITRE ATT&CK", "tactic": {"id": "TA0003", "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/"}, "technique": [{"id": "T1053", "name": "Scheduled Task/Job", "reference": "https://attack.mitre.org/techniques/T1053/", "subtechnique": [{"id": "T1053.003", "name": "Cron", "reference": "https://attack.mitre.org/techniques/T1053/003/"}]}]}, {"framework": "MITRE ATT&CK", "tactic": {"id": "TA0004", "name": "Privilege Escalation", "reference": "https://attack.mitre.org/tactics/TA0004/"}, "technique": [{"id": "T1053", "name": "Scheduled Task/Job", "reference": "https://attack.mitre.org/techniques/T1053/", "subtechnique": [{"id": "T1053.003", "name": "Cron", "reference": "https://attack.mitre.org/techniques/T1053/003/"}]}]}], "type": "query", "version": 1} {"author": ["Dave"], "description": "Detects common reverse shell one-liners - bash redirection to /dev/tcp or /dev/udp, and netcat binding a shell with -e/-c.", "enabled": false, "false_positives": ["Health-check scripts that probe ports with bash /dev/tcp (they rarely redirect stdin and stdout to it)."], "from": "now-6m", "index": ["logs-endpoint.events.process-*", "auditbeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "Reverse Shell Command Line on Linux", "query": "(process.command_line:(*\\/dev\\/tcp\\/* OR *\\/dev\\/udp\\/*)) OR ((process.executable:(*\\/nc OR *\\/ncat OR *\\/netcat OR *\\/nc.traditional)) AND (process.command_line:(*\\ \\-e\\ \\/bin\\/sh* OR *\\ \\-e\\ \\/bin\\/bash* OR *\\ \\-c\\ \\/bin\\/sh* OR *\\ \\-c\\ \\/bin\\/bash* OR *\\ \\-e\\ sh* OR *\\ \\-e\\ bash*)))", "references": ["https://attack.mitre.org/techniques/T1059/004/"], "risk_score": 73, "rule_id": "95c33114-d86b-46a0-991c-a88c190dcb4c", "severity": "high", "tags": ["detection-as-code", "ATT&CK T1059.004"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0002", "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/"}, "technique": [{"id": "T1059", "name": "Command and Scripting Interpreter", "reference": "https://attack.mitre.org/techniques/T1059/", "subtechnique": [{"id": "T1059.004", "name": "Unix Shell", "reference": "https://attack.mitre.org/techniques/T1059/004/"}]}]}], "type": "query", "version": 1} {"author": ["Dave"], "description": "Detects directory traversal sequences (plain or URL-encoded) and requests for well-known sensitive files in the URI of web server access logs.", "enabled": false, "false_positives": ["Vulnerability scanners run by the security team; exclude their source addresses."], "from": "now-6m", "index": ["logs-nginx.access-*", "logs-apache.access-*", "logs-iis.access-*", "filebeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "Path Traversal or Local File Inclusion Attempt in a Web Request", "query": "(url.query:(*..\\/* OR *..\\\\* OR *..%2f* OR *..%5c* OR *%2e%2e%2f* OR *%2e%2e\\/* OR *..%252f*)) OR (url.query:(*\\/etc\\/passwd* OR *\\/etc\\/shadow* OR *\\/proc\\/self\\/environ* OR *win.ini* OR *boot.ini*))", "references": ["https://attack.mitre.org/techniques/T1190/", "https://owasp.org/www-community/attacks/Path_Traversal"], "risk_score": 47, "rule_id": "ffe90572-ec84-4176-8163-cc83448eb75b", "severity": "medium", "tags": ["detection-as-code", "ATT&CK T1190"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0001", "name": "Initial Access", "reference": "https://attack.mitre.org/tactics/TA0001/"}, "technique": [{"id": "T1190", "name": "Exploit Public-Facing Application", "reference": "https://attack.mitre.org/techniques/T1190/", "subtechnique": []}]}], "type": "query", "version": 1} {"author": ["Dave"], "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.", "enabled": false, "false_positives": ["Internal admin tools that legitimately expose a command parameter (they should not be internet-facing)."], "from": "now-6m", "index": ["logs-nginx.access-*", "logs-apache.access-*", "logs-iis.access-*", "filebeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "Web Shell Command Execution via Query Parameter", "query": "(url.path:(*.php OR *.jsp OR *.jspx OR *.asp OR *.aspx OR *.ashx)) AND url.query:/.*(cmd|exec|command|execute|run)=(whoami|id|uname|ipconfig|ifconfig|hostname).*/", "references": ["https://attack.mitre.org/techniques/T1505/003/"], "risk_score": 73, "rule_id": "179db1ef-ef21-49ba-aaf1-bd537fd20abc", "severity": "high", "tags": ["detection-as-code", "ATT&CK T1505.003"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0003", "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/"}, "technique": [{"id": "T1505", "name": "Server Software Component", "reference": "https://attack.mitre.org/techniques/T1505/", "subtechnique": [{"id": "T1505.003", "name": "Web Shell", "reference": "https://attack.mitre.org/techniques/T1505/003/"}]}]}], "type": "query", "version": 1} {"author": ["Dave"], "description": "Detects event 1102 (the audit log was cleared). Attackers clear the Security log to remove evidence of logons and privilege use.", "enabled": false, "false_positives": ["Planned log rotation on hosts without forwarding (should be rare and announced)."], "from": "now-6m", "index": ["logs-system.security-*", "winlogbeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "Security Event Log Cleared", "query": "winlog.channel:Security AND (event.code:1102 AND winlog.provider_name:Microsoft\\-Windows\\-Eventlog)", "references": ["https://attack.mitre.org/techniques/T1070/001/", "https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-1102"], "risk_score": 73, "rule_id": "eb402ed1-9e53-4fde-a2f1-82fe783bddea", "severity": "high", "tags": ["detection-as-code", "ATT&CK T1070.001"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0005", "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/"}, "technique": [{"id": "T1070", "name": "Indicator Removal", "reference": "https://attack.mitre.org/techniques/T1070/", "subtechnique": [{"id": "T1070.001", "name": "Clear Windows Event Logs", "reference": "https://attack.mitre.org/techniques/T1070/001/"}]}]}], "type": "query", "version": 1} {"author": ["Dave"], "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.", "enabled": false, "false_positives": ["Legacy applications or appliances that only support RC4; inventory them and exclude by IpAddress."], "from": "now-6m", "index": ["logs-system.security-*", "winlogbeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "Kerberos Service Ticket Requested With RC4 Encryption", "query": "winlog.channel:Security AND ((event.code:4769 AND winlog.event_data.TicketEncryptionType:0x17 AND winlog.event_data.Status:0x0) AND (NOT (service.name:(*$ OR krbtgt))))", "references": ["https://attack.mitre.org/techniques/T1558/003/", "https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4769"], "risk_score": 47, "rule_id": "1919ec4f-a56d-437c-b6de-adbdaec8c7eb", "severity": "medium", "tags": ["detection-as-code", "ATT&CK T1558.003"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0006", "name": "Credential Access", "reference": "https://attack.mitre.org/tactics/TA0006/"}, "technique": [{"id": "T1558", "name": "Steal or Forge Kerberos Tickets", "reference": "https://attack.mitre.org/techniques/T1558/", "subtechnique": [{"id": "T1558.003", "name": "Kerberoasting", "reference": "https://attack.mitre.org/techniques/T1558/003/"}]}]}], "type": "query", "version": 1} {"author": ["Dave"], "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.", "enabled": false, "false_positives": ["Help desk granting temporary admin rights; correlate with a change ticket."], "from": "now-6m", "index": ["logs-system.security-*", "winlogbeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "Account Added to the Local Administrators Group", "query": "winlog.channel:Security AND ((event.code:4732 AND winlog.event_data.TargetSid:S\\-1\\-5\\-32\\-544) AND (NOT user.name:*$))", "references": ["https://attack.mitre.org/techniques/T1098/", "https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4732"], "risk_score": 47, "rule_id": "1e50b0b6-9f18-4058-bb22-c3ffc59f7c18", "severity": "medium", "tags": ["detection-as-code", "ATT&CK T1098"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0003", "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/"}, "technique": [{"id": "T1098", "name": "Account Manipulation", "reference": "https://attack.mitre.org/techniques/T1098/", "subtechnique": []}]}, {"framework": "MITRE ATT&CK", "tactic": {"id": "TA0004", "name": "Privilege Escalation", "reference": "https://attack.mitre.org/tactics/TA0004/"}, "technique": [{"id": "T1098", "name": "Account Manipulation", "reference": "https://attack.mitre.org/techniques/T1098/", "subtechnique": []}]}], "type": "query", "version": 1} {"author": ["Dave"], "description": "Detects certutil.exe fetching a remote URL with -urlcache or -verifyctl, a classic living-off-the-land download technique.", "enabled": false, "false_positives": ["Administrators troubleshooting certificate revocation list retrieval."], "from": "now-6m", "index": ["logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*", "winlogbeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "Certutil Used to Download a File", "query": "(process.executable.caseless:*\\\\certutil.exe OR process.pe.original_file_name:CertUtil.exe) AND (process.command_line:(*\\-urlcache\\ * OR *\\/urlcache\\ * OR *\u2013urlcache\\ * OR *\u2014urlcache\\ * OR *\u2015urlcache\\ *) OR process.command_line:(*\\-verifyctl\\ * OR *\\/verifyctl\\ * OR *\u2013verifyctl\\ * OR *\u2014verifyctl\\ * OR *\u2015verifyctl\\ *)) AND (process.command_line:(*http\\:\\/\\/* OR *https\\:\\/\\/* OR *ftp\\:\\/\\/*))", "references": ["https://attack.mitre.org/techniques/T1105/", "https://lolbas-project.github.io/lolbas/Binaries/Certutil/"], "risk_score": 73, "rule_id": "f1ca80c3-ee2e-4167-8245-ade13c81c910", "severity": "high", "tags": ["detection-as-code", "ATT&CK T1105"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0011", "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/"}, "technique": [{"id": "T1105", "name": "Ingress Tool Transfer", "reference": "https://attack.mitre.org/techniques/T1105/", "subtechnique": []}]}], "type": "query", "version": 1} {"author": ["Dave"], "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.", "enabled": false, "false_positives": ["Unlikely"], "from": "now-6m", "index": ["logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*", "winlogbeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "LSASS Memory Dumped With comsvcs.dll MiniDump", "query": "(process.executable.caseless:*\\\\rundll32.exe OR process.pe.original_file_name:RUNDLL32.EXE) AND process.command_line:*comsvcs* AND (process.command_line:(*minidump* OR *#24* OR *#\\+24*))", "references": ["https://attack.mitre.org/techniques/T1003/001/", "https://lolbas-project.github.io/lolbas/Libraries/comsvcs/"], "risk_score": 99, "rule_id": "7b0cee57-e8b6-4137-b20a-4c86f3c40a61", "severity": "critical", "tags": ["detection-as-code", "ATT&CK T1003.001"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0006", "name": "Credential Access", "reference": "https://attack.mitre.org/tactics/TA0006/"}, "technique": [{"id": "T1003", "name": "OS Credential Dumping", "reference": "https://attack.mitre.org/techniques/T1003/", "subtechnique": [{"id": "T1003.001", "name": "LSASS Memory", "reference": "https://attack.mitre.org/techniques/T1003/001/"}]}]}], "type": "query", "version": 1} {"author": ["Dave"], "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.", "enabled": false, "false_positives": ["Some management agents (SCCM, RMM tools) pass encoded commands; tune with a ParentImage filter."], "from": "now-6m", "index": ["logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*", "winlogbeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "PowerShell Launched With an Encoded Command", "query": "((process.executable.caseless:(*\\\\powershell.exe OR *\\\\pwsh.exe)) OR (process.pe.original_file_name:(PowerShell.EXE OR pwsh.dll))) AND (process.command_line:(*\\ \\-e\\ * OR *\\ \\/e\\ * OR *\\ \u2013e\\ * OR *\\ \u2014e\\ * OR *\\ \u2015e\\ *) OR process.command_line:(*\\ \\-en\\ * OR *\\ \\/en\\ * OR *\\ \u2013en\\ * OR *\\ \u2014en\\ * OR *\\ \u2015en\\ *) OR process.command_line:(*\\ \\-enc\\ * OR *\\ \\/enc\\ * OR *\\ \u2013enc\\ * OR *\\ \u2014enc\\ * OR *\\ \u2015enc\\ *) OR process.command_line:(*\\ \\-enco\\ * OR *\\ \\/enco\\ * OR *\\ \u2013enco\\ * OR *\\ \u2014enco\\ * OR *\\ \u2015enco\\ *) OR process.command_line:(*\\ \\-ec\\ * OR *\\ \\/ec\\ * OR *\\ \u2013ec\\ * OR *\\ \u2014ec\\ * OR *\\ \u2015ec\\ *) OR process.command_line:(*\\ \\-encodedcommand\\ * OR *\\ \\/encodedcommand\\ * OR *\\ \u2013encodedcommand\\ * OR *\\ \u2014encodedcommand\\ * OR *\\ \u2015encodedcommand\\ *))", "references": ["https://attack.mitre.org/techniques/T1059/001/", "https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_powershell_exe"], "risk_score": 47, "rule_id": "fe5675ae-2a88-4ae8-a66d-d6ea9a44fbf3", "severity": "medium", "tags": ["detection-as-code", "ATT&CK T1027", "ATT&CK T1059.001"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0002", "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/"}, "technique": [{"id": "T1059", "name": "Command and Scripting Interpreter", "reference": "https://attack.mitre.org/techniques/T1059/", "subtechnique": [{"id": "T1059.001", "name": "PowerShell", "reference": "https://attack.mitre.org/techniques/T1059/001/"}]}]}, {"framework": "MITRE ATT&CK", "tactic": {"id": "TA0005", "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/"}, "technique": [{"id": "T1027", "name": "Obfuscated Files or Information", "reference": "https://attack.mitre.org/techniques/T1027/", "subtechnique": []}]}], "type": "query", "version": 1} {"author": ["Dave"], "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.", "enabled": false, "false_positives": ["Unlikely"], "from": "now-6m", "index": ["logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*", "winlogbeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "Regsvr32 Loading a Remote or Scriptlet COM Object", "query": "(process.executable.caseless:*\\\\regsvr32.exe OR process.pe.original_file_name:REGSVR32.EXE) AND process.command_line:(*\\-i\\:* OR *\\/i\\:* OR *\u2013i\\:* OR *\u2014i\\:* OR *\u2015i\\:*) AND (process.command_line:(*http\\:\\/\\/* OR *https\\:\\/\\/* OR *scrobj.dll*))", "references": ["https://attack.mitre.org/techniques/T1218/010/", "https://lolbas-project.github.io/lolbas/Binaries/Regsvr32/"], "risk_score": 73, "rule_id": "16c8ef39-51aa-47c1-a998-a4958e47c26e", "severity": "high", "tags": ["detection-as-code", "ATT&CK T1218.010"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0005", "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/"}, "technique": [{"id": "T1218", "name": "System Binary Proxy Execution", "reference": "https://attack.mitre.org/techniques/T1218/", "subtechnique": [{"id": "T1218.010", "name": "Regsvr32", "reference": "https://attack.mitre.org/techniques/T1218/010/"}]}]}], "type": "query", "version": 1} {"author": ["Dave"], "description": "Detects schtasks /create where the task action points into Temp, Public, ProgramData or AppData, a common persistence pattern for droppers.", "enabled": false, "false_positives": ["Installers that stage a helper task in ProgramData; add their parent image to the filter."], "from": "now-6m", "index": ["logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*", "winlogbeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "Scheduled Task Created to Run From a User-Writable Folder", "query": "(process.executable.caseless:*\\\\schtasks.exe AND process.command_line:(*\\-create\\ * OR *\\/create\\ * OR *\u2013create\\ * OR *\u2014create\\ * OR *\u2015create\\ *) AND (process.command_line:(*\\\\AppData\\\\Local\\\\Temp\\\\* OR *\\\\AppData\\\\Roaming\\\\* OR *\\\\Users\\\\Public\\\\* OR *\\\\ProgramData\\\\* OR *%TEMP%* OR *%APPDATA%* OR *%PUBLIC%*))) AND (NOT (process.parent.executable.caseless:(C\\:\\\\Windows\\\\System32\\\\* OR C\\:\\\\Program\\ Files\\\\* OR C\\:\\\\Program\\ Files\\ \\(x86\\)\\\\*)))", "references": ["https://attack.mitre.org/techniques/T1053/005/"], "risk_score": 47, "rule_id": "bd8f2b9f-c6c3-46ad-b68b-cc4c5ae289d9", "severity": "medium", "tags": ["detection-as-code", "ATT&CK T1053.005"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0002", "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/"}, "technique": [{"id": "T1053", "name": "Scheduled Task/Job", "reference": "https://attack.mitre.org/techniques/T1053/", "subtechnique": [{"id": "T1053.005", "name": "Scheduled Task", "reference": "https://attack.mitre.org/techniques/T1053/005/"}]}]}, {"framework": "MITRE ATT&CK", "tactic": {"id": "TA0003", "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/"}, "technique": [{"id": "T1053", "name": "Scheduled Task/Job", "reference": "https://attack.mitre.org/techniques/T1053/", "subtechnique": [{"id": "T1053.005", "name": "Scheduled Task", "reference": "https://attack.mitre.org/techniques/T1053/005/"}]}]}, {"framework": "MITRE ATT&CK", "tactic": {"id": "TA0004", "name": "Privilege Escalation", "reference": "https://attack.mitre.org/tactics/TA0004/"}, "technique": [{"id": "T1053", "name": "Scheduled Task/Job", "reference": "https://attack.mitre.org/techniques/T1053/", "subtechnique": [{"id": "T1053.005", "name": "Scheduled Task", "reference": "https://attack.mitre.org/techniques/T1053/005/"}]}]}], "type": "query", "version": 1} {"author": ["Dave"], "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.", "enabled": false, "false_positives": ["Backup software rotating its own snapshots (usually through the VSS API rather than these tools)."], "from": "now-6m", "index": ["logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*", "winlogbeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "Volume Shadow Copies or Backup Catalog Deleted", "query": "(process.executable.caseless:*\\\\vssadmin.exe AND (process.command_line:*delete* AND process.command_line:*shadows*)) OR (process.executable.caseless:*\\\\wmic.exe AND (process.command_line:*shadowcopy* AND process.command_line:*delete*)) OR (process.executable.caseless:*\\\\wbadmin.exe AND (process.command_line:*delete* AND process.command_line:*catalog*))", "references": ["https://attack.mitre.org/techniques/T1490/"], "risk_score": 73, "rule_id": "d64da330-1afb-40a3-a9a2-d40a4b5ff0f5", "severity": "high", "tags": ["detection-as-code", "ATT&CK T1490"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0040", "name": "Impact", "reference": "https://attack.mitre.org/tactics/TA0040/"}, "technique": [{"id": "T1490", "name": "Inhibit System Recovery", "reference": "https://attack.mitre.org/techniques/T1490/", "subtechnique": []}]}], "type": "query", "version": 1} {"author": ["Dave"], "description": "Detects wmic.exe starting a process on another host (/node: process call create), a lateral execution technique that needs no extra tooling.", "enabled": false, "false_positives": ["Software deployment scripts that still use WMIC; most have moved to PowerShell remoting or an agent."], "from": "now-6m", "index": ["logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*", "winlogbeat-*"], "interval": "5m", "language": "lucene", "max_signals": 100, "name": "WMIC Remote Process Creation", "query": "((process.executable.caseless:*\\\\wmic.exe OR process.pe.original_file_name:wmic.exe) AND process.command_line:(*\\-node\\:* OR *\\/node\\:* OR *\u2013node\\:* OR *\u2014node\\:* OR *\u2015node\\:*) AND (process.command_line:*process* AND process.command_line:*call* AND process.command_line:*create*)) AND (NOT (process.command_line:(*\\-node\\:localhost\\ * OR *\\/node\\:localhost\\ * OR *\u2013node\\:localhost\\ * OR *\u2014node\\:localhost\\ * OR *\u2015node\\:localhost\\ *) OR process.command_line:(*\\-node\\:127.0.0.1\\ * OR *\\/node\\:127.0.0.1\\ * OR *\u2013node\\:127.0.0.1\\ * OR *\u2014node\\:127.0.0.1\\ * OR *\u2015node\\:127.0.0.1\\ *) OR process.command_line:(*\\-node\\:\\\"localhost\\\"* OR *\\/node\\:\\\"localhost\\\"* OR *\u2013node\\:\\\"localhost\\\"* OR *\u2014node\\:\\\"localhost\\\"* OR *\u2015node\\:\\\"localhost\\\"*)))", "references": ["https://attack.mitre.org/techniques/T1047/"], "risk_score": 47, "rule_id": "9ea64786-ad5a-41a5-86f8-da28530ca023", "severity": "medium", "tags": ["detection-as-code", "ATT&CK T1047"], "threat": [{"framework": "MITRE ATT&CK", "tactic": {"id": "TA0002", "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/"}, "technique": [{"id": "T1047", "name": "Windows Management Instrumentation", "reference": "https://attack.mitre.org/techniques/T1047/", "subtechnique": []}]}], "type": "query", "version": 1}