Adding for review
This commit is contained in:
Родитель
1058723022
Коммит
3917c01be5
|
@ -1,43 +1,50 @@
|
||||||
id: 38cc38c3-bd6c-470e-ae1a-3136a9ded97f
|
id: 38cc38c3-bd6c-470e-ae1a-3136a9ded97f
|
||||||
name: Possible exploitation of Apache log4j component detected
|
name: Possible exploitation of Apache log4j component detected
|
||||||
description: |
|
description: |
|
||||||
'This hunting query looks for possible attempts to exploit a remote code execution vulnerability in the Log4j component of Apache.
|
'This hunting query looks for possible attempts to exploit a remote code execution vulnerability in the Log4j component of Apache.
|
||||||
Attackers may attempt to launch arbitrary code by passing specific commands to a server, which are then logged and executed by the Log4j component.
|
Attackers may attempt to launch arbitrary code by passing specific commands to a server, which are then logged and executed by the Log4j component.
|
||||||
For more details on Apache Log4j Remote Code Execution Vulnerability - https://community.riskiq.com/article/505098fc/description
|
For more details on Apache Log4j Remote Code Execution Vulnerability - https://community.riskiq.com/article/505098fc/description
|
||||||
Find more details on collecting EXECVE data into Microsoft Sentinel - https://techcommunity.microsoft.com/t5/azure-sentinel/hunting-threats-on-linux-with-azure-sentinel/ba-p/1344431'
|
Find more details on collecting EXECVE data into Microsoft Sentinel - https://techcommunity.microsoft.com/t5/azure-sentinel/hunting-threats-on-linux-with-azure-sentinel/ba-p/1344431'
|
||||||
requiredDataConnectors:
|
requiredDataConnectors:
|
||||||
- connectorId: Syslog
|
- connectorId: Syslog
|
||||||
dataTypes:
|
dataTypes:
|
||||||
- Syslog
|
- Syslog
|
||||||
tactics:
|
tactics:
|
||||||
- Persistence
|
- Persistence
|
||||||
- Execution
|
- Execution
|
||||||
relevantTechniques:
|
relevantTechniques:
|
||||||
- T1059
|
- T1059
|
||||||
- T1053
|
- T1053
|
||||||
tags:
|
tags:
|
||||||
- CVE-2021-44228
|
- CVE-2021-44228
|
||||||
query: |
|
query: |
|
||||||
Syslog
|
let log4j_execve=()
|
||||||
| where Facility == 'user'
|
{
|
||||||
| where SyslogMessage has "AUOMS_EXECVE"
|
Syslog
|
||||||
| where SyslogMessage has 'jndi' and SyslogMessage has_any ('ldap', 'dns', 'rmi', 'corba', 'iiop', 'nis', 'nds')
|
| where SyslogMessage has "AUOMS_EXECVE"
|
||||||
| parse SyslogMessage with "type=" EventType " audit(" * "): " EventData
|
| where SyslogMessage has 'jndi' and SyslogMessage has_any ('ldap', 'dns', 'rmi', 'corba', 'iiop', 'nis', 'nds')
|
||||||
| where EventType =~ "AUOMS_EXECVE"
|
| parse SyslogMessage with "type=" EventType " audit(" * "): " EventData
|
||||||
| project TimeGenerated, EventType, Computer, EventData
|
| where EventType =~ "AUOMS_EXECVE"
|
||||||
| parse EventData with * "syscall=" syscall " syscall_r=" * " success=" success " exit=" exit " a0" * " ppid=" ppid " pid=" pid " audit_user=" audit_user " auid=" auid " user=" user " uid=" uid " group=" group " gid=" gid "effective_user=" effective_user " euid=" euid " set_user=" set_user " suid=" suid " filesystem_user=" filesystem_user " fsuid=" fsuid " effective_group=" effective_group " egid=" egid " set_group=" set_group " sgid=" sgid " filesystem_group=" filesystem_group " fsgid=" fsgid " tty=" tty " ses=" ses " comm=\"" comm "\" exe=\"" exe "\"" * "cwd=\"" cwd "\"" * "name=\"" name "\"" * "cmdline=\"" cmdline "\" containerid=" containerid
|
| project TimeGenerated, EventType, Computer, EventData
|
||||||
| where comm has_any ("wget","curl")
|
| extend EventData = trim_end('containerid=',EventData)
|
||||||
| where cmdline has_any ("${jndi:ldap","${jndi:dns","${jndi:rmi","${jndi:corba","${jndi:iiop","${jndi:nis", "${jndi:nds")
|
| parse kind=regex EventData with * "success=" success " exit=" * "ppid=" ppid "pid=" pid
|
||||||
| project TimeGenerated, Computer, audit_user, user, cmdline
|
"audit_user=" audit_user "auid=" * "user=" user " uid=" uid " group=" * "comm=\"" comm "\" exe=\"" exe
|
||||||
| extend AccountCustomEntity = user, HostCustomEntity = Computer, timestamp = TimeGenerated
|
"\"" * "cwd=\"" cwd "\" name=\"" name "\" (inode|nametype)=" * "(proctitle|cmdline)=" cmdline
|
||||||
| sort by TimeGenerated desc
|
| extend cmdline = trim_end('redactors=.*',cmdline)
|
||||||
entityMappings:
|
};
|
||||||
- entityType: Host
|
log4j_execve
|
||||||
fieldMappings:
|
| where comm has_any ("wget","curl")
|
||||||
- identifier: FullName
|
| where cmdline has_any ("${jndi:ldap","${jndi:dns","${jndi:rmi","${jndi:corba","${jndi:iiop","${jndi:nis", "${jndi:nds")
|
||||||
columnName: HostCustomEntity
|
| project TimeGenerated, Computer, audit_user, user, cmdline
|
||||||
- entityType: Account
|
| extend AccountCustomEntity = user, HostCustomEntity = Computer, timestamp = TimeGenerated
|
||||||
fieldMappings:
|
| sort by TimeGenerated desc
|
||||||
- identifier: FullName
|
entityMappings:
|
||||||
columnName: AccountCustomEntity
|
- entityType: Host
|
||||||
version: 1.0.0
|
fieldMappings:
|
||||||
|
- identifier: FullName
|
||||||
|
columnName: HostCustomEntity
|
||||||
|
- entityType: Account
|
||||||
|
fieldMappings:
|
||||||
|
- identifier: FullName
|
||||||
|
columnName: AccountCustomEntity
|
||||||
|
version: 1.0.1
|
||||||
|
|
Загрузка…
Ссылка в новой задаче