diff --git a/rules/sigma/windows/builtin/win_aadhealth_mon_agent_regkey_access.yml b/rules/sigma/windows/builtin/win_aadhealth_mon_agent_regkey_access.yml new file mode 100644 index 00000000..b578ca24 --- /dev/null +++ b/rules/sigma/windows/builtin/win_aadhealth_mon_agent_regkey_access.yml @@ -0,0 +1,38 @@ +title: Azure AD Health Monitoring Agent Registry Keys Access +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research), MSTIC +date: 2021/08/26 +description: | + This detection uses Windows security events to detect suspicious access attempts to the registry key of Azure AD Health monitoring agent. + This detection requires an access control entry (ACE) on the system access control list (SACL) of the following securable object HKLM\SOFTWARE\Microsoft\Microsoft Online\Reporting\MonitoringAgent. +detection: + SELECTION_1: + EventID: 4656 + SELECTION_2: + EventID: 4663 + SELECTION_3: + ObjectType: Key + SELECTION_4: + ObjectName: \REGISTRY\MACHINE\SOFTWARE\Microsoft\Microsoft Online\Reporting\MonitoringAgent + SELECTION_5: + ProcessName: + - '*Microsoft.Identity.Health.Adfs.DiagnosticsAgent.exe*' + - '*Microsoft.Identity.Health.Adfs.InsightsService.exe*' + - '*Microsoft.Identity.Health.Adfs.MonitoringAgent.Startup.exe*' + - '*Microsoft.Identity.Health.Adfs.PshSurrogate.exe*' + - '*Microsoft.Identity.Health.Common.Clients.ResourceMonitor.exe*' + condition: (((SELECTION_1 or SELECTION_2) and SELECTION_3 and SELECTION_4) and not + (SELECTION_5)) +falsepositives: +- Unknown +id: ff151c33-45fa-475d-af4f-c2f93571f4fe +level: medium +logsource: + product: windows + service: security +references: +- https://o365blog.com/post/hybridhealthagent/ +- https://github.com/OTRF/Set-AuditRule/blob/master/rules/registry/aad_connect_health_monitoring_agent.yml +status: experimental +tags: +- attack.discovery +- attack.t1012 diff --git a/rules/sigma/windows/builtin/win_aadhealth_svc_agent_regkey_access.yml b/rules/sigma/windows/builtin/win_aadhealth_svc_agent_regkey_access.yml new file mode 100644 index 00000000..fc58977e --- /dev/null +++ b/rules/sigma/windows/builtin/win_aadhealth_svc_agent_regkey_access.yml @@ -0,0 +1,41 @@ + +title: Azure AD Health Service Agents Registry Keys Access +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research), MSTIC +date: 2021/08/26 +description: | + This detection uses Windows security events to detect suspicious access attempts to the registry key values and sub-keys of Azure AD Health service agents (e.g AD FS). + Information from AD Health service agents can be used to potentially abuse some of the features provided by those services in the cloud (e.g. Federation). + This detection requires an access control entry (ACE) on the system access control list (SACL) of the following securable object: HKLM:\SOFTWARE\Microsoft\ADHealthAgent. + Make sure you set the SACL to propagate to its sub-keys. +detection: + SELECTION_1: + EventID: 4656 + SELECTION_2: + EventID: 4663 + SELECTION_3: + ObjectType: Key + SELECTION_4: + ObjectName: \REGISTRY\MACHINE\SOFTWARE\Microsoft\ADHealthAgent + SELECTION_5: + ProcessName: + - '*Microsoft.Identity.Health.Adfs.DiagnosticsAgent.exe*' + - '*Microsoft.Identity.Health.Adfs.InsightsService.exe*' + - '*Microsoft.Identity.Health.Adfs.MonitoringAgent.Startup.exe*' + - '*Microsoft.Identity.Health.Adfs.PshSurrogate.exe*' + - '*Microsoft.Identity.Health.Common.Clients.ResourceMonitor.exe*' + condition: (((SELECTION_1 or SELECTION_2) and SELECTION_3 and SELECTION_4) and not + (SELECTION_5)) +falsepositives: +- Unknown +id: 1d2ab8ac-1a01-423b-9c39-001510eae8e8 +level: medium +logsource: + product: windows + service: security +references: +- https://o365blog.com/post/hybridhealthagent/ +- https://github.com/OTRF/Set-AuditRule/blob/master/rules/registry/aad_connect_health_service_agent.yml +status: experimental +tags: +- attack.discovery +- attack.t1012 diff --git a/rules/sigma/windows/builtin/win_account_backdoor_dcsync_rights.yml b/rules/sigma/windows/builtin/win_account_backdoor_dcsync_rights.yml new file mode 100644 index 00000000..14368dbb --- /dev/null +++ b/rules/sigma/windows/builtin/win_account_backdoor_dcsync_rights.yml @@ -0,0 +1,34 @@ + +title: Powerview Add-DomainObjectAcl DCSync AD Extend Right +author: Samir Bousseaden; Roberto Rodriguez @Cyb3rWard0g; oscd.community +date: 2019/04/03 +description: backdooring domain object to grant the rights associated with DCSync + to a regular user or machine account using Powerview\Add-DomainObjectAcl DCSync + Extended Right cmdlet, will allow to re-obtain the pwd hashes of any user/computer +detection: + SELECTION_1: + EventID: 5136 + SELECTION_2: + AttributeLDAPDisplayName: ntSecurityDescriptor + SELECTION_3: + AttributeValue: + - '*1131f6ad-9c07-11d1-f79f-00c04fc2dcd2*' + - '*1131f6aa-9c07-11d1-f79f-00c04fc2dcd2*' + - '*89e95b76-444d-4c62-991a-0facbeda640c*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- New Domain Controller computer account, check user SIDs within the value attribute + of event 5136 and verify if it's a regular user or DC computer account. +id: 2c99737c-585d-4431-b61a-c911d86ff32f +level: critical +logsource: + product: windows + service: security +modified: 2021/07/09 +references: +- https://twitter.com/menasec1/status/1111556090137903104 +- https://www.specterops.io/assets/resources/an_ace_up_the_sleeve.pdf +status: experimental +tags: +- attack.persistence +- attack.t1098 diff --git a/rules/sigma/windows/builtin/win_account_discovery.yml b/rules/sigma/windows/builtin/win_account_discovery.yml new file mode 100644 index 00000000..ef8b4bb5 --- /dev/null +++ b/rules/sigma/windows/builtin/win_account_discovery.yml @@ -0,0 +1,43 @@ + +title: AD Privileged Users or Groups Reconnaissance +author: Samir Bousseaden +date: 2019/04/03 +description: Detect priv users or groups recon based on 4661 eventid and known privileged + users or groups SIDs +detection: + SELECTION_1: + EventID: 4661 + SELECTION_2: + ObjectType: + - SAM_USER + - SAM_GROUP + SELECTION_3: + ObjectName: + - '*-512' + - '*-502' + - '*-500' + - '*-505' + - '*-519' + - '*-520' + - '*-544' + - '*-551' + - '*-555' + SELECTION_4: + ObjectName: '*admin*' + condition: ((SELECTION_1 and SELECTION_2) and (SELECTION_3 or SELECTION_4)) +falsepositives: +- if source account name is not an admin then its super suspicious +id: 35ba1d85-724d-42a3-889f-2e2362bcaf23 +level: high +logsource: + definition: 'Requirements: enable Object Access SAM on your Domain Controllers' + product: windows + service: security +modified: 2021/09/08 +references: +- https://blog.menasec.net/2019/02/threat-hunting-5-detecting-enumeration.html +status: experimental +tags: +- attack.discovery +- attack.t1087 +- attack.t1087.002 diff --git a/rules/sigma/windows/builtin/win_ad_object_writedac_access.yml b/rules/sigma/windows/builtin/win_ad_object_writedac_access.yml new file mode 100644 index 00000000..d186b4be --- /dev/null +++ b/rules/sigma/windows/builtin/win_ad_object_writedac_access.yml @@ -0,0 +1,31 @@ + +title: AD Object WriteDAC Access +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/09/12 +description: Detects WRITE_DAC access to a domain object +detection: + SELECTION_1: + EventID: 4662 + SELECTION_2: + ObjectServer: DS + SELECTION_3: + AccessMask: '0x40000' + SELECTION_4: + ObjectType: + - 19195a5b-6da0-11d0-afd3-00c04fd930c9 + - domainDNS + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: 028c7842-4243-41cd-be6f-12f3cf1a26c7 +level: critical +logsource: + product: windows + service: security +references: +- https://threathunterplaybook.com/notebooks/windows/05_defense_evasion/WIN-190101151110.html +status: experimental +tags: +- attack.defense_evasion +- attack.t1222 +- attack.t1222.001 diff --git a/rules/sigma/windows/builtin/win_ad_replication_non_machine_account.yml b/rules/sigma/windows/builtin/win_ad_replication_non_machine_account.yml new file mode 100644 index 00000000..9ba3f9f4 --- /dev/null +++ b/rules/sigma/windows/builtin/win_ad_replication_non_machine_account.yml @@ -0,0 +1,41 @@ + +title: Active Directory Replication from Non Machine Account +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/07/26 +description: Detects potential abuse of Active Directory Replication Service (ADRS) + from a non machine account to request credentials. +detection: + SELECTION_1: + EventID: 4662 + SELECTION_2: + AccessMask: '0x100' + SELECTION_3: + Properties: + - '*1131f6aa-9c07-11d1-f79f-00c04fc2dcd2*' + - '*1131f6ad-9c07-11d1-f79f-00c04fc2dcd2*' + - '*89e95b76-444d-4c62-991a-0facbeda640c*' + SELECTION_4: + SubjectUserName: '*$' + SELECTION_5: + SubjectUserName: MSOL_* + condition: ((SELECTION_1 and SELECTION_2 and SELECTION_3) and not (SELECTION_4 + or SELECTION_5)) +falsepositives: +- Unknown +fields: +- ComputerName +- SubjectDomainName +- SubjectUserName +id: 17d619c1-e020-4347-957e-1d1207455c93 +level: critical +logsource: + product: windows + service: security +modified: 2020/08/23 +references: +- https://threathunterplaybook.com/notebooks/windows/06_credential_access/WIN-180815210510.html +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.006 diff --git a/rules/sigma/windows/builtin/win_ad_user_enumeration.yml b/rules/sigma/windows/builtin/win_ad_user_enumeration.yml new file mode 100644 index 00000000..e294af0b --- /dev/null +++ b/rules/sigma/windows/builtin/win_ad_user_enumeration.yml @@ -0,0 +1,34 @@ + +title: AD User Enumeration +author: Maxime Thiebaut (@0xThiebaut) +date: 2020/03/30 +description: Detects access to a domain user from a non-machine account +detection: + SELECTION_1: + EventID: 4662 + SELECTION_2: + ObjectType: '*bf967aba-0de6-11d0-a285-00aa003049e2*' + SELECTION_3: + SubjectUserName: '*$' + SELECTION_4: + SubjectUserName: MSOL_* + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3 or SELECTION_4)) +falsepositives: +- Administrators configuring new users. +id: ab6bffca-beff-4baa-af11-6733f296d57a +level: medium +logsource: + definition: Requires the "Read all properties" permission on the user object to + be audited for the "Everyone" principal + product: windows + service: security +modified: 2021/08/09 +references: +- https://www.specterops.io/assets/resources/an_ace_up_the_sleeve.pdf +- http://www.stuffithoughtiknew.com/2019/02/detecting-bloodhound.html +- https://docs.microsoft.com/en-us/windows/win32/adschema/attributes-all +status: experimental +tags: +- attack.discovery +- attack.t1087 +- attack.t1087.002 diff --git a/rules/sigma/windows/builtin/win_admin_rdp_login.yml b/rules/sigma/windows/builtin/win_admin_rdp_login.yml new file mode 100644 index 00000000..8f957093 --- /dev/null +++ b/rules/sigma/windows/builtin/win_admin_rdp_login.yml @@ -0,0 +1,36 @@ + +title: Admin User Remote Logon +author: juju4 +date: 2017/10/29 +description: Detect remote login by Administrator user (depending on internal pattern). +detection: + SELECTION_1: + EventID: 4624 + SELECTION_2: + LogonType: 10 + SELECTION_3: + AuthenticationPackageName: Negotiate + SELECTION_4: + TargetUserName: Admin* + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Legitimate administrative activity. +id: 0f63e1ef-1eb9-4226-9d54-8927ca08520a +level: low +logsource: + definition: 'Requirements: Identifiable administrators usernames (pattern or special + unique character. ex: "Admin-*"), internal policy mandating use only as secondary + account' + product: windows + service: security +modified: 2021/07/07 +references: +- https://car.mitre.org/wiki/CAR-2016-04-005 +status: experimental +tags: +- attack.lateral_movement +- attack.t1078 +- attack.t1078.001 +- attack.t1078.002 +- attack.t1078.003 +- car.2016-04-005 diff --git a/rules/sigma/windows/builtin/win_admin_share_access.yml b/rules/sigma/windows/builtin/win_admin_share_access.yml new file mode 100644 index 00000000..cc1bcf4e --- /dev/null +++ b/rules/sigma/windows/builtin/win_admin_share_access.yml @@ -0,0 +1,28 @@ + +title: Access to ADMIN$ Share +author: Florian Roth +date: 2017/03/04 +description: Detects access to $ADMIN share +detection: + SELECTION_1: + EventID: 5140 + SELECTION_2: + ShareName: Admin$ + SELECTION_3: + SubjectUserName: '*$' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) +falsepositives: +- Legitimate administrative activity +id: 098d7118-55bc-4912-a836-dc6483a8d150 +level: low +logsource: + definition: The advanced audit policy setting "Object Access > Audit File Share" + must be configured for Success/Failure + product: windows + service: security +modified: 2020/08/23 +status: experimental +tags: +- attack.lateral_movement +- attack.t1077 +- attack.t1021.002 diff --git a/rules/sigma/windows/builtin/win_alert_active_directory_user_control.yml b/rules/sigma/windows/builtin/win_alert_active_directory_user_control.yml new file mode 100644 index 00000000..e591f3be --- /dev/null +++ b/rules/sigma/windows/builtin/win_alert_active_directory_user_control.yml @@ -0,0 +1,30 @@ + +title: Enabled User Right in AD to Control User Objects +author: '@neu5ron' +date: 2017/07/30 +description: Detects scenario where if a user is assigned the SeEnableDelegationPrivilege + right in Active Directory it would allow control of other AD user objects. +detection: + SELECTION_1: + EventID: 4704 + SELECTION_2: + PrivilegeList: + - '*SeEnableDelegationPrivilege*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 311b6ce2-7890-4383-a8c2-663a9f6b43cd +level: high +logsource: + definition: 'Requirements: Audit Policy : Policy Change > Audit Authorization Policy + Change, Group Policy : Computer Configuration\Windows Settings\Security Settings\Advanced + Audit Policy Configuration\Audit Policies\Policy Change\Audit Authorization Policy + Change' + product: windows + service: security +modified: 2020/08/23 +references: +- https://www.harmj0y.net/blog/activedirectory/the-most-dangerous-user-right-you-probably-have-never-heard-of/ +tags: +- attack.persistence +- attack.t1098 diff --git a/rules/sigma/windows/builtin/win_alert_ad_user_backdoors.yml b/rules/sigma/windows/builtin/win_alert_ad_user_backdoors.yml new file mode 100644 index 00000000..8e170c36 --- /dev/null +++ b/rules/sigma/windows/builtin/win_alert_ad_user_backdoors.yml @@ -0,0 +1,51 @@ + +title: Active Directory User Backdoors +author: '@neu5ron' +date: 2017/04/13 +description: Detects scenarios where one can control another users or computers account + without having to use their credentials. +detection: + SELECTION_1: + EventID: 4738 + SELECTION_10: + AttributeLDAPDisplayName: msDS-AllowedToActOnBehalfOfOtherIdentity + SELECTION_2: + AllowedToDelegateTo: '-' + SELECTION_3: + AllowedToDelegateTo|re: ^$ + SELECTION_4: + EventID: 5136 + SELECTION_5: + AttributeLDAPDisplayName: msDS-AllowedToDelegateTo + SELECTION_6: + EventID: 5136 + SELECTION_7: + ObjectClass: user + SELECTION_8: + AttributeLDAPDisplayName: servicePrincipalName + SELECTION_9: + EventID: 5136 + condition: (((((SELECTION_1 and not (SELECTION_2)) and not (SELECTION_3)) or (SELECTION_4 + and SELECTION_5)) or (SELECTION_6 and SELECTION_7 and SELECTION_8)) or (SELECTION_9 + and SELECTION_10)) +falsepositives: +- Unknown +id: 300bac00-e041-4ee2-9c36-e262656a6ecc +level: high +logsource: + definition: 'Requirements: Audit Policy : Account Management > Audit User Account + Management, Group Policy : Computer Configuration\Windows Settings\Security Settings\Advanced + Audit Policy Configuration\Audit Policies\Account Management\Audit User Account + Management, DS Access > Audit Directory Service Changes, Group Policy : Computer + Configuration\Windows Settings\Security Settings\Advanced Audit Policy Configuration\Audit + Policies\DS Access\Audit Directory Service Changes' + product: windows + service: security +modified: 2020/08/23 +references: +- https://msdn.microsoft.com/en-us/library/cc220234.aspx +- https://adsecurity.org/?p=3466 +- https://www.harmj0y.net/blog/redteaming/another-word-on-delegation/ +tags: +- attack.t1098 +- attack.persistence diff --git a/rules/sigma/windows/builtin/win_alert_enable_weak_encryption.yml b/rules/sigma/windows/builtin/win_alert_enable_weak_encryption.yml new file mode 100644 index 00000000..1e47b7cf --- /dev/null +++ b/rules/sigma/windows/builtin/win_alert_enable_weak_encryption.yml @@ -0,0 +1,89 @@ + +title: Weak Encryption Enabled and Kerberoast +author: '@neu5ron' +date: 2017/07/30 +description: Detects scenario where weak encryption is enabled for a user profile + which could be used for hash/password cracking. +detection: + SELECTION_1: + EventID: 4738 + SELECTION_2: + NewUacValue: + - '*8???' + - '*9???' + - '*A???' + - '*B???' + - '*C???' + - '*D???' + - '*E???' + - '*F???' + SELECTION_3: + OldUacValue: + - '*8???' + - '*9???' + - '*A???' + - '*B???' + - '*C???' + - '*D???' + - '*E???' + - '*F???' + SELECTION_4: + NewUacValue: + - '*1????' + - '*3????' + - '*5????' + - '*7????' + - '*9????' + - '*B????' + - '*D????' + - '*F????' + SELECTION_5: + OldUacValue: + - '*1????' + - '*3????' + - '*5????' + - '*7????' + - '*9????' + - '*B????' + - '*D????' + - '*F????' + SELECTION_6: + NewUacValue: + - '*8??' + - '*9??' + - '*A??' + - '*B??' + - '*C??' + - '*D??' + - '*E??' + - '*F??' + SELECTION_7: + OldUacValue: + - '*8??' + - '*9??' + - '*A??' + - '*B??' + - '*C??' + - '*D??' + - '*E??' + - '*F??' + condition: (SELECTION_1 and (((SELECTION_2 and not (SELECTION_3)) or (SELECTION_4 + and not (SELECTION_5))) or (SELECTION_6 and not (SELECTION_7)))) +falsepositives: +- Unknown +id: f6de9536-0441-4b3f-a646-f4e00f300ffd +level: high +logsource: + definition: 'Requirements: Audit Policy : Account Management > Audit User Account + Management, Group Policy : Computer Configuration\Windows Settings\Security Settings\Advanced + Audit Policy Configuration\Audit Policies\Account Management\Audit User Account + Management' + product: windows + service: security +references: +- https://adsecurity.org/?p=2053 +- https://www.harmj0y.net/blog/activedirectory/roasting-as-reps/ +tags: +- attack.defense_evasion +- attack.t1089 +- attack.t1562.001 diff --git a/rules/sigma/windows/builtin/win_alert_lsass_access.yml b/rules/sigma/windows/builtin/win_alert_lsass_access.yml new file mode 100644 index 00000000..b8defbf3 --- /dev/null +++ b/rules/sigma/windows/builtin/win_alert_lsass_access.yml @@ -0,0 +1,28 @@ + +title: LSASS Access Detected via Attack Surface Reduction +author: Markus Neis +date: 2018/08/26 +description: Detects Access to LSASS Process +detection: + SELECTION_1: + EventID: 1121 + SELECTION_2: + Path: '*\lsass.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Google Chrome GoogleUpdate.exe +- Some Taskmgr.exe related activity +id: a0a278fe-2c0e-4de2-ac3c-c68b08a9ba98 +level: high +logsource: + definition: 'Requirements:Enabled Block credential stealing from the Windows local + security authority subsystem (lsass.exe) from Attack Surface Reduction (GUID: + 9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2)' + product: windows_defender +references: +- https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-exploit-guard/attack-surface-reduction-exploit-guard?WT.mc_id=twitter +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.001 diff --git a/rules/sigma/windows/builtin/win_alert_mimikatz_keywords.yml b/rules/sigma/windows/builtin/win_alert_mimikatz_keywords.yml new file mode 100644 index 00000000..8e0adbf0 --- /dev/null +++ b/rules/sigma/windows/builtin/win_alert_mimikatz_keywords.yml @@ -0,0 +1,44 @@ + +title: Mimikatz Use +author: Florian Roth +date: 2017/01/10 +description: This method detects mimikatz keywords in different Eventlogs (some of + them only appear in older Mimikatz version that are however still used by different + threat groups) +detection: + SELECTION_1: + - \mimikatz + - mimikatz.exe + - \mimilib.dll + - <3 eo.oe + - eo.oe.kiwi + - privilege::debug + - sekurlsa::logonpasswords + - lsadump::sam + - mimidrv.sys + - ' p::d ' + - ' s::l ' + - gentilkiwi.com + - Kiwi Legit Printer + condition: (SELECTION_1) +falsepositives: +- Naughty administrators +- Penetration test +- AV Signature updates +- Files with Mimikatz in their filename +id: 06d71506-7beb-4f22-8888-e2e5e2ca7fd8 +level: critical +logsource: + product: windows +modified: 2021/08/26 +tags: +- attack.s0002 +- attack.t1003 +- attack.lateral_movement +- attack.credential_access +- car.2013-07-001 +- car.2019-04-004 +- attack.t1003.002 +- attack.t1003.004 +- attack.t1003.001 +- attack.t1003.006 diff --git a/rules/sigma/windows/builtin/win_alert_ruler.yml b/rules/sigma/windows/builtin/win_alert_ruler.yml new file mode 100644 index 00000000..29183e34 --- /dev/null +++ b/rules/sigma/windows/builtin/win_alert_ruler.yml @@ -0,0 +1,39 @@ + +title: Hacktool Ruler +author: Florian Roth +date: 2017/05/31 +description: This events that are generated when using the hacktool Ruler by Sensepost +detection: + SELECTION_1: + EventID: 4776 + SELECTION_2: + Workstation: RULER + SELECTION_3: + EventID: 4624 + SELECTION_4: + EventID: 4625 + SELECTION_5: + WorkstationName: RULER + condition: ((SELECTION_1 and SELECTION_2) or ((SELECTION_3 or SELECTION_4) and SELECTION_5)) +falsepositives: +- Go utilities that use staaldraad awesome NTLM library +id: 24549159-ac1b-479c-8175-d42aea947cae +level: high +logsource: + product: windows + service: security +modified: 2021/08/09 +references: +- https://github.com/sensepost/ruler +- https://github.com/sensepost/ruler/issues/47 +- https://github.com/staaldraad/go-ntlm/blob/master/ntlm/ntlmv1.go#L427 +- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4776 +- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4624 +tags: +- attack.discovery +- attack.execution +- attack.t1087 +- attack.t1075 +- attack.t1114 +- attack.t1059 +- attack.t1550.002 diff --git a/rules/sigma/windows/builtin/win_applocker_file_was_not_allowed_to_run.yml b/rules/sigma/windows/builtin/win_applocker_file_was_not_allowed_to_run.yml new file mode 100644 index 00000000..27e0f507 --- /dev/null +++ b/rules/sigma/windows/builtin/win_applocker_file_was_not_allowed_to_run.yml @@ -0,0 +1,47 @@ + +title: File Was Not Allowed To Run +author: Pushkarev Dmitry +date: 2020/06/28 +description: Detect run not allowed files. Applocker is a very useful tool, especially + on servers where unprivileged users have access. For example terminal servers. You + need configure applocker and log collect to receive these events. +detection: + SELECTION_1: + EventID: 8004 + SELECTION_2: + EventID: 8007 + condition: (SELECTION_1 or SELECTION_2) +falsepositives: +- need tuning applocker or add exceptions in SIEM +fields: +- PolicyName +- RuleId +- RuleName +- TargetUser +- TargetProcessId +- FilePath +- FileHash +- Fqbn +id: 401e5d00-b944-11ea-8f9a-00163ecd60ae +level: medium +logsource: + product: windows + service: applocker +modified: 2020/08/23 +references: +- https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/applocker/what-is-applocker +- https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/applocker/using-event-viewer-with-applocker +- https://nxlog.co/documentation/nxlog-user-guide/applocker.html +status: experimental +tags: +- attack.execution +- attack.t1086 +- attack.t1064 +- attack.t1204 +- attack.t1035 +- attack.t1204.002 +- attack.t1059.001 +- attack.t1059.003 +- attack.t1059.005 +- attack.t1059.006 +- attack.t1059.007 diff --git a/rules/sigma/windows/builtin/win_apt_carbonpaper_turla.yml b/rules/sigma/windows/builtin/win_apt_carbonpaper_turla.yml new file mode 100644 index 00000000..fa48e983 --- /dev/null +++ b/rules/sigma/windows/builtin/win_apt_carbonpaper_turla.yml @@ -0,0 +1,29 @@ + +title: Turla Service Install +author: Florian Roth +date: 2017/03/31 +description: This method detects a service install of malicious services mentioned + in Carbon Paper - Turla report by ESET +detection: + SELECTION_1: + EventID: 7045 + SELECTION_2: + ServiceName: + - srservice + - ipvpn + - hkmsvc + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 1df8b3da-b0ac-4d8a-b7c7-6cb7c24160e4 +level: high +logsource: + product: windows + service: system +references: +- https://www.welivesecurity.com/2017/03/30/carbon-paper-peering-turlas-second-stage-backdoor/ +tags: +- attack.persistence +- attack.g0010 +- attack.t1050 +- attack.t1543.003 diff --git a/rules/sigma/windows/builtin/win_apt_chafer_mar18_security.yml b/rules/sigma/windows/builtin/win_apt_chafer_mar18_security.yml new file mode 100644 index 00000000..db762f47 --- /dev/null +++ b/rules/sigma/windows/builtin/win_apt_chafer_mar18_security.yml @@ -0,0 +1,40 @@ + +title: Chafer Activity +author: Florian Roth, Markus Neis, Jonhnathan Ribeiro, Daniil Yugoslavskiy, oscd.community +date: 2018/03/23 +description: Detects Chafer activity attributed to OilRig as reported in Nyotron report + in March 2018 +detection: + SELECTION_1: + EventID: 4698 + SELECTION_2: + TaskName: + - SC Scheduled Scan + - UpdatMachine + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: c0580559-a6bd-4ef6-b9b7-83703d98b561 +level: critical +logsource: + product: windows + service: security +modified: 2021/09/19 +references: +- https://nyotron.com/nyotron-discovers-next-generation-oilrig-attacks/ +related: +- id: 53ba33fd-3a50-4468-a5ef-c583635cfa92 + type: derived +tags: +- attack.persistence +- attack.g0049 +- attack.t1053 +- attack.t1053.005 +- attack.s0111 +- attack.t1050 +- attack.t1543.003 +- attack.defense_evasion +- attack.t1112 +- attack.command_and_control +- attack.t1071 +- attack.t1071.004 diff --git a/rules/sigma/windows/builtin/win_apt_chafer_mar18_system.yml b/rules/sigma/windows/builtin/win_apt_chafer_mar18_system.yml new file mode 100644 index 00000000..1a30419c --- /dev/null +++ b/rules/sigma/windows/builtin/win_apt_chafer_mar18_system.yml @@ -0,0 +1,37 @@ + +title: Chafer Activity +author: Florian Roth, Markus Neis, Jonhnathan Ribeiro, Daniil Yugoslavskiy, oscd.community +date: 2018/03/23 +description: Detects Chafer activity attributed to OilRig as reported in Nyotron report + in March 2018 +detection: + SELECTION_1: + EventID: 7045 + SELECTION_2: + ServiceName: + - SC Scheduled Scan + - UpdatMachine + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 53ba33fd-3a50-4468-a5ef-c583635cfa92 +level: critical +logsource: + product: windows + service: system +modified: 2021/09/19 +references: +- https://nyotron.com/nyotron-discovers-next-generation-oilrig-attacks/ +tags: +- attack.persistence +- attack.g0049 +- attack.t1053 +- attack.t1053.005 +- attack.s0111 +- attack.t1050 +- attack.t1543.003 +- attack.defense_evasion +- attack.t1112 +- attack.command_and_control +- attack.t1071 +- attack.t1071.004 diff --git a/rules/sigma/windows/builtin/win_apt_gallium.yml b/rules/sigma/windows/builtin/win_apt_gallium.yml new file mode 100644 index 00000000..2aa1f54f --- /dev/null +++ b/rules/sigma/windows/builtin/win_apt_gallium.yml @@ -0,0 +1,37 @@ + +title: GALLIUM Artefacts +author: Tim Burrell +date: 2020/02/07 +description: Detects artefacts associated with activity group GALLIUM - Microsoft + Threat Intelligence Center indicators released in December 2019. +detection: + SELECTION_1: + EventID: 257 + SELECTION_2: + QNAME: + - asyspy256.ddns.net + - hotkillmail9sddcc.ddns.net + - rosaf112.ddns.net + - cvdfhjh1231.myftp.biz + - sz2016rose.ddns.net + - dffwescwer4325.myftp.biz + - cvdfhjh1231.ddns.net + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 3db10f25-2527-4b79-8d4b-471eb900ee29 +level: high +logsource: + product: windows + service: dns-server +modified: 2021/09/19 +references: +- https://www.microsoft.com/security/blog/2019/12/12/gallium-targeting-global-telecom/ +- https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn800669(v=ws.11) +related: +- id: 440a56bf-7873-4439-940a-1c8a671073c2 + type: derived +status: experimental +tags: +- attack.credential_access +- attack.command_and_control diff --git a/rules/sigma/windows/builtin/win_apt_slingshot.yml b/rules/sigma/windows/builtin/win_apt_slingshot.yml new file mode 100644 index 00000000..4eda9120 --- /dev/null +++ b/rules/sigma/windows/builtin/win_apt_slingshot.yml @@ -0,0 +1,29 @@ + +title: Defrag Deactivation +author: Florian Roth, Bartlomiej Czyz (@bczyz1) +date: 2019/03/04 +description: Detects the deactivation and disabling of the Scheduled defragmentation + task as seen by Slingshot APT group +detection: + SELECTION_1: + EventID: 4701 + SELECTION_2: + TaskName: \Microsoft\Windows\Defrag\ScheduledDefrag + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: c5a178bf-9cfb-4340-b584-e4df39b6a3e7 +level: medium +logsource: + definition: 'Requirements: Audit Policy : Audit Other Object Access Events > Success' + product: windows + service: security +modified: 2021/09/19 +references: +- https://securelist.com/apt-slingshot/84312/ +related: +- id: 958d81aa-8566-4cea-a565-59ccd4df27b0 + type: derived +tags: +- attack.persistence +- attack.s0111 diff --git a/rules/sigma/windows/builtin/win_apt_stonedrill.yml b/rules/sigma/windows/builtin/win_apt_stonedrill.yml new file mode 100644 index 00000000..73d5e5ed --- /dev/null +++ b/rules/sigma/windows/builtin/win_apt_stonedrill.yml @@ -0,0 +1,28 @@ + +title: StoneDrill Service Install +author: Florian Roth +date: 2017/03/07 +description: This method detects a service install of the malicious Microsoft Network + Realtime Inspection Service service described in StoneDrill report by Kaspersky +detection: + SELECTION_1: + EventID: 7045 + SELECTION_2: + ServiceName: NtsSrv + SELECTION_3: + ServiceFileName: '* LocalService' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unlikely +id: 9e987c6c-4c1e-40d8-bd85-dd26fba8fdd6 +level: high +logsource: + product: windows + service: system +references: +- https://securelist.com/blog/research/77725/from-shamoon-to-stonedrill/ +tags: +- attack.persistence +- attack.g0064 +- attack.t1050 +- attack.t1543.003 diff --git a/rules/sigma/windows/builtin/win_apt_turla_service_png.yml b/rules/sigma/windows/builtin/win_apt_turla_service_png.yml new file mode 100644 index 00000000..e21435f5 --- /dev/null +++ b/rules/sigma/windows/builtin/win_apt_turla_service_png.yml @@ -0,0 +1,26 @@ + +title: Turla PNG Dropper Service +author: Florian Roth +date: 2018/11/23 +description: This method detects malicious services mentioned in Turla PNG dropper + report by NCC Group in November 2018 +detection: + SELECTION_1: + EventID: 7045 + SELECTION_2: + ServiceName: WerFaultSvc + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unlikely +id: 1228f8e2-7e79-4dea-b0ad-c91f1d5016c1 +level: critical +logsource: + product: windows + service: system +references: +- https://www.nccgroup.trust/uk/about-us/newsroom-and-events/blogs/2018/november/turla-png-dropper-is-back/ +tags: +- attack.persistence +- attack.g0010 +- attack.t1050 +- attack.t1543.003 diff --git a/rules/sigma/windows/builtin/win_apt_wocao.yml b/rules/sigma/windows/builtin/win_apt_wocao.yml new file mode 100644 index 00000000..8bcc4956 --- /dev/null +++ b/rules/sigma/windows/builtin/win_apt_wocao.yml @@ -0,0 +1,37 @@ + +title: Operation Wocao Activity +author: Florian Roth, frack113 +date: 2019/12/20 +description: Detects activity mentioned in Operation Wocao report +detection: + SELECTION_1: + EventID: 4799 + SELECTION_2: + TargetUserName: Administr* + SELECTION_3: + CallerProcessName: '*\checkadmin.exe' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Administrators that use checkadmin.exe tool to enumerate local administrators +id: 74ad4314-482e-4c3e-b237-3f7ed3b9ca8d +level: high +logsource: + product: windows + service: security +modified: 2021/09/19 +references: +- https://www.fox-it.com/en/news/whitepapers/operation-wocao-shining-a-light-on-one-of-chinas-hidden-hacking-groups/ +- https://twitter.com/SBousseaden/status/1207671369963646976 +status: experimental +tags: +- attack.discovery +- attack.t1012 +- attack.defense_evasion +- attack.t1036.004 +- attack.t1036 +- attack.t1027 +- attack.execution +- attack.t1053.005 +- attack.t1053 +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/builtin/win_arbitrary_shell_execution_via_settingcontent.yml b/rules/sigma/windows/builtin/win_arbitrary_shell_execution_via_settingcontent.yml new file mode 100644 index 00000000..850d8d75 --- /dev/null +++ b/rules/sigma/windows/builtin/win_arbitrary_shell_execution_via_settingcontent.yml @@ -0,0 +1,33 @@ + +title: Arbitrary Shell Command Execution Via Settingcontent-Ms +author: Sreeman +date: 2020/03/13 +description: The .SettingContent-ms file type was introduced in Windows 10 and allows + a user to create "shortcuts" to various Windows 10 setting pages. These files are + simply XML and contain paths to various Windows 10 settings binaries. +detection: + SELECTION_1: + CommandLine: '*.SettingContent-ms*' + SELECTION_2: + FilePath: '*immersivecontrolpanel*' + condition: (SELECTION_1 and not (SELECTION_2)) +falsepositives: +- unknown +fields: +- ParentProcess +- CommandLine +- ParentCommandLine +id: 24de4f3b-804c-4165-b442-5a06a2302c7e +level: medium +logsource: + product: windows + service: security +modified: 2021/08/09 +references: +- https://posts.specterops.io/the-tale-of-settingcontent-ms-files-f1ea253e4d39 +tags: +- attack.t1204 +- attack.t1193 +- attack.t1566.001 +- attack.execution +- attack.initial_access diff --git a/rules/sigma/windows/builtin/win_asr_bypass_via_appvlp_re.yml b/rules/sigma/windows/builtin/win_asr_bypass_via_appvlp_re.yml new file mode 100644 index 00000000..cd230cdf --- /dev/null +++ b/rules/sigma/windows/builtin/win_asr_bypass_via_appvlp_re.yml @@ -0,0 +1,29 @@ + +title: Using AppVLP To Circumvent ASR File Path Rule +author: Sreeman +date: 2020/03/13 +description: Application Virtualization Utility is included with Microsoft Office.We + are able to abuse “AppVLP” to execute shell commands. Normally, this binary is used + for Application Virtualization, but we can use it as an abuse binary to circumvent + the ASR file path rule folder or to mark a file as a system file +detection: + SELECTION_1: + CommandLine|re: (?i).*appvlp.exe.*(cmd.exe|powershell.exe).*(.sh|.exe|.dll|.bin|.bat|.cmd|.js|.msh|.reg|.scr|.ps|.vb|.jar|.pl|.inf) + condition: SELECTION_1 +falsepositives: +- unknown +fields: +- ParentProcess +- CommandLine +- ParentCommandLine +id: 9c7e131a-0f2c-4ae0-9d43-b04f4e266d43 +level: medium +logsource: + product: windows + service: security +modified: 2021/06/11 +status: experimental +tags: +- attack.t1218 +- attack.defense_evasion +- attack.execution diff --git a/rules/sigma/windows/builtin/win_atsvc_task.yml b/rules/sigma/windows/builtin/win_atsvc_task.yml new file mode 100644 index 00000000..c80980a5 --- /dev/null +++ b/rules/sigma/windows/builtin/win_atsvc_task.yml @@ -0,0 +1,34 @@ + +title: Remote Task Creation via ATSVC Named Pipe +author: Samir Bousseaden +date: 2019/04/03 +description: Detects remote task creation via at.exe or API interacting with ATSVC + namedpipe +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + ShareName: \\*\IPC$ + SELECTION_3: + RelativeTargetName: atsvc + SELECTION_4: + Accesses: '*WriteData*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- pentesting +id: f6de6525-4509-495a-8a82-1f8b0ed73a00 +level: medium +logsource: + definition: The advanced audit policy setting "Object Access > Audit Detailed File + Share" must be configured for Success/Failure + product: windows + service: security +references: +- https://blog.menasec.net/2019/03/threat-hunting-25-scheduled-tasks-for.html +tags: +- attack.lateral_movement +- attack.persistence +- attack.t1053 +- car.2013-05-004 +- car.2015-04-001 +- attack.t1053.002 diff --git a/rules/sigma/windows/builtin/win_audit_cve.yml b/rules/sigma/windows/builtin/win_audit_cve.yml new file mode 100644 index 00000000..2b4486a6 --- /dev/null +++ b/rules/sigma/windows/builtin/win_audit_cve.yml @@ -0,0 +1,38 @@ + +title: Audit CVE Event +author: Florian Roth +date: 2020/01/15 +description: Detects events generated by Windows to indicate the exploitation of a + known vulnerability (e.g. CVE-2020-0601) +detection: + SELECTION_1: + Source: Microsoft-Windows-Audit-CVE + condition: SELECTION_1 +falsepositives: +- Unknown +id: 48d91a3a-2363-43ba-a456-ca71ac3da5c2 +level: critical +logsource: + product: windows + service: application +modified: 2020/08/23 +references: +- https://twitter.com/mattifestation/status/1217179698008068096 +- https://twitter.com/VM_vivisector/status/1217190929330655232 +- https://twitter.com/davisrichardg/status/1217517547576348673 +- https://twitter.com/DidierStevens/status/1217533958096924676 +- https://twitter.com/FlemmingRiis/status/1217147415482060800 +status: experimental +tags: +- attack.execution +- attack.t1203 +- attack.privilege_escalation +- attack.t1068 +- attack.defense_evasion +- attack.t1211 +- attack.credential_access +- attack.t1212 +- attack.lateral_movement +- attack.t1210 +- attack.impact +- attack.t1499.004 diff --git a/rules/sigma/windows/builtin/win_av_relevant_match.yml b/rules/sigma/windows/builtin/win_av_relevant_match.yml new file mode 100644 index 00000000..56c965a0 --- /dev/null +++ b/rules/sigma/windows/builtin/win_av_relevant_match.yml @@ -0,0 +1,42 @@ + +title: Relevant Anti-Virus Event +author: Florian Roth +date: 2017/02/19 +description: This detection method points out highly relevant Antivirus events +detection: + SELECTION_1: + - HTool- + - Hacktool + - ASP/Backdoor + - JSP/Backdoor + - PHP/Backdoor + - Backdoor.ASP + - Backdoor.JSP + - Backdoor.PHP + - Webshell + - Portscan + - Mimikatz + - WinCred + - PlugX + - Korplug + - Pwdump + - Chopper + - WmiExec + - Xscan + - Clearlog + - ASPXSpy + SELECTION_2: + - Keygen + - Crack + condition: ((SELECTION_1) and not (SELECTION_2)) +falsepositives: +- Some software piracy tools (key generators, cracks) are classified as hack tools +id: 78bc5783-81d9-4d73-ac97-59f6db4f72a8 +level: high +logsource: + product: windows + service: application +modified: 2021/07/28 +tags: +- attack.resource_development +- attack.t1588 diff --git a/rules/sigma/windows/builtin/win_camera_microphone_access.yml b/rules/sigma/windows/builtin/win_camera_microphone_access.yml new file mode 100644 index 00000000..37ef15db --- /dev/null +++ b/rules/sigma/windows/builtin/win_camera_microphone_access.yml @@ -0,0 +1,31 @@ + +title: Processes Accessing the Microphone and Webcam +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/06/07 +description: Potential adversaries accessing the microphone and webcam in an endpoint. +detection: + SELECTION_1: + EventID: 4657 + SELECTION_2: + EventID: 4656 + SELECTION_3: + EventID: 4663 + SELECTION_4: + ObjectName: '*\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\microphone\NonPackaged*' + SELECTION_5: + ObjectName: '*\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\webcam\NonPackaged*' + condition: ((SELECTION_1 or SELECTION_2 or SELECTION_3) and (SELECTION_4 or SELECTION_5)) +falsepositives: +- Unknown +id: 8cd538a4-62d5-4e83-810b-12d41e428d6e +level: medium +logsource: + product: windows + service: security +references: +- https://twitter.com/duzvik/status/1269671601852813320 +- https://medium.com/@7a616368/can-you-track-processes-accessing-the-camera-and-microphone-7e6885b37072 +status: experimental +tags: +- attack.collection +- attack.t1123 diff --git a/rules/sigma/windows/builtin/win_cobaltstrike_service_installs.yml b/rules/sigma/windows/builtin/win_cobaltstrike_service_installs.yml new file mode 100644 index 00000000..955aea00 --- /dev/null +++ b/rules/sigma/windows/builtin/win_cobaltstrike_service_installs.yml @@ -0,0 +1,47 @@ + +title: CobaltStrike Service Installations +author: Florian Roth, Wojciech Lesicki +date: 2021/05/26 +description: Detects known malicious service installs that appear in cases in which + a Cobalt Strike beacon elevates privileges or lateral movement +detection: + SELECTION_1: + EventID: 7045 + SELECTION_2: + ImagePath: '*ADMIN$*' + SELECTION_3: + ImagePath: '*.exe*' + SELECTION_4: + ImagePath: '*%COMSPEC%*' + SELECTION_5: + ImagePath: '*start*' + SELECTION_6: + ImagePath: '*powershell*' + SELECTION_7: + ImagePath: '*powershell -nop -w hidden -encodedcommand*' + SELECTION_8: + ImagePath: + - '*SUVYIChOZXctT2JqZWN0IE5ldC5XZWJjbGllbnQpLkRvd25sb2FkU3RyaW5nKCdodHRwOi8vMTI3LjAuMC4xO*' + - '*lFWCAoTmV3LU9iamVjdCBOZXQuV2ViY2xpZW50KS5Eb3dubG9hZFN0cmluZygnaHR0cDovLzEyNy4wLjAuMT*' + - '*JRVggKE5ldy1PYmplY3QgTmV0LldlYmNsaWVudCkuRG93bmxvYWRTdHJpbmcoJ2h0dHA6Ly8xMjcuMC4wLjE6*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and SELECTION_5 + and SELECTION_6) or SELECTION_7 or SELECTION_8)) +falsepositives: +- Unknown +id: 5a105d34-05fc-401e-8553-272b45c1522d +level: critical +logsource: + product: windows + service: system +modified: 2021/09/21 +references: +- https://www.sans.org/webcasts/119395 +- https://www.crowdstrike.com/blog/getting-the-bacon-from-cobalt-strike-beacon/ +- https://thedfirreport.com/2021/08/29/cobalt-strike-a-defenders-guide/ +tags: +- attack.execution +- attack.privilege_escalation +- attack.lateral_movement +- attack.t1021.002 +- attack.t1543.003 +- attack.t1569.002 diff --git a/rules/sigma/windows/builtin/win_dce_rpc_smb_spoolss_named_pipe.yml b/rules/sigma/windows/builtin/win_dce_rpc_smb_spoolss_named_pipe.yml new file mode 100644 index 00000000..a09fdfcf --- /dev/null +++ b/rules/sigma/windows/builtin/win_dce_rpc_smb_spoolss_named_pipe.yml @@ -0,0 +1,30 @@ + +title: DCERPC SMB Spoolss Named Pipe +author: OTR (Open Threat Research) +date: 2018/11/28 +description: Detects the use of the spoolss named pipe over SMB. This can be used + to trigger the authentication via NTLM of any machine that has the spoolservice + enabled. +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + ShareName: \\*\IPC$ + SELECTION_3: + RelativeTargetName: spoolss + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Domain Controllers acting as printer servers too? :) +id: 214e8f95-100a-4e04-bb31-ef6cba8ce07e +level: medium +logsource: + product: windows + service: security +references: +- https://posts.specterops.io/hunting-in-active-directory-unconstrained-delegation-forests-trusts-71f2b33688e1 +- https://dirkjanm.io/a-different-way-of-abusing-zerologon/ +- https://twitter.com/_dirkjan/status/1309214379003588608 +status: experimental +tags: +- attack.lateral_movement +- attack.t1021.002 diff --git a/rules/sigma/windows/builtin/win_dcom_iertutil_dll_hijack.yml b/rules/sigma/windows/builtin/win_dcom_iertutil_dll_hijack.yml new file mode 100644 index 00000000..bd963770 --- /dev/null +++ b/rules/sigma/windows/builtin/win_dcom_iertutil_dll_hijack.yml @@ -0,0 +1,29 @@ + +title: T1021 DCOM InternetExplorer.Application Iertutil DLL Hijack +author: Roberto Rodriguez @Cyb3rWard0g, Open Threat Research (OTR) +date: 2020/10/12 +description: Detects a threat actor creating a file named `iertutil.dll` in the `C:\Program + Files\Internet Explorer\` directory over the network for a DCOM InternetExplorer + DLL Hijack scenario. +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + RelativeTargetName: '*\Internet Explorer\iertutil.dll' + SELECTION_3: + SubjectUserName: '*$' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) +falsepositives: +- Unknown +id: c39f0c81-7348-4965-ab27-2fde35a1b641 +level: critical +logsource: + product: windows + service: security +references: +- https://threathunterplaybook.com/notebooks/windows/08_lateral_movement/WIN-201009183000.html +status: experimental +tags: +- attack.lateral_movement +- attack.t1021.002 +- attack.t1021.003 diff --git a/rules/sigma/windows/builtin/win_dcsync.yml b/rules/sigma/windows/builtin/win_dcsync.yml new file mode 100644 index 00000000..1415f4f1 --- /dev/null +++ b/rules/sigma/windows/builtin/win_dcsync.yml @@ -0,0 +1,40 @@ + +title: Mimikatz DC Sync +author: Benjamin Delpy, Florian Roth, Scott Dermott +date: 2018/06/03 +description: Detects Mimikatz DC sync security events +detection: + SELECTION_1: + EventID: 4662 + SELECTION_2: + Properties: + - '*Replicating Directory Changes All*' + - '*1131f6ad-9c07-11d1-f79f-00c04fc2dcd2*' + SELECTION_3: + SubjectDomainName: Window Manager + SELECTION_4: + SubjectUserName: + - NT AUTHORITY* + - MSOL_* + SELECTION_5: + SubjectUserName: '*$' + condition: ((((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) and not (SELECTION_4)) + and not (SELECTION_5)) +falsepositives: +- Valid DC Sync that is not covered by the filters; please report +- Local Domain Admin account used for Azure AD Connect +id: 611eab06-a145-4dfa-a295-3ccc5c20f59a +level: high +logsource: + product: windows + service: security +modified: 2021/08/09 +references: +- https://twitter.com/gentilkiwi/status/1003236624925413376 +- https://gist.github.com/gentilkiwi/dcc132457408cf11ad2061340dcb53c2 +status: experimental +tags: +- attack.credential_access +- attack.s0002 +- attack.t1003 +- attack.t1003.006 diff --git a/rules/sigma/windows/builtin/win_disable_event_logging.yml b/rules/sigma/windows/builtin/win_disable_event_logging.yml new file mode 100644 index 00000000..6f0a19e3 --- /dev/null +++ b/rules/sigma/windows/builtin/win_disable_event_logging.yml @@ -0,0 +1,38 @@ + +title: Disabling Windows Event Auditing +author: '@neu5ron' +date: 2017/11/19 +description: 'Detects scenarios where system auditing (ie: windows event log auditing) + is disabled. This may be used in a scenario where an entity would want to bypass + local logging to evade detection when windows event logging is enabled and reviewed. + Also, it is recommended to turn off "Local Group Policy Object Processing" via GPO, + which will make sure that Active Directory GPOs take precedence over local/edited + computer policies via something such as "gpedit.msc". Please note, that disabling + "Local Group Policy Object Processing" may cause an issue in scenarios of one off + specific GPO modifications -- however it is recommended to perform these modifications + in Active Directory anyways.' +detection: + SELECTION_1: + EventID: 4719 + SELECTION_2: + AuditPolicyChanges: + - '*%%8448*' + - '*%%8450*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 69aeb277-f15f-4d2d-b32a-55e883609563 +level: high +logsource: + definition: 'Requirements: Audit Policy : Computer Management > Audit Policy Configuration, + Group Policy : Computer Configuration\Windows Settings\Security Settings\Advanced + Audit Policy Configuration\Audit Policies\Policy Change\Audit Authorization Policy + Change' + product: windows + service: security +references: +- https://bit.ly/WinLogsZero2Hero +tags: +- attack.defense_evasion +- attack.t1054 +- attack.t1562.002 diff --git a/rules/sigma/windows/builtin/win_dpapi_domain_backupkey_extraction.yml b/rules/sigma/windows/builtin/win_dpapi_domain_backupkey_extraction.yml new file mode 100644 index 00000000..0c80adc9 --- /dev/null +++ b/rules/sigma/windows/builtin/win_dpapi_domain_backupkey_extraction.yml @@ -0,0 +1,30 @@ + +title: DPAPI Domain Backup Key Extraction +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/06/20 +description: Detects tools extracting LSA secret DPAPI domain backup key from Domain + Controllers +detection: + SELECTION_1: + EventID: 4662 + SELECTION_2: + ObjectType: SecretObject + SELECTION_3: + AccessMask: '0x2' + SELECTION_4: + ObjectName: BCKUPKEY + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: 4ac1f50b-3bd0-4968-902d-868b4647937e +level: critical +logsource: + product: windows + service: security +references: +- https://threathunterplaybook.com/notebooks/windows/06_credential_access/WIN-190620024610.html +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.004 diff --git a/rules/sigma/windows/builtin/win_dpapi_domain_masterkey_backup_attempt.yml b/rules/sigma/windows/builtin/win_dpapi_domain_masterkey_backup_attempt.yml new file mode 100644 index 00000000..8ebc6b42 --- /dev/null +++ b/rules/sigma/windows/builtin/win_dpapi_domain_masterkey_backup_attempt.yml @@ -0,0 +1,28 @@ + +title: DPAPI Domain Master Key Backup Attempt +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/08/10 +description: Detects anyone attempting a backup for the DPAPI Master Key. This events + gets generated at the source and not the Domain Controller. +detection: + SELECTION_1: + EventID: 4692 + condition: SELECTION_1 +falsepositives: +- Unknown +fields: +- ComputerName +- SubjectDomainName +- SubjectUserName +id: 39a94fd1-8c9a-4ff6-bf22-c058762f8014 +level: critical +logsource: + product: windows + service: security +references: +- https://threathunterplaybook.com/notebooks/windows/06_credential_access/WIN-190620024610.html +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.004 diff --git a/rules/sigma/windows/builtin/win_etw_modification.yml b/rules/sigma/windows/builtin/win_etw_modification.yml new file mode 100644 index 00000000..1ecdce1d --- /dev/null +++ b/rules/sigma/windows/builtin/win_etw_modification.yml @@ -0,0 +1,36 @@ + +title: COMPlus_ETWEnabled Registry Modification +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/06/05 +description: Potential adversaries stopping ETW providers recording loaded .NET assemblies. +detection: + SELECTION_1: + EventID: 4657 + SELECTION_2: + ObjectName: '*\SOFTWARE\Microsoft\.NETFramework' + SELECTION_3: + ObjectValueName: ETWEnabled + SELECTION_4: + NewValue: '0' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- unknown +id: a4c90ea1-2634-4ca0-adbb-35eae169b6fc +level: critical +logsource: + product: windows + service: security +references: +- https://twitter.com/_xpn_/status/1268712093928378368 +- https://social.msdn.microsoft.com/Forums/vstudio/en-US/0878832e-39d7-4eaf-8e16-a729c4c40975/what-can-i-use-e13c0d23ccbc4e12931bd9cc2eee27e4-for?forum=clr +- https://github.com/dotnet/runtime/blob/ee2355c801d892f2894b0f7b14a20e6cc50e0e54/docs/design/coreclr/jit/viewing-jit-dumps.md#setting-configuration-variables +- https://github.com/dotnet/runtime/blob/f62e93416a1799aecc6b0947adad55a0d9870732/src/coreclr/src/inc/clrconfigvalues.h#L35-L38 +- https://github.com/dotnet/runtime/blob/7abe42dc1123722ed385218268bb9fe04556e3d3/src/coreclr/src/inc/clrconfig.h#L33-L39 +- https://github.com/dotnet/runtime/search?p=1&q=COMPlus_&unscoped_q=COMPlus_ +- https://bunnyinside.com/?term=f71e8cb9c76a +- http://managed670.rssing.com/chan-5590147/all_p1.html +- https://github.com/dotnet/runtime/blob/4f9ae42d861fcb4be2fcd5d3d55d5f227d30e723/docs/coding-guidelines/clr-jit-coding-conventions.md#1412-disabling-code +status: experimental +tags: +- attack.defense_evasion +- attack.t1112 diff --git a/rules/sigma/windows/builtin/win_event_log_cleared.yml b/rules/sigma/windows/builtin/win_event_log_cleared.yml new file mode 100644 index 00000000..a5317944 --- /dev/null +++ b/rules/sigma/windows/builtin/win_event_log_cleared.yml @@ -0,0 +1,30 @@ + +title: Security Event Log Cleared +author: Saw Winn Naung +date: 2021/08/15 +description: Checks for event id 1102 which indicates the security event log was cleared. +detection: + SELECTION_1: + EventID: 1102 + SELECTION_2: + Source: Microsoft-Windows-Eventlog + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate administrative activity +fields: +- SubjectLogonId +- SubjectUserName +- SubjectUserSid +- SubjectDomainName +id: a122ac13-daf8-4175-83a2-72c387be339d +level: medium +logsource: + product: windows + service: security +modified: 2021/10/08 +references: +- https://github.com/Azure/Azure-Sentinel/blob/master/Detections/SecurityEvent/SecurityEventLogCleared.yaml +status: experimental +tags: +- attack.t1107 +- attack.t1070.001 diff --git a/rules/sigma/windows/builtin/win_exchange_transportagent.yml b/rules/sigma/windows/builtin/win_exchange_transportagent.yml new file mode 100644 index 00000000..be3d4154 --- /dev/null +++ b/rules/sigma/windows/builtin/win_exchange_transportagent.yml @@ -0,0 +1,27 @@ + +title: MSExchange Transport Agent Installation +author: Tobias Michalski +date: 2021/06/08 +description: Detects the Installation of a Exchange Transport Agent +detection: + condition: Install-TransportAgent +falsepositives: +- legitimate installations of exchange TransportAgents. AssemblyPath is a good indicator + for this. +fields: +- AssemblyPath +id: 4fe151c2-ecf9-4fae-95ae-b88ec9c2fca6 +level: medium +logsource: + product: windows + service: msexchange-management +modified: 2021/09/19 +references: +- https://twitter.com/blueteamsec1/status/1401290874202382336?s=20 +related: +- id: 83809e84-4475-4b69-bc3e-4aad8568612f + type: derived +status: experimental +tags: +- attack.persistence +- attack.t1505.002 diff --git a/rules/sigma/windows/builtin/win_exploit_cve_2021_1675_printspooler.yml b/rules/sigma/windows/builtin/win_exploit_cve_2021_1675_printspooler.yml new file mode 100644 index 00000000..b7dfe24d --- /dev/null +++ b/rules/sigma/windows/builtin/win_exploit_cve_2021_1675_printspooler.yml @@ -0,0 +1,44 @@ + +title: Possible CVE-2021-1675 Print Spooler Exploitation +author: Florian Roth, KevTheHermit, fuzzyf10w +date: 2021/06/30 +description: Detects events of driver load errors in print service logs that could + be a sign of successful exploitation attempts of print spooler vulnerability CVE-2021-1675 +detection: + SELECTION_1: + EventID: 808 + SELECTION_2: + EventID: 4909 + SELECTION_3: + ErrorCode: + - '0x45A' + - '0x7e' + SELECTION_4: + - The print spooler failed to load a plug-in module + - MyExploit.dll + - evil.dll + - \addCube.dll + - \rev.dll + - \rev2.dll + - \main64.dll + - \mimilib.dll + - \mimispool.dll + condition: (((SELECTION_1 or SELECTION_2) and SELECTION_3) or (SELECTION_4)) +falsepositives: +- Problems with printer drivers +fields: +- PluginDllName +id: 4e64668a-4da1-49f5-a8df-9e2d5b866718 +level: high +logsource: + product: windows + service: printservice-admin +modified: 2021/07/08 +references: +- https://github.com/hhlxf/PrintNightmare +- https://github.com/afwu/PrintNightmare +- https://twitter.com/fuzzyf10w/status/1410202370835898371 +- https://nvd.nist.gov/vuln/detail/cve-2021-1675 +status: experimental +tags: +- attack.execution diff --git a/rules/sigma/windows/builtin/win_exploit_cve_2021_1675_printspooler_operational.yml b/rules/sigma/windows/builtin/win_exploit_cve_2021_1675_printspooler_operational.yml new file mode 100644 index 00000000..42eb7436 --- /dev/null +++ b/rules/sigma/windows/builtin/win_exploit_cve_2021_1675_printspooler_operational.yml @@ -0,0 +1,30 @@ + +title: CVE-2021-1675 Print Spooler Exploitation +author: Florian Roth +date: 2021/07/01 +description: Detects driver load events print service operational log that are a sign + of successful exploitation attempts against print spooler vulnerability CVE-2021-1675 +detection: + SELECTION_1: + EventID: '316' + SELECTION_2: + - 'UNIDRV.DLL, kernelbase.dll, ' + - ' 123 ' + - ' 1234 ' + - mimispool + condition: (SELECTION_1 and (SELECTION_2)) +falsepositives: +- Unknown +fields: +- DriverAdded +id: f34d942d-c8c4-4f1f-b196-22471aecf10a +level: critical +logsource: + product: windows + service: printservice-operational +references: +- https://twitter.com/MalwareJake/status/1410421967463731200 +- https://nvd.nist.gov/vuln/detail/cve-2021-1675 +status: experimental +tags: +- attack.execution diff --git a/rules/sigma/windows/builtin/win_exploit_cve_2021_1675_printspooler_security.yml b/rules/sigma/windows/builtin/win_exploit_cve_2021_1675_printspooler_security.yml new file mode 100644 index 00000000..808b8daa --- /dev/null +++ b/rules/sigma/windows/builtin/win_exploit_cve_2021_1675_printspooler_security.yml @@ -0,0 +1,33 @@ + +title: CVE-2021-1675 Print Spooler Exploitation IPC Access +author: INIT_6 +date: 2021/07/02 +description: Detects remote printer driver load from Detailed File Share in Security + logs that are a sign of successful exploitation attempts against print spooler vulnerability + CVE-2021-1675 and CVE-2021-34527 +detection: + SELECTION_1: + EventID: '5145' + SELECTION_2: + ShareName: \\\*\IPC$ + SELECTION_3: + RelativeTargetName: spoolss + SELECTION_4: + AccessMask: '0x3' + SELECTION_5: + ObjectType: File + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- nothing observed so far +id: 8fe1c584-ee61-444b-be21-e9054b229694 +level: critical +logsource: + product: windows + service: security +references: +- https://twitter.com/INIT_3/status/1410662463641731075 +- https://nvd.nist.gov/vuln/detail/cve-2021-1675 +- https://nvd.nist.gov/vuln/detail/cve-2021-34527 +status: experimental +tags: +- attack.execution diff --git a/rules/sigma/windows/builtin/win_external_device.yml b/rules/sigma/windows/builtin/win_external_device.yml new file mode 100644 index 00000000..6eefe6ba --- /dev/null +++ b/rules/sigma/windows/builtin/win_external_device.yml @@ -0,0 +1,28 @@ + +title: External Disk Drive Or USB Storage Device +author: Keith Wright +date: 2019/11/20 +description: Detects external diskdrives or plugged in USB devices , EventID 6416 + on windows 10 or later +detection: + SELECTION_1: + EventID: 6416 + SELECTION_2: + ClassName: DiskDrive + SELECTION_3: + DeviceDescription: USB Mass Storage Device + condition: ((SELECTION_1 and SELECTION_2) or SELECTION_3) +falsepositives: +- Legitimate administrative activity +id: f69a87ea-955e-4fb4-adb2-bb9fd6685632 +level: low +logsource: + product: windows + service: security +modified: 2021/08/09 +status: experimental +tags: +- attack.t1091 +- attack.t1200 +- attack.lateral_movement +- attack.initial_access diff --git a/rules/sigma/windows/builtin/win_global_catalog_enumeration.yml b/rules/sigma/windows/builtin/win_global_catalog_enumeration.yml new file mode 100644 index 00000000..fca20a1c --- /dev/null +++ b/rules/sigma/windows/builtin/win_global_catalog_enumeration.yml @@ -0,0 +1,32 @@ + +title: Enumeration via the Global Catalog +author: Chakib Gzenayi (@Chak092), Hosni Mribah +date: 2020/05/11 +description: Detects enumeration of the global catalog (that can be performed using + BloodHound or others AD reconnaissance tools). Adjust Threshold according to domain + width. +detection: + SELECTION_1: + EventID: 5156 + SELECTION_2: + DestinationPort: 3268 + SELECTION_3: + DestinationPort: 3269 + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3)) | count() by SourceAddress + > 2000 +falsepositives: +- Exclude known DCs. +id: 619b020f-0fd7-4f23-87db-3f51ef837a34 +level: medium +logsource: + definition: The advanced audit policy setting "Windows Filtering Platform > Filtering + Platform Connection" must be configured for Success + product: windows + service: security +modified: 2021/06/01 +references: +- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-5156 +tags: +- attack.discovery +- attack.t1087 +- attack.t1087.002 diff --git a/rules/sigma/windows/builtin/win_gpo_scheduledtasks.yml b/rules/sigma/windows/builtin/win_gpo_scheduledtasks.yml new file mode 100644 index 00000000..06d06e5b --- /dev/null +++ b/rules/sigma/windows/builtin/win_gpo_scheduledtasks.yml @@ -0,0 +1,36 @@ + +title: Persistence and Execution at Scale via GPO Scheduled Task +author: Samir Bousseaden +date: 2019/04/03 +description: Detect lateral movement using GPO scheduled task, usually used to deploy + ransomware at scale +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + ShareName: \\*\SYSVOL + SELECTION_3: + RelativeTargetName: '*ScheduledTasks.xml' + SELECTION_4: + Accesses: + - '*WriteData*' + - '*%%4417*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- if the source IP is not localhost then it's super suspicious, better to monitor + both local and remote changes to GPO scheduledtasks +id: a8f29a7b-b137-4446-80a0-b804272f3da2 +level: high +logsource: + definition: The advanced audit policy setting "Object Access > Audit Detailed File + Share" must be configured for Success/Failure + product: windows + service: security +references: +- https://twitter.com/menasec1/status/1106899890377052160 +- https://www.secureworks.com/blog/ransomware-as-a-distraction +tags: +- attack.persistence +- attack.lateral_movement +- attack.t1053 +- attack.t1053.005 diff --git a/rules/sigma/windows/builtin/win_hack_smbexec.yml b/rules/sigma/windows/builtin/win_hack_smbexec.yml new file mode 100644 index 00000000..97fb5b6e --- /dev/null +++ b/rules/sigma/windows/builtin/win_hack_smbexec.yml @@ -0,0 +1,34 @@ + +title: smbexec.py Service Installation +author: Omer Faruk Celik +date: 2018/03/20 +description: Detects the use of smbexec.py tool by detecting a specific service installation +detection: + SELECTION_1: + EventID: 7045 + SELECTION_2: + ServiceName: BTOBTO + SELECTION_3: + ServiceFileName: '*\execute.bat' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Penetration Test +- Unknown +fields: +- ServiceName +- ServiceFileName +id: 52a85084-6989-40c3-8f32-091e12e13f09 +level: critical +logsource: + product: windows + service: system +modified: 2020/08/23 +references: +- https://blog.ropnop.com/using-credentials-to-own-windows-boxes-part-2-psexec-and-services/ +tags: +- attack.lateral_movement +- attack.execution +- attack.t1077 +- attack.t1021.002 +- attack.t1035 +- attack.t1569.002 diff --git a/rules/sigma/windows/builtin/win_hidden_user_creation.yml b/rules/sigma/windows/builtin/win_hidden_user_creation.yml new file mode 100644 index 00000000..fb45ac19 --- /dev/null +++ b/rules/sigma/windows/builtin/win_hidden_user_creation.yml @@ -0,0 +1,28 @@ + +title: Hidden Local User Creation +author: Christian Burkard +date: 2021/05/03 +description: Detects the creation of a local hidden user account which should not + happen for event ID 4720. +detection: + SELECTION_1: + EventID: 4720 + SELECTION_2: + TargetUserName: '*$' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +fields: +- EventCode +- AccountName +id: 7b449a5e-1db5-4dd0-a2dc-4e3a67282538 +level: high +logsource: + product: windows + service: security +references: +- https://twitter.com/SBousseaden/status/1387743867663958021 +status: experimental +tags: +- attack.persistence +- attack.t1136.001 diff --git a/rules/sigma/windows/builtin/win_hybridconnectionmgr_svc_installation.yml b/rules/sigma/windows/builtin/win_hybridconnectionmgr_svc_installation.yml new file mode 100644 index 00000000..c8b0d585 --- /dev/null +++ b/rules/sigma/windows/builtin/win_hybridconnectionmgr_svc_installation.yml @@ -0,0 +1,26 @@ + +title: HybridConnectionManager Service Installation +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2021/04/12 +description: Rule to detect the Hybrid Connection Manager service installation. +detection: + SELECTION_1: + EventID: 4697 + SELECTION_2: + ServiceName: HybridConnectionManager + SELECTION_3: + ServiceFileName: '*HybridConnectionManager*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Legitimate use of Hybrid Connection Manager via Azure function apps. +id: 0ee4d8a5-4e67-4faf-acfa-62a78457d1f2 +level: high +logsource: + product: windows + service: security +modified: 2021/08/09 +references: +- https://twitter.com/Cyb3rWard0g/status/1381642789369286662 +status: experimental +tags: +- attack.persistence diff --git a/rules/sigma/windows/builtin/win_hybridconnectionmgr_svc_running.yml b/rules/sigma/windows/builtin/win_hybridconnectionmgr_svc_running.yml new file mode 100644 index 00000000..9710207e --- /dev/null +++ b/rules/sigma/windows/builtin/win_hybridconnectionmgr_svc_running.yml @@ -0,0 +1,30 @@ + +title: HybridConnectionManager Service Running +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2021/04/12 +description: Rule to detect the Hybrid Connection Manager service running on an endpoint. +detection: + SELECTION_1: + EventID: 40300 + SELECTION_2: + EventID: 40301 + SELECTION_3: + EventID: 40302 + SELECTION_4: + - HybridConnection + - sb:// + - servicebus.windows.net + - HybridConnectionManage + condition: ((SELECTION_1 or SELECTION_2 or SELECTION_3) and (SELECTION_4)) +falsepositives: +- Legitimate use of Hybrid Connection Manager via Azure function apps. +id: b55d23e5-6821-44ff-8a6e-67218891e49f +level: high +logsource: + product: windows + service: Microsoft-ServiceBus-Client +references: +- https://twitter.com/Cyb3rWard0g/status/1381642789369286662 +status: experimental +tags: +- attack.persistence diff --git a/rules/sigma/windows/builtin/win_impacket_psexec.yml b/rules/sigma/windows/builtin/win_impacket_psexec.yml new file mode 100644 index 00000000..aeae3ca0 --- /dev/null +++ b/rules/sigma/windows/builtin/win_impacket_psexec.yml @@ -0,0 +1,30 @@ + +title: Impacket PsExec Execution +author: Bhabesh Raj +date: 2020/12/14 +description: Detects execution of Impacket's psexec.py. +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + ShareName: \\*\IPC$ + SELECTION_3: + RelativeTargetName: + - '*RemCom_stdint*' + - '*RemCom_stdoutt*' + - '*RemCom_stderrt*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- nothing observed so far +id: 32d56ea1-417f-44ff-822b-882873f5f43b +level: high +logsource: + definition: The advanced audit policy setting "Object Access > Audit Detailed File + Share" must be configured for Success/Failure + product: windows + service: security +references: +- https://blog.menasec.net/2019/02/threat-hunting-3-detecting-psexec.html +tags: +- attack.lateral_movement +- attack.t1021.002 diff --git a/rules/sigma/windows/builtin/win_impacket_secretdump.yml b/rules/sigma/windows/builtin/win_impacket_secretdump.yml new file mode 100644 index 00000000..d24953e8 --- /dev/null +++ b/rules/sigma/windows/builtin/win_impacket_secretdump.yml @@ -0,0 +1,33 @@ + +title: Possible Impacket SecretDump Remote Activity +author: Samir Bousseaden, wagga +date: 2019/04/03 +description: Detect AD credential dumping using impacket secretdump HKTL +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + ShareName: \\*\ADMIN$ + SELECTION_3: + RelativeTargetName: '*SYSTEM32\\*' + SELECTION_4: + RelativeTargetName: '*.tmp*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- pentesting +id: 252902e3-5830-4cf6-bf21-c22083dfd5cf +level: high +logsource: + definition: The advanced audit policy setting "Object Access > Audit Detailed File + Share" must be configured for Success/Failure + product: windows + service: security +modified: 2021/06/27 +references: +- https://blog.menasec.net/2019/02/threat-huting-10-impacketsecretdump.html +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.002 +- attack.t1003.004 +- attack.t1003.003 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_clip_services.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_clip_services.yml new file mode 100644 index 00000000..8d0a93a9 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_clip_services.yml @@ -0,0 +1,27 @@ + +title: Invoke-Obfuscation CLIP+ Launcher +author: Jonathan Cheong, oscd.community +date: 2020/10/13 +description: Detects Obfuscated use of Clip.exe to execute PowerShell +detection: + SELECTION_1: + ImagePath|re: .*cmd.{0,5}(?:/c|/r).+clip(?:\.exe)?.{0,4}&&.+clipboard]::\(\s\\"\{\d\}.+\-f.+" + SELECTION_2: + EventID: 7045 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: f7385ee2-0e0c-11eb-adc1-0242ac120002 +level: high +logsource: + product: windows + service: system +modified: 2021/09/16 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_clip_services_security.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_clip_services_security.yml new file mode 100644 index 00000000..482b842d --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_clip_services_security.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation CLIP+ Launcher +author: Jonathan Cheong, oscd.community +date: 2020/10/13 +description: Detects Obfuscated use of Clip.exe to execute PowerShell +detection: + SELECTION_1: + ServiceFileName|re: .*cmd.{0,5}(?:/c|/r).+clip(?:\.exe)?.{0,4}&&.+clipboard]::\(\s\\"\{\d\}.+\-f.+" + SELECTION_2: + EventID: 4697 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 4edf51e1-cb83-4e1a-bc39-800e396068e3 +level: high +logsource: + product: windows + service: security +modified: 2021/09/16 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: f7385ee2-0e0c-11eb-adc1-0242ac120002 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_obfuscated_iex_services.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_obfuscated_iex_services.yml new file mode 100644 index 00000000..42d9636b --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_obfuscated_iex_services.yml @@ -0,0 +1,37 @@ + +title: Invoke-Obfuscation Obfuscated IEX Invocation +author: Daniel Bohannon (@Mandiant/@FireEye), oscd.community +date: 2019/11/08 +description: Detects all variations of obfuscated powershell IEX invocation code generated + by Invoke-Obfuscation framework from the following code block — https://github.com/danielbohannon/Invoke-Obfuscation/blob/master/Out-ObfuscatedStringCommand.ps1#L873-L888 +detection: + SELECTION_1: + EventID: 7045 + SELECTION_2: + ImagePath|re: \$PSHome\[\s*\d{1,3}\s*\]\s*\+\s*\$PSHome\[ + SELECTION_3: + ImagePath|re: \$ShellId\[\s*\d{1,3}\s*\]\s*\+\s*\$ShellId\[ + SELECTION_4: + ImagePath|re: \$env:Public\[\s*\d{1,3}\s*\]\s*\+\s*\$env:Public\[ + SELECTION_5: + ImagePath|re: \$env:ComSpec\[(\s*\d{1,3}\s*,){2} + SELECTION_6: + ImagePath|re: \\*mdr\*\W\s*\)\.Name + SELECTION_7: + ImagePath|re: \$VerbosePreference\.ToString\( + SELECTION_8: + ImagePath|re: \String\]\s*\$VerbosePreference + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3 or SELECTION_4 or SELECTION_5 + or SELECTION_6 or SELECTION_7 or SELECTION_8)) +falsepositives: +- Unknown +id: 51aa9387-1c53-4153-91cc-d73c59ae1ca9 +level: high +logsource: + product: windows + service: system +modified: 2021/09/16 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_obfuscated_iex_services_security.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_obfuscated_iex_services_security.yml new file mode 100644 index 00000000..ee6c57d1 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_obfuscated_iex_services_security.yml @@ -0,0 +1,40 @@ + +title: Invoke-Obfuscation Obfuscated IEX Invocation +author: Daniel Bohannon (@Mandiant/@FireEye), oscd.community +date: 2019/11/08 +description: Detects all variations of obfuscated powershell IEX invocation code generated + by Invoke-Obfuscation framework from the following code block — https://github.com/danielbohannon/Invoke-Obfuscation/blob/master/Out-ObfuscatedStringCommand.ps1#L873-L888 +detection: + SELECTION_1: + EventID: 4697 + SELECTION_2: + ServiceFileName|re: \$PSHome\[\s*\d{1,3}\s*\]\s*\+\s*\$PSHome\[ + SELECTION_3: + ServiceFileName|re: \$ShellId\[\s*\d{1,3}\s*\]\s*\+\s*\$ShellId\[ + SELECTION_4: + ServiceFileName|re: \$env:Public\[\s*\d{1,3}\s*\]\s*\+\s*\$env:Public\[ + SELECTION_5: + ServiceFileName|re: \$env:ComSpec\[(\s*\d{1,3}\s*,){2} + SELECTION_6: + ServiceFileName|re: \\*mdr\*\W\s*\)\.Name + SELECTION_7: + ServiceFileName|re: \$VerbosePreference\.ToString\( + SELECTION_8: + ServiceFileName|re: \String\]\s*\$VerbosePreference + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3 or SELECTION_4 or SELECTION_5 + or SELECTION_6 or SELECTION_7 or SELECTION_8)) +falsepositives: +- Unknown +id: fd0f5778-d3cb-4c9a-9695-66759d04702a +level: high +logsource: + product: windows + service: security +modified: 2021/09/16 +related: +- id: 51aa9387-1c53-4153-91cc-d73c59ae1ca9 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_stdin_services.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_stdin_services.yml new file mode 100644 index 00000000..c60be129 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_stdin_services.yml @@ -0,0 +1,27 @@ + +title: Invoke-Obfuscation STDIN+ Launcher +author: Jonathan Cheong, oscd.community +date: 2020/10/15 +description: Detects Obfuscated use of stdin to execute PowerShell +detection: + SELECTION_1: + ImagePath|re: .*cmd.{0,5}(?:/c|/r).+powershell.+(?:\$\{?input\}?|noexit).+" + SELECTION_2: + EventID: 7045 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 72862bf2-0eb1-11eb-adc1-0242ac120002 +level: high +logsource: + product: windows + service: system +modified: 2021/09/17 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_stdin_services_security.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_stdin_services_security.yml new file mode 100644 index 00000000..c8cf3603 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_stdin_services_security.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation STDIN+ Launcher +author: Jonathan Cheong, oscd.community +date: 2020/10/15 +description: Detects Obfuscated use of stdin to execute PowerShell +detection: + SELECTION_1: + ServiceFileName|re: .*cmd.{0,5}(?:/c|/r).+powershell.+(?:\$\{?input\}?|noexit).+" + SELECTION_2: + EventID: 4697 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 0c718a5e-4284-4fb9-b4d9-b9a50b3a1974 +level: high +logsource: + product: windows + service: security +modified: 2021/09/17 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 72862bf2-0eb1-11eb-adc1-0242ac120002 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_var_services.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_var_services.yml new file mode 100644 index 00000000..d95a8dbe --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_var_services.yml @@ -0,0 +1,27 @@ + +title: Invoke-Obfuscation VAR+ Launcher +author: Jonathan Cheong, oscd.community +date: 2020/10/15 +description: Detects Obfuscated use of Environment Variables to execute PowerShell +detection: + SELECTION_1: + EventID: 7045 + SELECTION_2: + ImagePath|re: .*cmd.{0,5}(?:/c|/r)(?:\s|)"set\s[a-zA-Z]{3,6}.*(?:\{\d\}){1,}\\"\s+?\-f(?:.*\)){1,}.*" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 8ca7004b-e620-4ecb-870e-86129b5b8e75 +level: high +logsource: + product: windows + service: system +modified: 2021/09/17 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_var_services_security.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_var_services_security.yml new file mode 100644 index 00000000..f07168f1 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_var_services_security.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation VAR+ Launcher +author: Jonathan Cheong, oscd.community +date: 2020/10/15 +description: Detects Obfuscated use of Environment Variables to execute PowerShell +detection: + SELECTION_1: + EventID: 4697 + SELECTION_2: + ServiceFileName|re: .*cmd.{0,5}(?:/c|/r)(?:\s|)"set\s[a-zA-Z]{3,6}.*(?:\{\d\}){1,}\\"\s+?\-f(?:.*\)){1,}.*" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: dcf2db1f-f091-425b-a821-c05875b8925a +level: high +logsource: + product: windows + service: security +modified: 2021/09/17 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 8ca7004b-e620-4ecb-870e-86129b5b8e75 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_compress_services.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_compress_services.yml new file mode 100644 index 00000000..a581eb99 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_compress_services.yml @@ -0,0 +1,27 @@ + +title: Invoke-Obfuscation COMPRESS OBFUSCATION +author: Timur Zinniatullin, oscd.community +date: 2020/10/18 +description: Detects Obfuscated Powershell via COMPRESS OBFUSCATION +detection: + SELECTION_1: + ImagePath|re: (?i).*new-object.*(?:system\.io\.compression\.deflatestream|system\.io\.streamreader).*text\.encoding\]::ascii.*readtoend + SELECTION_2: + EventID: 7045 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 175997c5-803c-4b08-8bb0-70b099f47595 +level: medium +logsource: + product: windows + service: system +modified: 2021/08/09 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_compress_services_security.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_compress_services_security.yml new file mode 100644 index 00000000..7c92c4db --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_compress_services_security.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation COMPRESS OBFUSCATION +author: Timur Zinniatullin, oscd.community +date: 2020/10/18 +description: Detects Obfuscated Powershell via COMPRESS OBFUSCATION +detection: + SELECTION_1: + ServiceFileName|re: (?i).*new-object.*(?:system\.io\.compression\.deflatestream|system\.io\.streamreader).*text\.encoding\]::ascii.*readtoend + SELECTION_2: + EventID: 4697 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 7a922f1b-2635-4d6c-91ef-af228b198ad3 +level: medium +logsource: + product: windows + service: security +modified: 2021/09/18 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 175997c5-803c-4b08-8bb0-70b099f47595 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_rundll_services.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_rundll_services.yml new file mode 100644 index 00000000..87b33028 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_rundll_services.yml @@ -0,0 +1,27 @@ + +title: Invoke-Obfuscation RUNDLL LAUNCHER +author: Timur Zinniatullin, oscd.community +date: 2020/10/18 +description: Detects Obfuscated Powershell via RUNDLL LAUNCHER +detection: + SELECTION_1: + ImagePath|re: (?i).*rundll32(?:\.exe)?(?:\s+)?shell32\.dll.*shellexec_rundll.*powershell.*" + SELECTION_2: + EventID: 7045 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 11b52f18-aaec-4d60-9143-5dd8cc4706b9 +level: medium +logsource: + product: windows + service: system +modified: 2021/09/18 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_rundll_services_security.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_rundll_services_security.yml new file mode 100644 index 00000000..381f2ff6 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_rundll_services_security.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation RUNDLL LAUNCHER +author: Timur Zinniatullin, oscd.community +date: 2020/10/18 +description: Detects Obfuscated Powershell via RUNDLL LAUNCHER +detection: + SELECTION_1: + ServiceFileName|re: (?i).*rundll32(?:\.exe)?(?:\s+)?shell32\.dll.*shellexec_rundll.*powershell.*" + SELECTION_2: + EventID: 4697 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: f241cf1b-3a6b-4e1a-b4f9-133c00dd95ca +level: medium +logsource: + product: windows + service: security +modified: 2021/09/18 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 11b52f18-aaec-4d60-9143-5dd8cc4706b9 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_stdin_services.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_stdin_services.yml new file mode 100644 index 00000000..2525c04a --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_stdin_services.yml @@ -0,0 +1,27 @@ + +title: Invoke-Obfuscation Via Stdin +author: Nikita Nazarov, oscd.community +date: 2020/10/12 +description: Detects Obfuscated Powershell via Stdin in Scripts +detection: + SELECTION_1: + ImagePath|re: (?i).*(set).*&&\s?set.*(environment|invoke|\$\{?input).*&&.*" + SELECTION_2: + EventID: 7045 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 487c7524-f892-4054-b263-8a0ace63fc25 +level: high +logsource: + product: windows + service: system +modified: 2021/09/18 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_stdin_services_security.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_stdin_services_security.yml new file mode 100644 index 00000000..2ac6c448 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_stdin_services_security.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation Via Stdin +author: Nikita Nazarov, oscd.community +date: 2020/10/12 +description: Detects Obfuscated Powershell via Stdin in Scripts +detection: + SELECTION_1: + ServiceFileName|re: (?i).*(set).*&&\s?set.*(environment|invoke|\$\{?input).*&&.*" + SELECTION_2: + EventID: 4697 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 80b708f3-d034-40e4-a6c8-d23b7a7db3d1 +level: high +logsource: + product: windows + service: security +modified: 2021/09/18 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 487c7524-f892-4054-b263-8a0ace63fc25 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_clip_services.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_clip_services.yml new file mode 100644 index 00000000..aff3bd8b --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_clip_services.yml @@ -0,0 +1,27 @@ + +title: Invoke-Obfuscation Via Use Clip +author: Nikita Nazarov, oscd.community +date: 2020/10/09 +description: Detects Obfuscated Powershell via use Clip.exe in Scripts +detection: + SELECTION_1: + ImagePath|re: (?i).*?echo.*clip.*&&.*(Clipboard|i`?n`?v`?o`?k`?e`?).* + SELECTION_2: + EventID: 7045 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 63e3365d-4824-42d8-8b82-e56810fefa0c +level: high +logsource: + product: windows + service: system +modified: 2021/09/18 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_clip_services_security.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_clip_services_security.yml new file mode 100644 index 00000000..6147cc92 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_clip_services_security.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation Via Use Clip +author: Nikita Nazarov, oscd.community +date: 2020/10/09 +description: Detects Obfuscated Powershell via use Clip.exe in Scripts +detection: + SELECTION_1: + ServiceFileName|re: (?i).*?echo.*clip.*&&.*(Clipboard|i`?n`?v`?o`?k`?e`?).* + SELECTION_2: + EventID: 4697 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 1a0a2ff1-611b-4dac-8216-8a7b47c618a6 +level: high +logsource: + product: windows + service: security +modified: 2021/09/18 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 63e3365d-4824-42d8-8b82-e56810fefa0c + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_mshta_services.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_mshta_services.yml new file mode 100644 index 00000000..741f0654 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_mshta_services.yml @@ -0,0 +1,27 @@ + +title: Invoke-Obfuscation Via Use MSHTA +author: Nikita Nazarov, oscd.community +date: 2020/10/09 +description: Detects Obfuscated Powershell via use MSHTA in Scripts +detection: + SELECTION_1: + ImagePath|re: (?i).*(set).*(&&).*(mshta).*(vbscript:createobject).*(\.run).*\(window\.close\).*" + SELECTION_2: + EventID: 7045 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 7e9c7999-0f9b-4d4a-a6ed-af6d553d4af4 +level: high +logsource: + product: windows + service: system +modified: 2021/09/18 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_mshta_services_security.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_mshta_services_security.yml new file mode 100644 index 00000000..80ae5c5e --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_mshta_services_security.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation Via Use MSHTA +author: Nikita Nazarov, oscd.community +date: 2020/10/09 +description: Detects Obfuscated Powershell via use MSHTA in Scripts +detection: + SELECTION_1: + ServiceFileName|re: (?i).*(set).*(&&).*(mshta).*(vbscript:createobject).*(\.run).*\(window\.close\).*" + SELECTION_2: + EventID: 4697 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 9b8d9203-4e0f-4cd9-bb06-4cc4ea6d0e9a +level: high +logsource: + product: windows + service: security +modified: 2021/09/18 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 7e9c7999-0f9b-4d4a-a6ed-af6d553d4af4 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_rundll32_services.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_rundll32_services.yml new file mode 100644 index 00000000..639bbc88 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_rundll32_services.yml @@ -0,0 +1,27 @@ + +title: Invoke-Obfuscation Via Use Rundll32 +author: Nikita Nazarov, oscd.community +date: 2020/10/09 +description: Detects Obfuscated Powershell via use Rundll32 in Scripts +detection: + SELECTION_1: + ImagePath|re: (?i).*&&.*rundll32.*shell32\.dll.*shellexec_rundll.*(value|invoke|comspec|iex).*" + SELECTION_2: + EventID: 7045 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 641a4bfb-c017-44f7-800c-2aee0184ce9b +level: high +logsource: + product: windows + service: system +modified: 2021/09/18 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_rundll32_services_security.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_rundll32_services_security.yml new file mode 100644 index 00000000..7d5b1b16 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_use_rundll32_services_security.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation Via Use Rundll32 +author: Nikita Nazarov, oscd.community +date: 2020/10/09 +description: Detects Obfuscated Powershell via use Rundll32 in Scripts +detection: + SELECTION_1: + ServiceFileName|re: (?i).*&&.*rundll32.*shell32\.dll.*shellexec_rundll.*(value|invoke|comspec|iex).*" + SELECTION_2: + EventID: 4697 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: cd0f7229-d16f-42de-8fe3-fba365fbcb3a +level: high +logsource: + product: windows + service: security +modified: 2021/09/18 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 641a4bfb-c017-44f7-800c-2aee0184ce9b + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_var_services.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_var_services.yml new file mode 100644 index 00000000..42ae63e1 --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_var_services.yml @@ -0,0 +1,27 @@ + +title: Invoke-Obfuscation VAR++ LAUNCHER OBFUSCATION +author: Timur Zinniatullin, oscd.community +date: 2020/10/13 +description: Detects Obfuscated Powershell via VAR++ LAUNCHER +detection: + SELECTION_1: + ImagePath|re: (?i).*&&set.*(\{\d\}){2,}\\"\s+?\-f.*&&.*cmd.*/c + SELECTION_2: + EventID: 7045 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 14bcba49-a428-42d9-b943-e2ce0f0f7ae6 +level: high +logsource: + product: windows + service: system +modified: 2021/09/18 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_invoke_obfuscation_via_var_services_security.yml b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_var_services_security.yml new file mode 100644 index 00000000..8aa3705b --- /dev/null +++ b/rules/sigma/windows/builtin/win_invoke_obfuscation_via_var_services_security.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation VAR++ LAUNCHER OBFUSCATION +author: Timur Zinniatullin, oscd.community +date: 2020/10/13 +description: Detects Obfuscated Powershell via VAR++ LAUNCHER +detection: + SELECTION_1: + ServiceFileName|re: (?i).*&&set.*(\{\d\}){2,}\\"\s+?\-f.*&&.*cmd.*/c + SELECTION_2: + EventID: 4697 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 4c54ba8f-73d2-4d40-8890-d9cf1dca3d30 +level: high +logsource: + product: windows + service: security +modified: 2021/09/18 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 14bcba49-a428-42d9-b943-e2ce0f0f7ae6 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_iso_mount.yml b/rules/sigma/windows/builtin/win_iso_mount.yml new file mode 100644 index 00000000..7fbea3ee --- /dev/null +++ b/rules/sigma/windows/builtin/win_iso_mount.yml @@ -0,0 +1,32 @@ + +title: ISO Image Mount +author: Syed Hasan (@syedhasan009) +date: 2021/05/29 +description: Detects the mount of ISO images on an endpoint +detection: + SELECTION_1: + EventID: 4663 + SELECTION_2: + ObjectServer: Security + SELECTION_3: + ObjectType: File + SELECTION_4: + ObjectName: \Device\CdRom* + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Software installation ISO files +id: 0248a7bc-8a9a-4cd8-a57e-3ae8e073a073 +level: medium +logsource: + definition: The advanced audit policy setting "Object Access > Audit Removable Storage" + must be configured for Success/Failure + product: windows + service: security +references: +- https://www.trendmicro.com/vinfo/hk-en/security/news/cybercrime-and-digital-threats/malicious-spam-campaign-uses-iso-image-files-to-deliver-lokibot-and-nanocore +- https://www.proofpoint.com/us/blog/threat-insight/threat-actor-profile-ta2719-uses-colorful-lures-deliver-rats-local-languages +- https://twitter.com/MsftSecIntel/status/1257324139515269121 +status: experimental +tags: +- attack.initial_access +- attack.t1566.001 diff --git a/rules/sigma/windows/builtin/win_lm_namedpipe.yml b/rules/sigma/windows/builtin/win_lm_namedpipe.yml new file mode 100644 index 00000000..1c11df03 --- /dev/null +++ b/rules/sigma/windows/builtin/win_lm_namedpipe.yml @@ -0,0 +1,52 @@ + +title: First Time Seen Remote Named Pipe +author: Samir Bousseaden +date: 2019/04/03 +description: This detection excludes known namped pipes accessible remotely and notify + on newly observed ones, may help to detect lateral movement and remote exec using + named pipes +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + ShareName: \\*\IPC$ + SELECTION_3: + EventID: 5145 + SELECTION_4: + ShareName: \\*\IPC$ + SELECTION_5: + RelativeTargetName: + - atsvc + - samr + - lsarpc + - winreg + - netlogon + - srvsvc + - protected_storage + - wkssvc + - browser + - netdfs + - svcctl + - spoolss + - ntsvcs + - LSM_API_service + - HydraLsPipe + - TermSrv_API_service + - MsFteWds + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3 and SELECTION_4 + and SELECTION_5)) +falsepositives: +- update the excluded named pipe to filter out any newly observed legit named pipe +id: 52d8b0c6-53d6-439a-9e41-52ad442ad9ad +level: high +logsource: + definition: The advanced audit policy setting "Object Access > Audit Detailed File + Share" must be configured for Success/Failure + product: windows + service: security +references: +- https://twitter.com/menasec1/status/1104489274387451904 +tags: +- attack.lateral_movement +- attack.t1077 +- attack.t1021.002 diff --git a/rules/sigma/windows/builtin/win_lolbas_execution_of_nltest.yml b/rules/sigma/windows/builtin/win_lolbas_execution_of_nltest.yml new file mode 100644 index 00000000..c2434bb1 --- /dev/null +++ b/rules/sigma/windows/builtin/win_lolbas_execution_of_nltest.yml @@ -0,0 +1,34 @@ + +title: Correct Execution of Nltest.exe +author: Arun Chauhan +date: 2021/10/04 +description: The attacker might use LOLBAS nltest.exe for discovery of domain controllers, + domain trusts, parent domain and the current user permissions. +detection: + SELECTION_1: + EventID: 4689 + SELECTION_2: + ProcessName: '*nltest.exe' + SELECTION_3: + Status: '0x0' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Red team activity +- rare legitimate use by an administrator +fields: +- SubjectUserName +- SubjectDomainName +id: eeb66bbb-3dde-4582-815a-584aee9fe6d1 +level: high +logsource: + product: windows + service: security +references: +- https://jpcertcc.github.io/ToolAnalysisResultSheet/details/nltest.htm +- https://attack.mitre.org/software/S0359/ +status: experimental +tags: +- attack.discovery +- attack.t1482 +- attack.t1018 +- attack.t1016 diff --git a/rules/sigma/windows/builtin/win_lsass_access_non_system_account.yml b/rules/sigma/windows/builtin/win_lsass_access_non_system_account.yml new file mode 100644 index 00000000..bff50322 --- /dev/null +++ b/rules/sigma/windows/builtin/win_lsass_access_non_system_account.yml @@ -0,0 +1,69 @@ + +title: LSASS Access from Non System Account +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/06/20 +description: Detects potential mimikatz-like tools accessing LSASS from non system + account +detection: + SELECTION_1: + EventID: 4663 + SELECTION_2: + EventID: 4656 + SELECTION_3: + AccessMask: + - '0x40' + - '0x1400' + - '0x1000' + - '0x100000' + - '0x1410' + - '0x1010' + - '0x1438' + - '0x143a' + - '0x1418' + - '0x1f0fff' + - '0x1f1fff' + - '0x1f2fff' + - '0x1f3fff' + - '40' + - '1400' + - '1000' + - '100000' + - '1410' + - '1010' + - '1438' + - 143a + - '1418' + - 1f0fff + - 1f1fff + - 1f2fff + - 1f3fff + SELECTION_4: + ObjectType: Process + SELECTION_5: + ObjectName: '*\lsass.exe' + SELECTION_6: + SubjectUserName: '*$' + SELECTION_7: + ProcessName: C:\Program Files* + condition: ((((SELECTION_1 or SELECTION_2) and SELECTION_3 and SELECTION_4 and SELECTION_5) + and not (SELECTION_6)) and not (SELECTION_7)) +falsepositives: +- Unknown +fields: +- ComputerName +- ObjectName +- SubjectUserName +- ProcessName +id: 962fe167-e48d-4fd6-9974-11e5b9a5d6d1 +level: critical +logsource: + product: windows + service: security +modified: 2021/03/17 +references: +- https://threathunterplaybook.com/notebooks/windows/06_credential_access/WIN-170105221010.html +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.001 diff --git a/rules/sigma/windows/builtin/win_mal_creddumper.yml b/rules/sigma/windows/builtin/win_mal_creddumper.yml new file mode 100644 index 00000000..b4318634 --- /dev/null +++ b/rules/sigma/windows/builtin/win_mal_creddumper.yml @@ -0,0 +1,41 @@ + +title: Credential Dumping Tools Service Execution +author: Florian Roth, Teymur Kheirkhabarov, Daniil Yugoslavskiy, oscd.community +date: 2017/03/05 +description: Detects well-known credential dumping tools execution via service execution + events +detection: + SELECTION_1: + EventID: 7045 + SELECTION_2: + ImagePath: + - '*fgexec*' + - '*dumpsvc*' + - '*cachedump*' + - '*mimidrv*' + - '*gsecdump*' + - '*servpw*' + - '*pwdump*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate Administrator using credential dumping tool for password recovery +id: 4976aa50-8f41-45c6-8b15-ab3fc10e79ed +level: high +logsource: + product: windows + service: system +modified: 2021/09/21 +references: +- https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment +tags: +- attack.credential_access +- attack.execution +- attack.t1003 +- attack.t1003.001 +- attack.t1003.002 +- attack.t1003.004 +- attack.t1003.005 +- attack.t1003.006 +- attack.t1035 +- attack.t1569.002 +- attack.s0005 diff --git a/rules/sigma/windows/builtin/win_mal_wceaux_dll.yml b/rules/sigma/windows/builtin/win_mal_wceaux_dll.yml new file mode 100644 index 00000000..9350fc66 --- /dev/null +++ b/rules/sigma/windows/builtin/win_mal_wceaux_dll.yml @@ -0,0 +1,33 @@ + +title: WCE wceaux.dll Access +author: Thomas Patzke +date: 2017/06/14 +description: Detects wceaux.dll access while WCE pass-the-hash remote command execution + on source host +detection: + SELECTION_1: + EventID: 4656 + SELECTION_2: + EventID: 4658 + SELECTION_3: + EventID: 4660 + SELECTION_4: + EventID: 4663 + SELECTION_5: + ObjectName: '*\wceaux.dll' + condition: ((SELECTION_1 or SELECTION_2 or SELECTION_3 or SELECTION_4) and SELECTION_5) +falsepositives: +- Penetration testing +id: 1de68c67-af5c-4097-9c85-fe5578e09e67 +level: critical +logsource: + product: windows + service: security +references: +- https://www.jpcert.or.jp/english/pub/sr/ir_research.html +- https://jpcertcc.github.io/ToolAnalysisResultSheet +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.s0005 diff --git a/rules/sigma/windows/builtin/win_metasploit_authentication.yml b/rules/sigma/windows/builtin/win_metasploit_authentication.yml new file mode 100644 index 00000000..05c52767 --- /dev/null +++ b/rules/sigma/windows/builtin/win_metasploit_authentication.yml @@ -0,0 +1,38 @@ + +title: Metasploit SMB Authentication +author: Chakib Gzenayi (@Chak092), Hosni Mribah +date: 2020/05/06 +description: Alerts on Metasploit host's authentications on the domain. +detection: + SELECTION_1: + EventID: 4625 + SELECTION_2: + EventID: 4624 + SELECTION_3: + LogonType: 3 + SELECTION_4: + AuthenticationPackageName: NTLM + SELECTION_5: + WorkstationName|re: ^[A-Za-z0-9]{16}$ + SELECTION_6: + ProcessName|re: ^$ + SELECTION_7: + EventID: 4776 + SELECTION_8: + Workstation|re: ^[A-Za-z0-9]{16}$ + condition: (((SELECTION_1 or SELECTION_2) and SELECTION_3 and SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7 and SELECTION_8)) +falsepositives: +- Linux hostnames composed of 16 characters. +id: 72124974-a68b-4366-b990-d30e0b2a190d +level: high +logsource: + product: windows + service: security +modified: 2021/07/07 +references: +- https://github.com/rapid7/metasploit-framework/blob/master/lib/rex/proto/smb/client.rb +tags: +- attack.lateral_movement +- attack.t1077 +- attack.t1021.002 diff --git a/rules/sigma/windows/builtin/win_meterpreter_or_cobaltstrike_getsystem_service_installation.yml b/rules/sigma/windows/builtin/win_meterpreter_or_cobaltstrike_getsystem_service_installation.yml new file mode 100644 index 00000000..fe2c36b0 --- /dev/null +++ b/rules/sigma/windows/builtin/win_meterpreter_or_cobaltstrike_getsystem_service_installation.yml @@ -0,0 +1,64 @@ + +title: Meterpreter or Cobalt Strike Getsystem Service Installation +author: Teymur Kheirkhabarov, Ecco, Florian Roth +date: 2019/10/26 +description: Detects the use of getsystem Meterpreter/Cobalt Strike command by detecting + a specific service installation +detection: + SELECTION_1: + EventID: 7045 + SELECTION_10: + ImagePath: '*cmd.exe*' + SELECTION_11: + ImagePath: '*/c*' + SELECTION_12: + ImagePath: '*echo*' + SELECTION_13: + ImagePath: '*\pipe\\*' + SELECTION_14: + ImagePath: '*rundll32*' + SELECTION_15: + ImagePath: '*.dll,a*' + SELECTION_16: + ImagePath: '*/p:*' + SELECTION_2: + ImagePath: '*cmd*' + SELECTION_3: + ImagePath: '*/c*' + SELECTION_4: + ImagePath: '*echo*' + SELECTION_5: + ImagePath: '*\pipe\\*' + SELECTION_6: + ImagePath: '*%COMSPEC%*' + SELECTION_7: + ImagePath: '*/c*' + SELECTION_8: + ImagePath: '*echo*' + SELECTION_9: + ImagePath: '*\pipe\\*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7 and SELECTION_8 and SELECTION_9) or (SELECTION_10 + and SELECTION_11 and SELECTION_12 and SELECTION_13) or (SELECTION_14 and SELECTION_15 + and SELECTION_16))) +falsepositives: +- Highly unlikely +fields: +- ComputerName +- SubjectDomainName +- SubjectUserName +- ImagePath +id: 843544a7-56e0-4dcc-a44f-5cc266dd97d6 +level: critical +logsource: + product: windows + service: system +modified: 2021/09/21 +references: +- https://speakerdeck.com/heirhabarov/hunting-for-privilege-escalation-in-windows-environment +- https://blog.cobaltstrike.com/2014/04/02/what-happens-when-i-type-getsystem/ +tags: +- attack.privilege_escalation +- attack.t1134 +- attack.t1134.001 +- attack.t1134.002 diff --git a/rules/sigma/windows/builtin/win_mmc20_lateral_movement.yml b/rules/sigma/windows/builtin/win_mmc20_lateral_movement.yml new file mode 100644 index 00000000..ef77337b --- /dev/null +++ b/rules/sigma/windows/builtin/win_mmc20_lateral_movement.yml @@ -0,0 +1,32 @@ + +title: MMC20 Lateral Movement +author: '@2xxeformyshirt (Security Risk Advisors) - rule; Teymur Kheirkhabarov (idea)' +date: 2020/03/04 +description: Detects MMC20.Application Lateral Movement; specifically looks for the + spawning of the parent MMC.exe with a command line of "-Embedding" as a child of + svchost.exe +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*\svchost.exe' + SELECTION_3: + Image: '*\mmc.exe' + SELECTION_4: + CommandLine: '*-Embedding*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unlikely +id: f1f3bf22-deb2-418d-8cce-e1a45e46a5bd +level: high +logsource: + category: process_creation + product: windows +modified: 2020/08/23 +references: +- https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/ +- https://drive.google.com/file/d/1lKya3_mLnR3UQuCoiYruO3qgu052_iS_/view?usp=sharing +tags: +- attack.execution +- attack.t1175 +- attack.t1021.003 diff --git a/rules/sigma/windows/builtin/win_moriya_rootkit.yml b/rules/sigma/windows/builtin/win_moriya_rootkit.yml new file mode 100644 index 00000000..de950763 --- /dev/null +++ b/rules/sigma/windows/builtin/win_moriya_rootkit.yml @@ -0,0 +1,27 @@ + +title: Moriya Rootkit +author: Bhabesh Raj +date: 2021/05/06 +description: Detects the use of Moriya rootkit as described in the securelist's Operation + TunnelSnake report +detection: + SELECTION_1: + EventID: 7045 + SELECTION_2: + ServiceName: ZzNetSvc + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- None +id: 25b9c01c-350d-4b95-bed1-836d04a4f324 +level: critical +logsource: + product: windows + service: system +modified: 2021/09/21 +references: +- https://securelist.com/operation-tunnelsnake-and-moriya-rootkit/101831 +status: experimental +tags: +- attack.persistence +- attack.privilege_escalation +- attack.t1543.003 diff --git a/rules/sigma/windows/builtin/win_net_ntlm_downgrade.yml b/rules/sigma/windows/builtin/win_net_ntlm_downgrade.yml new file mode 100644 index 00000000..88b29652 --- /dev/null +++ b/rules/sigma/windows/builtin/win_net_ntlm_downgrade.yml @@ -0,0 +1,39 @@ + +title: NetNTLM Downgrade Attack +author: Florian Roth, wagga +date: 2018/03/20 +description: Detects NetNTLM downgrade attack +detection: + SELECTION_1: + EventID: 4657 + SELECTION_2: + ObjectName: '*\REGISTRY\MACHINE\SYSTEM*' + SELECTION_3: + ObjectName: '*ControlSet*' + SELECTION_4: + ObjectName: '*\Control\Lsa*' + SELECTION_5: + ObjectValueName: + - LmCompatibilityLevel + - NtlmMinClientSec + - RestrictSendingNTLMTraffic + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Unknown +id: d3abac66-f11c-4ed0-8acb-50cc29c97eed +level: critical +logsource: + definition: 'Requirements: Audit Policy : Object Access > Audit Registry (Success)' + product: windows + service: security +modified: 2021/06/27 +references: +- https://www.optiv.com/blog/post-exploitation-using-netntlm-downgrade-attacks +related: +- id: d67572a0-e2ec-45d6-b8db-c100d14b8ef2 + type: derived +tags: +- attack.defense_evasion +- attack.t1089 +- attack.t1562.001 +- attack.t1112 diff --git a/rules/sigma/windows/builtin/win_net_use_admin_share.yml b/rules/sigma/windows/builtin/win_net_use_admin_share.yml new file mode 100644 index 00000000..27179c34 --- /dev/null +++ b/rules/sigma/windows/builtin/win_net_use_admin_share.yml @@ -0,0 +1,32 @@ + +title: Mounted Windows Admin Shares with net.exe +author: oscd.community, Teymur Kheirkhabarov @HeirhabarovT, Zach Stanford @svch0st, + wagga +date: 2020/10/05 +description: Detects when an admin share is mounted using net.exe +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: + - '*\net.exe' + - '*\net1.exe' + SELECTION_3: + CommandLine: '* use *' + SELECTION_4: + CommandLine: '*\\\*\\*$*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Administrators +id: 3abd6094-7027-475f-9630-8ab9be7b9725 +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/06/27 +references: +- https://drive.google.com/file/d/1lKya3_mLnR3UQuCoiYruO3qgu052_iS_/view +status: experimental +tags: +- attack.lateral_movement +- attack.t1021.002 diff --git a/rules/sigma/windows/builtin/win_new_or_renamed_user_account_with_dollar_sign.yml b/rules/sigma/windows/builtin/win_new_or_renamed_user_account_with_dollar_sign.yml new file mode 100644 index 00000000..e4ddbbc5 --- /dev/null +++ b/rules/sigma/windows/builtin/win_new_or_renamed_user_account_with_dollar_sign.yml @@ -0,0 +1,29 @@ + +title: New or Renamed User Account with '$' in Attribute 'SamAccountName'. +author: Ilyas Ochkov, oscd.community +date: 2019/10/25 +description: Detects possible bypass EDR and SIEM via abnormal user account name. +detection: + SELECTION_1: + EventID: 4720 + SELECTION_2: + EventID: 4781 + SELECTION_3: + SamAccountName: '*$*' + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3) +falsepositives: +- Unknown +fields: +- EventID +- SamAccountName +- SubjectUserName +id: cfeed607-6aa4-4bbd-9627-b637deb723c8 +level: high +logsource: + product: windows + service: security +modified: 2021/07/07 +status: experimental +tags: +- attack.defense_evasion +- attack.t1036 diff --git a/rules/sigma/windows/builtin/win_not_allowed_rdp_access.yml b/rules/sigma/windows/builtin/win_not_allowed_rdp_access.yml new file mode 100644 index 00000000..f9eb2008 --- /dev/null +++ b/rules/sigma/windows/builtin/win_not_allowed_rdp_access.yml @@ -0,0 +1,30 @@ + +title: Denied Access To Remote Desktop +author: Pushkarev Dmitry +date: 2020/06/27 +description: This event is generated when an authenticated user who is not allowed + to log on remotely attempts to connect to this computer through Remote Desktop. + Often, this event can be generated by attackers when searching for available windows + servers in the network. +detection: + SELECTION_1: + EventID: 4825 + condition: SELECTION_1 +falsepositives: +- Valid user was not added to RDP group +fields: +- EventCode +- AccountName +- ClientAddress +id: 8e5c03fa-b7f0-11ea-b242-07e0576828d9 +level: medium +logsource: + product: windows + service: security +references: +- https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4825 +status: experimental +tags: +- attack.lateral_movement +- attack.t1076 +- attack.t1021.001 diff --git a/rules/sigma/windows/builtin/win_ntfs_vuln_exploit.yml b/rules/sigma/windows/builtin/win_ntfs_vuln_exploit.yml new file mode 100644 index 00000000..3e6615c3 --- /dev/null +++ b/rules/sigma/windows/builtin/win_ntfs_vuln_exploit.yml @@ -0,0 +1,29 @@ + +title: NTFS Vulnerability Exploitation +author: Florian Roth +date: 2021/01/11 +description: This the exploitation of a NTFS vulnerability as reported without many + details via Twitter +detection: + SELECTION_1: + EventID: 55 + SELECTION_2: + Origin: File System Driver + SELECTION_3: + Description: '*contains a corrupted file record*' + SELECTION_4: + Description: '*The name of the file is "\"*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unlikely +id: f14719ce-d3ab-4e25-9ce6-2899092260b0 +level: critical +logsource: + product: windows + service: system +references: +- https://twitter.com/jonasLyk/status/1347900440000811010 +- https://twitter.com/wdormann/status/1347958161609809921 +tags: +- attack.impact +- attack.t1499.001 diff --git a/rules/sigma/windows/builtin/win_overpass_the_hash.yml b/rules/sigma/windows/builtin/win_overpass_the_hash.yml new file mode 100644 index 00000000..46bb891e --- /dev/null +++ b/rules/sigma/windows/builtin/win_overpass_the_hash.yml @@ -0,0 +1,31 @@ + +title: Successful Overpass the Hash Attempt +author: Roberto Rodriguez (source), Dominik Schaudel (rule) +date: 2018/02/12 +description: Detects successful logon with logon type 9 (NewCredentials) which matches + the Overpass the Hash behavior of e.g Mimikatz's sekurlsa::pth module. +detection: + SELECTION_1: + EventID: 4624 + SELECTION_2: + LogonType: 9 + SELECTION_3: + LogonProcessName: seclogo + SELECTION_4: + AuthenticationPackageName: Negotiate + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Runas command-line tool using /netonly parameter +id: 192a0330-c20b-4356-90b6-7b7049ae0b87 +level: high +logsource: + product: windows + service: security +references: +- https://cyberwardog.blogspot.de/2017/04/chronicles-of-threat-hunter-hunting-for.html +status: experimental +tags: +- attack.lateral_movement +- attack.t1075 +- attack.s0002 +- attack.t1550.002 diff --git a/rules/sigma/windows/builtin/win_pass_the_hash.yml b/rules/sigma/windows/builtin/win_pass_the_hash.yml new file mode 100644 index 00000000..5585185a --- /dev/null +++ b/rules/sigma/windows/builtin/win_pass_the_hash.yml @@ -0,0 +1,42 @@ + +title: Pass the Hash Activity +author: Ilias el Matani (rule), The Information Assurance Directorate at the NSA (method) +date: 2017/03/08 +description: Detects the attack technique pass the hash which is used to move laterally + inside the network +detection: + SELECTION_1: + EventID: 4624 + SELECTION_2: + EventID: 4625 + SELECTION_3: + LogonType: '3' + SELECTION_4: + LogonProcessName: NtLmSsp + SELECTION_5: + WorkstationName: '%Workstations%' + SELECTION_6: + ComputerName: '%Workstations%' + SELECTION_7: + AccountName: ANONYMOUS LOGON + condition: (((SELECTION_1 or SELECTION_2) and SELECTION_3 and SELECTION_4 and SELECTION_5 + and SELECTION_6) and not (SELECTION_7)) +falsepositives: +- Administrator activity +- Penetration tests +id: f8d98d6c-7a07-4d74-b064-dd4a3c244528 +level: medium +logsource: + definition: The successful use of PtH for lateral movement between workstations + would trigger event ID 4624, a failed logon attempt would trigger an event ID + 4625 + product: windows + service: security +references: +- https://github.com/iadgov/Event-Forwarding-Guidance/tree/master/Events +status: experimental +tags: +- attack.lateral_movement +- attack.t1075 +- car.2016-04-004 +- attack.t1550.002 diff --git a/rules/sigma/windows/builtin/win_pass_the_hash_2.yml b/rules/sigma/windows/builtin/win_pass_the_hash_2.yml new file mode 100644 index 00000000..42f919b9 --- /dev/null +++ b/rules/sigma/windows/builtin/win_pass_the_hash_2.yml @@ -0,0 +1,44 @@ + +title: Pass the Hash Activity 2 +author: Dave Kennedy, Jeff Warren (method) / David Vassallo (rule) +date: 2019/06/14 +description: Detects the attack technique pass the hash which is used to move laterally + inside the network +detection: + SELECTION_1: + EventID: 4624 + SELECTION_2: + SubjectUserSid: S-1-0-0 + SELECTION_3: + LogonType: '3' + SELECTION_4: + LogonProcessName: NtLmSsp + SELECTION_5: + KeyLength: '0' + SELECTION_6: + LogonType: '9' + SELECTION_7: + LogonProcessName: seclogo + SELECTION_8: + AccountName: ANONYMOUS LOGON + condition: ((SELECTION_1 and ((SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7))) and not (SELECTION_8)) +falsepositives: +- Administrator activity +- Penetration tests +id: 8eef149c-bd26-49f2-9e5a-9b00e3af499b +level: medium +logsource: + definition: The successful use of PtH for lateral movement between workstations + would trigger event ID 4624 + product: windows + service: security +references: +- https://github.com/iadgov/Event-Forwarding-Guidance/tree/master/Events +- https://blog.binarydefense.com/reliably-detecting-pass-the-hash-through-event-log-analysis +- https://blog.stealthbits.com/how-to-detect-pass-the-hash-attacks/ +status: stable +tags: +- attack.lateral_movement +- attack.t1075 +- attack.t1550.002 diff --git a/rules/sigma/windows/builtin/win_petitpotam_network_share.yml b/rules/sigma/windows/builtin/win_petitpotam_network_share.yml new file mode 100644 index 00000000..b47f93f9 --- /dev/null +++ b/rules/sigma/windows/builtin/win_petitpotam_network_share.yml @@ -0,0 +1,32 @@ + +title: Possible PetitPotam Coerce Authentication Attempt +author: Mauricio Velazco, Michael Haag +date: 2021/09/02 +description: Detect PetitPotam coerced authentication activity. +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + ShareName: \\\* + SELECTION_3: + ShareName: '*\IPC$' + SELECTION_4: + RelativeTargetName: lsarpc + SELECTION_5: + SubjectUserName: ANONYMOUS LOGON + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Unknown. Feedback welcomed. +id: 1ce8c8a3-2723-48ed-8246-906ac91061a6 +level: high +logsource: + definition: The advanced audit policy setting "Object Access > Detailed File Share" + must be configured for Success/Failure + product: windows + service: security +references: +- https://github.com/topotam/PetitPotam +- https://github.com/splunk/security_content/blob/0dd6de32de2118b2818550df9e65255f4109a56d/detections/endpoint/petitpotam_network_share_access_request.yml +tags: +- attack.credential_access +- attack.t1187 diff --git a/rules/sigma/windows/builtin/win_petitpotam_susp_tgt_request.yml b/rules/sigma/windows/builtin/win_petitpotam_susp_tgt_request.yml new file mode 100644 index 00000000..d9e69e88 --- /dev/null +++ b/rules/sigma/windows/builtin/win_petitpotam_susp_tgt_request.yml @@ -0,0 +1,42 @@ + +title: PetitPotam Suspicious Kerberos TGT Request +author: Mauricio Velazco, Michael Haag +date: 2021/09/02 +description: Detect suspicious Kerberos TGT requests. Once an attacer obtains a computer + certificate by abusing Active Directory Certificate Services in combination with + PetitPotam, the next step would be to leverage the certificate for malicious purposes. + One way of doing this is to request a Kerberos Ticket Granting Ticket using a tool + like Rubeus. This request will generate a 4768 event with some unusual fields depending + on the environment. This analytic will require tuning, we recommend filtering Account_Name + to the Domain Controller computer accounts. +detection: + SELECTION_1: + EventID: 4768 + SELECTION_2: + TargetUserName: '*$' + SELECTION_3: + CertThumbprint: '*' + SELECTION_4: + IpAddress: ::1 + SELECTION_5: + CertThumbprint: '' + condition: (((SELECTION_1 and SELECTION_2 and SELECTION_3) and not (SELECTION_4)) + and not (SELECTION_5)) +falsepositives: +- False positives are possible if the environment is using certificates for authentication. + We recommend filtering Account_Name to the Domain Controller computer accounts. +id: 6a53d871-682d-40b6-83e0-b7c1a6c4e3a5 +level: high +logsource: + definition: The advanced audit policy setting "Account Logon > Kerberos Authentication + Service" must be configured for Success/Failure + product: windows + service: security +modified: 2021/09/07 +references: +- https://github.com/topotam/PetitPotam +- https://isc.sans.edu/forums/diary/Active+Directory+Certificate+Services+ADCS+PKI+domain+admin+vulnerability/27668/ +- https://github.com/splunk/security_content/blob/develop/detections/endpoint/petitpotam_suspicious_kerberos_tgt_request.yml +tags: +- attack.credential_access +- attack.t1187 diff --git a/rules/sigma/windows/builtin/win_possible_dc_shadow.yml b/rules/sigma/windows/builtin/win_possible_dc_shadow.yml new file mode 100644 index 00000000..db7a1ae2 --- /dev/null +++ b/rules/sigma/windows/builtin/win_possible_dc_shadow.yml @@ -0,0 +1,34 @@ + +title: Possible DC Shadow +author: Ilyas Ochkov, oscd.community, Chakib Gzenayi (@Chak092), Hosni Mribah +date: 2019/10/25 +description: Detects DCShadow via create new SPN +detection: + SELECTION_1: + EventID: 4742 + SELECTION_2: + ServicePrincipalNames: '*GC/*' + SELECTION_3: + EventID: 5136 + SELECTION_4: + AttributeLDAPDisplayName: servicePrincipalName + SELECTION_5: + AttributeValue: GC/* + condition: ((SELECTION_1 and SELECTION_2) or (SELECTION_3 and SELECTION_4 and SELECTION_5)) +falsepositives: +- Exclude known DCs +id: 32e19d25-4aed-4860-a55a-be99cb0bf7ed +level: high +logsource: + product: windows + service: security +modified: 2021/07/06 +references: +- https://github.com/Neo23x0/sigma/blob/ec5bb710499caae6667c7f7311ca9e92c03b9039/rules/windows/builtin/win_dcsync.yml +- https://twitter.com/gentilkiwi/status/1003236624925413376 +- https://gist.github.com/gentilkiwi/dcc132457408cf11ad2061340dcb53c2 +- https://blog.alsid.eu/dcshadow-explained-4510f52fc19d +status: experimental +tags: +- attack.credential_access +- attack.t1207 diff --git a/rules/sigma/windows/builtin/win_powershell_script_installed_as_service.yml b/rules/sigma/windows/builtin/win_powershell_script_installed_as_service.yml new file mode 100644 index 00000000..bb086901 --- /dev/null +++ b/rules/sigma/windows/builtin/win_powershell_script_installed_as_service.yml @@ -0,0 +1,27 @@ + +title: PowerShell Scripts Installed as Services +author: oscd.community, Natalia Shornikova +date: 2020/10/06 +description: Detects powershell script installed as a Service +detection: + SELECTION_1: + EventID: 7045 + SELECTION_2: + ImagePath: + - '*powershell*' + - '*pwsh*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: a2e5019d-a658-4c6a-92bf-7197b54e2cae +level: high +logsource: + product: windows + service: system +modified: 2021/09/21 +references: +- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse +status: experimental +tags: +- attack.execution +- attack.t1569.002 diff --git a/rules/sigma/windows/builtin/win_privesc_cve_2020_1472.yml b/rules/sigma/windows/builtin/win_privesc_cve_2020_1472.yml new file mode 100644 index 00000000..d3a1e278 --- /dev/null +++ b/rules/sigma/windows/builtin/win_privesc_cve_2020_1472.yml @@ -0,0 +1,31 @@ + +title: Possible Zerologon (CVE-2020-1472) Exploitation +author: Aleksandr Akhremchik, @aleqs4ndr, ocsd.community +date: 2020/10/15 +description: Detects Netlogon Elevation of Privilege Vulnerability aka Zerologon (CVE-2020-1472) +detection: + SELECTION_1: + EventID: 4742 + SELECTION_2: + SubjectUserName: ANONYMOUS LOGON + SELECTION_3: + TargetUserName: '%DC-MACHINE-NAME%' + SELECTION_4: + PasswordLastSet: '-' + condition: ((SELECTION_1 and SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- automatic DC computer account password change +- legitimate DC computer account password change +id: dd7876d8-0f09-11eb-adc1-0242ac120002 +level: high +logsource: + product: windows + service: security +modified: 2021/07/07 +references: +- https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-1472 +- https://www.logpoint.com/en/blog/detecting-zerologon-vulnerability-in-logpoint/ +status: experimental +tags: +- attack.t1068 +- attack.privilege_escalation diff --git a/rules/sigma/windows/builtin/win_protected_storage_service_access.yml b/rules/sigma/windows/builtin/win_protected_storage_service_access.yml new file mode 100644 index 00000000..9caec014 --- /dev/null +++ b/rules/sigma/windows/builtin/win_protected_storage_service_access.yml @@ -0,0 +1,29 @@ + +title: Protected Storage Service Access +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/08/10 +description: Detects access to a protected_storage service over the network. Potential + abuse of DPAPI to extract domain backup keys from Domain Controllers +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + ShareName: '*IPC*' + SELECTION_3: + RelativeTargetName: protected_storage + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 45545954-4016-43c6-855e-eae8f1c369dc +level: critical +logsource: + product: windows + service: security +modified: 2020/08/23 +references: +- https://threathunterplaybook.com/notebooks/windows/06_credential_access/WIN-190620024610.html +status: experimental +tags: +- attack.lateral_movement +- attack.t1021 +- attack.t1021.002 diff --git a/rules/sigma/windows/builtin/win_quarkspwdump_clearing_hive_access_history.yml b/rules/sigma/windows/builtin/win_quarkspwdump_clearing_hive_access_history.yml new file mode 100644 index 00000000..56adafad --- /dev/null +++ b/rules/sigma/windows/builtin/win_quarkspwdump_clearing_hive_access_history.yml @@ -0,0 +1,26 @@ + +title: QuarksPwDump Clearing Access History +author: Florian Roth +date: 2017/05/15 +description: Detects QuarksPwDump clearing access history in hive +detection: + SELECTION_1: + EventID: 16 + SELECTION_2: + HiveName: '*\AppData\Local\Temp\SAM*' + SELECTION_3: + HiveName: '*.dmp' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 39f919f3-980b-4e6f-a975-8af7e507ef2b +level: critical +logsource: + product: windows + service: system +modified: 2019/11/13 +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.002 diff --git a/rules/sigma/windows/builtin/win_rare_schtasks_creations.yml b/rules/sigma/windows/builtin/win_rare_schtasks_creations.yml new file mode 100644 index 00000000..97b16991 --- /dev/null +++ b/rules/sigma/windows/builtin/win_rare_schtasks_creations.yml @@ -0,0 +1,31 @@ + +title: Rare Schtasks Creations +author: Florian Roth +date: 2017/03/23 +description: Detects rare scheduled tasks creations that only appear a few times per + time frame and could reveal password dumpers, backdoor installs or other types of + malicious code +detection: + SELECTION_1: + EventID: 4698 + condition: SELECTION_1 | count() by TaskName < 5 +falsepositives: +- Software installation +- Software updates +id: b0d77106-7bb0-41fe-bd94-d1752164d066 +level: low +logsource: + definition: The Advanced Audit Policy setting Object Access > Audit Other Object + Access Events has to be configured to allow this detection (not in the baseline + recommendations by Microsoft). We also recommend extracting the Command field + from the embedded XML in the event data. + product: windows + service: security +status: experimental +tags: +- attack.execution +- attack.privilege_escalation +- attack.persistence +- attack.t1053 +- car.2013-08-001 +- attack.t1053.005 diff --git a/rules/sigma/windows/builtin/win_rare_service_installs.yml b/rules/sigma/windows/builtin/win_rare_service_installs.yml new file mode 100644 index 00000000..e1906682 --- /dev/null +++ b/rules/sigma/windows/builtin/win_rare_service_installs.yml @@ -0,0 +1,26 @@ + +title: Rare Service Installs +author: Florian Roth +date: 2017/03/08 +description: Detects rare service installs that only appear a few times per time frame + and could reveal password dumpers, backdoor installs or other types of malicious + services +detection: + SELECTION_1: + EventID: 7045 + condition: SELECTION_1 | count() by ServiceFileName < 5 +falsepositives: +- Software installation +- Software updates +id: 66bfef30-22a5-4fcd-ad44-8d81e60922ae +level: low +logsource: + product: windows + service: system +status: experimental +tags: +- attack.persistence +- attack.privilege_escalation +- attack.t1050 +- car.2013-09-005 +- attack.t1543.003 diff --git a/rules/sigma/windows/builtin/win_rdp_bluekeep_poc_scanner.yml b/rules/sigma/windows/builtin/win_rdp_bluekeep_poc_scanner.yml new file mode 100644 index 00000000..1fd0973f --- /dev/null +++ b/rules/sigma/windows/builtin/win_rdp_bluekeep_poc_scanner.yml @@ -0,0 +1,26 @@ + +title: Scanner PoC for CVE-2019-0708 RDP RCE Vuln +author: Florian Roth (rule), Adam Bradbury (idea) +date: 2019/06/02 +description: Detects the use of a scanner by zerosum0x0 that discovers targets vulnerable + to CVE-2019-0708 RDP RCE aka BlueKeep +detection: + SELECTION_1: + EventID: 4625 + SELECTION_2: + AccountName: AAAAAAA + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unlikely +id: 8400629e-79a9-4737-b387-5db940ab2367 +level: critical +logsource: + product: windows + service: security +references: +- https://twitter.com/AdamTheAnalyst/status/1134394070045003776 +- https://github.com/zerosum0x0/CVE-2019-0708 +tags: +- attack.lateral_movement +- attack.t1210 +- car.2013-07-002 diff --git a/rules/sigma/windows/builtin/win_rdp_localhost_login.yml b/rules/sigma/windows/builtin/win_rdp_localhost_login.yml new file mode 100644 index 00000000..a5b60e50 --- /dev/null +++ b/rules/sigma/windows/builtin/win_rdp_localhost_login.yml @@ -0,0 +1,31 @@ + +title: RDP Login from Localhost +author: Thomas Patzke +date: 2019/01/28 +description: RDP login with localhost source address may be a tunnelled login +detection: + SELECTION_1: + EventID: 4624 + SELECTION_2: + LogonType: 10 + SELECTION_3: + IpAddress: + - ::1 + - 127.0.0.1 + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 51e33403-2a37-4d66-a574-1fda1782cc31 +level: high +logsource: + product: windows + service: security +modified: 2021/07/07 +references: +- https://www.fireeye.com/blog/threat-research/2019/01/bypassing-network-restrictions-through-rdp-tunneling.html +status: experimental +tags: +- attack.lateral_movement +- attack.t1076 +- car.2013-07-002 +- attack.t1021.001 diff --git a/rules/sigma/windows/builtin/win_rdp_potential_cve_2019_0708.yml b/rules/sigma/windows/builtin/win_rdp_potential_cve_2019_0708.yml new file mode 100644 index 00000000..85fe242b --- /dev/null +++ b/rules/sigma/windows/builtin/win_rdp_potential_cve_2019_0708.yml @@ -0,0 +1,29 @@ + +title: Potential RDP Exploit CVE-2019-0708 +author: Lionel PRAT, Christophe BROCAS, @atc_project (improvements) +date: 2019/05/24 +description: Detect suspicious error on protocol RDP, potential CVE-2019-0708 +detection: + SELECTION_1: + EventID: 56 + SELECTION_2: + EventID: 50 + SELECTION_3: + Source: TermDD + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3) +falsepositives: +- Bad connections or network interruptions +id: aaa5b30d-f418-420b-83a0-299cb6024885 +level: high +logsource: + product: windows + service: system +modified: 2020/08/23 +references: +- https://github.com/zerosum0x0/CVE-2019-0708 +- https://github.com/Ekultek/BlueKeep +status: experimental +tags: +- attack.lateral_movement +- attack.t1210 +- car.2013-07-002 diff --git a/rules/sigma/windows/builtin/win_rdp_reverse_tunnel.yml b/rules/sigma/windows/builtin/win_rdp_reverse_tunnel.yml new file mode 100644 index 00000000..1b63af63 --- /dev/null +++ b/rules/sigma/windows/builtin/win_rdp_reverse_tunnel.yml @@ -0,0 +1,44 @@ + +title: RDP over Reverse SSH Tunnel WFP +author: Samir Bousseaden +date: 2019/02/16 +description: Detects svchost hosting RDP termsvcs communicating with the loopback + address +detection: + SELECTION_1: + EventID: 5156 + SELECTION_2: + SourcePort: 3389 + SELECTION_3: + DestAddress: + - 127.* + - ::1 + SELECTION_4: + DestPort: 3389 + SELECTION_5: + SourceAddress: + - 127.* + - ::1 + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and SELECTION_5))) +falsepositives: +- unknown +id: 5bed80b6-b3e8-428e-a3ae-d3c757589e41 +level: high +logsource: + product: windows + service: security +modified: 2021/07/06 +references: +- https://twitter.com/SBousseaden/status/1096148422984384514 +- https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/master/Command%20and%20Control/DE_RDP_Tunnel_5156.evtx +status: experimental +tags: +- attack.defense_evasion +- attack.command_and_control +- attack.lateral_movement +- attack.t1076 +- attack.t1090 +- attack.t1090.001 +- attack.t1090.002 +- attack.t1021.001 +- car.2013-07-002 diff --git a/rules/sigma/windows/builtin/win_register_new_logon_process_by_rubeus.yml b/rules/sigma/windows/builtin/win_register_new_logon_process_by_rubeus.yml new file mode 100644 index 00000000..f13755a6 --- /dev/null +++ b/rules/sigma/windows/builtin/win_register_new_logon_process_by_rubeus.yml @@ -0,0 +1,27 @@ + +title: Register new Logon Process by Rubeus +author: Roberto Rodriguez (source), Ilyas Ochkov (rule), oscd.community +date: 2019/10/24 +description: Detects potential use of Rubeus via registered new trusted logon process +detection: + SELECTION_1: + EventID: 4611 + SELECTION_2: + LogonProcessName: User32LogonProcesss + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 12e6d621-194f-4f59-90cc-1959e21e69f7 +level: critical +logsource: + product: windows + service: security +modified: 2021/08/14 +references: +- https://posts.specterops.io/hunting-in-active-directory-unconstrained-delegation-forests-trusts-71f2b33688e1 +status: experimental +tags: +- attack.lateral_movement +- attack.privilege_escalation +- attack.t1208 +- attack.t1558.003 diff --git a/rules/sigma/windows/builtin/win_remote_powershell_session.yml b/rules/sigma/windows/builtin/win_remote_powershell_session.yml new file mode 100644 index 00000000..05c1f437 --- /dev/null +++ b/rules/sigma/windows/builtin/win_remote_powershell_session.yml @@ -0,0 +1,31 @@ + +title: Remote PowerShell Sessions Network Connections (WinRM) +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/09/12 +description: Detects basic PowerShell Remoting (WinRM) by monitoring for network inbound + connections to ports 5985 OR 5986 +detection: + SELECTION_1: + EventID: 5156 + SELECTION_2: + DestPort: 5985 + SELECTION_3: + DestPort: 5986 + SELECTION_4: + LayerRTID: 44 + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3) and SELECTION_4) +falsepositives: +- Legitimate use of remote PowerShell execution +id: 13acf386-b8c6-4fe0-9a6e-c4756b974698 +level: high +logsource: + product: windows + service: security +modified: 2021/05/21 +references: +- https://threathunterplaybook.com/notebooks/windows/02_execution/WIN-190511223310.html +status: experimental +tags: +- attack.execution +- attack.t1086 +- attack.t1059.001 diff --git a/rules/sigma/windows/builtin/win_remote_registry_management_using_reg_utility.yml b/rules/sigma/windows/builtin/win_remote_registry_management_using_reg_utility.yml new file mode 100644 index 00000000..6035d21a --- /dev/null +++ b/rules/sigma/windows/builtin/win_remote_registry_management_using_reg_utility.yml @@ -0,0 +1,32 @@ + +title: Remote Registry Management Using Reg Utility +author: Teymur Kheirkhabarov, oscd.community +date: 2019/10/22 +description: Remote registry management using REG utility from non-admin workstation +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + RelativeTargetName: '*\winreg*' + SELECTION_3: + IpAddress: '%Admins_Workstations%' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) +falsepositives: +- Legitimate usage of remote registry management by administrator +id: 68fcba0d-73a5-475e-a915-e8b4c576827e +level: medium +logsource: + product: windows + service: security +modified: 2020/08/23 +references: +- https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment +status: experimental +tags: +- attack.defense_evasion +- attack.t1112 +- attack.discovery +- attack.t1012 +- attack.credential_access +- attack.t1552.002 +- attack.s0075 diff --git a/rules/sigma/windows/builtin/win_root_certificate_installed.yml b/rules/sigma/windows/builtin/win_root_certificate_installed.yml new file mode 100644 index 00000000..f40b81f4 --- /dev/null +++ b/rules/sigma/windows/builtin/win_root_certificate_installed.yml @@ -0,0 +1,31 @@ + +title: Root Certificate Installed +author: oscd.community, @redcanary, Zach Stanford @svch0st +date: 2020/10/10 +description: Adversaries may install a root certificate on a compromised system to + avoid warnings when connecting to adversary controlled web servers. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*Cert:\LocalMachine\Root*' + SELECTION_3: + ScriptBlockText: '*Move-Item*' + SELECTION_4: + ScriptBlockText: '*Import-Certificate*' + condition: (SELECTION_1 and SELECTION_2 and (SELECTION_3 or SELECTION_4)) +falsepositives: +- Help Desk or IT may need to manually add a corporate Root CA on occasion. Need to + test if GPO push doesn't trigger FP +id: 42821614-9264-4761-acfc-5772c3286f76 +level: medium +logsource: + product: windows + service: powershell +modified: 2021/09/21 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1553.004/T1553.004.md +status: experimental +tags: +- attack.defense_evasion +- attack.t1553.004 diff --git a/rules/sigma/windows/builtin/win_sam_registry_hive_handle_request.yml b/rules/sigma/windows/builtin/win_sam_registry_hive_handle_request.yml new file mode 100644 index 00000000..98d776d2 --- /dev/null +++ b/rules/sigma/windows/builtin/win_sam_registry_hive_handle_request.yml @@ -0,0 +1,35 @@ + +title: SAM Registry Hive Handle Request +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/08/12 +description: Detects handles requested to SAM registry hive +detection: + SELECTION_1: + EventID: 4656 + SELECTION_2: + ObjectType: Key + SELECTION_3: + ObjectName: '*\SAM' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +fields: +- ComputerName +- SubjectDomainName +- SubjectUserName +- ProcessName +- ObjectName +id: f8748f2c-89dc-4d95-afb0-5a2dfdbad332 +level: critical +logsource: + product: windows + service: security +modified: 2020/08/23 +references: +- https://threathunterplaybook.com/notebooks/windows/07_discovery/WIN-190725024610.html +status: experimental +tags: +- attack.discovery +- attack.t1012 +- attack.credential_access +- attack.t1552.002 diff --git a/rules/sigma/windows/builtin/win_scheduled_task_deletion.yml b/rules/sigma/windows/builtin/win_scheduled_task_deletion.yml new file mode 100644 index 00000000..dc7c8d05 --- /dev/null +++ b/rules/sigma/windows/builtin/win_scheduled_task_deletion.yml @@ -0,0 +1,31 @@ + +title: Scheduled Task Deletion +author: David Strassegger +date: 2021/01/22 +description: Detects scheduled task deletion events. Scheduled tasks are likely to + be deleted if not used for persistence. Malicious Software often creates tasks directly + under the root node e.g. \TASKNAME +detection: + SELECTION_1: + EventID: 4699 + condition: SELECTION_1 +falsepositives: +- Software installation +id: 4f86b304-3e02-40e3-aa5d-e88a167c9617 +level: medium +logsource: + definition: The Advanced Audit Policy setting Object Access > Audit Other Object + Access Events has to be configured to allow this detection. We also recommend + extracting the Command field from the embedded XML in the event data. + product: windows + service: security +references: +- https://twitter.com/matthewdunwoody/status/1352356685982146562 +- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4699 +status: experimental +tags: +- attack.execution +- attack.privilege_escalation +- attack.t1053 +- car.2013-08-001 +- attack.t1053.005 diff --git a/rules/sigma/windows/builtin/win_scm_database_handle_failure.yml b/rules/sigma/windows/builtin/win_scm_database_handle_failure.yml new file mode 100644 index 00000000..6f676721 --- /dev/null +++ b/rules/sigma/windows/builtin/win_scm_database_handle_failure.yml @@ -0,0 +1,30 @@ + +title: SCM Database Handle Failure +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/08/12 +description: Detects non-system users failing to get a handle of the SCM database. +detection: + SELECTION_1: + EventID: 4656 + SELECTION_2: + ObjectType: SC_MANAGER OBJECT + SELECTION_3: + ObjectName: servicesactive + SELECTION_4: + Keywords: Audit Failure + SELECTION_5: + SubjectLogonId: '0x3e4' + condition: ((SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) and not + (SELECTION_5)) +falsepositives: +- Unknown +id: 13addce7-47b2-4ca0-a98f-1de964d1d669 +level: critical +logsource: + product: windows + service: security +references: +- https://threathunterplaybook.com/notebooks/windows/07_discovery/WIN-190826010110.html +status: experimental +tags: +- attack.discovery diff --git a/rules/sigma/windows/builtin/win_scm_database_privileged_operation.yml b/rules/sigma/windows/builtin/win_scm_database_privileged_operation.yml new file mode 100644 index 00000000..7224c518 --- /dev/null +++ b/rules/sigma/windows/builtin/win_scm_database_privileged_operation.yml @@ -0,0 +1,31 @@ + +title: SCM Database Privileged Operation +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/08/15 +description: Detects non-system users performing privileged operation os the SCM database +detection: + SELECTION_1: + EventID: 4674 + SELECTION_2: + ObjectType: SC_MANAGER OBJECT + SELECTION_3: + ObjectName: servicesactive + SELECTION_4: + PrivilegeList: SeTakeOwnershipPrivilege + SELECTION_5: + SubjectLogonId: '0x3e4' + condition: ((SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) and not + (SELECTION_5)) +falsepositives: +- Unknown +id: dae8171c-5ec6-4396-b210-8466585b53e9 +level: critical +logsource: + product: windows + service: security +references: +- https://threathunterplaybook.com/notebooks/windows/07_discovery/WIN-190826010110.html +status: experimental +tags: +- attack.privilege_escalation +- attack.t1548 diff --git a/rules/sigma/windows/builtin/win_scrcons_remote_wmi_scripteventconsumer.yml b/rules/sigma/windows/builtin/win_scrcons_remote_wmi_scripteventconsumer.yml new file mode 100644 index 00000000..9bbff293 --- /dev/null +++ b/rules/sigma/windows/builtin/win_scrcons_remote_wmi_scripteventconsumer.yml @@ -0,0 +1,31 @@ + +title: Remote WMI ActiveScriptEventConsumers +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/09/02 +description: Detect potential adversaries leveraging WMI ActiveScriptEventConsumers + remotely to move laterally in a network +detection: + SELECTION_1: + EventID: 4624 + SELECTION_2: + LogonType: 3 + SELECTION_3: + ProcessName: '*scrcons.exe' + SELECTION_4: + TargetLogonId: '0x3e7' + condition: ((SELECTION_1 and SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- SCCM +id: 9599c180-e3a8-4743-8f92-7fb96d3be648 +level: high +logsource: + product: windows + service: security +references: +- https://threathunterplaybook.com/notebooks/windows/08_lateral_movement/WIN-200902020333.html +status: experimental +tags: +- attack.lateral_movement +- attack.privilege_escalation +- attack.persistence +- attack.t1546.003 diff --git a/rules/sigma/windows/builtin/win_security_cobaltstrike_service_installs.yml b/rules/sigma/windows/builtin/win_security_cobaltstrike_service_installs.yml new file mode 100644 index 00000000..8279ffbd --- /dev/null +++ b/rules/sigma/windows/builtin/win_security_cobaltstrike_service_installs.yml @@ -0,0 +1,50 @@ + +title: CobaltStrike Service Installations +author: Florian Roth, Wojciech Lesicki +date: 2021/05/26 +description: Detects known malicious service installs that appear in cases in which + a Cobalt Strike beacon elevates privileges or lateral movement +detection: + SELECTION_1: + EventID: 4697 + SELECTION_2: + ServiceFileName: '*ADMIN$*' + SELECTION_3: + ServiceFileName: '*.exe*' + SELECTION_4: + ServiceFileName: '*%COMSPEC%*' + SELECTION_5: + ServiceFileName: '*start*' + SELECTION_6: + ServiceFileName: '*powershell*' + SELECTION_7: + ServiceFileName: '*powershell -nop -w hidden -encodedcommand*' + SELECTION_8: + ServiceFileName: + - '*SUVYIChOZXctT2JqZWN0IE5ldC5XZWJjbGllbnQpLkRvd25sb2FkU3RyaW5nKCdodHRwOi8vMTI3LjAuMC4xO*' + - '*lFWCAoTmV3LU9iamVjdCBOZXQuV2ViY2xpZW50KS5Eb3dubG9hZFN0cmluZygnaHR0cDovLzEyNy4wLjAuMT*' + - '*JRVggKE5ldy1PYmplY3QgTmV0LldlYmNsaWVudCkuRG93bmxvYWRTdHJpbmcoJ2h0dHA6Ly8xMjcuMC4wLjE6*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and SELECTION_5 + and SELECTION_6) or SELECTION_7 or SELECTION_8)) +falsepositives: +- Unknown +id: d7a95147-145f-4678-b85d-d1ff4a3bb3f6 +level: critical +logsource: + product: windows + service: security +modified: 2021/09/21 +references: +- https://www.sans.org/webcasts/119395 +- https://www.crowdstrike.com/blog/getting-the-bacon-from-cobalt-strike-beacon/ +- https://thedfirreport.com/2021/08/29/cobalt-strike-a-defenders-guide/ +related: +- id: 5a105d34-05fc-401e-8553-272b45c1522d + type: derived +tags: +- attack.execution +- attack.privilege_escalation +- attack.lateral_movement +- attack.t1021.002 +- attack.t1543.003 +- attack.t1569.002 diff --git a/rules/sigma/windows/builtin/win_security_mal_creddumper.yml b/rules/sigma/windows/builtin/win_security_mal_creddumper.yml new file mode 100644 index 00000000..e4e9a554 --- /dev/null +++ b/rules/sigma/windows/builtin/win_security_mal_creddumper.yml @@ -0,0 +1,44 @@ + +title: Credential Dumping Tools Service Execution +author: Florian Roth, Teymur Kheirkhabarov, Daniil Yugoslavskiy, oscd.community +date: 2017/03/05 +description: Detects well-known credential dumping tools execution via service execution + events +detection: + SELECTION_1: + EventID: 4697 + SELECTION_2: + ServiceFileName: + - '*fgexec*' + - '*dumpsvc*' + - '*cachedump*' + - '*mimidrv*' + - '*gsecdump*' + - '*servpw*' + - '*pwdump*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate Administrator using credential dumping tool for password recovery +id: f0d1feba-4344-4ca9-8121-a6c97bd6df52 +level: high +logsource: + product: windows + service: security +modified: 2021/09/21 +references: +- https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment +related: +- id: 4976aa50-8f41-45c6-8b15-ab3fc10e79ed + type: derived +tags: +- attack.credential_access +- attack.execution +- attack.t1003 +- attack.t1003.001 +- attack.t1003.002 +- attack.t1003.004 +- attack.t1003.005 +- attack.t1003.006 +- attack.t1035 +- attack.t1569.002 +- attack.s0005 diff --git a/rules/sigma/windows/builtin/win_security_mal_service_installs.yml b/rules/sigma/windows/builtin/win_security_mal_service_installs.yml new file mode 100644 index 00000000..fd21b5f5 --- /dev/null +++ b/rules/sigma/windows/builtin/win_security_mal_service_installs.yml @@ -0,0 +1,36 @@ + +title: Malicious Service Installations +author: Florian Roth, Daniil Yugoslavskiy, oscd.community (update) +date: 2017/03/27 +description: Detects known malicious service installs that only appear in cases of + lateral movement, credential dumping, and other suspicious activities. +detection: + SELECTION_1: + EventID: 4697 + SELECTION_2: + ServiceName: javamtsup + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Penetration testing +id: cb062102-587e-4414-8efa-dbe3c7bf19c6 +level: critical +logsource: + product: windows + service: security +modified: 2021/09/21 +references: +- https://awakesecurity.com/blog/threat-hunting-for-paexec/ +- https://www.fireeye.com/blog/threat-research/2017/05/wannacry-malware-profile.html +- https://blog.f-secure.com/wp-content/uploads/2019/10/CosmicDuke.pdf +related: +- id: 2cfe636e-317a-4bee-9f2c-1066d9f54d1a + type: derived +tags: +- attack.persistence +- attack.privilege_escalation +- attack.t1003 +- attack.t1035 +- attack.t1050 +- car.2013-09-005 +- attack.t1543.003 +- attack.t1569.002 diff --git a/rules/sigma/windows/builtin/win_security_metasploit_or_impacket_smb_psexec_service_install.yml b/rules/sigma/windows/builtin/win_security_metasploit_or_impacket_smb_psexec_service_install.yml new file mode 100644 index 00000000..6969a03b --- /dev/null +++ b/rules/sigma/windows/builtin/win_security_metasploit_or_impacket_smb_psexec_service_install.yml @@ -0,0 +1,47 @@ + +title: Metasploit Or Impacket Service Installation Via SMB PsExec +author: Bartlomiej Czyz, Relativity +date: 2021/01/21 +description: Detects usage of Metasploit SMB PsExec (exploit/windows/smb/psexec) and + Impacket psexec.py by triggering on specific service installation +detection: + SELECTION_1: + EventID: 4697 + SELECTION_2: + ServiceFileName|re: ^%systemroot%\\[a-zA-Z]{8}\.exe$ + SELECTION_3: + ServiceName|re: (^[a-zA-Z]{4}$)|(^[a-zA-Z]{8}$)|(^[a-zA-Z]{16}$) + SELECTION_4: + ServiceStartType: '3' + SELECTION_5: + ServiceType: '0x10' + SELECTION_6: + ServiceName: PSEXESVC + condition: ((SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) + and not (SELECTION_6)) +falsepositives: +- Possible, different agents with a 8 character binary and a 4, 8 or 16 character + service name +fields: +- ComputerName +- SubjectDomainName +- SubjectUserName +- ServiceName +- ServiceFileName +id: 6fb63b40-e02a-403e-9ffd-3bcc1d749442 +level: high +logsource: + product: windows + service: security +modified: 2021/07/23 +references: +- https://bczyz1.github.io/2021/01/30/psexec.html +related: +- id: 1a17ce75-ff0d-4f02-9709-2b7bb5618cf0 + type: derived +tags: +- attack.lateral_movement +- attack.t1021.002 +- attack.t1570 +- attack.execution +- attack.t1569.002 diff --git a/rules/sigma/windows/builtin/win_security_meterpreter_or_cobaltstrike_getsystem_service_install.yml b/rules/sigma/windows/builtin/win_security_meterpreter_or_cobaltstrike_getsystem_service_install.yml new file mode 100644 index 00000000..8da06f13 --- /dev/null +++ b/rules/sigma/windows/builtin/win_security_meterpreter_or_cobaltstrike_getsystem_service_install.yml @@ -0,0 +1,67 @@ + +title: Meterpreter or Cobalt Strike Getsystem Service Installation +author: Teymur Kheirkhabarov, Ecco, Florian Roth +date: 2019/10/26 +description: Detects the use of getsystem Meterpreter/Cobalt Strike command by detecting + a specific service installation +detection: + SELECTION_1: + EventID: 4697 + SELECTION_10: + ServiceFileName: '*cmd.exe*' + SELECTION_11: + ServiceFileName: '*/c*' + SELECTION_12: + ServiceFileName: '*echo*' + SELECTION_13: + ServiceFileName: '*\pipe\\*' + SELECTION_14: + ServiceFileName: '*rundll32*' + SELECTION_15: + ServiceFileName: '*.dll,a*' + SELECTION_16: + ServiceFileName: '*/p:*' + SELECTION_2: + ServiceFileName: '*cmd*' + SELECTION_3: + ServiceFileName: '*/c*' + SELECTION_4: + ServiceFileName: '*echo*' + SELECTION_5: + ServiceFileName: '*\pipe\\*' + SELECTION_6: + ServiceFileName: '*%COMSPEC%*' + SELECTION_7: + ServiceFileName: '*/c*' + SELECTION_8: + ServiceFileName: '*echo*' + SELECTION_9: + ServiceFileName: '*\pipe\\*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7 and SELECTION_8 and SELECTION_9) or (SELECTION_10 + and SELECTION_11 and SELECTION_12 and SELECTION_13) or (SELECTION_14 and SELECTION_15 + and SELECTION_16))) +falsepositives: +- Highly unlikely +fields: +- ComputerName +- SubjectDomainName +- SubjectUserName +- ServiceFileName +id: ecbc5e16-58e0-4521-9c60-eb9a7ea4ad34 +level: critical +logsource: + product: windows + service: security +modified: 2021/09/21 +references: +- https://speakerdeck.com/heirhabarov/hunting-for-privilege-escalation-in-windows-environment +- https://blog.cobaltstrike.com/2014/04/02/what-happens-when-i-type-getsystem/ +related: +- id: 843544a7-56e0-4dcc-a44f-5cc266dd97d6 + type: derived +tags: +- attack.privilege_escalation +- attack.t1134 +- attack.t1134.001 +- attack.t1134.002 diff --git a/rules/sigma/windows/builtin/win_security_powershell_script_installed_as_service.yml b/rules/sigma/windows/builtin/win_security_powershell_script_installed_as_service.yml new file mode 100644 index 00000000..435c6e13 --- /dev/null +++ b/rules/sigma/windows/builtin/win_security_powershell_script_installed_as_service.yml @@ -0,0 +1,30 @@ + +title: PowerShell Scripts Installed as Services +author: oscd.community, Natalia Shornikova +date: 2020/10/06 +description: Detects powershell script installed as a Service +detection: + SELECTION_1: + EventID: 4697 + SELECTION_2: + ServiceFileName: + - '*powershell*' + - '*pwsh*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 2a926e6a-4b81-4011-8a96-e36cc8c04302 +level: high +logsource: + product: windows + service: security +modified: 2021/09/21 +references: +- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse +related: +- id: a2e5019d-a658-4c6a-92bf-7197b54e2cae + type: derived +status: experimental +tags: +- attack.execution +- attack.t1569.002 diff --git a/rules/sigma/windows/builtin/win_security_tap_driver_installation.yml b/rules/sigma/windows/builtin/win_security_tap_driver_installation.yml new file mode 100644 index 00000000..9aea52b1 --- /dev/null +++ b/rules/sigma/windows/builtin/win_security_tap_driver_installation.yml @@ -0,0 +1,27 @@ + +title: Tap Driver Installation +author: Daniil Yugoslavskiy, Ian Davis, oscd.community +date: 2019/10/24 +description: Well-known TAP software installation. Possible preparation for data exfiltration + using tunnelling techniques +detection: + SELECTION_1: + EventID: 4697 + SELECTION_2: + ServiceFileName: '*tap0901*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate OpenVPN TAP insntallation +id: 9c8afa4d-0022-48f0-9456-3712466f9701 +level: medium +logsource: + product: windows + service: security +modified: 2021/09/21 +related: +- id: 8e4cf0e5-aa5d-4dc3-beff-dc26917744a9 + type: derived +status: experimental +tags: +- attack.exfiltration +- attack.t1048 diff --git a/rules/sigma/windows/builtin/win_set_oabvirtualdirectory_externalurl.yml b/rules/sigma/windows/builtin/win_set_oabvirtualdirectory_externalurl.yml new file mode 100644 index 00000000..f68fe8ba --- /dev/null +++ b/rules/sigma/windows/builtin/win_set_oabvirtualdirectory_externalurl.yml @@ -0,0 +1,29 @@ + +title: Set OabVirtualDirectory ExternalUrl Property +author: Jose Rodriguez @Cyb3rPandaH +date: 2021/03/15 +description: Rule to detect an adversary setting OabVirtualDirectory External URL + property to a script +detection: + SELECTION_1: + - Set-OabVirtualDirectory + SELECTION_2: + - ExternalUrl + SELECTION_3: + - Page_Load + SELECTION_4: + - script + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: 9db37458-4df2-46a5-95ab-307e7f29e675 +level: high +logsource: + product: windows + service: msexchange-management +references: +- https://twitter.com/OTR_Community/status/1371053369071132675 +status: experimental +tags: +- attack.persistence +- attack.t1505.003 diff --git a/rules/sigma/windows/builtin/win_smb_file_creation_admin_shares.yml b/rules/sigma/windows/builtin/win_smb_file_creation_admin_shares.yml new file mode 100644 index 00000000..6c275f44 --- /dev/null +++ b/rules/sigma/windows/builtin/win_smb_file_creation_admin_shares.yml @@ -0,0 +1,30 @@ + +title: SMB Create Remote File Admin Share +author: Jose Rodriguez (@Cyb3rPandaH), OTR (Open Threat Research) +date: 2020/08/06 +description: Look for non-system accounts SMB accessing a file with write (0x2) access + mask via administrative share (i.e C$). +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + ShareName: '*C$' + SELECTION_3: + AccessMask: '0x2' + SELECTION_4: + SubjectUserName: '*$' + condition: ((SELECTION_1 and SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Unknown +id: b210394c-ba12-4f89-9117-44a2464b9511 +level: high +logsource: + product: windows + service: security +references: +- https://github.com/OTRF/ThreatHunter-Playbook/blob/master/playbooks/WIN-201012004336.yaml +- https://securitydatasets.com/notebooks/small/windows/08_lateral_movement/SDWIN-200806015757.html?highlight=create%20file +status: experimental +tags: +- attack.lateral_movement +- attack.t1021.002 diff --git a/rules/sigma/windows/builtin/win_software_atera_rmm_agent_install.yml b/rules/sigma/windows/builtin/win_software_atera_rmm_agent_install.yml new file mode 100644 index 00000000..7864a202 --- /dev/null +++ b/rules/sigma/windows/builtin/win_software_atera_rmm_agent_install.yml @@ -0,0 +1,26 @@ + +title: Atera Agent Installation +author: Bhabesh Raj +date: 2021/09/01 +description: Detects successful installation of Atera Remote Monitoring & Management + (RMM) agent as recently found to be used by Conti operators +detection: + SELECTION_1: + EventID: 1033 + SELECTION_2: + Source: MsiInstaller + SELECTION_3: + Message: '*AteraAgent*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Legitimate Atera agent installation +id: 87261fb2-69d0-42fe-b9de-88c6b5f65a43 +level: high +logsource: + product: windows + service: application +references: +- https://www.advintel.io/post/secret-backdoor-behind-conti-ransomware-operation-introducing-atera-agent +status: experimental +tags: +- attack.t1219 diff --git a/rules/sigma/windows/builtin/win_software_discovery.yml b/rules/sigma/windows/builtin/win_software_discovery.yml new file mode 100644 index 00000000..680bd85d --- /dev/null +++ b/rules/sigma/windows/builtin/win_software_discovery.yml @@ -0,0 +1,35 @@ + +title: Detected Windows Software Discovery +author: Nikita Nazarov, oscd.community +date: 2020/10/16 +description: Adversaries may attempt to enumerate software for a variety of reasons, + such as figuring out what security measures are present or if the compromised system + has a version of software that is vulnerable. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*get-itemProperty*' + SELECTION_3: + ScriptBlockText: '*\software\\*' + SELECTION_4: + ScriptBlockText: '*select-object*' + SELECTION_5: + ScriptBlockText: '*format-table*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Legitimate administration activities +id: 2650dd1a-eb2a-412d-ac36-83f06c4f2282 +level: medium +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/09/21 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1518/T1518.md +- https://github.com/harleyQu1nn/AggressorScripts +status: experimental +tags: +- attack.discovery +- attack.t1518 diff --git a/rules/sigma/windows/builtin/win_susp_add_domain_trust.yml b/rules/sigma/windows/builtin/win_susp_add_domain_trust.yml new file mode 100644 index 00000000..29535917 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_add_domain_trust.yml @@ -0,0 +1,19 @@ + +title: Addition of Domain Trusts +author: Thomas Patzke +date: 2019/12/03 +description: Addition of domains is seldom and should be verified for legitimacy. +detection: + SELECTION_1: + EventID: 4706 + condition: SELECTION_1 +falsepositives: +- Legitimate extension of domain structure +id: 0255a820-e564-4e40-af2b-6ac61160335c +level: medium +logsource: + product: windows + service: security +status: stable +tags: +- attack.persistence diff --git a/rules/sigma/windows/builtin/win_susp_add_sid_history.yml b/rules/sigma/windows/builtin/win_susp_add_sid_history.yml new file mode 100644 index 00000000..38e6f1df --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_add_sid_history.yml @@ -0,0 +1,35 @@ + +title: Addition of SID History to Active Directory Object +author: Thomas Patzke, @atc_project (improvements) +date: 2017/02/19 +description: An attacker can use the SID history attribute to gain additional privileges. +detection: + SELECTION_1: + EventID: 4765 + SELECTION_2: + EventID: 4766 + SELECTION_3: + EventID: 4738 + SELECTION_4: + SidHistory: + - '-' + - '%%1793' + SELECTION_5: + SidHistory|re: ^$ + condition: ((SELECTION_1 or SELECTION_2) or ((SELECTION_3 and not (SELECTION_4)) + and not (SELECTION_5))) +falsepositives: +- Migration of an account into a new domain +id: 2632954e-db1c-49cb-9936-67d1ef1d17d2 +level: medium +logsource: + product: windows + service: security +references: +- https://adsecurity.org/?p=1772 +status: stable +tags: +- attack.persistence +- attack.privilege_escalation +- attack.t1178 +- attack.t1134.005 diff --git a/rules/sigma/windows/builtin/win_susp_backup_delete.yml b/rules/sigma/windows/builtin/win_susp_backup_delete.yml new file mode 100644 index 00000000..fa3701f2 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_backup_delete.yml @@ -0,0 +1,26 @@ + +title: Backup Catalog Deleted +author: Florian Roth (rule), Tom U. @c_APT_ure (collection) +date: 2017/05/12 +description: Detects backup catalog deletions +detection: + SELECTION_1: + EventID: 524 + SELECTION_2: + Source: Microsoft-Windows-Backup + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 9703792d-fd9a-456d-a672-ff92efe4806a +level: medium +logsource: + product: windows + service: application +references: +- https://technet.microsoft.com/en-us/library/cc742154(v=ws.11).aspx +- https://www.hybrid-analysis.com/sample/ed01ebfbc9eb5bbea545af4d01bf5f1071661840480439c6e5babe8e080e41aa?environmentId=100 +status: experimental +tags: +- attack.defense_evasion +- attack.t1107 +- attack.t1070.004 diff --git a/rules/sigma/windows/builtin/win_susp_codeintegrity_check_failure.yml b/rules/sigma/windows/builtin/win_susp_codeintegrity_check_failure.yml new file mode 100644 index 00000000..70384e41 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_codeintegrity_check_failure.yml @@ -0,0 +1,24 @@ + +title: Failed Code Integrity Checks +author: Thomas Patzke +date: 2019/12/03 +description: Code integrity failures may indicate tampered executables. +detection: + SELECTION_1: + EventID: 5038 + SELECTION_2: + EventID: 6281 + condition: (SELECTION_1 or SELECTION_2) +falsepositives: +- Disk device errors +id: 470ec5fa-7b4e-4071-b200-4c753100f49b +level: low +logsource: + product: windows + service: security +modified: 2020/08/23 +status: stable +tags: +- attack.defense_evasion +- attack.t1009 +- attack.t1027.001 diff --git a/rules/sigma/windows/builtin/win_susp_dhcp_config.yml b/rules/sigma/windows/builtin/win_susp_dhcp_config.yml new file mode 100644 index 00000000..3f606022 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_dhcp_config.yml @@ -0,0 +1,28 @@ + +title: DHCP Server Loaded the CallOut DLL +author: Dimitrios Slamaris +date: 2017/05/15 +description: This rule detects a DHCP server in which a specified Callout DLL (in + registry) was loaded +detection: + SELECTION_1: + EventID: 1033 + SELECTION_2: + Source: Microsoft-Windows-DHCP-Server + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 13fc89a9-971e-4ca6-b9dc-aa53a445bf40 +level: critical +logsource: + product: windows + service: system +references: +- https://blog.3or.de/mimilib-dhcp-server-callout-dll-injection.html +- https://technet.microsoft.com/en-us/library/cc726884(v=ws.10).aspx +- https://msdn.microsoft.com/de-de/library/windows/desktop/aa363389(v=vs.85).aspx +status: experimental +tags: +- attack.defense_evasion +- attack.t1073 +- attack.t1574.002 diff --git a/rules/sigma/windows/builtin/win_susp_dhcp_config_failed.yml b/rules/sigma/windows/builtin/win_susp_dhcp_config_failed.yml new file mode 100644 index 00000000..1781a473 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_dhcp_config_failed.yml @@ -0,0 +1,33 @@ + +title: DHCP Server Error Failed Loading the CallOut DLL +author: Dimitrios Slamaris, @atc_project (fix) +date: 2017/05/15 +description: This rule detects a DHCP server error in which a specified Callout DLL + (in registry) could not be loaded +detection: + SELECTION_1: + EventID: 1031 + SELECTION_2: + EventID: 1032 + SELECTION_3: + EventID: 1034 + SELECTION_4: + Source: Microsoft-Windows-DHCP-Server + condition: ((SELECTION_1 or SELECTION_2 or SELECTION_3) and SELECTION_4) +falsepositives: +- Unknown +id: 75edd3fd-7146-48e5-9848-3013d7f0282c +level: critical +logsource: + product: windows + service: system +modified: 2019/07/17 +references: +- https://blog.3or.de/mimilib-dhcp-server-callout-dll-injection.html +- https://technet.microsoft.com/en-us/library/cc726884(v=ws.10).aspx +- https://msdn.microsoft.com/de-de/library/windows/desktop/aa363389(v=vs.85).aspx +status: experimental +tags: +- attack.defense_evasion +- attack.t1073 +- attack.t1574.002 diff --git a/rules/sigma/windows/builtin/win_susp_dns_config.yml b/rules/sigma/windows/builtin/win_susp_dns_config.yml new file mode 100644 index 00000000..6aaa09e1 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_dns_config.yml @@ -0,0 +1,28 @@ + +title: DNS Server Error Failed Loading the ServerLevelPluginDLL +author: Florian Roth +date: 2017/05/08 +description: This rule detects a DNS server error in which a specified plugin DLL + (in registry) could not be loaded +detection: + SELECTION_1: + EventID: 150 + SELECTION_2: + EventID: 770 + condition: (SELECTION_1 or SELECTION_2) +falsepositives: +- Unknown +id: cbe51394-cd93-4473-b555-edf0144952d9 +level: critical +logsource: + product: windows + service: dns-server +references: +- https://medium.com/@esnesenon/feature-not-bug-dnsadmin-to-dc-compromise-in-one-line-a0f779b8dc83 +- https://technet.microsoft.com/en-us/library/cc735829(v=ws.10).aspx +- https://twitter.com/gentilkiwi/status/861641945944391680 +status: experimental +tags: +- attack.defense_evasion +- attack.t1073 +- attack.t1574.002 diff --git a/rules/sigma/windows/builtin/win_susp_dsrm_password_change.yml b/rules/sigma/windows/builtin/win_susp_dsrm_password_change.yml new file mode 100644 index 00000000..01ce1c2c --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_dsrm_password_change.yml @@ -0,0 +1,24 @@ + +title: Password Change on Directory Service Restore Mode (DSRM) Account +author: Thomas Patzke +date: 2017/02/19 +description: The Directory Service Restore Mode (DSRM) account is a local administrator + account on Domain Controllers. Attackers may change the password to gain persistence. +detection: + SELECTION_1: + EventID: 4794 + condition: SELECTION_1 +falsepositives: +- Initial installation of a domain controller +id: 53ad8e36-f573-46bf-97e4-15ba5bf4bb51 +level: high +logsource: + product: windows + service: security +modified: 2020/08/23 +references: +- https://adsecurity.org/?p=1714 +status: stable +tags: +- attack.persistence +- attack.t1098 diff --git a/rules/sigma/windows/builtin/win_susp_eventlog_cleared.yml b/rules/sigma/windows/builtin/win_susp_eventlog_cleared.yml new file mode 100644 index 00000000..e930d9a6 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_eventlog_cleared.yml @@ -0,0 +1,35 @@ + +title: Eventlog Cleared +author: Florian Roth +date: 2017/01/10 +description: One of the Windows Eventlogs has been cleared. e.g. caused by "wevtutil + cl" command execution +detection: + SELECTION_1: + EventID: 517 + SELECTION_2: + EventID: 1102 + SELECTION_3: + Source: Microsoft-Windows-Eventlog + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3) +falsepositives: +- Rollout of log collection agents (the setup routine often includes a reset of the + local Eventlog) +- System provisioning (system reset before the golden image creation) +id: d99b79d2-0a6f-4f46-ad8b-260b6e17f982 +level: high +logsource: + product: windows + service: security +modified: 2021/10/08 +references: +- https://twitter.com/deviouspolack/status/832535435960209408 +- https://www.hybrid-analysis.com/sample/027cc450ef5f8c5f653329641ec1fed91f694e0d229928963b30f6b0d7d3a745?environmentId=100 +related: +- id: f2f01843-e7b8-4f95-a35a-d23584476423 + type: obsoletes +tags: +- attack.defense_evasion +- attack.t1070 +- attack.t1070.001 +- car.2016-04-002 diff --git a/rules/sigma/windows/builtin/win_susp_failed_guest_logon.yml b/rules/sigma/windows/builtin/win_susp_failed_guest_logon.yml new file mode 100644 index 00000000..349fe587 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_failed_guest_logon.yml @@ -0,0 +1,35 @@ + +title: Suspicious Rejected SMB Guest Logon From IP +author: Florian Roth, KevTheHermit, fuzzyf10w +date: 2021/06/30 +description: Detect Attempt PrintNightmare (CVE-2021-1675) Remote code execution in + Windows Spooler Service +detection: + SELECTION_1: + EventID: 31017 + SELECTION_2: + Description: '*Rejected an insecure guest logon*' + SELECTION_3: + UserName: '' + SELECTION_4: + ServerName: \1* + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Account fallback reasons (after failed login with specific account) +fields: +- Computer +- User +id: 71886b70-d7b4-4dbf-acce-87d2ca135262 +level: medium +logsource: + product: windows + service: smbclient-security +modified: 2021/07/05 +references: +- https://twitter.com/KevTheHermit/status/1410203844064301056 +- https://github.com/hhlxf/PrintNightmare +- https://github.com/afwu/PrintNightmare +status: experimental +tags: +- attack.credential_access +- attack.t1110.001 diff --git a/rules/sigma/windows/builtin/win_susp_failed_logon_reasons.yml b/rules/sigma/windows/builtin/win_susp_failed_logon_reasons.yml new file mode 100644 index 00000000..8ee4cd79 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_failed_logon_reasons.yml @@ -0,0 +1,36 @@ + +title: Account Tampering - Suspicious Failed Logon Reasons +author: Florian Roth +date: 2017/02/19 +description: This method uses uncommon error codes on failed logons to determine suspicious + activity and tampering with accounts that have been disabled or somehow restricted. +detection: + SELECTION_1: + EventID: 4625 + SELECTION_2: + EventID: 4776 + SELECTION_3: + Status: + - '0xC0000072' + - '0xC000006F' + - '0xC0000070' + - '0xC0000413' + - '0xC000018C' + - '0xC000015B' + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3) +falsepositives: +- User using a disabled account +id: 9eb99343-d336-4020-a3cd-67f3819e68ee +level: high +logsource: + product: windows + service: security +modified: 2020/08/23 +references: +- https://twitter.com/SBousseaden/status/1101431884540710913 +tags: +- attack.persistence +- attack.defense_evasion +- attack.privilege_escalation +- attack.initial_access +- attack.t1078 diff --git a/rules/sigma/windows/builtin/win_susp_failed_logon_source.yml b/rules/sigma/windows/builtin/win_susp_failed_logon_source.yml new file mode 100644 index 00000000..a7972171 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_failed_logon_source.yml @@ -0,0 +1,55 @@ + +title: Failed Logon From Public IP +author: NVISO +date: 2020/05/06 +description: A login from a public IP can indicate a misconfigured firewall or network + boundary. +detection: + SELECTION_1: + EventID: 4625 + SELECTION_2: + IpAddress: '*-*' + SELECTION_3: + IpAddress: + - 10.* + - 192.168.* + - 172.16.* + - 172.17.* + - 172.18.* + - 172.19.* + - 172.20.* + - 172.21.* + - 172.22.* + - 172.23.* + - 172.24.* + - 172.25.* + - 172.26.* + - 172.27.* + - 172.28.* + - 172.29.* + - 172.30.* + - 172.31.* + - 127.* + - 169.254.* + SELECTION_4: + IpAddress: ::1 + SELECTION_5: + IpAddress: + - fe80::* + - fc00::* + condition: (SELECTION_1 and not ((SELECTION_2 or SELECTION_3 or SELECTION_4 or + SELECTION_5))) +falsepositives: +- Legitimate logon attempts over the internet +- IPv4-to-IPv6 mapped IPs +id: f88e112a-21aa-44bd-9b01-6ee2a2bbbed1 +level: medium +logsource: + product: windows + service: security +tags: +- attack.initial_access +- attack.persistence +- attack.t1078 +- attack.t1190 +- attack.t1133 diff --git a/rules/sigma/windows/builtin/win_susp_failed_logons_explicit_credentials.yml b/rules/sigma/windows/builtin/win_susp_failed_logons_explicit_credentials.yml new file mode 100644 index 00000000..d133bc09 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_failed_logons_explicit_credentials.yml @@ -0,0 +1,27 @@ + +title: Multiple Users Attempting To Authenticate Using Explicit Credentials +author: Mauricio Velazco +date: 2021/06/01 +description: Detects a source user failing to authenticate with multiple users using + explicit credentials on a host. +detection: + SELECTION_1: + EventID: 4648 + condition: SELECTION_1 | count(Account_Name) by ComputerName > 10 +falsepositives: +- Terminal servers +- Jump servers +- Other multiuser systems like Citrix server farms +- Workstations with frequently changing users +id: 196a29c2-e378-48d8-ba07-8a9e61f7fab9 +level: medium +logsource: + product: windows + service: security +modified: 2021/08/09 +references: +- https://docs.splunk.com/Documentation/ESSOC/3.22.0/stories/UseCase#Active_directory_password_spraying +tags: +- attack.t1110.003 +- attack.initial_access +- attack.privilege_escalation diff --git a/rules/sigma/windows/builtin/win_susp_failed_logons_single_process.yml b/rules/sigma/windows/builtin/win_susp_failed_logons_single_process.yml new file mode 100644 index 00000000..7b8b972e --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_failed_logons_single_process.yml @@ -0,0 +1,33 @@ + +title: Multiple Users Failing to Authenticate from Single Process +author: Mauricio Velazco +date: 2021/06/01 +description: Detects failed logins with multiple accounts from a single process on + the system. +detection: + SELECTION_1: + EventID: 4625 + SELECTION_2: + LogonType: 2 + SELECTION_3: + ProcessName: '-' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) | count(TargetUserName) + by ProcessName > 10 +falsepositives: +- Terminal servers +- Jump servers +- Other multiuser systems like Citrix server farms +- Workstations with frequently changing users +id: fe563ab6-ded4-4916-b49f-a3a8445fe280 +level: medium +logsource: + product: windows + service: security +modified: 2021/07/07 +references: +- https://docs.splunk.com/Documentation/ESSOC/3.22.0/stories/UseCase#Active_directory_password_spraying +- https://www.trimarcsecurity.com/single-post/2018/05/06/trimarc-research-detecting-password-spraying-with-security-event-auditing +tags: +- attack.t1110.003 +- attack.initial_access +- attack.privilege_escalation diff --git a/rules/sigma/windows/builtin/win_susp_failed_logons_single_source.yml b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source.yml new file mode 100644 index 00000000..93222d21 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source.yml @@ -0,0 +1,32 @@ + +title: Failed Logins with Different Accounts from Single Source System +author: Florian Roth +date: 2017/01/10 +description: Detects suspicious failed logins with different user accounts from a + single source system +detection: + SELECTION_1: + EventID: 529 + SELECTION_2: + EventID: 4625 + SELECTION_3: + TargetUserName: '*' + SELECTION_4: + WorkstationName: '*' + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3 and SELECTION_4) | count(TargetUserName) + by WorkstationName > 3 +falsepositives: +- Terminal servers +- Jump servers +- Other multiuser systems like Citrix server farms +- Workstations with frequently changing users +id: e98374a6-e2d9-4076-9b5c-11bdb2569995 +level: medium +logsource: + product: windows + service: security +modified: 2021/09/21 +tags: +- attack.persistence +- attack.privilege_escalation +- attack.t1078 diff --git a/rules/sigma/windows/builtin/win_susp_failed_logons_single_source2.yml b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source2.yml new file mode 100644 index 00000000..23cb0de7 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source2.yml @@ -0,0 +1,33 @@ + +title: Failed Logins with Different Accounts from Single Source System +author: Florian Roth +date: 2017/01/10 +description: Detects suspicious failed logins with different user accounts from a + single source system +detection: + SELECTION_1: + EventID: 4776 + SELECTION_2: + TargetUserName: '*' + SELECTION_3: + Workstation: '*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) | count(TargetUserName) + by Workstation > 3 +falsepositives: +- Terminal servers +- Jump servers +- Other multiuser systems like Citrix server farms +- Workstations with frequently changing users +id: 6309ffc4-8fa2-47cf-96b8-a2f72e58e538 +level: medium +logsource: + product: windows + service: security +modified: 2021/09/21 +related: +- id: e98374a6-e2d9-4076-9b5c-11bdb2569995 + type: derived +tags: +- attack.persistence +- attack.privilege_escalation +- attack.t1078 diff --git a/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_kerberos.yml b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_kerberos.yml new file mode 100644 index 00000000..7202f464 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_kerberos.yml @@ -0,0 +1,33 @@ + +title: Valid Users Failing to Authenticate From Single Source Using Kerberos +author: Mauricio Velazco, frack113 +date: 2021/06/01 +description: Detects multiple failed logins with multiple valid domain accounts from + a single source system using the Kerberos protocol. +detection: + SELECTION_1: + EventID: 4771 + SELECTION_2: + Status: '0x18' + SELECTION_3: + TargetUserName: '*$' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) | count(TargetUserName) + by IpAddress > 10 +falsepositives: +- Vulnerability scanners +- Misconfigured systems +- Remote administration tools +- VPN terminators +- Multiuser systems like Citrix server farms +id: 5d1d946e-32e6-4d9a-a0dc-0ac022c7eb98 +level: medium +logsource: + product: windows + service: security +modified: 2021/07/06 +references: +- https://docs.splunk.com/Documentation/ESSOC/3.22.0/stories/UseCase#Active_directory_password_spraying +tags: +- attack.t1110.003 +- attack.initial_access +- attack.privilege_escalation diff --git a/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_kerberos2.yml b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_kerberos2.yml new file mode 100644 index 00000000..a37dfc92 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_kerberos2.yml @@ -0,0 +1,33 @@ + +title: Disabled Users Failing To Authenticate From Source Using Kerberos +author: Mauricio Velazco, frack113 +date: 2021/06/01 +description: Detects failed logins with multiple disabled domain accounts from a single + source system using the Kerberos protocol. +detection: + SELECTION_1: + EventID: 4768 + SELECTION_2: + Status: '0x12' + SELECTION_3: + TargetUserName: '*$' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) | count(TargetUserName) + by IpAddress > 10 +falsepositives: +- Vulnerability scanners +- Misconfigured systems +- Remote administration tools +- VPN terminators +- Multiuser systems like Citrix server farms +id: 4b6fe998-b69c-46d8-901b-13677c9fb663 +level: medium +logsource: + product: windows + service: security +modified: 2021/07/06 +references: +- https://docs.splunk.com/Documentation/ESSOC/3.22.0/stories/UseCase#Active_directory_password_spraying +tags: +- attack.t1110.003 +- attack.initial_access +- attack.privilege_escalation diff --git a/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_kerberos3.yml b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_kerberos3.yml new file mode 100644 index 00000000..7197b2b1 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_kerberos3.yml @@ -0,0 +1,33 @@ + +title: Invalid Users Failing To Authenticate From Source Using Kerberos +author: Mauricio Velazco, frack113 +date: 2021/06/01 +description: Detects failed logins with multiple invalid domain accounts from a single + source system using the Kerberos protocol. +detection: + SELECTION_1: + EventID: 4768 + SELECTION_2: + Status: '0x6' + SELECTION_3: + TargetUserName: '*$' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) | count(TargetUserName) + by IpAddress > 10 +falsepositives: +- Vulnerability scanners +- Misconfigured systems +- Remote administration tools +- VPN terminators +- Multiuser systems like Citrix server farms +id: bc93dfe6-8242-411e-a2dd-d16fa0cc8564 +level: medium +logsource: + product: windows + service: security +modified: 2021/07/06 +references: +- https://docs.splunk.com/Documentation/ESSOC/3.22.0/stories/UseCase#Active_directory_password_spraying +tags: +- attack.t1110.003 +- attack.initial_access +- attack.privilege_escalation diff --git a/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_ntlm.yml b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_ntlm.yml new file mode 100644 index 00000000..8186a0f4 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_ntlm.yml @@ -0,0 +1,32 @@ + +title: Valid Users Failing to Authenticate from Single Source Using NTLM +author: Mauricio Velazco +date: 2021/06/01 +description: Detects failed logins with multiple valid domain accounts from a single + source system using the NTLM protocol. +detection: + SELECTION_1: + EventID: 4776 + SELECTION_2: + Status: '*0xC000006A' + SELECTION_3: + TargetUserName: '*$' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) | count(TargetUserName) + by Workstation > 10 +falsepositives: +- Terminal servers +- Jump servers +- Other multiuser systems like Citrix server farms +- Workstations with frequently changing users +id: f88bab7f-b1f4-41bb-bdb1-4b8af35b0470 +level: medium +logsource: + product: windows + service: security +modified: 2021/07/07 +references: +- https://docs.splunk.com/Documentation/ESSOC/3.22.0/stories/UseCase#Active_directory_password_spraying +tags: +- attack.t1110.003 +- attack.initial_access +- attack.privilege_escalation diff --git a/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_ntlm2.yml b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_ntlm2.yml new file mode 100644 index 00000000..0604c9a4 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_failed_logons_single_source_ntlm2.yml @@ -0,0 +1,32 @@ + +title: Invalid Users Failing To Authenticate From Single Source Using NTLM +author: Mauricio Velazco +date: 2021/06/01 +description: Detects failed logins with multiple invalid domain accounts from a single + source system using the NTLM protocol. +detection: + SELECTION_1: + EventID: 4776 + SELECTION_2: + Status: '*0xC0000064' + SELECTION_3: + TargetUserName: '*$' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) | count(TargetUserName) + by Workstation > 10 +falsepositives: +- Terminal servers +- Jump servers +- Other multiuser systems like Citrix server farms +- Workstations with frequently changing users +id: 56d62ef8-3462-4890-9859-7b41e541f8d5 +level: medium +logsource: + product: windows + service: security +modified: 2021/07/07 +references: +- https://docs.splunk.com/Documentation/ESSOC/3.22.0/stories/UseCase#Active_directory_password_spraying +tags: +- attack.t1110.003 +- attack.initial_access +- attack.privilege_escalation diff --git a/rules/sigma/windows/builtin/win_susp_failed_remote_logons_single_source.yml b/rules/sigma/windows/builtin/win_susp_failed_remote_logons_single_source.yml new file mode 100644 index 00000000..dcc802c5 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_failed_remote_logons_single_source.yml @@ -0,0 +1,32 @@ + +title: Multiple Users Remotely Failing To Authenticate From Single Source +author: Mauricio Velazco +date: 2021/06/01 +description: Detects a source system failing to authenticate against a remote host + with multiple users. +detection: + SELECTION_1: + EventID: 4625 + SELECTION_2: + LogonType: 3 + SELECTION_3: + IpAddress: '-' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) | count(TargetUserName) + by IpAddress > 10 +falsepositives: +- Terminal servers +- Jump servers +- Other multiuser systems like Citrix server farms +- Workstations with frequently changing users +id: add2ef8d-dc91-4002-9e7e-f2702369f53a +level: medium +logsource: + product: windows + service: security +modified: 2021/07/09 +references: +- https://docs.splunk.com/Documentation/ESSOC/3.22.0/stories/UseCase#Active_directory_password_spraying +tags: +- attack.t1110.003 +- attack.initial_access +- attack.privilege_escalation diff --git a/rules/sigma/windows/builtin/win_susp_interactive_logons.yml b/rules/sigma/windows/builtin/win_susp_interactive_logons.yml new file mode 100644 index 00000000..b287f0d8 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_interactive_logons.yml @@ -0,0 +1,36 @@ + +title: Interactive Logon to Server Systems +author: Florian Roth +date: 2017/03/17 +description: Detects interactive console logons to Server Systems +detection: + SELECTION_1: + EventID: 528 + SELECTION_2: + EventID: 529 + SELECTION_3: + EventID: 4624 + SELECTION_4: + EventID: 4625 + SELECTION_5: + LogonType: 2 + SELECTION_6: + ComputerName: + - '%ServerSystems%' + - '%DomainControllers%' + SELECTION_7: + LogonProcessName: Advapi + SELECTION_8: + ComputerName: '%Workstations%' + condition: (((SELECTION_1 or SELECTION_2 or SELECTION_3 or SELECTION_4) and SELECTION_5 + and SELECTION_6) and not (SELECTION_7 and SELECTION_8)) +falsepositives: +- Administrative activity via KVM or ILO board +id: 3ff152b2-1388-4984-9cd9-a323323fdadf +level: medium +logsource: + product: windows + service: security +tags: +- attack.lateral_movement +- attack.t1078 diff --git a/rules/sigma/windows/builtin/win_susp_kerberos_manipulation.yml b/rules/sigma/windows/builtin/win_susp_kerberos_manipulation.yml new file mode 100644 index 00000000..9fbbc4f9 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_kerberos_manipulation.yml @@ -0,0 +1,58 @@ + +title: Kerberos Manipulation +author: Florian Roth +date: 2017/02/10 +description: This method triggers on rare Kerberos Failure Codes caused by manipulations + of Kerberos messages +detection: + SELECTION_1: + EventID: 675 + SELECTION_2: + EventID: 4768 + SELECTION_3: + EventID: 4769 + SELECTION_4: + EventID: 4771 + SELECTION_5: + FailureCode: + - '0x9' + - '0xA' + - '0xB' + - '0xF' + - '0x10' + - '0x11' + - '0x13' + - '0x14' + - '0x1A' + - '0x1F' + - '0x21' + - '0x22' + - '0x23' + - '0x24' + - '0x26' + - '0x27' + - '0x28' + - '0x29' + - '0x2C' + - '0x2D' + - '0x2E' + - '0x2F' + - '0x31' + - '0x32' + - '0x3E' + - '0x3F' + - '0x40' + - '0x41' + - '0x43' + - '0x44' + condition: ((SELECTION_1 or SELECTION_2 or SELECTION_3 or SELECTION_4) and SELECTION_5) +falsepositives: +- Faulty legacy applications +id: f7644214-0eb0-4ace-9455-331ec4c09253 +level: high +logsource: + product: windows + service: security +tags: +- attack.credential_access +- attack.t1212 diff --git a/rules/sigma/windows/builtin/win_susp_ldap_dataexchange.yml b/rules/sigma/windows/builtin/win_susp_ldap_dataexchange.yml new file mode 100644 index 00000000..666a893b --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_ldap_dataexchange.yml @@ -0,0 +1,35 @@ + +title: Suspicious LDAP-Attributes Used +author: xknow @xknow_infosec +date: 2019/03/24 +description: Detects the usage of particular AttributeLDAPDisplayNames, which are + known for data exchange via LDAP by the tool LDAPFragger and are additionally not + commonly used in companies. +detection: + SELECTION_1: + EventID: 5136 + SELECTION_2: + AttributeValue: '*' + SELECTION_3: + AttributeLDAPDisplayName: + - primaryInternationalISDNNumber + - otherFacsimileTelephoneNumber + - primaryTelexNumber + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Companies, who may use these default LDAP-Attributes for personal information +id: d00a9a72-2c09-4459-ad03-5e0a23351e36 +level: high +logsource: + product: windows + service: security +modified: 2020/08/23 +references: +- https://medium.com/@ivecodoe/detecting-ldapfragger-a-newly-released-cobalt-strike-beacon-using-ldap-for-c2-communication-c274a7f00961 +- https://blog.fox-it.com/2020/03/19/ldapfragger-command-and-control-over-ldap-attributes/ +- https://github.com/fox-it/LDAPFragger +status: experimental +tags: +- attack.t1071 +- attack.t1001.003 +- attack.command_and_control diff --git a/rules/sigma/windows/builtin/win_susp_local_anon_logon_created.yml b/rules/sigma/windows/builtin/win_susp_local_anon_logon_created.yml new file mode 100644 index 00000000..be0b662d --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_local_anon_logon_created.yml @@ -0,0 +1,31 @@ + +title: Suspicious Windows ANONYMOUS LOGON Local Account Created +author: James Pemberton / @4A616D6573 +date: 2019/10/31 +description: Detects the creation of suspicious accounts similar to ANONYMOUS LOGON, + such as using additional spaces. Created as an covering detection for exclusion + of Logon Type 3 from ANONYMOUS LOGON accounts. +detection: + SELECTION_1: + EventID: 4720 + SELECTION_2: + SamAccountName: '*ANONYMOUS*' + SELECTION_3: + SamAccountName: '*LOGON*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 1bbf25b9-8038-4154-a50b-118f2a32be27 +level: high +logsource: + product: windows + service: security +modified: 2021/07/06 +references: +- https://twitter.com/SBousseaden/status/1189469425482829824 +status: experimental +tags: +- attack.persistence +- attack.t1136 +- attack.t1136.001 +- attack.t1136.002 diff --git a/rules/sigma/windows/builtin/win_susp_logon_explicit_credentials.yml b/rules/sigma/windows/builtin/win_susp_logon_explicit_credentials.yml new file mode 100644 index 00000000..d565d27a --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_logon_explicit_credentials.yml @@ -0,0 +1,35 @@ + +title: Suspicious Remote Logon with Explicit Credentials +author: oscd.community, Teymur Kheirkhabarov @HeirhabarovT, Zach Stanford @svch0st +date: 2020/10/05 +description: Detects suspicious processes logging on with explicit credentials +detection: + SELECTION_1: + EventID: 4648 + SELECTION_2: + Image: + - '*\cmd.exe' + - '*\powershell.exe' + - '*\pwsh.exe' + - '*\winrs.exe' + - '*\wmic.exe' + - '*\net.exe' + - '*\net1.exe' + - '*\reg.exe' + SELECTION_3: + TargetServerName: localhost + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) +falsepositives: +- Administrators that use the RunAS command or scheduled tasks +id: 941e5c45-cda7-4864-8cea-bbb7458d194a +level: medium +logsource: + product: windows + service: security +modified: 2021/07/07 +references: +- https://drive.google.com/file/d/1lKya3_mLnR3UQuCoiYruO3qgu052_iS_/view +status: experimental +tags: +- attack.t1078 +- attack.lateral_movement diff --git a/rules/sigma/windows/builtin/win_susp_lsass_dump.yml b/rules/sigma/windows/builtin/win_susp_lsass_dump.yml new file mode 100644 index 00000000..d30ba662 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_lsass_dump.yml @@ -0,0 +1,31 @@ + +title: Password Dumper Activity on LSASS +author: sigma +date: 2017/02/12 +description: Detects process handle on LSASS process with certain access mask and + object type SAM_DOMAIN +detection: + SELECTION_1: + EventID: 4656 + SELECTION_2: + ProcessName: '*\lsass.exe' + SELECTION_3: + AccessMask: '0x705' + SELECTION_4: + ObjectType: SAM_DOMAIN + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: aa1697b7-d611-4f9a-9cb2-5125b4ccfd5c +level: high +logsource: + product: windows + service: security +modified: 2021/06/21 +references: +- https://twitter.com/jackcr/status/807385668833968128 +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.001 diff --git a/rules/sigma/windows/builtin/win_susp_lsass_dump_generic.yml b/rules/sigma/windows/builtin/win_susp_lsass_dump_generic.yml new file mode 100644 index 00000000..1141cf54 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_lsass_dump_generic.yml @@ -0,0 +1,81 @@ + +title: Generic Password Dumper Activity on LSASS +author: Roberto Rodriguez, Teymur Kheirkhabarov, Dimitrios Slamaris, Mark Russinovich, + Aleksey Potapov, oscd.community (update) +date: 2019/11/01 +description: Detects process handle on LSASS process with certain access mask +detection: + SELECTION_1: + ObjectName: '*\lsass.exe' + SELECTION_2: + EventID: 4656 + SELECTION_3: + AccessMask: + - '*0x40*' + - '*0x1400*' + - '*0x1000*' + - '*0x100000*' + - '*0x1410*' + - '*0x1010*' + - '*0x1438*' + - '*0x143a*' + - '*0x1418*' + - '*0x1f0fff*' + - '*0x1f1fff*' + - '*0x1f2fff*' + - '*0x1f3fff*' + SELECTION_4: + EventID: 4663 + SELECTION_5: + AccessList: + - '*4484*' + - '*4416*' + SELECTION_6: + ProcessName: + - '*\wmiprvse.exe' + - '*\taskmgr.exe' + - '*\procexp64.exe' + - '*\procexp.exe' + - '*\lsm.exe' + - '*\csrss.exe' + - '*\wininit.exe' + - '*\vmtoolsd.exe' + - '*\minionhost.exe' + - '*\VsTskMgr.exe' + - '*\thor64.exe' + SELECTION_7: + ProcessName: + - C:\Windows\System32\\* + - C:\Windows\SysWow64\\* + - C:\Windows\SysNative\\* + - C:\Program Files\\* + - C:\Windows\Temp\asgard2-agent\\* + SELECTION_8: + ProcessName: + - C:\Program Files* + condition: (((SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and + SELECTION_5))) and not (SELECTION_6 and SELECTION_7)) and not (SELECTION_8)) +falsepositives: +- Legitimate software accessing LSASS process for legitimate reason; update the whitelist + with it +fields: +- ComputerName +- SubjectDomainName +- SubjectUserName +- ProcessName +- ProcessID +id: 4a1b6da0-d94f-4fc3-98fc-2d9cb9e5ee76 +level: high +logsource: + product: windows + service: security +modified: 2021/04/19 +references: +- https://cyberwardog.blogspot.com/2017/03/chronicles-of-threat-hunter-hunting-for_22.html +- https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- car.2019-04-004 +- attack.t1003.001 diff --git a/rules/sigma/windows/builtin/win_susp_mshta_execution.yml b/rules/sigma/windows/builtin/win_susp_mshta_execution.yml new file mode 100644 index 00000000..6dbd6bb3 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_mshta_execution.yml @@ -0,0 +1,40 @@ + +title: MSHTA Suspicious Execution 01 +author: Diego Perez (@darkquassar), Markus Neis, Swisscom (Improve Rule) +date: 2019/02/22 +description: Detection for mshta.exe suspicious execution patterns sometimes involving + file polyglotism +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\mshta.exe' + SELECTION_3: + CommandLine: + - '*vbscript*' + - '*.jpg*' + - '*.png*' + - '*.lnk*' + - '*.xls*' + - '*.doc*' + - '*.zip*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- False positives depend on scripts and administrative tools used in the monitored + environment +id: cc7abbd0-762b-41e3-8a26-57ad50d2eea3 +level: high +logsource: + category: process_creation + product: windows +modified: 2020/08/23 +references: +- http://blog.sevagas.com/?Hacking-around-HTA-files +- https://0x00sec.org/t/clientside-exploitation-in-2018-how-pentesting-has-changed/7356 +- https://docs.microsoft.com/en-us/dotnet/standard/data/xml/xslt-stylesheet-scripting-using-msxsl-script +- https://medium.com/tsscyber/pentesting-and-hta-bypassing-powershell-constrained-language-mode-53a42856c997 +status: experimental +tags: +- attack.defense_evasion +- attack.t1140 +- attack.t1218.005 diff --git a/rules/sigma/windows/builtin/win_susp_msmpeng_crash.yml b/rules/sigma/windows/builtin/win_susp_msmpeng_crash.yml new file mode 100644 index 00000000..194a5597 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_msmpeng_crash.yml @@ -0,0 +1,37 @@ + +title: Microsoft Malware Protection Engine Crash +author: Florian Roth +date: 2017/05/09 +description: This rule detects a suspicious crash of the Microsoft Malware Protection + Engine +detection: + SELECTION_1: + Source: Application Error + SELECTION_2: + EventID: 1000 + SELECTION_3: + Source: Windows Error Reporting + SELECTION_4: + EventID: 1001 + SELECTION_5: + - MsMpEng.exe + SELECTION_6: + - mpengine.dll + condition: (((SELECTION_1 and SELECTION_2) or (SELECTION_3 and SELECTION_4)) and + (SELECTION_5 and SELECTION_6)) +falsepositives: +- MsMpEng.exe can crash when C:\ is full +id: 6c82cf5c-090d-4d57-9188-533577631108 +level: high +logsource: + product: windows + service: application +references: +- https://bugs.chromium.org/p/project-zero/issues/detail?id=1252&desc=5 +- https://technet.microsoft.com/en-us/library/security/4022344 +status: experimental +tags: +- attack.defense_evasion +- attack.t1089 +- attack.t1211 +- attack.t1562.001 diff --git a/rules/sigma/windows/builtin/win_susp_multiple_files_renamed_or_deleted.yml b/rules/sigma/windows/builtin/win_susp_multiple_files_renamed_or_deleted.yml new file mode 100644 index 00000000..e732c2f8 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_multiple_files_renamed_or_deleted.yml @@ -0,0 +1,34 @@ + +title: Suspicious Multiple File Rename Or Delete Occurred +author: Vasiliy Burov, oscd.community +date: 2020/10/16 +description: Detects multiple file rename or delete events occurrence within a specified + period of time by a same user (these events may signalize about ransomware activity). +detection: + SELECTION_1: + EventID: 4663 + SELECTION_2: + ObjectType: File + SELECTION_3: + AccessList: '%%1537' + SELECTION_4: + Keywords: '0x8020000000000000' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) | count() + by SubjectLogonId > 10 +falsepositives: +- Software uninstallation +- Files restore activities +id: 97919310-06a7-482c-9639-92b67ed63cf8 +level: medium +logsource: + definition: 'Requirements: Audit Policy : Policies/Windows Settings/Security Settings/Local + Policies/Audit Policy/Audit object access, Policies/Windows Settings/Security + Settings/Advanced Audit Policy Configuration/Object Access' + product: windows + service: security +references: +- https://www.manageengine.com/data-security/how-to/how-to-detect-ransomware-attacks.html +status: experimental +tags: +- attack.impact +- attack.t1486 diff --git a/rules/sigma/windows/builtin/win_susp_net_recon_activity.yml b/rules/sigma/windows/builtin/win_susp_net_recon_activity.yml new file mode 100644 index 00000000..7a2687a5 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_net_recon_activity.yml @@ -0,0 +1,45 @@ + +title: Reconnaissance Activity +author: Florian Roth (rule), Jack Croock (method), Jonhnathan Ribeiro (improvements), + oscd.community +date: 2017/03/07 +description: Detects activity as "net user administrator /domain" and "net group domain + admins /domain" +detection: + SELECTION_1: + EventID: 4661 + SELECTION_2: + ObjectType: + - SAM_USER + - SAM_GROUP + SELECTION_3: + ObjectName: S-1-5-21-* + SELECTION_4: + AccessMask: '0x2d' + SELECTION_5: + ObjectName: + - '*-500' + - '*-512' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Administrator activity +- Penetration tests +id: 968eef52-9cff-4454-8992-1e74b9cbad6c +level: high +logsource: + definition: The volume of Event ID 4661 is high on Domain Controllers and therefore + "Audit SAM" and "Audit Kernel Object" advanced audit policy settings are not configured + in the recommendations for server systems + product: windows + service: security +modified: 2020/08/23 +references: +- https://findingbad.blogspot.de/2017/01/hunting-what-does-it-look-like.html +status: experimental +tags: +- attack.discovery +- attack.t1087 +- attack.t1087.002 +- attack.t1069 +- attack.t1069.002 +- attack.s0039 diff --git a/rules/sigma/windows/builtin/win_susp_ntlm_auth.yml b/rules/sigma/windows/builtin/win_susp_ntlm_auth.yml new file mode 100644 index 00000000..ef45d4f1 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_ntlm_auth.yml @@ -0,0 +1,28 @@ + +title: NTLM Logon +author: Florian Roth +date: 2018/06/08 +description: Detects logons using NTLM, which could be caused by a legacy source or + attackers +detection: + SELECTION_1: + EventID: 8002 + SELECTION_2: + CallingProcessName: '*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legacy hosts +id: 98c3bcf1-56f2-49dc-9d8d-c66cf190238b +level: low +logsource: + definition: Requires events from Microsoft-Windows-NTLM/Operational + product: windows + service: ntlm +references: +- https://twitter.com/JohnLaTwC/status/1004895028995477505 +- https://goo.gl/PsqrhT +status: experimental +tags: +- attack.lateral_movement +- attack.t1075 +- attack.t1550.002 diff --git a/rules/sigma/windows/builtin/win_susp_ntlm_rdp.yml b/rules/sigma/windows/builtin/win_susp_ntlm_rdp.yml new file mode 100644 index 00000000..8cc21ffe --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_ntlm_rdp.yml @@ -0,0 +1,33 @@ + +title: Potential Remote Desktop Connection to Non-Domain Host +author: James Pemberton +date: 2020/05/22 +description: Detects logons using NTLM to hosts that are potentially not part of the + domain. +detection: + SELECTION_1: + EventID: 8001 + SELECTION_2: + TargetName: TERMSRV* + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Host connections to valid domains, exclude these. +- Host connections not using host FQDN. +- Host connections to external legitimate domains. +fields: +- Computer +- UserName +- DomainName +- TargetName +id: ce5678bb-b9aa-4fb5-be4b-e57f686256ad +level: medium +logsource: + definition: Requires events from Microsoft-Windows-NTLM/Operational + product: windows + service: ntlm +references: +- n/a +status: experimental +tags: +- attack.command_and_control +- attack.t1219 diff --git a/rules/sigma/windows/builtin/win_susp_proceshacker.yml b/rules/sigma/windows/builtin/win_susp_proceshacker.yml new file mode 100644 index 00000000..fae5bba5 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_proceshacker.yml @@ -0,0 +1,28 @@ + +title: ProcessHacker Privilege Elevation +author: Florian Roth +date: 2021/05/27 +description: Detects a ProcessHacker tool that elevated privileges to a very high + level +detection: + SELECTION_1: + EventID: 7045 + SELECTION_2: + ServiceName: ProcessHacker* + SELECTION_3: + AccountName: LocalSystem + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unlikely +id: c4ff1eac-84ad-44dd-a6fb-d56a92fc43a9 +level: high +logsource: + product: windows + service: system +references: +- https://twitter.com/1kwpeter/status/1397816101455765504 +tags: +- attack.execution +- attack.privilege_escalation +- attack.t1543.003 +- attack.t1569.002 diff --git a/rules/sigma/windows/builtin/win_susp_psexec.yml b/rules/sigma/windows/builtin/win_susp_psexec.yml new file mode 100644 index 00000000..c76445aa --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_psexec.yml @@ -0,0 +1,40 @@ + +title: Suspicious PsExec Execution +author: Samir Bousseaden +date: 2019/04/03 +description: detects execution of psexec or paexec with renamed service name, this + rule helps to filter out the noise if psexec is used for legit purposes or if attacker + uses a different psexec client other than sysinternal one +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + ShareName: \\*\IPC$ + SELECTION_3: + RelativeTargetName: + - '*-stdin' + - '*-stdout' + - '*-stderr' + SELECTION_4: + EventID: 5145 + SELECTION_5: + ShareName: \\*\IPC$ + SELECTION_6: + RelativeTargetName: PSEXESVC* + condition: ((SELECTION_1 and SELECTION_2 and SELECTION_3) and not (SELECTION_4 + and SELECTION_5 and SELECTION_6)) +falsepositives: +- nothing observed so far +id: c462f537-a1e3-41a6-b5fc-b2c2cef9bf82 +level: high +logsource: + definition: The advanced audit policy setting "Object Access > Audit Detailed File + Share" must be configured for Success/Failure + product: windows + service: security +references: +- https://blog.menasec.net/2019/02/threat-hunting-3-detecting-psexec.html +tags: +- attack.lateral_movement +- attack.t1077 +- attack.t1021.002 diff --git a/rules/sigma/windows/builtin/win_susp_raccess_sensitive_fext.yml b/rules/sigma/windows/builtin/win_susp_raccess_sensitive_fext.yml new file mode 100644 index 00000000..4692f5d7 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_raccess_sensitive_fext.yml @@ -0,0 +1,41 @@ + +title: Suspicious Access to Sensitive File Extensions +author: Samir Bousseaden +date: 2019/04/03 +description: Detects known sensitive file extensions accessed on a network share +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + RelativeTargetName: + - '*.pst' + - '*.ost' + - '*.msg' + - '*.nst' + - '*.oab' + - '*.edb' + - '*.nsf' + - '*.bak' + - '*.dmp' + - '*.kirbi' + - '*\groups.xml' + - '*.rdp' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Help Desk operator doing backup or re-imaging end user machine or pentest or backup + software +- Users working with these data types or exchanging message files +fields: +- ComputerName +- SubjectDomainName +- SubjectUserName +- RelativeTargetName +id: 91c945bc-2ad1-4799-a591-4d00198a1215 +level: medium +logsource: + product: windows + service: security +modified: 2021/08/09 +tags: +- attack.collection +- attack.t1039 diff --git a/rules/sigma/windows/builtin/win_susp_rc4_kerberos.yml b/rules/sigma/windows/builtin/win_susp_rc4_kerberos.yml new file mode 100644 index 00000000..c556f550 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_rc4_kerberos.yml @@ -0,0 +1,32 @@ + +title: Suspicious Kerberos RC4 Ticket Encryption +author: Florian Roth +date: 2017/02/06 +description: Detects service ticket requests using RC4 encryption type +detection: + SELECTION_1: + EventID: 4769 + SELECTION_2: + TicketOptions: '0x40810000' + SELECTION_3: + TicketEncryptionType: '0x17' + SELECTION_4: + ServiceName: $* + condition: ((SELECTION_1 and SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Service accounts used on legacy systems (e.g. NetApp) +- Windows Domains with DFL 2003 and legacy systems +id: 496a0e47-0a33-4dca-b009-9e6ca3591f39 +level: medium +logsource: + product: windows + service: security +modified: 2021/08/14 +references: +- https://adsecurity.org/?p=3458 +- https://www.trimarcsecurity.com/single-post/TrimarcResearch/Detecting-Kerberoasting-Activity +status: experimental +tags: +- attack.credential_access +- attack.t1208 +- attack.t1558.003 diff --git a/rules/sigma/windows/builtin/win_susp_rottenpotato.yml b/rules/sigma/windows/builtin/win_susp_rottenpotato.yml new file mode 100644 index 00000000..22ba93aa --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_rottenpotato.yml @@ -0,0 +1,34 @@ + +title: RottenPotato Like Attack Pattern +author: '@SBousseaden, Florian Roth' +date: 2019/11/15 +description: Detects logon events that have characteristics of events generated during + an attack with RottenPotato and the like +detection: + SELECTION_1: + EventID: 4624 + SELECTION_2: + LogonType: 3 + SELECTION_3: + TargetUserName: ANONYMOUS_LOGON + SELECTION_4: + WorkstationName: '-' + SELECTION_5: + IpAddress: 127.0.0.1 + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Unknown +id: 16f5d8ca-44bd-47c8-acbe-6fc95a16c12f +level: high +logsource: + product: windows + service: security +modified: 2021/07/07 +references: +- https://twitter.com/SBousseaden/status/1195284233729777665 +status: experimental +tags: +- attack.privilege_escalation +- attack.credential_access +- attack.t1171 +- attack.t1557.001 diff --git a/rules/sigma/windows/builtin/win_susp_sam_dump.yml b/rules/sigma/windows/builtin/win_susp_sam_dump.yml new file mode 100644 index 00000000..196f3b60 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_sam_dump.yml @@ -0,0 +1,27 @@ + +title: SAM Dump to AppData +author: Florian Roth +date: 2018/01/27 +description: Detects suspicious SAM dump activity as cause by QuarksPwDump and other + password dumpers +detection: + SELECTION_1: + EventID: 16 + SELECTION_2: + - \AppData\Local\Temp\SAM- + SELECTION_3: + - .dmp + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Penetration testing +id: 839dd1e8-eda8-4834-8145-01beeee33acd +level: high +logsource: + definition: The source of this type of event is Kernel-General + product: windows + service: system +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.002 diff --git a/rules/sigma/windows/builtin/win_susp_sdelete.yml b/rules/sigma/windows/builtin/win_susp_sdelete.yml new file mode 100644 index 00000000..1495d239 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_sdelete.yml @@ -0,0 +1,40 @@ + +title: Secure Deletion with SDelete +author: Thomas Patzke +date: 2017/06/14 +description: Detects renaming of file while deletion with SDelete tool. +detection: + SELECTION_1: + EventID: 4656 + SELECTION_2: + EventID: 4663 + SELECTION_3: + EventID: 4658 + SELECTION_4: + ObjectName: + - '*.AAA' + - '*.ZZZ' + condition: ((SELECTION_1 or SELECTION_2 or SELECTION_3) and SELECTION_4) +falsepositives: +- Legitimate usage of SDelete +id: 39a80702-d7ca-4a83-b776-525b1f86a36d +level: medium +logsource: + product: windows + service: security +modified: 2020/08/02 +references: +- https://jpcertcc.github.io/ToolAnalysisResultSheet/details/sdelete.htm +- https://www.jpcert.or.jp/english/pub/sr/ir_research.html +- https://docs.microsoft.com/en-gb/sysinternals/downloads/sdelete +status: experimental +tags: +- attack.impact +- attack.defense_evasion +- attack.t1107 +- attack.t1070.004 +- attack.t1066 +- attack.t1027.005 +- attack.t1485 +- attack.t1553.002 +- attack.s0195 diff --git a/rules/sigma/windows/builtin/win_susp_time_modification.yml b/rules/sigma/windows/builtin/win_susp_time_modification.yml new file mode 100644 index 00000000..3fdcf5fd --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_time_modification.yml @@ -0,0 +1,40 @@ + +title: Unauthorized System Time Modification +author: '@neu5ron' +date: 2019/02/05 +description: Detect scenarios where a potentially unauthorized application or user + is modifying the system time. +detection: + SELECTION_1: + EventID: 4616 + SELECTION_2: + ProcessName: C:\Program Files\VMware\VMware Tools\vmtoolsd.exe + SELECTION_3: + ProcessName: C:\Windows\System32\VBoxService.exe + SELECTION_4: + ProcessName: C:\Windows\System32\svchost.exe + SELECTION_5: + SubjectUserSid: S-1-5-19 + condition: (SELECTION_1 and not (((SELECTION_2 or SELECTION_3) or (SELECTION_4 + and SELECTION_5)))) +falsepositives: +- HyperV or other virtualization technologies with binary not listed in filter portion + of detection +id: faa031b5-21ed-4e02-8881-2591f98d82ed +level: medium +logsource: + definition: 'Requirements: Audit Policy : System > Audit Security State Change, + Group Policy : Computer Configuration\Windows Settings\Security Settings\Advanced + Audit Policy Configuration\Audit Policies\System\Audit Security State Change' + product: windows + service: security +modified: 2020/01/27 +references: +- Private Cuckoo Sandbox (from many years ago, no longer have hash, NDA as well) +- Live environment caused by malware +- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4616 +status: experimental +tags: +- attack.defense_evasion +- attack.t1099 +- attack.t1070.006 diff --git a/rules/sigma/windows/builtin/win_susp_wmi_login.yml b/rules/sigma/windows/builtin/win_susp_wmi_login.yml new file mode 100644 index 00000000..f71228a1 --- /dev/null +++ b/rules/sigma/windows/builtin/win_susp_wmi_login.yml @@ -0,0 +1,23 @@ + +title: Login with WMI +author: Thomas Patzke +date: 2019/12/04 +description: Detection of logins performed with WMI +detection: + SELECTION_1: + EventID: 4624 + SELECTION_2: + ProcessName: '*\WmiPrvSE.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Monitoring tools +- Legitimate system administration +id: 5af54681-df95-4c26-854f-2565e13cfab0 +level: low +logsource: + product: windows + service: security +status: stable +tags: +- attack.execution +- attack.t1047 diff --git a/rules/sigma/windows/builtin/win_suspicious_outbound_kerberos_connection.yml b/rules/sigma/windows/builtin/win_suspicious_outbound_kerberos_connection.yml new file mode 100644 index 00000000..04dcba2f --- /dev/null +++ b/rules/sigma/windows/builtin/win_suspicious_outbound_kerberos_connection.yml @@ -0,0 +1,33 @@ + +title: Suspicious Outbound Kerberos Connection +author: Ilyas Ochkov, oscd.community +date: 2019/10/24 +description: Detects suspicious outbound network activity via kerberos default port + indicating possible lateral movement or first stage PrivEsc via delegation. +detection: + SELECTION_1: + EventID: 5156 + SELECTION_2: + DestinationPort: 88 + SELECTION_3: + Image: + - '*\lsass.exe' + - '*\opera.exe' + - '*\chrome.exe' + - '*\firefox.exe' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) +falsepositives: +- Other browsers +id: eca91c7c-9214-47b9-b4c5-cb1d7e4f2350 +level: high +logsource: + product: windows + service: security +modified: 2019/11/13 +references: +- https://github.com/GhostPack/Rubeus +status: experimental +tags: +- attack.lateral_movement +- attack.t1208 +- attack.t1558.003 diff --git a/rules/sigma/windows/builtin/win_suspicious_werfault_connection_outbound.yml b/rules/sigma/windows/builtin/win_suspicious_werfault_connection_outbound.yml new file mode 100644 index 00000000..88227ac5 --- /dev/null +++ b/rules/sigma/windows/builtin/win_suspicious_werfault_connection_outbound.yml @@ -0,0 +1,52 @@ + +title: Suspicious Werfault.exe Network Connection Outbound +author: Sreeman +date: 2021/03/09 +description: Adversaries can migrate cobalt strike/metasploit/C2 beacons on compromised + systems to legitimate werfault.exe process to avoid detection. +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + Image: werfault.exe + SELECTION_3: + EventID: 3 + SELECTION_4: + ParentImage: svchost.exe + SELECTION_5: + DestinationIp: + - 104.42.151.234 + - 104.43.193.48 + - 52.255.188.83 + - 13.64.90.137 + - 168.61.161.212 + - 13.88.21.125 + - 40.88.32.150 + - 52.147.198.201 + - 52.239.207.100 + - 52.176.224.96 + - 2607:7700:0:24:0:1:287e:1894 + - 10.* + - 192.168.* + - 127.* + SELECTION_6: + DestinationHostname: + - '*.windowsupdate.com*' + - '*.microsoft.com*' + condition: (SELECTION_1 and SELECTION_2 and not ((SELECTION_3 and SELECTION_4 and + SELECTION_5 and SELECTION_6))) +falsepositives: +- Communication to other corporate systems that use IP addresses from public address + spaces and Microsoft IP spaces +id: e12c75f2-d09e-43f6-90e4-6a23842907af +level: medium +logsource: + category: network_connection + product: windows +modified: 2021/06/11 +references: +- https://thedfirreport.com/2021/03/08/bazar-drops-the-anchor/ +status: experimental +tags: +- attack.command_and_control +- attack.t1571 diff --git a/rules/sigma/windows/builtin/win_svcctl_remote_service.yml b/rules/sigma/windows/builtin/win_svcctl_remote_service.yml new file mode 100644 index 00000000..91c3f669 --- /dev/null +++ b/rules/sigma/windows/builtin/win_svcctl_remote_service.yml @@ -0,0 +1,32 @@ + +title: Remote Service Activity via SVCCTL Named Pipe +author: Samir Bousseaden +date: 2019/04/03 +description: Detects remote service activity via remote access to the svcctl named + pipe +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + ShareName: \\*\IPC$ + SELECTION_3: + RelativeTargetName: svcctl + SELECTION_4: + Accesses: '*WriteData*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- pentesting +id: 586a8d6b-6bfe-4ad9-9d78-888cd2fe50c3 +level: medium +logsource: + definition: The advanced audit policy setting "Object Access > Audit Detailed File + Share" must be configured for Success/Failure + product: windows + service: security +references: +- https://blog.menasec.net/2019/03/threat-hunting-26-remote-windows.html +tags: +- attack.lateral_movement +- attack.persistence +- attack.t1077 +- attack.t1021.002 diff --git a/rules/sigma/windows/builtin/win_syskey_registry_access.yml b/rules/sigma/windows/builtin/win_syskey_registry_access.yml new file mode 100644 index 00000000..a03abe07 --- /dev/null +++ b/rules/sigma/windows/builtin/win_syskey_registry_access.yml @@ -0,0 +1,34 @@ + +title: SysKey Registry Keys Access +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/08/12 +description: Detects handle requests and access operations to specific registry keys + to calculate the SysKey +detection: + SELECTION_1: + EventID: 4656 + SELECTION_2: + EventID: 4663 + SELECTION_3: + ObjectType: key + SELECTION_4: + ObjectName: + - '*lsa\JD' + - '*lsa\GBG' + - '*lsa\Skew1' + - '*lsa\Data' + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: 9a4ff3b8-6187-4fd2-8e8b-e0eae1129495 +level: critical +logsource: + product: windows + service: security +modified: 2019/11/10 +references: +- https://threathunterplaybook.com/notebooks/windows/07_discovery/WIN-190625024610.html +status: experimental +tags: +- attack.discovery +- attack.t1012 diff --git a/rules/sigma/windows/builtin/win_sysmon_channel_reference_deletion.yml b/rules/sigma/windows/builtin/win_sysmon_channel_reference_deletion.yml new file mode 100644 index 00000000..2e5ec716 --- /dev/null +++ b/rules/sigma/windows/builtin/win_sysmon_channel_reference_deletion.yml @@ -0,0 +1,39 @@ + +title: Sysmon Channel Reference Deletion +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/07/14 +description: Potential threat actor tampering with Sysmon manifest and eventually + disabling it +detection: + SELECTION_1: + ObjectName: + - '*WINEVT\Publishers\{5770385f-c22a-43e0-bf4c-06f5698ffbd9}*' + - '*WINEVT\Channels\Microsoft-Windows-Sysmon/Operational*' + SELECTION_2: + EventID: 4657 + SELECTION_3: + ObjectValueName: Enabled + SELECTION_4: + NewValue: '0' + SELECTION_5: + EventID: 4663 + SELECTION_6: + AccessMask: 65536 + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3 and SELECTION_4) or (SELECTION_5 + and SELECTION_6))) +falsepositives: +- unknown +id: 18beca67-ab3e-4ee3-ba7a-a46ca8d7d0cc +level: critical +logsource: + product: windows + service: security +references: +- https://twitter.com/Flangvik/status/1283054508084473861 +- https://twitter.com/SecurityJosh/status/1283027365770276866 +- https://securityjosh.github.io/2020/04/23/Mute-Sysmon.html +- https://gist.github.com/Cyb3rWard0g/cf08c38c61f7e46e8404b38201ca01c8 +status: experimental +tags: +- attack.defense_evasion +- attack.t1112 diff --git a/rules/sigma/windows/builtin/win_system_susp_eventlog_cleared.yml b/rules/sigma/windows/builtin/win_system_susp_eventlog_cleared.yml new file mode 100644 index 00000000..ea185905 --- /dev/null +++ b/rules/sigma/windows/builtin/win_system_susp_eventlog_cleared.yml @@ -0,0 +1,35 @@ + +title: Eventlog Cleared +author: Florian Roth +date: 2017/01/10 +description: One of the Windows Eventlogs has been cleared. e.g. caused by "wevtutil + cl" command execution +detection: + SELECTION_1: + EventID: 104 + SELECTION_2: + Source: Microsoft-Windows-Eventlog + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Rollout of log collection agents (the setup routine often includes a reset of the + local Eventlog) +- System provisioning (system reset before the golden image creation) +id: a62b37e0-45d3-48d9-a517-90c1a1b0186b +level: high +logsource: + product: windows + service: system +modified: 2021/09/21 +references: +- https://twitter.com/deviouspolack/status/832535435960209408 +- https://www.hybrid-analysis.com/sample/027cc450ef5f8c5f653329641ec1fed91f694e0d229928963b30f6b0d7d3a745?environmentId=100 +related: +- id: f2f01843-e7b8-4f95-a35a-d23584476423 + type: obsoletes +- id: d99b79d2-0a6f-4f46-ad8b-260b6e17f982 + type: derived +tags: +- attack.defense_evasion +- attack.t1070 +- attack.t1070.001 +- car.2016-04-002 diff --git a/rules/sigma/windows/builtin/win_tap_driver_installation.yml b/rules/sigma/windows/builtin/win_tap_driver_installation.yml new file mode 100644 index 00000000..913ab312 --- /dev/null +++ b/rules/sigma/windows/builtin/win_tap_driver_installation.yml @@ -0,0 +1,24 @@ + +title: Tap Driver Installation +author: Daniil Yugoslavskiy, Ian Davis, oscd.community +date: 2019/10/24 +description: Well-known TAP software installation. Possible preparation for data exfiltration + using tunnelling techniques +detection: + SELECTION_1: + EventID: 7045 + SELECTION_2: + ImagePath: '*tap0901*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate OpenVPN TAP insntallation +id: 8e4cf0e5-aa5d-4dc3-beff-dc26917744a9 +level: medium +logsource: + product: windows + service: system +modified: 2021/09/21 +status: experimental +tags: +- attack.exfiltration +- attack.t1048 diff --git a/rules/sigma/windows/builtin/win_transferring_files_with_credential_data_via_network_shares.yml b/rules/sigma/windows/builtin/win_transferring_files_with_credential_data_via_network_shares.yml new file mode 100644 index 00000000..47dc4116 --- /dev/null +++ b/rules/sigma/windows/builtin/win_transferring_files_with_credential_data_via_network_shares.yml @@ -0,0 +1,36 @@ + +title: Transferring Files with Credential Data via Network Shares +author: Teymur Kheirkhabarov, oscd.community +date: 2019/10/22 +description: Transferring files with well-known filenames (sensitive files with credential + data) using network shares +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + RelativeTargetName: + - '*\mimidrv*' + - '*\lsass*' + - '*\windows\minidump\\*' + - '*\hiberfil*' + - '*\sqldmpr*' + - '*\sam*' + - '*\ntds.dit*' + - '*\security*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Transferring sensitive files for legitimate administration work by legitimate administrator +id: 910ab938-668b-401b-b08c-b596e80fdca5 +level: medium +logsource: + product: windows + service: security +references: +- https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.002 +- attack.t1003.001 +- attack.t1003.003 diff --git a/rules/sigma/windows/builtin/win_usb_device_plugged.yml b/rules/sigma/windows/builtin/win_usb_device_plugged.yml new file mode 100644 index 00000000..24d35c90 --- /dev/null +++ b/rules/sigma/windows/builtin/win_usb_device_plugged.yml @@ -0,0 +1,27 @@ + +title: USB Device Plugged +author: Florian Roth +date: 2017/11/09 +description: Detects plugged USB devices +detection: + SELECTION_1: + EventID: 2003 + SELECTION_2: + EventID: 2100 + SELECTION_3: + EventID: 2102 + condition: (SELECTION_1 or SELECTION_2 or SELECTION_3) +falsepositives: +- Legitimate administrative activity +id: 1a4bd6e3-4c6e-405d-a9a3-53a116e341d4 +level: low +logsource: + product: windows + service: driver-framework +references: +- https://df-stream.com/2014/01/the-windows-7-event-log-and-usb-device/ +- https://www.techrepublic.com/article/how-to-track-down-usb-flash-drive-usage-in-windows-10s-event-viewer/ +status: experimental +tags: +- attack.initial_access +- attack.t1200 diff --git a/rules/sigma/windows/builtin/win_user_added_to_local_administrators.yml b/rules/sigma/windows/builtin/win_user_added_to_local_administrators.yml new file mode 100644 index 00000000..0ba30fcc --- /dev/null +++ b/rules/sigma/windows/builtin/win_user_added_to_local_administrators.yml @@ -0,0 +1,30 @@ + +title: User Added to Local Administrators +author: Florian Roth +date: 2017/03/14 +description: This rule triggers on user accounts that are added to the local Administrators + group, which could be legitimate activity or a sign of privilege escalation activity +detection: + SELECTION_1: + EventID: 4732 + SELECTION_2: + TargetUserName: Administr* + SELECTION_3: + TargetSid: S-1-5-32-544 + SELECTION_4: + SubjectUserName: '*$' + condition: ((SELECTION_1 and (SELECTION_2 or SELECTION_3)) and not (SELECTION_4)) +falsepositives: +- Legitimate administrative activity +id: c265cf08-3f99-46c1-8d59-328247057d57 +level: medium +logsource: + product: windows + service: security +modified: 2021/07/07 +status: stable +tags: +- attack.privilege_escalation +- attack.t1078 +- attack.persistence +- attack.t1098 diff --git a/rules/sigma/windows/builtin/win_user_couldnt_call_privileged_service_lsaregisterlogonprocess.yml b/rules/sigma/windows/builtin/win_user_couldnt_call_privileged_service_lsaregisterlogonprocess.yml new file mode 100644 index 00000000..0fbf2966 --- /dev/null +++ b/rules/sigma/windows/builtin/win_user_couldnt_call_privileged_service_lsaregisterlogonprocess.yml @@ -0,0 +1,31 @@ + +title: User Couldn't Call a Privileged Service 'LsaRegisterLogonProcess' +author: Roberto Rodriguez (source), Ilyas Ochkov (rule), oscd.community +date: 2019/10/24 +description: The 'LsaRegisterLogonProcess' function verifies that the application + making the function call is a logon process by checking that it has the SeTcbPrivilege + privilege set. Possible Rubeus tries to get a handle to LSA. +detection: + SELECTION_1: + EventID: 4673 + SELECTION_2: + Service: LsaRegisterLogonProcess() + SELECTION_3: + Keywords: '0x8010000000000000' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 6daac7fc-77d1-449a-a71a-e6b4d59a0e54 +level: high +logsource: + product: windows + service: security +modified: 2021/08/14 +references: +- https://posts.specterops.io/hunting-in-active-directory-unconstrained-delegation-forests-trusts-71f2b33688e1 +status: experimental +tags: +- attack.lateral_movement +- attack.privilege_escalation +- attack.t1208 +- attack.t1558.003 diff --git a/rules/sigma/windows/builtin/win_user_creation.yml b/rules/sigma/windows/builtin/win_user_creation.yml new file mode 100644 index 00000000..c0bd2f4c --- /dev/null +++ b/rules/sigma/windows/builtin/win_user_creation.yml @@ -0,0 +1,31 @@ + +title: Local User Creation +author: Patrick Bareiss +date: 2019/04/18 +description: Detects local user creation on windows servers, which shouldn't happen + in an Active Directory environment. Apply this Sigma Use Case on your windows server + logs and not on your DC logs. +detection: + SELECTION_1: + EventID: 4720 + condition: SELECTION_1 +falsepositives: +- Domain Controller Logs +- Local accounts managed by privileged account management tools +fields: +- EventCode +- AccountName +- AccountDomain +id: 66b6be3d-55d0-4f47-9855-d69df21740ea +level: low +logsource: + product: windows + service: security +modified: 2020/08/23 +references: +- https://patrick-bareiss.com/detecting-local-user-creation-in-ad-with-sigma/ +status: experimental +tags: +- attack.persistence +- attack.t1136 +- attack.t1136.001 diff --git a/rules/sigma/windows/builtin/win_user_driver_loaded.yml b/rules/sigma/windows/builtin/win_user_driver_loaded.yml new file mode 100644 index 00000000..b98aef90 --- /dev/null +++ b/rules/sigma/windows/builtin/win_user_driver_loaded.yml @@ -0,0 +1,51 @@ + +title: Suspicious Driver Loaded By User +author: xknow (@xknow_infosec), xorxes (@xor_xes) +date: 2019/04/08 +description: Detects the loading of drivers via 'SeLoadDriverPrivilege' required to + load or unload a device driver. With this privilege, the user can dynamically load + and unload device drivers or other code in to kernel mode. This user right does + not apply to Plug and Play device drivers. If you exclude privileged users/admins + and processes, which are allowed to do so, you are maybe left with bad programs + trying to load malicious kernel drivers. This will detect Ghost-In-The-Logs (https://github.com/bats3c/Ghost-In-The-Logs) + and the usage of Sysinternals and various other tools. So you have to work with + a whitelist to find the bad stuff. +detection: + SELECTION_1: + EventID: 4673 + SELECTION_2: + PrivilegeList: SeLoadDriverPrivilege + SELECTION_3: + Service: '-' + SELECTION_4: + ProcessName: + - '*\Windows\System32\Dism.exe' + - '*\Windows\System32\rundll32.exe' + - '*\Windows\System32\fltMC.exe' + - '*\Windows\HelpPane.exe' + - '*\Windows\System32\mmc.exe' + - '*\Windows\System32\svchost.exe' + - '*\Windows\System32\wimserv.exe' + - '*\procexp64.exe' + - '*\procexp.exe' + - '*\procmon64.exe' + - '*\procmon.exe' + - '*\Google\Chrome\Application\chrome.exe' + condition: ((SELECTION_1 and SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- 'Other legimate tools loading drivers. There are some: Sysinternals, CPU-Z, AVs + etc. - but not much. You have to baseline this according to your used products and + allowed tools. Also try to exclude users, which are allowed to load drivers.' +id: f63508a0-c809-4435-b3be-ed819394d612 +level: medium +logsource: + product: windows + service: security +references: +- https://blog.dylan.codes/evading-sysmon-and-windows-event-logging/ +- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4673 +status: experimental +tags: +- attack.t1089 +- attack.defense_evasion +- attack.t1562.001 diff --git a/rules/sigma/windows/builtin/win_volume_shadow_copy_mount.yml b/rules/sigma/windows/builtin/win_volume_shadow_copy_mount.yml new file mode 100644 index 00000000..1f0e03c6 --- /dev/null +++ b/rules/sigma/windows/builtin/win_volume_shadow_copy_mount.yml @@ -0,0 +1,26 @@ + +title: Volume Shadow Copy Mount +author: Roberto Rodriguez @Cyb3rWard0g, Open Threat Research (OTR) +date: 2020/10/20 +description: Detects volume shadow copy mount +detection: + SELECTION_1: + Source: Microsoft-Windows-Ntfs + SELECTION_2: + EventID: 98 + SELECTION_3: + DeviceName: '*HarddiskVolumeShadowCopy*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Legitimate use of volume shadow copy mounts (backups maybe). +id: f512acbf-e662-4903-843e-97ce4652b740 +level: medium +logsource: + product: windows + service: system +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.002/T1003.002.md#atomic-test-3---esentutlexe-sam-copy +status: experimental +tags: +- attack.credential_access +- attack.t1003.002 diff --git a/rules/sigma/windows/builtin/win_vssaudit_secevent_source_registration.yml b/rules/sigma/windows/builtin/win_vssaudit_secevent_source_registration.yml new file mode 100644 index 00000000..24a406e8 --- /dev/null +++ b/rules/sigma/windows/builtin/win_vssaudit_secevent_source_registration.yml @@ -0,0 +1,27 @@ + +title: VSSAudit Security Event Source Registration +author: Roberto Rodriguez @Cyb3rWard0g, Open Threat Research (OTR) +date: 2020/10/20 +description: Detects the registration of the security event source VSSAudit. It would + usually trigger when volume shadow copy operations happen. +detection: + SELECTION_1: + AuditSourceName: VSSAudit + SELECTION_2: + EventID: 4904 + SELECTION_3: + EventID: 4905 + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3)) +falsepositives: +- Legitimate use of VSSVC. Maybe backup operations. It would usually be done by C:\Windows\System32\VSSVC.exe. +id: e9faba72-4974-4ab2-a4c5-46e25ad59e9b +level: medium +logsource: + product: windows + service: security +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.002/T1003.002.md#atomic-test-3---esentutlexe-sam-copy +status: experimental +tags: +- attack.credential_access +- attack.t1003.002 diff --git a/rules/sigma/windows/builtin/win_vul_cve_2020_0688.yml b/rules/sigma/windows/builtin/win_vul_cve_2020_0688.yml new file mode 100644 index 00000000..59a22da0 --- /dev/null +++ b/rules/sigma/windows/builtin/win_vul_cve_2020_0688.yml @@ -0,0 +1,31 @@ + +title: CVE-2020-0688 Exploitation via Eventlog +author: Florian Roth, wagga +date: 2020/02/29 +description: Detects the exploitation of Microsoft Exchange vulnerability as described + in CVE-2020-0688 +detection: + SELECTION_1: + EventID: 4 + SELECTION_2: + Source: MSExchange Control Panel + SELECTION_3: + Level: Error + SELECTION_4: + - '&__VIEWSTATE=' + condition: ((SELECTION_1 and SELECTION_2 and SELECTION_3) and SELECTION_4) +falsepositives: +- Unknown +id: d6266bf5-935e-4661-b477-78772735a7cb +level: high +logsource: + product: windows + service: application +modified: 2021/06/27 +references: +- https://www.trustedsec.com/blog/detecting-cve-20200688-remote-code-execution-vulnerability-on-microsoft-exchange-server/ +- https://cyberpolygon.com/materials/okhota-na-ataki-ms-exchange-chast-2-cve-2020-0688-cve-2020-16875-cve-2021-24085/ +status: experimental +tags: +- attack.initial_access +- attack.t1190 diff --git a/rules/sigma/windows/builtin/win_vul_cve_2020_1472.yml b/rules/sigma/windows/builtin/win_vul_cve_2020_1472.yml new file mode 100644 index 00000000..bc23abed --- /dev/null +++ b/rules/sigma/windows/builtin/win_vul_cve_2020_1472.yml @@ -0,0 +1,25 @@ + +title: Vulnerable Netlogon Secure Channel Connection Allowed +author: NVISO +date: 2020/09/15 +description: Detects that a vulnerable Netlogon secure channel connection was allowed, + which could be an indicator of CVE-2020-1472. +detection: + SELECTION_1: + EventID: 5829 + condition: SELECTION_1 +falsepositives: +- Unknown +fields: +- SAMAccountName +id: a0cb7110-edf0-47a4-9177-541a4083128a +level: high +logsource: + product: windows + service: system +modified: 2021/08/09 +references: +- https://support.microsoft.com/en-us/help/4557222/how-to-manage-the-changes-in-netlogon-secure-channel-connections-assoc +status: experimental +tags: +- attack.privilege_escalation diff --git a/rules/sigma/windows/builtin/win_wmiprvse_wbemcomn_dll_hijack.yml b/rules/sigma/windows/builtin/win_wmiprvse_wbemcomn_dll_hijack.yml new file mode 100644 index 00000000..d31eb0df --- /dev/null +++ b/rules/sigma/windows/builtin/win_wmiprvse_wbemcomn_dll_hijack.yml @@ -0,0 +1,29 @@ + +title: T1047 Wmiprvse Wbemcomn DLL Hijack +author: Roberto Rodriguez @Cyb3rWard0g, Open Threat Research (OTR) +date: 2020/10/12 +description: Detects a threat actor creating a file named `wbemcomn.dll` in the `C:\Windows\System32\wbem\` + directory over the network for a WMI DLL Hijack scenario. +detection: + SELECTION_1: + EventID: 5145 + SELECTION_2: + RelativeTargetName: '*\wbem\wbemcomn.dll' + SELECTION_3: + SubjectUserName: '*$' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) +falsepositives: +- Unknown +id: f6c68d5f-e101-4b86-8c84-7d96851fd65c +level: critical +logsource: + product: windows + service: security +references: +- https://threathunterplaybook.com/notebooks/windows/08_lateral_movement/WIN-201009173318.html +status: experimental +tags: +- attack.execution +- attack.t1047 +- attack.lateral_movement +- attack.t1021.002 diff --git a/rules/sigma/windows/create_remote_thread/sysmon_cactustorch.yml b/rules/sigma/windows/create_remote_thread/sysmon_cactustorch.yml new file mode 100644 index 00000000..efa547f2 --- /dev/null +++ b/rules/sigma/windows/create_remote_thread/sysmon_cactustorch.yml @@ -0,0 +1,41 @@ + +title: CACTUSTORCH Remote Thread Creation +author: '@SBousseaden (detection), Thomas Patzke (rule)' +date: 2019/02/01 +description: Detects remote thread creation from CACTUSTORCH as described in references. +detection: + SELECTION_1: + EventID: 8 + SELECTION_2: + SourceImage: + - '*\System32\cscript.exe' + - '*\System32\wscript.exe' + - '*\System32\mshta.exe' + - '*\winword.exe' + - '*\excel.exe' + SELECTION_3: + TargetImage: '*\SysWOW64\\*' + SELECTION_4: + StartModule|re: ^$ + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- unknown +id: 2e4e488a-6164-4811-9ea1-f960c7359c40 +level: high +logsource: + category: create_remote_thread + product: windows +modified: 2020/08/28 +references: +- https://twitter.com/SBousseaden/status/1090588499517079552 +- https://github.com/mdsecactivebreach/CACTUSTORCH +status: experimental +tags: +- attack.defense_evasion +- attack.t1093 +- attack.t1055.012 +- attack.execution +- attack.t1064 +- attack.t1059.005 +- attack.t1059.007 +- attack.t1218.005 diff --git a/rules/sigma/windows/create_remote_thread/sysmon_cobaltstrike_process_injection.yml b/rules/sigma/windows/create_remote_thread/sysmon_cobaltstrike_process_injection.yml new file mode 100644 index 00000000..4fe3a278 --- /dev/null +++ b/rules/sigma/windows/create_remote_thread/sysmon_cobaltstrike_process_injection.yml @@ -0,0 +1,31 @@ + +title: CobaltStrike Process Injection +author: Olaf Hartong, Florian Roth, Aleksey Potapov, oscd.community +date: 2018/11/30 +description: Detects a possible remote threat creation with certain characteristics + which are typical for Cobalt Strike beacons +detection: + SELECTION_1: + EventID: 8 + SELECTION_2: + TargetProcessAddress: + - '*0B80' + - '*0C7C' + - '*0C88' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 6309645e-122d-4c5b-bb2b-22e4f9c2fa42 +level: high +logsource: + category: create_remote_thread + product: windows +modified: 2020/08/28 +references: +- https://medium.com/@olafhartong/cobalt-strike-remote-threads-detection-206372d11d0f +- https://blog.cobaltstrike.com/2018/04/09/cobalt-strike-3-11-the-snake-that-eats-its-tail/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1055 +- attack.t1055.001 diff --git a/rules/sigma/windows/create_remote_thread/sysmon_createremotethread_loadlibrary.yml b/rules/sigma/windows/create_remote_thread/sysmon_createremotethread_loadlibrary.yml new file mode 100644 index 00000000..981bc40e --- /dev/null +++ b/rules/sigma/windows/create_remote_thread/sysmon_createremotethread_loadlibrary.yml @@ -0,0 +1,29 @@ + +title: CreateRemoteThread API and LoadLibrary +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/08/11 +description: Detects potential use of CreateRemoteThread api and LoadLibrary function + to inject DLL into a process +detection: + SELECTION_1: + EventID: 8 + SELECTION_2: + StartModule: '*\kernel32.dll' + SELECTION_3: + StartFunction: LoadLibraryA + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 052ec6f6-1adc-41e6-907a-f1c813478bee +level: critical +logsource: + category: create_remote_thread + product: windows +modified: 2020/08/28 +references: +- https://threathunterplaybook.com/notebooks/windows/05_defense_evasion/WIN-180719170510.html +status: experimental +tags: +- attack.defense_evasion +- attack.t1055 +- attack.t1055.001 diff --git a/rules/sigma/windows/create_remote_thread/sysmon_password_dumper_lsass.yml b/rules/sigma/windows/create_remote_thread/sysmon_password_dumper_lsass.yml new file mode 100644 index 00000000..fa0f2607 --- /dev/null +++ b/rules/sigma/windows/create_remote_thread/sysmon_password_dumper_lsass.yml @@ -0,0 +1,32 @@ + +title: Password Dumper Remote Thread in LSASS +author: Thomas Patzke +date: 2017/02/19 +description: Detects password dumper activity by monitoring remote thread creation + EventID 8 in combination with the lsass.exe process as TargetImage. The process + in field Process is the malicious program. A single execution can lead to hundreds + of events. +detection: + SELECTION_1: + EventID: 8 + SELECTION_2: + TargetImage: '*\lsass.exe' + SELECTION_3: + StartModule: '' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Antivirus products +id: f239b326-2f41-4d6b-9dfa-c846a60ef505 +level: high +logsource: + category: create_remote_thread + product: windows +modified: 2021/06/21 +references: +- https://jpcertcc.github.io/ToolAnalysisResultSheet/details/WCE.htm +status: stable +tags: +- attack.credential_access +- attack.t1003 +- attack.s0005 +- attack.t1003.001 diff --git a/rules/sigma/windows/create_remote_thread/sysmon_powershell_code_injection.yml b/rules/sigma/windows/create_remote_thread/sysmon_powershell_code_injection.yml new file mode 100644 index 00000000..3c080014 --- /dev/null +++ b/rules/sigma/windows/create_remote_thread/sysmon_powershell_code_injection.yml @@ -0,0 +1,26 @@ + +title: Accessing WinAPI in PowerShell. Code Injection. +author: Nikita Nazarov, oscd.community +date: 2020/10/06 +description: Detecting Code injection with PowerShell in another process +detection: + SELECTION_1: + EventID: 8 + SELECTION_2: + SourceImage: '*\powershell.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: eeb2e3dc-c1f4-40dd-9bd5-149ee465ad50 +level: high +logsource: + category: create_remote_thread + definition: Note that you have to configure logging for CreateRemoteThread in Symson + config + product: windows +references: +- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse +status: experimental +tags: +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/create_remote_thread/sysmon_susp_powershell_rundll32.yml b/rules/sigma/windows/create_remote_thread/sysmon_susp_powershell_rundll32.yml new file mode 100644 index 00000000..c8928d89 --- /dev/null +++ b/rules/sigma/windows/create_remote_thread/sysmon_susp_powershell_rundll32.yml @@ -0,0 +1,30 @@ + +title: PowerShell Rundll32 Remote Thread Creation +author: Florian Roth +date: 2018/06/25 +description: Detects PowerShell remote thread creation in Rundll32.exe +detection: + SELECTION_1: + EventID: 8 + SELECTION_2: + SourceImage: '*\powershell.exe' + SELECTION_3: + TargetImage: '*\rundll32.exe' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 99b97608-3e21-4bfe-8217-2a127c396a0e +level: high +logsource: + category: create_remote_thread + product: windows +references: +- https://www.fireeye.com/blog/threat-research/2018/06/bring-your-own-land-novel-red-teaming-technique.html +status: experimental +tags: +- attack.defense_evasion +- attack.execution +- attack.t1085 +- attack.t1218.011 +- attack.t1086 +- attack.t1059.001 diff --git a/rules/sigma/windows/create_remote_thread/sysmon_suspicious_remote_thread.yml b/rules/sigma/windows/create_remote_thread/sysmon_suspicious_remote_thread.yml new file mode 100644 index 00000000..f0402ae0 --- /dev/null +++ b/rules/sigma/windows/create_remote_thread/sysmon_suspicious_remote_thread.yml @@ -0,0 +1,88 @@ + +title: Suspicious Remote Thread Created +author: Perez Diego (@darkquassar), oscd.community +date: 2019/10/27 +description: Offensive tradecraft is switching away from using APIs like "CreateRemoteThread", + however, this is still largely observed in the wild. This rule aims to detect suspicious + processes (those we would not expect to behave in this way like word.exe or outlook.exe) + creating remote threads on other processes. It is a generalistic rule, but it should + have a low FP ratio due to the selected range of processes. +detection: + SELECTION_1: + EventID: 8 + SELECTION_2: + SourceImage: + - '*\bash.exe' + - '*\cvtres.exe' + - '*\defrag.exe' + - '*\dnx.exe' + - '*\esentutl.exe' + - '*\excel.exe' + - '*\expand.exe' + - '*\explorer.exe' + - '*\find.exe' + - '*\findstr.exe' + - '*\forfiles.exe' + - '*\git.exe' + - '*\gpupdate.exe' + - '*\hh.exe' + - '*\iexplore.exe' + - '*\installutil.exe' + - '*\lync.exe' + - '*\makecab.exe' + - '*\mDNSResponder.exe' + - '*\monitoringhost.exe' + - '*\msbuild.exe' + - '*\mshta.exe' + - '*\msiexec.exe' + - '*\mspaint.exe' + - '*\outlook.exe' + - '*\ping.exe' + - '*\powerpnt.exe' + - '*\powershell.exe' + - '*\provtool.exe' + - '*\python.exe' + - '*\regsvr32.exe' + - '*\robocopy.exe' + - '*\runonce.exe' + - '*\sapcimc.exe' + - '*\schtasks.exe' + - '*\smartscreen.exe' + - '*\spoolsv.exe' + - '*\tstheme.exe' + - '*\userinit.exe' + - '*\vssadmin.exe' + - '*\vssvc.exe' + - '*\w3wp.exe' + - '*\winlogon.exe' + - '*\winscp.exe' + - '*\wmic.exe' + - '*\word.exe' + - '*\wscript.exe' + SELECTION_3: + SourceImage: '*Visual Studio*' + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- Unknown +fields: +- ComputerName +- User +- SourceImage +- TargetImage +id: 66d31e5f-52d6-40a4-9615-002d3789a119 +level: high +logsource: + category: create_remote_thread + product: windows +modified: 2021/06/27 +notes: +- MonitoringHost.exe is a process that loads .NET CLR by default and thus a favorite + for process injection for .NET in-memory offensive tools. +references: +- Personal research, statistical analysis +- https://lolbas-project.github.io +status: experimental +tags: +- attack.privilege_escalation +- attack.defense_evasion +- attack.t1055 diff --git a/rules/sigma/windows/create_stream_hash/sysmon_ads_executable.yml b/rules/sigma/windows/create_stream_hash/sysmon_ads_executable.yml new file mode 100644 index 00000000..85044cb1 --- /dev/null +++ b/rules/sigma/windows/create_stream_hash/sysmon_ads_executable.yml @@ -0,0 +1,34 @@ + +title: Executable in ADS +author: Florian Roth, @0xrawsec +date: 2018/06/03 +description: Detects the creation of an ADS data stream that contains an executable + (non-empty imphash) +detection: + SELECTION_1: + EventID: 15 + SELECTION_2: + Imphash: '00000000000000000000000000000000' + SELECTION_3: + Imphash|re: ^$ + condition: (SELECTION_1 and not ((SELECTION_2) or (SELECTION_3))) +falsepositives: +- unknown +fields: +- TargetFilename +- Image +id: b69888d4-380c-45ce-9cf9-d9ce46e67821 +level: critical +logsource: + category: create_stream_hash + definition: 'Requirements: Sysmon config with Imphash logging activated' + product: windows +modified: 2020/08/26 +references: +- https://twitter.com/0xrawsec/status/1002478725605273600?s=21 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.s0139 +- attack.t1564.004 diff --git a/rules/sigma/windows/create_stream_hash/sysmon_regedit_export_to_ads.yml b/rules/sigma/windows/create_stream_hash/sysmon_regedit_export_to_ads.yml new file mode 100644 index 00000000..8df65a8e --- /dev/null +++ b/rules/sigma/windows/create_stream_hash/sysmon_regedit_export_to_ads.yml @@ -0,0 +1,28 @@ + +title: Exports Registry Key To an Alternate Data Stream +author: Oddvar Moe, Sander Wiebing, oscd.community +date: 2020/10/07 +description: Exports the target Registry key and hides it in the specified alternate + data stream. +detection: + SELECTION_1: + EventID: 15 + SELECTION_2: + Image: '*\regedit.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +fields: +- TargetFilename +id: 0d7a9363-af70-4e7b-a3b7-1a176b7fbe84 +level: high +logsource: + category: create_stream_hash + product: windows +references: +- https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSBinaries/Regedit.yml +- https://gist.github.com/api0cradle/cdd2d0d0ec9abb686f0e89306e277b8f +status: experimental +tags: +- attack.defense_evasion +- attack.t1564.004 diff --git a/rules/sigma/windows/deprecated/process_creation_syncappvpublishingserver_exe.yml b/rules/sigma/windows/deprecated/process_creation_syncappvpublishingserver_exe.yml new file mode 100644 index 00000000..69848f23 --- /dev/null +++ b/rules/sigma/windows/deprecated/process_creation_syncappvpublishingserver_exe.yml @@ -0,0 +1,25 @@ + +title: SyncAppvPublishingServer Execution to Bypass Powershell Restriction +author: Ensar Şamil, @sblmsrsn, OSCD Community +date: 2020/10/05 +description: Detects SyncAppvPublishingServer process execution which usually utilized + by adversaries to bypass PowerShell execution restrictions. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\SyncAppvPublishingServer.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- App-V clients +id: fde7929d-8beb-4a4c-b922-be9974671667 +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/09/11 +references: +- https://lolbas-project.github.io/lolbas/Binaries/Syncappvpublishingserver/ +tags: +- attack.defense_evasion +- attack.t1218 diff --git a/rules/sigma/windows/deprecated/sysmon_mimikatz_detection_lsass.yml b/rules/sigma/windows/deprecated/sysmon_mimikatz_detection_lsass.yml new file mode 100644 index 00000000..a7de7cec --- /dev/null +++ b/rules/sigma/windows/deprecated/sysmon_mimikatz_detection_lsass.yml @@ -0,0 +1,38 @@ + +title: Mimikatz Detection LSASS Access +author: Sherif Eldeeb +date: 2017/10/18 +description: Detects process access to LSASS which is typical for Mimikatz (0x1000 + PROCESS_QUERY_ LIMITED_INFORMATION, 0x0400 PROCESS_QUERY_ INFORMATION "only old + versions", 0x0010 PROCESS_VM_READ) +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\lsass.exe' + SELECTION_3: + GrantedAccess: + - '0x1410' + - '0x1010' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Some security products access LSASS in this way. +fields: +- ComputerName +- User +- SourceImage +id: 0d894093-71bc-43c3-8c4d-ecfc28dcf5d9 +level: high +logsource: + category: process_access + product: windows +modified: 2021/06/21 +references: +- https://onedrive.live.com/view.aspx?resid=D026B4699190F1E6!2843&ithint=file%2cpptx&app=PowerPoint&authkey=!AMvCRTKB_V1J5ow +- https://cyberwardog.blogspot.com/2017/03/chronicles-of-threat-hunter-hunting-for_22.html +status: experimental +tags: +- attack.t1003 +- attack.s0002 +- attack.credential_access +- car.2019-04-004 diff --git a/rules/sigma/windows/deprecated/win_susp_esentutl_activity.yml b/rules/sigma/windows/deprecated/win_susp_esentutl_activity.yml new file mode 100644 index 00000000..e29e58bb --- /dev/null +++ b/rules/sigma/windows/deprecated/win_susp_esentutl_activity.yml @@ -0,0 +1,34 @@ + +title: Suspicious Esentutl Use +author: Florian Roth +date: 2020/05/23 +description: Detects flags often used with the LOLBAS Esentutl for malicious activity. + It could be used in rare cases by administrators to access locked files or during + maintenance. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '* /vss *' + SELECTION_3: + CommandLine: '* /y *' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Administrative activity +fields: +- CommandLine +- ParentCommandLine +id: 56a8189f-11b2-48c8-8ca7-c54b03c2fbf7 +level: high +logsource: + category: process_creation + product: windows +references: +- https://lolbas-project.github.io/ +- https://twitter.com/chadtilbury/status/1264226341408452610 +status: experimental +tags: +- attack.defense_evasion +- attack.execution +- attack.s0404 +- attack.t1218 diff --git a/rules/sigma/windows/deprecated/win_susp_vssadmin_ntds_activity.yml b/rules/sigma/windows/deprecated/win_susp_vssadmin_ntds_activity.yml new file mode 100644 index 00000000..8243fbcf --- /dev/null +++ b/rules/sigma/windows/deprecated/win_susp_vssadmin_ntds_activity.yml @@ -0,0 +1,41 @@ + +title: Activity Related to NTDS.dit Domain Hash Retrieval +author: Florian Roth, Michael Haag +date: 2019/01/16 +description: Detects suspicious commands that could be related to activity that uses + volume shadow copy to steal and retrieve hashes from the NTDS.dit file remotely +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - vssadmin.exe Delete Shadows + - 'vssadmin create shadow /for=C:' + - copy \\?\GLOBALROOT\Device\\*\windows\ntds\ntds.dit + - copy \\?\GLOBALROOT\Device\\*\config\SAM + - 'vssadmin delete shadows /for=C:' + - 'reg SAVE HKLM\SYSTEM ' + - esentutl.exe /y /vss *\ntds.dit* + - esentutl.exe /y /vss *\SAM + - esentutl.exe /y /vss *\SYSTEM + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Administrative activity +fields: +- CommandLine +- ParentCommandLine +id: b932b60f-fdda-4d53-8eda-a170c1d97bbd +level: high +logsource: + category: process_creation + product: windows +references: +- https://www.swordshield.com/2015/07/getting-hashes-from-ntds-dit-file/ +- https://room362.com/post/2013/2013-06-10-volume-shadow-copy-ntdsdit-domain-hashes-remotely-part-1/ +- https://www.trustwave.com/Resources/SpiderLabs-Blog/Tutorial-for-NTDS-goodness-(VSSADMIN,-WMIS,-NTDS-dit,-SYSTEM)/ +- https://securingtomorrow.mcafee.com/mcafee-labs/new-teslacrypt-ransomware-arrives-via-spam/ +- https://dfironthemountain.wordpress.com/2018/12/06/locked-file-access-using-esentutl-exe/ +status: experimental +tags: +- attack.credential_access +- attack.t1003 diff --git a/rules/sigma/windows/dns_query/dns_query_hybridconnectionmgr_servicebus.yml b/rules/sigma/windows/dns_query/dns_query_hybridconnectionmgr_servicebus.yml new file mode 100644 index 00000000..07b1bc32 --- /dev/null +++ b/rules/sigma/windows/dns_query/dns_query_hybridconnectionmgr_servicebus.yml @@ -0,0 +1,27 @@ + +title: DNS HybridConnectionManager Service Bus +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2021/04/12 +description: Detects Azure Hybrid Connection Manager services querying the Azure service + bus service +detection: + SELECTION_1: + EventID: 22 + SELECTION_2: + QueryName: '*servicebus.windows.net*' + SELECTION_3: + Image: '*HybridConnectionManager*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Legitimate use of Azure Hybrid Connection Manager and the Azure Service Bus service +id: 7bd3902d-8b8b-4dd4-838a-c6862d40150d +level: high +logsource: + category: dns_query + product: windows +modified: 2021/06/10 +references: +- https://twitter.com/Cyb3rWard0g/status/1381642789369286662 +status: experimental +tags: +- attack.persistence diff --git a/rules/sigma/windows/dns_query/dns_query_mega_nz.yml b/rules/sigma/windows/dns_query/dns_query_mega_nz.yml new file mode 100644 index 00000000..de60de21 --- /dev/null +++ b/rules/sigma/windows/dns_query/dns_query_mega_nz.yml @@ -0,0 +1,24 @@ + +title: DNS Query for MEGA.io Upload Domain +author: Aaron Greetham (@beardofbinary) - NCC Group +date: 2021/05/26 +description: Detects DNS queries for subdomains used for upload to MEGA.io +detection: + SELECTION_1: + EventID: 22 + SELECTION_2: + QueryName: '*userstorage.mega.co.nz*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate Mega upload +id: 613c03ba-0779-4a53-8a1f-47f914a4ded3 +level: high +logsource: + category: dns_query + product: windows +references: +- https://research.nccgroup.com/2021/05/27/detecting-rclone-an-effective-tool-for-exfiltration/ +status: experimental +tags: +- attack.exfiltration +- attack.t1567.002 diff --git a/rules/sigma/windows/dns_query/dns_query_possible_dns_rebinding.yml b/rules/sigma/windows/dns_query/dns_query_possible_dns_rebinding.yml new file mode 100644 index 00000000..3e706528 --- /dev/null +++ b/rules/sigma/windows/dns_query/dns_query_possible_dns_rebinding.yml @@ -0,0 +1,75 @@ + +title: Possible DNS Rebinding +author: Ilyas Ochkov, oscd.community +date: 2019/10/25 +description: Detects several different DNS-answers by one domain with IPs from internal + and external networks. Normally, DNS-answer contain TTL >100. (DNS-record will saved + in host cache for a while TTL). +detection: + SELECTION_1: + EventID: 22 + SELECTION_2: + QueryName: '*' + SELECTION_3: + QueryStatus: '0' + SELECTION_4: + QueryResults: + - (::ffff:)?10.* + - (::ffff:)?192.168.* + - (::ffff:)?172.16.* + - (::ffff:)?172.17.* + - (::ffff:)?172.18.* + - (::ffff:)?172.19.* + - (::ffff:)?172.20.* + - (::ffff:)?172.21.* + - (::ffff:)?172.22.* + - (::ffff:)?172.23.* + - (::ffff:)?172.24.* + - (::ffff:)?172.25.* + - (::ffff:)?172.26.* + - (::ffff:)?172.27.* + - (::ffff:)?172.28.* + - (::ffff:)?172.29.* + - (::ffff:)?172.30.* + - (::ffff:)?172.31.* + - (::ffff:)?127.* + SELECTION_5: + QueryName: '*' + SELECTION_6: + QueryStatus: '0' + SELECTION_7: + QueryResults: + - (::ffff:)?10.* + - (::ffff:)?192.168.* + - (::ffff:)?172.16.* + - (::ffff:)?172.17.* + - (::ffff:)?172.18.* + - (::ffff:)?172.19.* + - (::ffff:)?172.20.* + - (::ffff:)?172.21.* + - (::ffff:)?172.22.* + - (::ffff:)?172.23.* + - (::ffff:)?172.24.* + - (::ffff:)?172.25.* + - (::ffff:)?172.26.* + - (::ffff:)?172.27.* + - (::ffff:)?172.28.* + - (::ffff:)?172.29.* + - (::ffff:)?172.30.* + - (::ffff:)?172.31.* + - (::ffff:)?127.* + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and (SELECTION_5 + and SELECTION_6) and not (SELECTION_7)) | count(QueryName) by ComputerName > + 3 +id: eb07e747-2552-44cd-af36-b659ae0958e4 +level: medium +logsource: + category: dns_query + product: windows +modified: 2020/08/28 +references: +- https://medium.com/@brannondorsey/attacking-private-networks-from-the-internet-with-dns-rebinding-ea7098a2d325 +status: experimental +tags: +- attack.initial_access +- attack.t1189 diff --git a/rules/sigma/windows/dns_query/dns_query_regsvr32_network_activity.yml b/rules/sigma/windows/dns_query/dns_query_regsvr32_network_activity.yml new file mode 100644 index 00000000..3ead6e60 --- /dev/null +++ b/rules/sigma/windows/dns_query/dns_query_regsvr32_network_activity.yml @@ -0,0 +1,40 @@ + +title: Regsvr32 Network Activity +author: Dmitriy Lifanov, oscd.community +date: 2019/10/25 +description: Detects network connections and DNS queries initiated by Regsvr32.exe +detection: + SELECTION_1: + EventID: 22 + SELECTION_2: + Image: '*\regsvr32.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +fields: +- ComputerName +- User +- Image +- DestinationIp +- DestinationPort +id: 36e037c4-c228-4866-b6a3-48eb292b9955 +level: high +logsource: + category: dns_query + product: windows +modified: 2021/09/21 +references: +- https://pentestlab.blog/2017/05/11/applocker-bypass-regsvr32/ +- https://oddvar.moe/2017/12/13/applocker-case-study-how-insecure-is-it-really-part-1/ +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1117/T1117.md +related: +- id: c7e91a02-d771-4a6d-a700-42587e0b1095 + type: derived +status: experimental +tags: +- attack.execution +- attack.t1559.001 +- attack.t1175 +- attack.defense_evasion +- attack.t1218.010 +- attack.t1117 diff --git a/rules/sigma/windows/driver_load/driver_load_mal_creddumper.yml b/rules/sigma/windows/driver_load/driver_load_mal_creddumper.yml new file mode 100644 index 00000000..2b983b7a --- /dev/null +++ b/rules/sigma/windows/driver_load/driver_load_mal_creddumper.yml @@ -0,0 +1,44 @@ + +title: Credential Dumping Tools Service Execution +author: Florian Roth, Teymur Kheirkhabarov, Daniil Yugoslavskiy, oscd.community +date: 2017/03/05 +description: Detects well-known credential dumping tools execution via service execution + events +detection: + SELECTION_1: + EventID: 6 + SELECTION_2: + ImagePath: + - '*fgexec*' + - '*dumpsvc*' + - '*cachedump*' + - '*mimidrv*' + - '*gsecdump*' + - '*servpw*' + - '*pwdump*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate Administrator using credential dumping tool for password recovery +id: df5ff0a5-f83f-4a5b-bba1-3e6a3f6f6ea2 +level: critical +logsource: + category: driver_load + product: windows +modified: 2021/10/14 +references: +- https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment +related: +- id: 4976aa50-8f41-45c6-8b15-ab3fc10e79ed + type: derived +tags: +- attack.credential_access +- attack.execution +- attack.t1003 +- attack.t1003.001 +- attack.t1003.002 +- attack.t1003.004 +- attack.t1003.005 +- attack.t1003.006 +- attack.t1035 +- attack.t1569.002 +- attack.s0005 diff --git a/rules/sigma/windows/driver_load/driver_load_meterpreter_or_cobaltstrike_getsystem_service_installation.yml b/rules/sigma/windows/driver_load/driver_load_meterpreter_or_cobaltstrike_getsystem_service_installation.yml new file mode 100644 index 00000000..42d39074 --- /dev/null +++ b/rules/sigma/windows/driver_load/driver_load_meterpreter_or_cobaltstrike_getsystem_service_installation.yml @@ -0,0 +1,67 @@ + +title: Meterpreter or Cobalt Strike Getsystem Service Installation +author: Teymur Kheirkhabarov, Ecco, Florian Roth +date: 2019/10/26 +description: Detects the use of getsystem Meterpreter/Cobalt Strike command by detecting + a specific service installation +detection: + SELECTION_1: + EventID: 6 + SELECTION_10: + ImagePath: '*cmd.exe*' + SELECTION_11: + ImagePath: '*/c*' + SELECTION_12: + ImagePath: '*echo*' + SELECTION_13: + ImagePath: '*\pipe\\*' + SELECTION_14: + ImagePath: '*rundll32*' + SELECTION_15: + ImagePath: '*.dll,a*' + SELECTION_16: + ImagePath: '*/p:*' + SELECTION_2: + ImagePath: '*cmd*' + SELECTION_3: + ImagePath: '*/c*' + SELECTION_4: + ImagePath: '*echo*' + SELECTION_5: + ImagePath: '*\pipe\\*' + SELECTION_6: + ImagePath: '*%COMSPEC%*' + SELECTION_7: + ImagePath: '*/c*' + SELECTION_8: + ImagePath: '*echo*' + SELECTION_9: + ImagePath: '*\pipe\\*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7 and SELECTION_8 and SELECTION_9) or (SELECTION_10 + and SELECTION_11 and SELECTION_12 and SELECTION_13) or (SELECTION_14 and SELECTION_15 + and SELECTION_16))) +falsepositives: +- Highly unlikely +fields: +- ComputerName +- SubjectDomainName +- SubjectUserName +- ImagePath +id: d585ab5a-6a69-49a8-96e8-4a726a54de46 +level: critical +logsource: + category: driver_load + product: windows +modified: 2021/09/21 +references: +- https://speakerdeck.com/heirhabarov/hunting-for-privilege-escalation-in-windows-environment +- https://blog.cobaltstrike.com/2014/04/02/what-happens-when-i-type-getsystem/ +related: +- id: 843544a7-56e0-4dcc-a44f-5cc266dd97d6 + type: derived +tags: +- attack.privilege_escalation +- attack.t1134 +- attack.t1134.001 +- attack.t1134.002 diff --git a/rules/sigma/windows/driver_load/driver_load_powershell_script_installed_as_service.yml b/rules/sigma/windows/driver_load/driver_load_powershell_script_installed_as_service.yml new file mode 100644 index 00000000..a2f2f2e3 --- /dev/null +++ b/rules/sigma/windows/driver_load/driver_load_powershell_script_installed_as_service.yml @@ -0,0 +1,30 @@ + +title: PowerShell Scripts Run by a Services +author: oscd.community, Natalia Shornikova +date: 2020/10/06 +description: Detects powershell script installed as a Service +detection: + SELECTION_1: + EventID: 6 + SELECTION_2: + ImageLoaded: + - '*powershell*' + - '*pwsh*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 46deb5e1-28c9-4905-b2df-51cdcc9e6073 +level: high +logsource: + category: driver_load + product: windows +modified: 2021/09/21 +references: +- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse +related: +- id: a2e5019d-a658-4c6a-92bf-7197b54e2cae + type: derived +status: experimental +tags: +- attack.execution +- attack.t1569.002 diff --git a/rules/sigma/windows/driver_load/driver_load_susp_temp_use.yml b/rules/sigma/windows/driver_load/driver_load_susp_temp_use.yml new file mode 100644 index 00000000..0e6a74db --- /dev/null +++ b/rules/sigma/windows/driver_load/driver_load_susp_temp_use.yml @@ -0,0 +1,24 @@ + +title: Suspicious Driver Load from Temp +author: Florian Roth +date: 2017/02/12 +description: Detects a driver load from a temporary directory +detection: + SELECTION_1: + EventID: 6 + SELECTION_2: + ImageLoaded: '*\Temp\\*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- there is a relevant set of false positives depending on applications in the environment +id: 2c4523d5-d481-4ed0-8ec3-7fbf0cb41a75 +level: high +logsource: + category: driver_load + product: windows +modified: 2020/08/23 +tags: +- attack.persistence +- attack.privilege_escalation +- attack.t1050 +- attack.t1543.003 diff --git a/rules/sigma/windows/driver_load/driver_load_vuln_dell_driver.yml b/rules/sigma/windows/driver_load/driver_load_vuln_dell_driver.yml new file mode 100644 index 00000000..69574e82 --- /dev/null +++ b/rules/sigma/windows/driver_load/driver_load_vuln_dell_driver.yml @@ -0,0 +1,32 @@ + +title: Vulnerable Dell BIOS Update Driver Load +author: Florian Roth +date: 2021/05/05 +description: Detects the load of the vulnerable Dell BIOS update driver as reported + in CVE-2021-21551 +detection: + SELECTION_1: + EventID: 6 + SELECTION_2: + ImageLoaded: '*\DBUtil_2_3.Sys*' + SELECTION_3: + Hashes: + - '*0296e2ce999e67c76352613a718e11516fe1b0efc3ffdb8918fc999dd76a73a5*' + - '*c948ae14761095e4d76b55d9de86412258be7afd*' + - '*c996d7971c49252c582171d9380360f2*' + - '*ddbf5ecca5c8086afde1fb4f551e9e6400e94f4428fe7fb5559da5cffa654cc1*' + - '*10b30bdee43b3a2ec4aa63375577ade650269d25*' + - '*d2fd132ab7bbc6bbb87a84f026fa0244*' + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3)) +falsepositives: +- legitimate BIOS driver updates (should be rare) +id: 21b23707-60d6-41bb-96e3-0f0481b0fed9 +level: high +logsource: + category: driver_load + product: windows +references: +- https://labs.sentinelone.com/cve-2021-21551-hundreds-of-millions-of-dell-computers-at-risk-due-to-multiple-bios-driver-privilege-escalation-flaws/ +- https://nvd.nist.gov/vuln/detail/cve-2021-21551 +tags: +- attack.privilege_escalation diff --git a/rules/sigma/windows/driver_load/driver_load_windivert.yml b/rules/sigma/windows/driver_load/driver_load_windivert.yml new file mode 100644 index 00000000..202a4b63 --- /dev/null +++ b/rules/sigma/windows/driver_load/driver_load_windivert.yml @@ -0,0 +1,30 @@ + +title: WinDivert Driver Load +author: Florian Roth +date: 2021/07/30 +description: Detects the load of the Windiver driver, a powerful user-mode capture/sniffing/modification/blocking/re-injection + package for Windows +detection: + SELECTION_1: + EventID: 6 + SELECTION_2: + ImageLoaded: + - '*\WinDivert.sys*' + - '*\WinDivert64.sys*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- legitimate WinDivert driver usage +id: 679085d5-f427-4484-9f58-1dc30a7c426d +level: high +logsource: + category: driver_load + product: windows +references: +- https://reqrypt.org/windivert-doc.html +- https://rastamouse.me/ntlm-relaying-via-cobalt-strike/ +status: experimental +tags: +- attack.collection +- attack.defense_evasion +- attack.t1599.001 +- attack.t1557.001 diff --git a/rules/sigma/windows/file_delete/sysmon_delete_prefetch.yml b/rules/sigma/windows/file_delete/sysmon_delete_prefetch.yml new file mode 100644 index 00000000..6ba6585f --- /dev/null +++ b/rules/sigma/windows/file_delete/sysmon_delete_prefetch.yml @@ -0,0 +1,31 @@ + +title: Prefetch File Deletion +author: Cedric MAURUGEON +date: 2021/09/29 +description: Detects the deletion of a prefetch file (AntiForensic) +detection: + SELECTION_1: + EventID: 23 + SELECTION_2: + EventID: 26 + SELECTION_3: + TargetFilename: C:\Windows\Prefetch\\* + SELECTION_4: + TargetFilename: '*.pf' + SELECTION_5: + Image: C:\windows\system32\svchost.exe + SELECTION_6: + User: NT AUTHORITY\SYSTEM + condition: ((SELECTION_1 or SELECTION_2) and (SELECTION_3 and SELECTION_4) and not + (SELECTION_5 and SELECTION_6)) +falsepositives: +- Unknown +id: 0a1f9d29-6465-4776-b091-7f43b26e4c89 +level: high +logsource: + category: file_delete + product: windows +status: experimental +tags: +- attack.defense_evasion +- attack.t1070.004 diff --git a/rules/sigma/windows/file_delete/sysmon_sysinternals_sdelete_file_deletion.yml b/rules/sigma/windows/file_delete/sysmon_sysinternals_sdelete_file_deletion.yml new file mode 100644 index 00000000..f002c41d --- /dev/null +++ b/rules/sigma/windows/file_delete/sysmon_sysinternals_sdelete_file_deletion.yml @@ -0,0 +1,30 @@ + +title: Sysinternals SDelete File Deletion +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/05/02 +description: A General detection to trigger for the deletion of files by Sysinternals + SDelete. It looks for the common name pattern used to rename files. +detection: + SELECTION_1: + EventID: 23 + SELECTION_2: + EventID: 26 + SELECTION_3: + TargetFilename: + - '*.AAA' + - '*.ZZZ' + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3) +falsepositives: +- Legitime usage of SDelete +id: 6ddab845-b1b8-49c2-bbf7-1a11967f64bc +level: medium +logsource: + category: file_delete + product: windows +references: +- https://github.com/OTRF/detection-hackathon-apt29/issues/9 +- https://threathunterplaybook.com/evals/apt29/detections/4.B.4_83D62033-105A-4A02-8B75-DAB52D8D51EC.html +status: experimental +tags: +- attack.defense_evasion +- attack.t1070.004 diff --git a/rules/sigma/windows/file_delete/win_cve_2021_1675_printspooler_del.yml b/rules/sigma/windows/file_delete/win_cve_2021_1675_printspooler_del.yml new file mode 100644 index 00000000..c3d8b864 --- /dev/null +++ b/rules/sigma/windows/file_delete/win_cve_2021_1675_printspooler_del.yml @@ -0,0 +1,33 @@ + +title: Windows Spooler Service Suspicious File Deletion +author: Bhabesh Raj +date: 2021/07/01 +description: Detect DLL deletions from Spooler Service driver folder +detection: + SELECTION_1: + EventID: 23 + SELECTION_2: + EventID: 26 + SELECTION_3: + Image: '*spoolsv.exe' + SELECTION_4: + TargetFilename: '*C:\Windows\System32\spool\drivers\x64\3\\*' + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: 5b2bbc47-dead-4ef7-8908-0cf73fcbecbf +level: high +logsource: + category: file_delete + product: windows +modified: 2021/08/24 +references: +- https://github.com/hhlxf/PrintNightmare +- https://github.com/cube0x0/CVE-2021-1675 +- https://nvd.nist.gov/vuln/detail/cve-2021-1675 +status: experimental +tags: +- attack.persistence +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1574 diff --git a/rules/sigma/windows/file_event/file_event_advanced_ip_scanner.yml b/rules/sigma/windows/file_event/file_event_advanced_ip_scanner.yml new file mode 100644 index 00000000..9cefb6c6 --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_advanced_ip_scanner.yml @@ -0,0 +1,33 @@ + +title: Advanced IP Scanner +author: '@ROxPinTeddy' +date: 2020/05/12 +description: Detects the use of Advanced IP Scanner. Seems to be a popular tool for + ransomware groups. +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\AppData\Local\Temp\Advanced IP Scanner 2*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate administrative use +id: fed85bf9-e075-4280-9159-fbe8a023d6fa +level: medium +logsource: + category: file_event + product: windows +modified: 2021/09/11 +references: +- https://news.sophos.com/en-us/2019/12/09/snatch-ransomware-reboots-pcs-into-safe-mode-to-bypass-protection/ +- https://www.fireeye.com/blog/threat-research/2020/05/tactics-techniques-procedures-associated-with-maze-ransomware-incidents.html +- https://labs.f-secure.com/blog/prelude-to-ransomware-systembc +- https://assets.documentcloud.org/documents/20444693/fbi-pin-egregor-ransomware-bc-01062021.pdf +- https://thedfirreport.com/2021/01/18/all-that-for-a-coinminer +related: +- id: bef37fa2-f205-4a7b-b484-0759bfd5f86f + type: derived +status: experimental +tags: +- attack.discovery +- attack.t1046 diff --git a/rules/sigma/windows/file_event/file_event_apt_unidentified_nov_18.yml b/rules/sigma/windows/file_event/file_event_apt_unidentified_nov_18.yml new file mode 100644 index 00000000..89c748bd --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_apt_unidentified_nov_18.yml @@ -0,0 +1,29 @@ + +title: Unidentified Attacker November 2018 +author: '@41thexplorer, Microsoft Defender ATP' +date: 2018/11/20 +description: A sigma rule detecting an unidetefied attacker who used phishing emails + to target high profile orgs on November 2018. The Actor shares some TTPs with YYTRIUM/APT29 + campaign in 2016. +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*ds7002.lnk*' + condition: (SELECTION_1 and SELECTION_2) +id: 3a3f81ca-652c-482b-adeb-b1c804727f74 +level: high +logsource: + category: file_event + product: windows +modified: 2021/09/19 +references: +- https://twitter.com/DrunkBinary/status/1063075530180886529 +related: +- id: 7453575c-a747-40b9-839b-125a0aae324b + type: derived +status: stable +tags: +- attack.execution +- attack.t1218.011 +- attack.t1085 diff --git a/rules/sigma/windows/file_event/file_event_cve_2021_31979_cve_2021_33771_exploits.yml b/rules/sigma/windows/file_event/file_event_cve_2021_31979_cve_2021_33771_exploits.yml new file mode 100644 index 00000000..be0b9971 --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_cve_2021_31979_cve_2021_33771_exploits.yml @@ -0,0 +1,40 @@ + +title: CVE-2021-31979 CVE-2021-33771 Exploits by Sourgum +author: Sittikorn S +date: 2021/07/16 +description: Detects patterns as noticed in exploitation of Windows CVE-2021-31979 + CVE-2021-33771 vulnerability and DevilsTongue malware by threat group Sourgum +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: + - '*C:\Windows\system32\physmem.sys*' + - '*C:\Windows\System32\IME\IMEJP\imjpueact.dll*' + - '*C:\Windows\system32\ime\IMETC\IMTCPROT.DLL*' + - '*C:\Windows\system32\ime\SHARED\imecpmeid.dll*' + - '*C:\Windows\system32\config\spp\ServiceState\Recovery\pac.dat*' + - '*C:\Windows\system32\config\cy-GB\Setup\SKB\InputMethod\TupTask.dat*' + - '*C:\Windows\system32\config\config\startwus.dat*' + - '*C:\Windows\system32\ime\SHARED\WimBootConfigurations.ini*' + - '*C:\Windows\system32\ime\IMEJP\WimBootConfigurations.ini*' + - '*C:\Windows\system32\ime\IMETC\WimBootConfigurations.ini*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unlikely +id: ad7085ac-92e4-4b76-8ce2-276d2c0e68ef +level: critical +logsource: + category: file_event + product: windows +modified: 2021/09/09 +references: +- https://www.microsoft.com/security/blog/2021/07/15/protecting-customers-from-a-private-sector-offensive-actor-using-0-day-exploits-and-devilstongue-malware/ +- https://citizenlab.ca/2021/07/hooking-candiru-another-mercenary-spyware-vendor-comes-into-focus/ +- https://nvd.nist.gov/vuln/detail/cve-2021-33771 +- https://nvd.nist.gov/vuln/detail/cve-2021-31979 +status: experimental +tags: +- attack.credential_access +- attack.t1566 +- attack.t1203 diff --git a/rules/sigma/windows/file_event/file_event_executable_and_script_creation_by_office_using_file_ext.yml b/rules/sigma/windows/file_event/file_event_executable_and_script_creation_by_office_using_file_ext.yml new file mode 100644 index 00000000..64cf9111 --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_executable_and_script_creation_by_office_using_file_ext.yml @@ -0,0 +1,46 @@ + +title: File Creation by Office Applications +author: Vadim Khrykov (ThreatIntel), Cyb3rEng (Rule) +date: 2021/08/23 +description: This rule will monitor executable and script file creation by office + applications. Please add more file extensions or magic bytes to the logic of your + choice. +detection: + SELECTION_1: + Image: + - '*winword.exe' + - '*excel.exe' + - '*powerpnt.exe' + SELECTION_2: + FileName: + - '*.exe' + - '*.dll' + - '*.ocx' + - '*.com' + - '*.ps1' + - '*.vbs' + - '*.sys' + - '*.bat' + - '*.scr' + - '*.proj' + SELECTION_3: + FileMagicBytes: + - 4D5A* + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3)) +falsepositives: +- Unknown +id: 8c6fd6fc-28fc-4597-a86a-fc1de20b039d +level: high +logsource: + category: file_event + product: Windows +references: +- https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/ +- https://github.com/vadim-hunter/Detection-Ideas-Rules/blob/main/Threat%20Intelligence/The%20DFIR%20Report/20210329_Sodinokibi_(aka_REvil)_Ransomware.yaml +status: experimental +tags: +- attack.t1204.002 +- attack.t1047 +- attack.t1218.010 +- attack.execution +- attack.defense_evasion diff --git a/rules/sigma/windows/file_event/file_event_hack_dumpert.yml b/rules/sigma/windows/file_event/file_event_hack_dumpert.yml new file mode 100644 index 00000000..b777829b --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_hack_dumpert.yml @@ -0,0 +1,31 @@ + +title: Dumpert Process Dumper +author: Florian Roth +date: 2020/02/04 +description: Detects the use of Dumpert process dumper, which dumps the lsass.exe + process memory +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: C:\Windows\Temp\dumpert.dmp + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Very unlikely +id: 93d94efc-d7ad-4161-ad7d-1638c4f908d8 +level: critical +logsource: + category: file_event + product: windows +modified: 2021/09/21 +references: +- https://github.com/outflanknl/Dumpert +- https://unit42.paloaltonetworks.com/actors-still-exploiting-sharepoint-vulnerability/ +related: +- id: 2704ab9e-afe2-4854-a3b1-0c0706d03578 + type: derived +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.001 diff --git a/rules/sigma/windows/file_event/file_event_hktl_createminidump.yml b/rules/sigma/windows/file_event/file_event_hktl_createminidump.yml new file mode 100644 index 00000000..1fcdc4c9 --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_hktl_createminidump.yml @@ -0,0 +1,29 @@ + +title: CreateMiniDump Hacktool +author: Florian Roth +date: 2019/12/22 +description: Detects the use of CreateMiniDump hack tool used to dump the LSASS process + memory for credential extraction on the attacker's machine +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\lsass.dmp' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: db2110f3-479d-42a6-94fb-d35bc1e46492 +level: high +logsource: + category: file_event + product: windows +modified: 2021/09/19 +references: +- https://ired.team/offensive-security/credential-access-and-credential-dumping/dumping-lsass-passwords-without-mimikatz-minidumpwritedump-av-signature-bypass +related: +- id: 36d88494-1d43-4dc0-b3fa-35c8fea0ca9d + type: derived +tags: +- attack.credential_access +- attack.t1003.001 +- attack.t1003 diff --git a/rules/sigma/windows/file_event/file_event_mal_adwind.yml b/rules/sigma/windows/file_event/file_event_mal_adwind.yml new file mode 100644 index 00000000..640f36e3 --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_mal_adwind.yml @@ -0,0 +1,35 @@ + +title: Adwind RAT / JRAT +author: Florian Roth, Tom Ueltschi, Jonhnathan Ribeiro, oscd.community +date: 2017/11/10 +description: Detects javaw.exe in AppData folder as used by Adwind / JRAT +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\AppData\Roaming\Oracle\bin\java*' + SELECTION_3: + TargetFilename: '*.exe*' + SELECTION_4: + TargetFilename: '*\Retrive*' + SELECTION_5: + TargetFilename: '*.vbs*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and SELECTION_5))) +id: 0bcfabcb-7929-47f4-93d6-b33fb67d34d1 +level: high +logsource: + category: file_event + product: windows +modified: 2021/09/19 +references: +- https://www.hybrid-analysis.com/sample/ba86fa0d4b6af2db0656a88b1dd29f36fe362473ae8ad04255c4e52f214a541c?environmentId=100 +- https://www.first.org/resources/papers/conf2017/Advanced-Incident-Detection-and-Threat-Hunting-using-Sysmon-and-Splunk.pdf +related: +- id: 1fac1481-2dbc-48b2-9096-753c49b4ec71 + type: derived +status: experimental +tags: +- attack.execution +- attack.t1059.005 +- attack.t1059.007 +- attack.t1064 diff --git a/rules/sigma/windows/file_event/file_event_moriya_rootkit.yml b/rules/sigma/windows/file_event/file_event_moriya_rootkit.yml new file mode 100644 index 00000000..b01ef6ea --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_moriya_rootkit.yml @@ -0,0 +1,30 @@ + +title: Moriya Rootkit +author: Bhabesh Raj +date: 2021/05/06 +description: Detects the use of Moriya rootkit as described in the securelist's Operation + TunnelSnake report +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: C:\Windows\System32\drivers\MoriyaStreamWatchmen.sys + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- None +id: a1507d71-0b60-44f6-b17c-bf53220fdd88 +level: critical +logsource: + category: file_event + product: windows +modified: 2021/09/21 +references: +- https://securelist.com/operation-tunnelsnake-and-moriya-rootkit/101831 +related: +- id: 25b9c01c-350d-4b95-bed1-836d04a4f324 + type: derived +status: experimental +tags: +- attack.persistence +- attack.privilege_escalation +- attack.t1543.003 diff --git a/rules/sigma/windows/file_event/file_event_pingback_backdoor.yml b/rules/sigma/windows/file_event/file_event_pingback_backdoor.yml new file mode 100644 index 00000000..de05302b --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_pingback_backdoor.yml @@ -0,0 +1,29 @@ + +title: Pingback Backdoor +author: Bhabesh Raj +date: 2021/05/05 +description: Detects the use of Pingback backdoor that creates ICMP tunnel for C2 + as described in the trustwave report +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + Image: '*updata.exe' + SELECTION_3: + TargetFilename: C:\Windows\oci.dll + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Very unlikely +id: 2bd63d53-84d4-4210-80ff-bf0658f1bf78 +level: high +logsource: + category: file_event + product: windows +modified: 2021/09/09 +references: +- https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/backdoor-at-the-end-of-the-icmp-tunnel +- https://app.any.run/tasks/4a54c651-b70b-4b72-84d7-f34d301d6406 +status: experimental +tags: +- attack.persistence +- attack.t1574.001 diff --git a/rules/sigma/windows/file_event/file_event_script_creation_by_office_using_file_ext.yml b/rules/sigma/windows/file_event/file_event_script_creation_by_office_using_file_ext.yml new file mode 100644 index 00000000..d6295d34 --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_script_creation_by_office_using_file_ext.yml @@ -0,0 +1,43 @@ + +title: Created Files by Office Applications +author: Vadim Khrykov (ThreatIntel), Cyb3rEng (Rule) +date: 2021/08/23 +description: This rule will monitor executable and script file creation by office + applications. Please add more file extensions or magic bytes to the logic of your + choice. +detection: + SELECTION_1: + Image: + - '*winword.exe' + - '*excel.exe' + - '*powerpnt.exe' + SELECTION_2: + TargetFileName: + - '*.exe' + - '*.dll' + - '*.ocx' + - '*.com' + - '*.ps1' + - '*.vbs' + - '*.sys' + - '*.bat' + - '*.scr' + - '*.proj' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: c7a74c80-ba5a-486e-9974-ab9e682bc5e4 +level: high +logsource: + category: file_event + product: Windows +references: +- https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/ +- https://github.com/vadim-hunter/Detection-Ideas-Rules/blob/main/Threat%20Intelligence/The%20DFIR%20Report/20210329_Sodinokibi_(aka_REvil)_Ransomware.yaml +status: experimental +tags: +- attack.t1204.002 +- attack.t1047 +- attack.t1218.010 +- attack.execution +- attack.defense_evasion diff --git a/rules/sigma/windows/file_event/file_event_tool_psexec.yml b/rules/sigma/windows/file_event/file_event_tool_psexec.yml new file mode 100644 index 00000000..004327bb --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_tool_psexec.yml @@ -0,0 +1,40 @@ + +title: PsExec Tool Execution +author: Thomas Patzke +date: 2017/06/12 +description: Detects PsExec service installation and execution events (service and + Sysmon) +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\PSEXESVC.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +fields: +- EventID +- CommandLine +- ParentCommandLine +- ServiceName +- ServiceFileName +- TargetFilename +- PipeName +id: 259e5a6a-b8d2-4c38-86e2-26c5e651361d +level: low +logsource: + category: file_event + product: windows +modified: 2021/09/21 +references: +- https://www.jpcert.or.jp/english/pub/sr/ir_research.html +- https://jpcertcc.github.io/ToolAnalysisResultSheet +related: +- id: 42c575ea-e41e-41f1-b248-8093c3e82a28 + type: derived +status: experimental +tags: +- attack.execution +- attack.t1035 +- attack.t1569.002 +- attack.s0029 diff --git a/rules/sigma/windows/file_event/file_event_uac_bypass_winsat.yml b/rules/sigma/windows/file_event/file_event_uac_bypass_winsat.yml new file mode 100644 index 00000000..0866da20 --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_uac_bypass_winsat.yml @@ -0,0 +1,30 @@ + +title: UAC Bypass Abusing Winsat Path Parsing - File +author: Christian Burkard +date: 2021/08/30 +description: Detects the pattern of UAC Bypass using a path parsing issue in winsat.exe + (UACMe 52) +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: C:\Users\\* + SELECTION_3: + TargetFilename: + - '*\AppData\Local\Temp\system32\winsat.exe' + - '*\AppData\Local\Temp\system32\winmm.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 155dbf56-e0a4-4dd0-8905-8a98705045e8 +level: high +logsource: + category: file_event + product: windows +references: +- https://github.com/hfiref0x/UACME +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/file_event/file_event_uac_bypass_wmp.yml b/rules/sigma/windows/file_event/file_event_uac_bypass_wmp.yml new file mode 100644 index 00000000..cdbae4e8 --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_uac_bypass_wmp.yml @@ -0,0 +1,32 @@ + +title: UAC Bypass Using Windows Media Player - File +author: Christian Burkard +date: 2021/08/23 +description: Detects the pattern of UAC Bypass using Windows Media Player osksupport.dll + (UACMe 32) +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: C:\Users\\* + SELECTION_3: + TargetFilename: '*\AppData\Local\Temp\OskSupport.dll' + SELECTION_4: + Image: C:\Windows\system32\DllHost.exe + SELECTION_5: + TargetFilename: C:\Program Files\Windows Media Player\osk.exe + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and SELECTION_5))) +falsepositives: +- Unknown +id: 68578b43-65df-4f81-9a9b-92f32711a951 +level: high +logsource: + category: file_event + product: windows +references: +- https://github.com/hfiref0x/UACME +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/file_event/file_event_winrm_awl_bypass.yml b/rules/sigma/windows/file_event/file_event_winrm_awl_bypass.yml new file mode 100644 index 00000000..6add2daf --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_winrm_awl_bypass.yml @@ -0,0 +1,35 @@ + +title: AWL Bypass with Winrm.vbs and Malicious WsmPty.xsl/WsmTxt.xsl +author: Julia Fomina, oscd.community +date: 2020/10/06 +description: Detects execution of attacker-controlled WsmPty.xsl or WsmTxt.xsl via + winrm.vbs and copied cscript.exe (can be renamed) +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: + - '*WsmPty.xsl' + - '*WsmTxt.xsl' + SELECTION_3: + TargetFilename: + - C:\Windows\System32\\* + - C:\Windows\SysWOW64\\* + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- Unlikely +id: d353dac0-1b41-46c2-820c-d7d2561fc6ed +level: medium +logsource: + category: file_event + product: windows +modified: 2021/09/19 +references: +- https://posts.specterops.io/application-whitelisting-bypass-and-arbitrary-unsigned-code-execution-technique-in-winrm-vbs-c8c24fb40404 +related: +- id: 074e0ded-6ced-4ebd-8b4d-53f55908119 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1216 diff --git a/rules/sigma/windows/file_event/file_event_wmiprvse_wbemcomn_dll_hijack.yml b/rules/sigma/windows/file_event/file_event_wmiprvse_wbemcomn_dll_hijack.yml new file mode 100644 index 00000000..30783eb6 --- /dev/null +++ b/rules/sigma/windows/file_event/file_event_wmiprvse_wbemcomn_dll_hijack.yml @@ -0,0 +1,30 @@ + +title: Wmiprvse Wbemcomn DLL Hijack +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/10/12 +description: Detects a threat actor creating a file named `wbemcomn.dll` in the `C:\Windows\System32\wbem\` + directory over the network and loading it for a WMI DLL Hijack scenario. +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + Image: System + SELECTION_3: + TargetFilename: '*\wbem\wbemcomn.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 614a7e17-5643-4d89-b6fe-f9df1a79641c +level: critical +logsource: + category: file_event + product: windows +modified: 2021/09/09 +references: +- https://threathunterplaybook.com/notebooks/windows/08_lateral_movement/WIN-201009173318.html +status: experimental +tags: +- attack.execution +- attack.t1047 +- attack.lateral_movement +- attack.t1021.002 diff --git a/rules/sigma/windows/file_event/sysmon_creation_system_file.yml b/rules/sigma/windows/file_event/sysmon_creation_system_file.yml new file mode 100644 index 00000000..6ce627cf --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_creation_system_file.yml @@ -0,0 +1,63 @@ + +title: File Created with System Process Name +author: Sander Wiebing +date: 2020/05/26 +description: Detects the creation of a executable with a system process name in a + suspicious folder +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: + - '*\svchost.exe' + - '*\rundll32.exe' + - '*\services.exe' + - '*\powershell.exe' + - '*\regsvr32.exe' + - '*\spoolsv.exe' + - '*\lsass.exe' + - '*\smss.exe' + - '*\csrss.exe' + - '*\conhost.exe' + - '*\wininit.exe' + - '*\lsm.exe' + - '*\winlogon.exe' + - '*\explorer.exe' + - '*\taskhost.exe' + - '*\Taskmgr.exe' + - '*\taskmgr.exe' + - '*\sihost.exe' + - '*\RuntimeBroker.exe' + - '*\runtimebroker.exe' + - '*\smartscreen.exe' + - '*\dllhost.exe' + - '*\audiodg.exe' + - '*\wlanext.exe' + SELECTION_3: + TargetFilename: + - C:\Windows\System32\\* + - C:\Windows\system32\\* + - C:\Windows\SysWow64\\* + - C:\Windows\SysWOW64\\* + - C:\Windows\winsxs\\* + - C:\Windows\WinSxS\\* + - \SystemRoot\System32\\* + SELECTION_4: + Image: + - '*\Windows\System32\dism.exe' + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3 and SELECTION_4)) +falsepositives: +- System processes copied outside the default folder +fields: +- Image +id: d5866ddf-ce8f-4aea-b28e-d96485a20d3d +level: high +logsource: + category: file_event + product: windows +modified: 2021/05/16 +status: experimental +tags: +- attack.defense_evasion +- attack.t1036 +- attack.t1036.005 diff --git a/rules/sigma/windows/file_event/sysmon_cred_dump_tools_dropped_files.yml b/rules/sigma/windows/file_event/sysmon_cred_dump_tools_dropped_files.yml new file mode 100644 index 00000000..189b3f81 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_cred_dump_tools_dropped_files.yml @@ -0,0 +1,57 @@ + +title: Cred Dump Tools Dropped Files +author: Teymur Kheirkhabarov, oscd.community +date: 2019/11/01 +description: Files with well-known filenames (parts of credential dump software or + files produced by them) creation +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: + - '*\pwdump*' + - '*\kirbi*' + - '*\pwhashes*' + - '*\wce_ccache*' + - '*\wce_krbtkts*' + - '*\fgdump-log*' + SELECTION_3: + TargetFilename: + - '*\test.pwd' + - '*\lsremora64.dll' + - '*\lsremora.dll' + - '*\fgexec.exe' + - '*\wceaux.dll' + - '*\SAM.out' + - '*\SECURITY.out' + - '*\SYSTEM.out' + - '*\NTDS.out' + - '*\DumpExt.dll' + - '*\DumpSvc.exe' + - '*\cachedump64.exe' + - '*\cachedump.exe' + - '*\pstgdump.exe' + - '*\servpw.exe' + - '*\servpw64.exe' + - '*\pwdump.exe' + - '*\procdump64.exe' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Legitimate Administrator using tool for password recovery +id: 8fbf3271-1ef6-4e94-8210-03c2317947f6 +level: high +logsource: + category: file_event + product: windows +modified: 2020/08/23 +references: +- https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.001 +- attack.t1003.002 +- attack.t1003.003 +- attack.t1003.004 +- attack.t1003.005 diff --git a/rules/sigma/windows/file_event/sysmon_cve_2021_26858_msexchange.yml b/rules/sigma/windows/file_event/sysmon_cve_2021_26858_msexchange.yml new file mode 100644 index 00000000..d67642c3 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_cve_2021_26858_msexchange.yml @@ -0,0 +1,39 @@ + +title: CVE-2021-26858 Exchange Exploitation +author: Bhabesh Raj +date: 2021/03/03 +description: Detects possible successful exploitation for vulnerability described + in CVE-2021-26858 by looking for | creation of non-standard files on disk by Exchange + Server’s Unified Messaging service | which could indicate dropping web shells or + other malicious content +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + Image: '*UMWorkerProcess.exe' + SELECTION_3: + TargetFilename: + - '*CacheCleanup.bin' + - '*.txt' + - '*.LOG' + - '*.cfg' + - '*cleanup.bin' + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- Unknown +fields: +- ComputerName +- TargetFilename +id: b06335b3-55ac-4b41-937e-16b7f5d57dfd +level: critical +logsource: + category: file_event + product: windows +references: +- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-26858 +- https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/ +- https://nvd.nist.gov/vuln/detail/cve-2021-26858 +status: experimental +tags: +- attack.t1203 +- attack.execution diff --git a/rules/sigma/windows/file_event/sysmon_detect_powerup_dllhijacking.yml b/rules/sigma/windows/file_event/sysmon_detect_powerup_dllhijacking.yml new file mode 100644 index 00000000..1a080745 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_detect_powerup_dllhijacking.yml @@ -0,0 +1,32 @@ + +title: Powerup Write Hijack DLL +author: Subhash Popuri (@pbssubhash) +date: 2021/08/21 +description: Powerup tool's Write Hijack DLL exploits DLL hijacking for privilege + escalation. In it's default mode, it builds a self deleting .bat file which executes + malicious command. The detection rule relies on creation of the malicious bat file + (debug.bat by default). +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + Image: '*\powershell.exe' + SELECTION_3: + TargetFilename: '*.bat' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Pentest +- Any powershell script that creates bat files +id: 602a1f13-c640-4d73-b053-be9a2fa58b96 +level: high +logsource: + category: file_event + product: windows +references: +- https://powersploit.readthedocs.io/en/latest/Privesc/Write-HijackDll/ +status: experimental +tags: +- attack.persistence +- attack.privilege_escalation +- attack.defense_evasion +- attack.t1574.001 diff --git a/rules/sigma/windows/file_event/sysmon_ghostpack_safetykatz.yml b/rules/sigma/windows/file_event/sysmon_ghostpack_safetykatz.yml new file mode 100644 index 00000000..4829dfc3 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_ghostpack_safetykatz.yml @@ -0,0 +1,26 @@ + +title: Detection of SafetyKatz +author: Markus Neis +date: 2018/07/24 +description: Detects possible SafetyKatz Behaviour +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\Temp\debug.bin' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: e074832a-eada-4fd7-94a1-10642b130e16 +level: high +logsource: + category: file_event + product: windows +modified: 2020/08/23 +references: +- https://github.com/GhostPack/SafetyKatz +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.001 diff --git a/rules/sigma/windows/file_event/sysmon_lsass_memory_dump_file_creation.yml b/rules/sigma/windows/file_event/sysmon_lsass_memory_dump_file_creation.yml new file mode 100644 index 00000000..ff534e89 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_lsass_memory_dump_file_creation.yml @@ -0,0 +1,34 @@ + +title: LSASS Memory Dump File Creation +author: Teymur Kheirkhabarov, oscd.community +date: 2019/10/22 +description: LSASS memory dump creation using operating systems utilities. Procdump + will use process name in output file if no name is specified +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*lsass*' + SELECTION_3: + TargetFilename: '*dmp' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Dumping lsass memory for forensic investigation purposes by legitimate incident + responder or forensic invetigator +- Dumps of another process that contains lsass in its process name (substring) +fields: +- ComputerName +- TargetFilename +id: 5e3d3601-0662-4af0-b1d2-36a05e90c40a +level: high +logsource: + category: file_event + product: windows +modified: 2021/08/16 +references: +- https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.001 diff --git a/rules/sigma/windows/file_event/sysmon_non_priv_program_files_move.yml b/rules/sigma/windows/file_event/sysmon_non_priv_program_files_move.yml new file mode 100644 index 00000000..3faf9d2a --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_non_priv_program_files_move.yml @@ -0,0 +1,37 @@ + +title: Files Dropped to Program Files by Non-Priviledged Process +author: Teymur Kheirkhabarov (idea), Ryan Plas (rule), oscd.community +date: 2020/10/17 +description: Search for dropping of files to Windows/Program Files fodlers by non-priviledged + processes +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + IntegrityLevel: Medium + SELECTION_3: + TargetFilename: + - '*\Program Files\\*' + - '*\Program Files (x86)\\*' + SELECTION_4: + TargetFilename: \Windows\\* + SELECTION_5: + TargetFilename: '*temp*' + condition: (SELECTION_1 and SELECTION_2 and (SELECTION_3 or (SELECTION_4 and not + (SELECTION_5)))) +falsepositives: +- Unknown +id: d6d9f4fb-4c1c-4f53-b306-62a22c7c61e1 +level: medium +logsource: + category: file_event + product: windows +modified: 2021/08/14 +references: +- https://image.slidesharecdn.com/kheirkhabarovoffzonefinal-181117201458/95/hunting-for-privilege-escalation-in-windows-environment-37-638.jpg +status: experimental +tags: +- attack.persistence +- attack.defense_evasion +- attack.t1574 +- attack.t1574.010 diff --git a/rules/sigma/windows/file_event/sysmon_office_persistence.yml b/rules/sigma/windows/file_event/sysmon_office_persistence.yml new file mode 100644 index 00000000..09b9e6de --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_office_persistence.yml @@ -0,0 +1,40 @@ + +title: Microsoft Office Add-In Loading +author: NVISO +date: 2020/05/11 +description: Detects add-ins that load when Microsoft Word or Excel starts (.wll/.xll + are simply .dll fit for Word or Excel). +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\Microsoft\Word\Startup\\*' + SELECTION_3: + TargetFilename: '*.wll' + SELECTION_4: + TargetFilename: '*\Microsoft\Excel\Startup\\*' + SELECTION_5: + TargetFilename: '*.xll' + SELECTION_6: + TargetFilename: '*\Microsoft\Addins\\*' + SELECTION_7: + TargetFilename: + - '*.xlam' + - '*.xla' + condition: (SELECTION_1 and (((SELECTION_2 and SELECTION_3) or (SELECTION_4 and + SELECTION_5)) or (SELECTION_6 and SELECTION_7))) +falsepositives: +- Legitimate add-ins +id: 8e1cb247-6cf6-42fa-b440-3f27d57e9936 +level: high +logsource: + category: file_event + product: windows +modified: 2020/08/23 +references: +- Internal Research +status: experimental +tags: +- attack.persistence +- attack.t1137 +- attack.t1137.006 diff --git a/rules/sigma/windows/file_event/sysmon_outlook_newform.yml b/rules/sigma/windows/file_event/sysmon_outlook_newform.yml new file mode 100644 index 00000000..bed12314 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_outlook_newform.yml @@ -0,0 +1,29 @@ + +title: Outlook Form Installation +author: Tobias Michalski +date: 2021/06/10 +description: Detects the creation of new Outlook form which can contain malicious + code +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + Image: \outlook.exe + SELECTION_3: + TargetFilename: '*\appdata\local\microsoft\FORMS\\*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- unknown +fields: +- TargetFilename +id: c3edc6a5-d9d4-48d8-930e-aab518390917 +level: high +logsource: + category: file_event + product: windows +references: +- https://twitter.com/blueteamsec1/status/1401290874202382336?s=20 +status: experimental +tags: +- attack.persistence +- attack.t1137.003 diff --git a/rules/sigma/windows/file_event/sysmon_pcre_net_temp_file.yml b/rules/sigma/windows/file_event/sysmon_pcre_net_temp_file.yml new file mode 100644 index 00000000..a700c4bc --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_pcre_net_temp_file.yml @@ -0,0 +1,26 @@ + +title: PCRE.NET Package Temp Files +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/10/29 +description: Detects processes creating temp files related to PCRE.NET package +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\AppData\Local\Temp\ba9ea7344a4a5f591d6e5dc32a13494b\\*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 6e90ae7a-7cd3-473f-a035-4ebb72d961da +level: high +logsource: + category: file_event + product: windows +modified: 2021/08/14 +references: +- https://twitter.com/rbmaslen/status/1321859647091970051 +- https://twitter.com/tifkin_/status/1321916444557365248 +status: experimental +tags: +- attack.execution +- attack.t1059 diff --git a/rules/sigma/windows/file_event/sysmon_powershell_exploit_scripts.yml b/rules/sigma/windows/file_event/sysmon_powershell_exploit_scripts.yml new file mode 100644 index 00000000..4d8625cd --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_powershell_exploit_scripts.yml @@ -0,0 +1,120 @@ + +title: Malicious PowerShell Commandlet Names +author: Markus Neis +date: 2018/04/07 +description: Detects the creation of known powershell scripts for exploitation +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: + - '*\Invoke-DllInjection.ps1' + - '*\Invoke-WmiCommand.ps1' + - '*\Get-GPPPassword.ps1' + - '*\Get-Keystrokes.ps1' + - '*\Get-VaultCredential.ps1' + - '*\Invoke-CredentialInjection.ps1' + - '*\Invoke-Mimikatz.ps1' + - '*\Invoke-NinjaCopy.ps1' + - '*\Invoke-TokenManipulation.ps1' + - '*\Out-Minidump.ps1' + - '*\VolumeShadowCopyTools.ps1' + - '*\Invoke-ReflectivePEInjection.ps1' + - '*\Get-TimedScreenshot.ps1' + - '*\Invoke-UserHunter.ps1' + - '*\Find-GPOLocation.ps1' + - '*\Invoke-ACLScanner.ps1' + - '*\Invoke-DowngradeAccount.ps1' + - '*\Get-ServiceUnquoted.ps1' + - '*\Get-ServiceFilePermission.ps1' + - '*\Get-ServicePermission.ps1' + - '*\Invoke-ServiceAbuse.ps1' + - '*\Install-ServiceBinary.ps1' + - '*\Get-RegAutoLogon.ps1' + - '*\Get-VulnAutoRun.ps1' + - '*\Get-VulnSchTask.ps1' + - '*\Get-UnattendedInstallFile.ps1' + - '*\Get-WebConfig.ps1' + - '*\Get-ApplicationHost.ps1' + - '*\Get-RegAlwaysInstallElevated.ps1' + - '*\Get-Unconstrained.ps1' + - '*\Add-RegBackdoor.ps1' + - '*\Add-ScrnSaveBackdoor.ps1' + - '*\Gupt-Backdoor.ps1' + - '*\Invoke-ADSBackdoor.ps1' + - '*\Enabled-DuplicateToken.ps1' + - '*\Invoke-PsUaCme.ps1' + - '*\Remove-Update.ps1' + - '*\Check-VM.ps1' + - '*\Get-LSASecret.ps1' + - '*\Get-PassHashes.ps1' + - '*\Show-TargetScreen.ps1' + - '*\Port-Scan.ps1' + - '*\Invoke-PoshRatHttp.ps1' + - '*\Invoke-PowerShellTCP.ps1' + - '*\Invoke-PowerShellWMI.ps1' + - '*\Add-Exfiltration.ps1' + - '*\Add-Persistence.ps1' + - '*\Do-Exfiltration.ps1' + - '*\Start-CaptureServer.ps1' + - '*\Invoke-ShellCode.ps1' + - '*\Get-ChromeDump.ps1' + - '*\Get-ClipboardContents.ps1' + - '*\Get-FoxDump.ps1' + - '*\Get-IndexedItem.ps1' + - '*\Get-Screenshot.ps1' + - '*\Invoke-Inveigh.ps1' + - '*\Invoke-NetRipper.ps1' + - '*\Invoke-EgressCheck.ps1' + - '*\Invoke-PostExfil.ps1' + - '*\Invoke-PSInject.ps1' + - '*\Invoke-RunAs.ps1' + - '*\MailRaider.ps1' + - '*\New-HoneyHash.ps1' + - '*\Set-MacAttribute.ps1' + - '*\Invoke-DCSync.ps1' + - '*\Invoke-PowerDump.ps1' + - '*\Exploit-Jboss.ps1' + - '*\Invoke-ThunderStruck.ps1' + - '*\Invoke-VoiceTroll.ps1' + - '*\Set-Wallpaper.ps1' + - '*\Invoke-InveighRelay.ps1' + - '*\Invoke-PsExec.ps1' + - '*\Invoke-SSHCommand.ps1' + - '*\Get-SecurityPackages.ps1' + - '*\Install-SSP.ps1' + - '*\Invoke-BackdoorLNK.ps1' + - '*\PowerBreach.ps1' + - '*\Get-SiteListPassword.ps1' + - '*\Get-System.ps1' + - '*\Invoke-BypassUAC.ps1' + - '*\Invoke-Tater.ps1' + - '*\Invoke-WScriptBypassUAC.ps1' + - '*\PowerUp.ps1' + - '*\PowerView.ps1' + - '*\Get-RickAstley.ps1' + - '*\Find-Fruit.ps1' + - '*\HTTP-Login.ps1' + - '*\Find-TrustedDocuments.ps1' + - '*\Invoke-Paranoia.ps1' + - '*\Invoke-WinEnum.ps1' + - '*\Invoke-ARPScan.ps1' + - '*\Invoke-PortScan.ps1' + - '*\Invoke-ReverseDNSLookup.ps1' + - '*\Invoke-SMBScanner.ps1' + - '*\Invoke-Mimikittenz.ps1' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Penetration Tests +id: f331aa1f-8c53-4fc3-b083-cc159bc971cb +level: high +logsource: + category: file_event + product: windows +references: +- https://raw.githubusercontent.com/Neo23x0/sigma/f35c50049fa896dff91ff545cb199319172701e8/rules/windows/powershell/powershell_malicious_commandlets.yml +status: experimental +tags: +- attack.execution +- attack.t1086 +- attack.t1059.001 diff --git a/rules/sigma/windows/file_event/sysmon_quarkspw_filedump.yml b/rules/sigma/windows/file_event/sysmon_quarkspw_filedump.yml new file mode 100644 index 00000000..59631cad --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_quarkspw_filedump.yml @@ -0,0 +1,28 @@ + +title: QuarksPwDump Dump File +author: Florian Roth +date: 2018/02/10 +description: Detects a dump file written by QuarksPwDump password dumper +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\AppData\Local\Temp\SAM-*' + SELECTION_3: + TargetFilename: '*.dmp*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 847def9e-924d-4e90-b7c4-5f581395a2b4 +level: critical +logsource: + category: file_event + product: windows +modified: 2020/08/23 +references: +- https://jpcertcc.github.io/ToolAnalysisResultSheet/details/QuarksPWDump.htm +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.002 diff --git a/rules/sigma/windows/file_event/sysmon_redmimicry_winnti_filedrop.yml b/rules/sigma/windows/file_event/sysmon_redmimicry_winnti_filedrop.yml new file mode 100644 index 00000000..90b2f289 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_redmimicry_winnti_filedrop.yml @@ -0,0 +1,26 @@ + +title: RedMimicry Winnti Playbook Dropped File +author: Alexander Rausch +date: 2020/06/24 +description: Detects actions caused by the RedMimicry Winnti playbook +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: + - '*gthread-3.6.dll*' + - '*sigcmm-2.4.dll*' + - '*\Windows\Temp\tmp.bat*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 130c9e58-28ac-4f83-8574-0a4cc913b97e +level: high +logsource: + category: file_event + product: windows +references: +- https://redmimicry.com +tags: +- attack.defense_evasion +- attack.t1027 diff --git a/rules/sigma/windows/file_event/sysmon_startup_folder_file_write.yml b/rules/sigma/windows/file_event/sysmon_startup_folder_file_write.yml new file mode 100644 index 00000000..c95ceaf6 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_startup_folder_file_write.yml @@ -0,0 +1,26 @@ + +title: Startup Folder File Write +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/05/02 +description: A General detection for files being created in the Windows startup directory. + This could be an indicator of persistence. +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 2aa0a6b4-a865-495b-ab51-c28249537b75 +level: low +logsource: + category: file_event + product: windows +references: +- https://github.com/OTRF/detection-hackathon-apt29/issues/12 +- https://threathunterplaybook.com/evals/apt29/detections/5.B.1_611FCA99-97D0-4873-9E51-1C1BA2DBB40D.html +status: experimental +tags: +- attack.persistence +- attack.t1547.001 diff --git a/rules/sigma/windows/file_event/sysmon_susp_adsi_cache_usage.yml b/rules/sigma/windows/file_event/sysmon_susp_adsi_cache_usage.yml new file mode 100644 index 00000000..2192a92f --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_susp_adsi_cache_usage.yml @@ -0,0 +1,39 @@ + +title: Suspicious ADSI-Cache Usage By Unknown Tool +author: xknow @xknow_infosec +date: 2019/03/24 +description: Detects the usage of ADSI (LDAP) operations by tools. This may also detect + tools like LDAPFragger. +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\Local\Microsoft\Windows\SchCache\\*' + SELECTION_3: + TargetFilename: '*.sch' + SELECTION_4: + Image: + - C:\windows\system32\svchost.exe + - C:\windows\system32\dllhost.exe + - C:\windows\system32\mmc.exe + - C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe + - C:\Windows\CCM\CcmExec.exe + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Other legimate tools, which do ADSI (LDAP) operations, e.g. any remoting activity + by MMC, Powershell, Windows etc. +id: 75bf09fa-1dd7-4d18-9af9-dd9e492562eb +level: high +logsource: + category: file_event + product: windows +modified: 2020/08/23 +references: +- https://medium.com/@ivecodoe/detecting-ldapfragger-a-newly-released-cobalt-strike-beacon-using-ldap-for-c2-communication-c274a7f00961 +- https://blog.fox-it.com/2020/03/19/ldapfragger-command-and-control-over-ldap-attributes/ +- https://github.com/fox-it/LDAPFragger +status: experimental +tags: +- attack.t1071 +- attack.t1001.003 +- attack.command_and_control diff --git a/rules/sigma/windows/file_event/sysmon_susp_clr_logs.yml b/rules/sigma/windows/file_event/sysmon_susp_clr_logs.yml new file mode 100644 index 00000000..eeb2cba7 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_susp_clr_logs.yml @@ -0,0 +1,33 @@ + +title: Suspcious CLR Logs Creation +author: omkar72, oscd.community +date: 2020/10/12 +description: Detects suspicious .NET assembly executions +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\AppData\Local\Microsoft\CLR*' + SELECTION_3: + TargetFilename: '*\UsageLogs\\*' + SELECTION_4: + TargetFilename: + - '*mshta*' + - '*cscript*' + - '*wscript*' + - '*regsvr32*' + - '*wmic*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: e4b63079-6198-405c-abd7-3fe8b0ce3263 +level: high +logsource: + category: file_event + product: windows +references: +- https://blog.menasec.net/2019/07/interesting-difr-traces-of-net-clr.html +status: experimental +tags: +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/file_event/sysmon_susp_desktop_ini.yml b/rules/sigma/windows/file_event/sysmon_susp_desktop_ini.yml new file mode 100644 index 00000000..1aa2c2c3 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_susp_desktop_ini.yml @@ -0,0 +1,33 @@ + +title: Suspicious desktop.ini Action +author: Maxime Thiebaut (@0xThiebaut) +date: 2020/03/19 +description: Detects unusual processes accessing desktop.ini, which can be leveraged + to alter how Explorer displays a folder's content (i.e. renaming files) without + changing them on disk. +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\desktop.ini' + SELECTION_3: + Image: + - C:\Windows\explorer.exe + - C:\Windows\System32\msiexec.exe + - C:\Windows\System32\mmc.exe + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- Operations performed through Windows SCCM or equivalent +id: 81315b50-6b60-4d8f-9928-3466e1022515 +level: medium +logsource: + category: file_event + product: windows +modified: 2020/08/23 +references: +- https://isc.sans.edu/forums/diary/Desktopini+as+a+postexploitation+tool/25912/ +status: experimental +tags: +- attack.persistence +- attack.t1023 +- attack.t1547.009 diff --git a/rules/sigma/windows/file_event/sysmon_susp_pfx_file_creation.yml b/rules/sigma/windows/file_event/sysmon_susp_pfx_file_creation.yml new file mode 100644 index 00000000..69228b11 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_susp_pfx_file_creation.yml @@ -0,0 +1,26 @@ + +title: Suspicious PFX File Creation +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/05/02 +description: A general detection for processes creating PFX files. This could be an + indicator of an adversary exporting a local certificate to a PFX file. +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*.pfx' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- System administrators managing certififcates. +id: dca1b3e8-e043-4ec8-85d7-867f334b5724 +level: medium +logsource: + category: file_event + product: windows +references: +- https://github.com/OTRF/detection-hackathon-apt29/issues/14 +- https://threathunterplaybook.com/evals/apt29/detections/6.B.1_6392C9F1-D975-4F75-8A70-433DEDD7F622.html +status: experimental +tags: +- attack.credential_access +- attack.t1552.004 diff --git a/rules/sigma/windows/file_event/sysmon_susp_procexplorer_driver_created_in_tmp_folder.yml b/rules/sigma/windows/file_event/sysmon_susp_procexplorer_driver_created_in_tmp_folder.yml new file mode 100644 index 00000000..efb44c6c --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_susp_procexplorer_driver_created_in_tmp_folder.yml @@ -0,0 +1,38 @@ + +title: Suspicious PROCEXP152.sys File Created In TMP +author: xknow (@xknow_infosec), xorxes (@xor_xes) +date: 2019/04/08 +description: Detects the creation of the PROCEXP152.sys file in the application-data + local temporary folder. This driver is used by Sysinternals Process Explorer but + also by KDU (https://github.com/hfiref0x/KDU) or Ghost-In-The-Logs (https://github.com/bats3c/Ghost-In-The-Logs), + which uses KDU. +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\AppData\Local\Temp\\*' + SELECTION_3: + TargetFilename: '*PROCEXP152.sys' + SELECTION_4: + Image: + - '*\procexp64.exe*' + - '*\procexp.exe*' + - '*\procmon64.exe*' + - '*\procmon.exe*' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Other legimate tools using this driver and filename (like Sysinternals). Note - + Clever attackers may easily bypass this detection by just renaming the driver filename. + Therefore just Medium-level and don't rely on it. +id: 3da70954-0f2c-4103-adff-b7440368f50e +level: medium +logsource: + category: file_event + product: windows +references: +- https://blog.dylan.codes/evading-sysmon-and-windows-event-logging/ +status: experimental +tags: +- attack.t1089 +- attack.t1562.001 +- attack.defense_evasion diff --git a/rules/sigma/windows/file_event/sysmon_suspicious_powershell_profile_create.yml b/rules/sigma/windows/file_event/sysmon_suspicious_powershell_profile_create.yml new file mode 100644 index 00000000..08781f7b --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_suspicious_powershell_profile_create.yml @@ -0,0 +1,30 @@ + +title: Powershell Profile.ps1 Modification +author: HieuTT35 +date: 2019/10/24 +description: Detects a change in profile.ps1 of the Powershell profile +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\profile.ps1*' + SELECTION_3: + TargetFilename: '*\My Documents\PowerShell\\*' + SELECTION_4: + TargetFilename: '*C:\Windows\System32\WindowsPowerShell\v1.0\\*' + condition: (SELECTION_1 and SELECTION_2 and (SELECTION_3 or SELECTION_4)) +falsepositives: +- System administrator create Powershell profile manually +id: b5b78988-486d-4a80-b991-930eff3ff8bf +level: high +logsource: + category: file_event + product: windows +modified: 2020/08/24 +references: +- https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/ +status: experimental +tags: +- attack.persistence +- attack.privilege_escalation +- attack.t1546.013 diff --git a/rules/sigma/windows/file_event/sysmon_tsclient_filewrite_startup.yml b/rules/sigma/windows/file_event/sysmon_tsclient_filewrite_startup.yml new file mode 100644 index 00000000..2dc971d9 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_tsclient_filewrite_startup.yml @@ -0,0 +1,25 @@ + +title: Hijack Legit RDP Session to Move Laterally +author: Samir Bousseaden +date: 2019/02/21 +description: Detects the usage of tsclient share to place a backdoor on the RDP source + machine's startup folder +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + Image: '*\mstsc.exe' + SELECTION_3: + TargetFilename: '*\Microsoft\Windows\Start Menu\Programs\Startup\\*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- unknown +id: 52753ea4-b3a0-4365-910d-36cff487b789 +level: high +logsource: + category: file_event + product: windows +status: experimental +tags: +- attack.command_and_control +- attack.t1219 diff --git a/rules/sigma/windows/file_event/sysmon_uac_bypass_consent_comctl32.yml b/rules/sigma/windows/file_event/sysmon_uac_bypass_consent_comctl32.yml new file mode 100644 index 00000000..6fff1ce4 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_uac_bypass_consent_comctl32.yml @@ -0,0 +1,28 @@ + +title: UAC Bypass Using Consent and Comctl32 - File +author: Christian Burkard +date: 2021/08/23 +description: Detects the pattern of UAC Bypass using consent.exe and comctl32.dll + (UACMe 22) +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: C:\Windows\System32\consent.exe.@* + SELECTION_3: + TargetFilename: '*\comctl32.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 62ed5b55-f991-406a-85d9-e8e8fdf18789 +level: high +logsource: + category: file_event + product: windows +references: +- https://github.com/hfiref0x/UACME +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/file_event/sysmon_uac_bypass_dotnet_profiler.yml b/rules/sigma/windows/file_event/sysmon_uac_bypass_dotnet_profiler.yml new file mode 100644 index 00000000..9bae5cc2 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_uac_bypass_dotnet_profiler.yml @@ -0,0 +1,28 @@ + +title: UAC Bypass Using .NET Code Profiler on MMC +author: Christian Burkard +date: 2021/08/30 +description: Detects the pattern of UAC Bypass using .NET Code Profiler and mmc.exe + DLL hijacking (UACMe 39) +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: C:\Users\\* + SELECTION_3: + TargetFilename: '*\AppData\Local\Temp\pe386.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 93a19907-d4f9-4deb-9f91-aac4692776a6 +level: high +logsource: + category: file_event + product: windows +references: +- https://github.com/hfiref0x/UACME +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/file_event/sysmon_uac_bypass_ieinstal.yml b/rules/sigma/windows/file_event/sysmon_uac_bypass_ieinstal.yml new file mode 100644 index 00000000..04172c32 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_uac_bypass_ieinstal.yml @@ -0,0 +1,31 @@ + +title: UAC Bypass Using IEInstal - File +author: Christian Burkard +date: 2021/08/30 +description: Detects the pattern of UAC Bypass using IEInstal.exe (UACMe 64) +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + Image: C:\Program Files\Internet Explorer\IEInstal.exe + SELECTION_3: + TargetFilename: C:\Users\\* + SELECTION_4: + TargetFilename: '*\AppData\Local\Temp\\*' + SELECTION_5: + TargetFilename: '*consent.exe' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Unknown +id: bdd8157d-8e85-4397-bb82-f06cc9c71dbb +level: high +logsource: + category: file_event + product: windows +references: +- https://github.com/hfiref0x/UACME +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/file_event/sysmon_uac_bypass_msconfig_gui.yml b/rules/sigma/windows/file_event/sysmon_uac_bypass_msconfig_gui.yml new file mode 100644 index 00000000..9d470fc6 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_uac_bypass_msconfig_gui.yml @@ -0,0 +1,27 @@ + +title: UAC Bypass Using MSConfig Token Modification - File +author: Christian Burkard +date: 2021/08/30 +description: Detects the pattern of UAC Bypass using a msconfig GUI hack (UACMe 55) +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: C:\Users\\* + SELECTION_3: + TargetFilename: '*\AppData\Local\Temp\pkgmgr.exe' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 41bb431f-56d8-4691-bb56-ed34e390906f +level: high +logsource: + category: file_event + product: windows +references: +- https://github.com/hfiref0x/UACME +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/file_event/sysmon_uac_bypass_ntfs_reparse_point.yml b/rules/sigma/windows/file_event/sysmon_uac_bypass_ntfs_reparse_point.yml new file mode 100644 index 00000000..db909df0 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_uac_bypass_ntfs_reparse_point.yml @@ -0,0 +1,28 @@ + +title: UAC Bypass Using NTFS Reparse Point - File +author: Christian Burkard +date: 2021/08/30 +description: Detects the pattern of UAC Bypass using NTFS reparse point and wusa.exe + DLL hijacking (UACMe 36) +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: C:\Users\\* + SELECTION_3: + TargetFilename: '*\AppData\Local\Temp\api-ms-win-core-kernel32-legacy-l1.DLL' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 7fff6773-2baa-46de-a24a-b6eec1aba2d1 +level: high +logsource: + category: file_event + product: windows +references: +- https://github.com/hfiref0x/UACME +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/file_event/sysmon_webshell_creation_detect.yml b/rules/sigma/windows/file_event/sysmon_webshell_creation_detect.yml new file mode 100644 index 00000000..ce9784b2 --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_webshell_creation_detect.yml @@ -0,0 +1,59 @@ + +title: Windows Webshell Creation +author: Beyu Denis, oscd.community +date: 2019/10/22 +description: Possible webshell file creation on a static web site +detection: + SELECTION_1: + EventID: 11 + SELECTION_10: + TargetFilename: '*.pl*' + SELECTION_11: + TargetFilename: + - '*\AppData\Local\Temp\\*' + - '*\Windows\Temp\\*' + SELECTION_2: + TargetFilename: '*\inetpub\wwwroot\\*' + SELECTION_3: + TargetFilename: + - '*.asp*' + - '*.ashx*' + - '*.ph*' + SELECTION_4: + TargetFilename: + - '*\AppData\Local\Temp\\*' + - '*\Windows\Temp\\*' + SELECTION_5: + TargetFilename: + - '*\www\\*' + - '*\htdocs\\*' + - '*\html\\*' + SELECTION_6: + TargetFilename: '*.ph*' + SELECTION_7: + TargetFilename: + - '*\AppData\Local\Temp\\*' + - '*\Windows\Temp\\*' + SELECTION_8: + TargetFilename: '*.jsp' + SELECTION_9: + TargetFilename: '*\cgi-bin\\*' + condition: (SELECTION_1 and ((((SELECTION_2 and SELECTION_3) and not (SELECTION_4)) + or ((SELECTION_5 and SELECTION_6) and not (SELECTION_7))) or ((SELECTION_8 or + (SELECTION_9 and SELECTION_10)) and not (SELECTION_11)))) +falsepositives: +- Legitimate administrator or developer creating legitimate executable files in a + web application folder +id: 39f1f9f2-9636-45de-98f6-a4046aa8e4b9 +level: critical +logsource: + category: file_event + product: windows +modified: 2020/08/23 +references: +- PT ESC rule and personal experience +status: experimental +tags: +- attack.persistence +- attack.t1100 +- attack.t1505.003 diff --git a/rules/sigma/windows/file_event/sysmon_wmi_persistence_script_event_consumer_write.yml b/rules/sigma/windows/file_event/sysmon_wmi_persistence_script_event_consumer_write.yml new file mode 100644 index 00000000..bb1d6f8c --- /dev/null +++ b/rules/sigma/windows/file_event/sysmon_wmi_persistence_script_event_consumer_write.yml @@ -0,0 +1,26 @@ + +title: WMI Persistence - Script Event Consumer File Write +author: Thomas Patzke +date: 2018/03/07 +description: Detects file writes of WMI script event consumer +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + Image: C:\WINDOWS\system32\wbem\scrcons.exe + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Dell Power Manager (C:\Program Files\Dell\PowerManager\DpmPowerPlanSetup.exe) +id: 33f41cdd-35ac-4ba8-814b-c6a4244a1ad4 +level: high +logsource: + category: file_event + product: windows +modified: 2020/08/23 +references: +- https://www.eideon.com/2018-03-02-THL03-WMIBackdoors/ +status: experimental +tags: +- attack.t1084 +- attack.t1546.003 +- attack.persistence diff --git a/rules/sigma/windows/file_event/win_cve_2021_1675_printspooler.yml b/rules/sigma/windows/file_event/win_cve_2021_1675_printspooler.yml new file mode 100644 index 00000000..82dcd034 --- /dev/null +++ b/rules/sigma/windows/file_event/win_cve_2021_1675_printspooler.yml @@ -0,0 +1,34 @@ + +title: CVE-2021-1675 Print Spooler Exploitation Filename Pattern +author: Florian Roth +date: 2021/06/29 +description: Detects the default filename used in PoC code against print spooler vulnerability + CVE-2021-1675 +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: + - '*C:\Windows\System32\spool\drivers\x64\3\old\1\123*' + - '*C:\Windows\System32\spool\drivers\x64\3\New\\*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +fields: +- ComputerName +- TargetFilename +id: 2131cfb3-8c12-45e8-8fa0-31f5924e9f07 +level: critical +logsource: + category: file_event + product: windows +modified: 2021/07/01 +references: +- https://github.com/hhlxf/PrintNightmare +- https://github.com/afwu/PrintNightmare +- https://github.com/cube0x0/CVE-2021-1675 +- https://nvd.nist.gov/vuln/detail/cve-2021-1675 +status: experimental +tags: +- attack.execution +- attack.privilege_escalation diff --git a/rules/sigma/windows/file_event/win_file_winword_cve_2021_40444.yml b/rules/sigma/windows/file_event/win_file_winword_cve_2021_40444.yml new file mode 100644 index 00000000..bf7b4a3d --- /dev/null +++ b/rules/sigma/windows/file_event/win_file_winword_cve_2021_40444.yml @@ -0,0 +1,35 @@ + +title: Suspicious Word Cab File Write CVE-2021-40444 +author: Florian Roth, Sittikorn S +date: 2021/09/10 +description: Detects file creation patterns noticeable during the exploitation of + CVE-2021-40444 +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + Image: \winword.exe + SELECTION_3: + TargetFilename: '*.cab' + SELECTION_4: + TargetFilename: '*\Windows\INetCache*' + SELECTION_5: + TargetFilename: '*\AppData\Local\Temp\\*' + SELECTION_6: + TargetFilename: '*.inf*' + condition: (SELECTION_1 and SELECTION_2 and ((SELECTION_3 and SELECTION_4) or (SELECTION_5 + and SELECTION_6))) +falsepositives: +- unknown +fields: +- TargetFilename +id: 60c0a111-787a-4e8a-9262-ee485f3ef9d5 +level: critical +logsource: + category: file_event + product: windows +modified: 2021/09/13 +references: +- https://twitter.com/RonnyTNL/status/1436334640617373699?s=20 +- https://twitter.com/vanitasnk/status/1437329511142420483?s=21 +status: experimental diff --git a/rules/sigma/windows/file_event/win_hivenightmare_file_exports.yml b/rules/sigma/windows/file_event/win_hivenightmare_file_exports.yml new file mode 100644 index 00000000..c95b9e4f --- /dev/null +++ b/rules/sigma/windows/file_event/win_hivenightmare_file_exports.yml @@ -0,0 +1,39 @@ + +title: Typical HiveNightmare SAM File Export +author: Florian Roth +date: 2021/07/23 +description: Detects files written by the different tools that exploit HiveNightmare +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: + - '*\hive_sam_*' + - '*\SAM-2021-*' + - '*\SAM-2022-*' + - '*\SAM-haxx*' + - '*\Sam.save*' + SELECTION_3: + TargetFilename: + - C:\windows\temp\sam + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3)) +falsepositives: +- Files that accidentally contain these strings +fields: +- CommandLine +- ParentCommandLine +id: 6ea858a8-ba71-4a12-b2cc-5d83312404c7 +level: high +logsource: + category: file_event + product: windows +references: +- https://github.com/GossiTheDog/HiveNightmare +- https://github.com/FireFart/hivenightmare/ +- https://github.com/WiredPulse/Invoke-HiveNightmare +- https://twitter.com/cube0x0/status/1418920190759378944 +- https://nvd.nist.gov/vuln/detail/cve-2021-36934 +status: experimental +tags: +- attack.credential_access +- attack.t1552.001 diff --git a/rules/sigma/windows/file_event/win_outlook_c2_macro_creation.yml b/rules/sigma/windows/file_event/win_outlook_c2_macro_creation.yml new file mode 100644 index 00000000..dec1443e --- /dev/null +++ b/rules/sigma/windows/file_event/win_outlook_c2_macro_creation.yml @@ -0,0 +1,29 @@ + +title: Outlook C2 Macro Creation +author: '@ScoubiMtl' +date: 2021/04/05 +description: Detects the creation of a macro file for Outlook. Goes with win_outlook_c2_registry_key. + VbaProject.OTM is explicitly mentioned in T1137. Particularly interesting if both + events Registry & File Creation happens at the same time. +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*\Microsoft\Outlook\VbaProject.OTM' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- User genuinly creates a VB Macro for their email +id: 8c31f563-f9a7-450c-bfa8-35f8f32f1f61 +level: medium +logsource: + category: file_event + product: windows +references: +- https://www.mdsec.co.uk/2020/11/a-fresh-outlook-on-mail-based-persistence/ +status: experimental +tags: +- attack.persistence +- attack.command_and_control +- attack.t1137 +- attack.t1008 +- attack.t1546 diff --git a/rules/sigma/windows/file_event/win_rclone_exec_file.yml b/rules/sigma/windows/file_event/win_rclone_exec_file.yml new file mode 100644 index 00000000..2213fef9 --- /dev/null +++ b/rules/sigma/windows/file_event/win_rclone_exec_file.yml @@ -0,0 +1,27 @@ + +title: Rclone Config File Creation +author: Aaron Greetham (@beardofbinary) - NCC Group +date: 2021/05/26 +description: Detects Rclone config file being created +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: '*:\Users\\*' + SELECTION_3: + TargetFilename: '*\.config\rclone\\*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Legitimate Rclone usage (rare) +id: 34986307-b7f4-49be-92f3-e7a4d01ac5db +level: high +logsource: + category: file_event + product: windows +modified: 2021/10/04 +references: +- https://research.nccgroup.com/2021/05/27/detecting-rclone-an-effective-tool-for-exfiltration/ +status: experimental +tags: +- attack.exfiltration +- attack.t1567.002 diff --git a/rules/sigma/windows/file_event/win_susp_desktopimgdownldr_file.yml b/rules/sigma/windows/file_event/win_susp_desktopimgdownldr_file.yml new file mode 100644 index 00000000..12ada67a --- /dev/null +++ b/rules/sigma/windows/file_event/win_susp_desktopimgdownldr_file.yml @@ -0,0 +1,40 @@ + +title: Suspicious Desktopimgdownldr Target File +author: Florian Roth +date: 2020/07/03 +description: Detects a suspicious Microsoft desktopimgdownldr file creation that stores + a file to a suspicious location or contains a file with a suspicious extension +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + Image: '*svchost.exe' + SELECTION_3: + TargetFilename: '*\Personalization\LockScreenImage\\*' + SELECTION_4: + TargetFilename: '*C:\Windows\\*' + SELECTION_5: + TargetFilename: + - '*.jpg*' + - '*.jpeg*' + - '*.png*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) and not (SELECTION_4)) + and not (SELECTION_5)) +falsepositives: +- False positives depend on scripts and administrative tools used in the monitored + environment +fields: +- CommandLine +- ParentCommandLine +id: fc4f4817-0c53-4683-a4ee-b17a64bc1039 +level: high +logsource: + category: file_event + product: windows +references: +- https://labs.sentinelone.com/living-off-windows-land-a-new-native-file-downldr/ +- https://twitter.com/SBousseaden/status/1278977301745741825 +status: experimental +tags: +- attack.defense_evasion +- attack.t1105 diff --git a/rules/sigma/windows/image_load/image_load_pingback_backdoor.yml b/rules/sigma/windows/image_load/image_load_pingback_backdoor.yml new file mode 100644 index 00000000..df069556 --- /dev/null +++ b/rules/sigma/windows/image_load/image_load_pingback_backdoor.yml @@ -0,0 +1,29 @@ + +title: Pingback Backdoor +author: Bhabesh Raj +date: 2021/05/05 +description: Detects the use of Pingback backdoor that creates ICMP tunnel for C2 + as described in the trustwave report +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: '*msdtc.exe' + SELECTION_3: + ImageLoaded: C:\Windows\oci.dll + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Very unlikely +id: 35a7dc42-bc6f-46e0-9f83-81f8e56c8d4b +level: high +logsource: + category: image_load + product: windows +modified: 2021/09/09 +references: +- https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/backdoor-at-the-end-of-the-icmp-tunnel +- https://app.any.run/tasks/4a54c651-b70b-4b72-84d7-f34d301d6406 +status: experimental +tags: +- attack.persistence +- attack.t1574.001 diff --git a/rules/sigma/windows/image_load/image_load_silenttrinity_stage_use.yml b/rules/sigma/windows/image_load/image_load_silenttrinity_stage_use.yml new file mode 100644 index 00000000..bff19ea7 --- /dev/null +++ b/rules/sigma/windows/image_load/image_load_silenttrinity_stage_use.yml @@ -0,0 +1,27 @@ + +title: SILENTTRINITY Stager Execution +author: Aleksey Potapov, oscd.community +date: 2019/10/22 +description: Detects SILENTTRINITY stager use +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Description: '*st2stager*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 75c505b1-711d-4f68-a357-8c3fe37dbf2d +level: high +logsource: + category: image_load + product: windows +modified: 2021/10/04 +references: +- https://github.com/byt3bl33d3r/SILENTTRINITY +related: +- id: 03552375-cc2c-4883-bbe4-7958d5a980be + type: derived +status: experimental +tags: +- attack.command_and_control diff --git a/rules/sigma/windows/image_load/image_load_wmiprvse_wbemcomn_dll_hijack.yml b/rules/sigma/windows/image_load/image_load_wmiprvse_wbemcomn_dll_hijack.yml new file mode 100644 index 00000000..9f934c89 --- /dev/null +++ b/rules/sigma/windows/image_load/image_load_wmiprvse_wbemcomn_dll_hijack.yml @@ -0,0 +1,30 @@ + +title: Wmiprvse Wbemcomn DLL Hijack +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/10/12 +description: Detects a threat actor creating a file named `wbemcomn.dll` in the `C:\Windows\System32\wbem\` + directory over the network and loading it for a WMI DLL Hijack scenario. +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: '*\wmiprvse.exe' + SELECTION_3: + ImageLoaded: '*\wbem\wbemcomn.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 7707a579-e0d8-4886-a853-ce47e4575aaa +level: critical +logsource: + category: image_load + product: windows +modified: 2021/09/09 +references: +- https://threathunterplaybook.com/notebooks/windows/08_lateral_movement/WIN-201009173318.html +status: experimental +tags: +- attack.execution +- attack.t1047 +- attack.lateral_movement +- attack.t1021.002 diff --git a/rules/sigma/windows/image_load/process_creation_tttracer_mod_load.yml b/rules/sigma/windows/image_load/process_creation_tttracer_mod_load.yml new file mode 100644 index 00000000..434af1a5 --- /dev/null +++ b/rules/sigma/windows/image_load/process_creation_tttracer_mod_load.yml @@ -0,0 +1,33 @@ + +title: Time Travel Debugging Utility Usage +author: Ensar Şamil, @sblmsrsn, @oscd_initiative +date: 2020/10/06 +description: Detects usage of Time Travel Debugging Utility. Adversaries can execute + malicious processes and dump processes, such as lsass.exe, via tttracer.exe. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*\tttracer.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate usage by software developers/testers +id: 0b4ae027-2a2d-4b93-8c7e-962caaba5b2a +level: high +logsource: + category: process_creation + product: windows +modified: 2021/09/21 +references: +- https://lolbas-project.github.io/lolbas/Binaries/Tttracer/ +- https://twitter.com/mattifestation/status/1196390321783025666 +- https://twitter.com/oulusoyum/status/1191329746069655553 +related: +- id: e76c8240-d68f-4773-8880-5c6f63595aaf + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.credential_access +- attack.t1218 +- attack.t1003.001 diff --git a/rules/sigma/windows/image_load/sysmon_abusing_azure_browser_sso.yml b/rules/sigma/windows/image_load/sysmon_abusing_azure_browser_sso.yml new file mode 100644 index 00000000..7873f0f6 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_abusing_azure_browser_sso.yml @@ -0,0 +1,37 @@ + +title: Abusing Azure Browser SSO +author: Den Iuzvyk +date: 2020/07/15 +description: Detects abusing Azure Browser SSO by requesting OAuth 2.0 refresh tokens + for an Azure-AD-authenticated Windows user (i.e. the machine is joined to Azure + AD and a user logs in with their Azure AD account) wanting to perform SSO authentication + in the browser. An attacker can use this to authenticate to Azure AD in a browser + as that user. +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + ImageLoaded: '*MicrosoftAccountTokenProvider.dll' + SELECTION_3: + Image: + - '*BackgroundTaskHost.exe' + - '*devenv.exe' + - '*iexplore.exe' + - '*MicrosoftEdge.exe' + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- unknown +id: 50f852e6-af22-4c78-9ede-42ef36aa3453 +level: high +logsource: + category: image_load + product: windows +modified: 2020/12/23 +references: +- https://posts.specterops.io/requesting-azure-ad-request-tokens-on-azure-ad-joined-machines-for-browser-sso-2b0409caad30 +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1073 +- attack.t1574.002 diff --git a/rules/sigma/windows/image_load/sysmon_alternate_powershell_hosts_moduleload.yml b/rules/sigma/windows/image_load/sysmon_alternate_powershell_hosts_moduleload.yml new file mode 100644 index 00000000..73c7ca5e --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_alternate_powershell_hosts_moduleload.yml @@ -0,0 +1,30 @@ + +title: Alternate PowerShell Hosts +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2019/09/12 +description: Detects alternate PowerShell hosts potentially bypassing detections looking + for powershell.exe +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Description: System.Management.Automation + SELECTION_3: + ImageLoaded: '*System.Management.Automation*' + SELECTION_4: + Image: '*\powershell.exe' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Unknown +id: fe6e002f-f244-4278-9263-20e4b593827f +level: medium +logsource: + category: image_load + product: windows +modified: 2021/05/12 +references: +- https://threathunterplaybook.com/notebooks/windows/02_execution/WIN-190815181010.html +status: experimental +tags: +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/image_load/sysmon_foggyweb_nobelium.yml b/rules/sigma/windows/image_load/sysmon_foggyweb_nobelium.yml new file mode 100644 index 00000000..19a55463 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_foggyweb_nobelium.yml @@ -0,0 +1,21 @@ + +title: FoggyWeb Backdoor DLL Loading +author: Florian Roth +date: 2021/09/27 +description: Detects DLL image load activity as used by FoggyWeb backdoor loader +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: C:\Windows\ADFS\version.dll + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unlikely +id: 640dc51c-7713-4faa-8a0e-e7c0d9d4654c +level: critical +logsource: + category: image_load + product: windows +references: +- https://www.microsoft.com/security/blog/2021/09/27/foggyweb-targeted-nobelium-malware-leads-to-persistent-backdoor/ +status: experimental diff --git a/rules/sigma/windows/image_load/sysmon_in_memory_powershell.yml b/rules/sigma/windows/image_load/sysmon_in_memory_powershell.yml new file mode 100644 index 00000000..d8f9da33 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_in_memory_powershell.yml @@ -0,0 +1,46 @@ + +title: In-memory PowerShell +author: Tom Kern, oscd.community, Natalia Shornikova +date: 2019/11/14 +description: Detects loading of essential DLL used by PowerShell, but not by the process + powershell.exe. Detects meterpreter's "load powershell" extension. +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + ImageLoaded: + - '*\System.Management.Automation.Dll' + - '*\System.Management.Automation.ni.Dll' + SELECTION_3: + Image: + - '*\powershell.exe' + - '*\powershell_ise.exe' + - '*\WINDOWS\System32\sdiagnhost.exe' + - '*\mscorsvw.exe' + - '*\WINDOWS\System32\RemoteFXvGPUDisablement.exe' + - '*\sqlps.exe' + - '*\wsmprovhost.exe' + - '*\winrshost.exe' + - '*\syncappvpublishingserver.exe' + - '*\runscripthelper.exe' + - '*\ServerManager.exe' + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +enrichment: +- EN_0001_cache_sysmon_event_id_1_info +- EN_0003_enrich_other_sysmon_events_with_event_id_1_data +falsepositives: +- Used by some .NET binaries, minimal on user workstation. +id: 092bc4b9-3d1d-43b4-a6b4-8c8acd83522f +level: high +logsource: + category: image_load + product: windows +modified: 2020/10/12 +references: +- https://adsecurity.org/?p=2921 +- https://github.com/p3nt4/PowerShdll +status: experimental +tags: +- attack.t1086 +- attack.t1059.001 +- attack.execution diff --git a/rules/sigma/windows/image_load/sysmon_pcre_net_load.yml b/rules/sigma/windows/image_load/sysmon_pcre_net_load.yml new file mode 100644 index 00000000..ce90f8b3 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_pcre_net_load.yml @@ -0,0 +1,26 @@ + +title: PCRE.NET Package Image Load +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/10/29 +description: Detects processes loading modules related to PCRE.NET package +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + ImageLoaded: '*\AppData\Local\Temp\ba9ea7344a4a5f591d6e5dc32a13494b\\*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 84b0a8f3-680b-4096-a45b-e9a89221727c +level: high +logsource: + category: image_load + product: windows +modified: 2021/08/14 +references: +- https://twitter.com/rbmaslen/status/1321859647091970051 +- https://twitter.com/tifkin_/status/1321916444557365248 +status: experimental +tags: +- attack.execution +- attack.t1059 diff --git a/rules/sigma/windows/image_load/sysmon_powershell_execution_moduleload.yml b/rules/sigma/windows/image_load/sysmon_powershell_execution_moduleload.yml new file mode 100644 index 00000000..da9cbad9 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_powershell_execution_moduleload.yml @@ -0,0 +1,33 @@ + +title: PowerShell Execution +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/09/12 +description: Detects execution of PowerShell +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Description: System.Management.Automation + SELECTION_3: + ImageLoaded: '*System.Management.Automation*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +fields: +- ComputerName +- Image +- ProcessID +- ImageLoaded +id: 867613fb-fa60-4497-a017-a82df74a172c +level: medium +logsource: + category: image_load + product: windows +modified: 2019/11/10 +references: +- https://threathunterplaybook.com/notebooks/windows/02_execution/WIN-190410151110.html +status: experimental +tags: +- attack.execution +- attack.t1086 +- attack.t1059.001 diff --git a/rules/sigma/windows/image_load/sysmon_scrcons_imageload_wmi_scripteventconsumer.yml b/rules/sigma/windows/image_load/sysmon_scrcons_imageload_wmi_scripteventconsumer.yml new file mode 100644 index 00000000..25be1a44 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_scrcons_imageload_wmi_scripteventconsumer.yml @@ -0,0 +1,35 @@ + +title: WMI Script Host Process Image Loaded +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/09/02 +description: Detects signs of the WMI script host process %SystemRoot%\system32\wbem\scrcons.exe + functionality being used via images being loaded by a process. +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: '*\scrcons.exe' + SELECTION_3: + ImageLoaded: + - '*\vbscript.dll' + - '*\wbemdisp.dll' + - '*\wshom.ocx' + - '*\scrrun.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: b439f47d-ef52-4b29-9a2f-57d8a96cb6b8 +level: high +logsource: + category: image_load + product: windows +references: +- https://twitter.com/HunterPlaybook/status/1301207718355759107 +- https://www.mdsec.co.uk/2020/09/i-like-to-move-it-windows-lateral-movement-part-1-wmi-event-subscription/ +- https://threathunterplaybook.com/notebooks/windows/08_lateral_movement/WIN-200902020333.html +status: experimental +tags: +- attack.lateral_movement +- attack.privilege_escalation +- attack.persistence +- attack.t1546.003 diff --git a/rules/sigma/windows/image_load/sysmon_spoolsv_dll_load.yml b/rules/sigma/windows/image_load/sysmon_spoolsv_dll_load.yml new file mode 100644 index 00000000..e006ed0b --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_spoolsv_dll_load.yml @@ -0,0 +1,33 @@ + +title: Windows Spooler Service Suspicious Binary Load +author: FPT.EagleEye, Thomas Patzke (improvements) +date: 2021/06/29 +description: Detect DLL Load from Spooler Service backup folder +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: '*spoolsv.exe' + SELECTION_3: + ImageLoaded: '*\Windows\System32\spool\drivers\x64\3\\*' + SELECTION_4: + ImageLoaded: '*.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Loading of legitimate driver +id: 02fb90de-c321-4e63-a6b9-25f4b03dfd14 +level: informational +logsource: + category: image_load + product: windows +modified: 2021/08/24 +references: +- https://github.com/hhlxf/PrintNightmare +- https://nvd.nist.gov/vuln/detail/cve-2021-1675 +- https://nvd.nist.gov/vuln/detail/cve-2021-34527 +status: experimental +tags: +- attack.persistence +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1574 diff --git a/rules/sigma/windows/image_load/sysmon_susp_fax_dll.yml b/rules/sigma/windows/image_load/sysmon_susp_fax_dll.yml new file mode 100644 index 00000000..27671f58 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_susp_fax_dll.yml @@ -0,0 +1,37 @@ + +title: Fax Service DLL Search Order Hijack +author: NVISO +date: 2020/05/04 +description: The Fax service attempts to load ualapi.dll, which is non-existent. An + attacker can then (side)load their own malicious DLL using this service. +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: + - '*fxssvc.exe' + SELECTION_3: + ImageLoaded: + - '*ualapi.dll' + SELECTION_4: + ImageLoaded: + - C:\Windows\WinSxS\\* + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Unlikely +id: 828af599-4c53-4ed2-ba4a-a9f835c434ea +level: high +logsource: + category: image_load + product: windows +modified: 2020/08/23 +references: +- https://windows-internals.com/faxing-your-way-to-system/ +status: experimental +tags: +- attack.persistence +- attack.defense_evasion +- attack.t1073 +- attack.t1038 +- attack.t1574.001 +- attack.t1574.002 diff --git a/rules/sigma/windows/image_load/sysmon_susp_image_load.yml b/rules/sigma/windows/image_load/sysmon_susp_image_load.yml new file mode 100644 index 00000000..64630bd8 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_susp_image_load.yml @@ -0,0 +1,32 @@ + +title: Possible Process Hollowing Image Loading +author: Markus Neis +date: 2018/01/07 +description: Detects Loading of samlib.dll, WinSCard.dll from untypical process e.g. + through process hollowing by Mimikatz +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: + - '*\notepad.exe' + SELECTION_3: + ImageLoaded: + - '*\samlib.dll' + - '*\WinSCard.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Very likely, needs more tuning +id: e32ce4f5-46c6-4c47-ba69-5de3c9193cd7 +level: high +logsource: + category: image_load + product: windows +modified: 2020/08/23 +references: +- https://cyberwardog.blogspot.com/2017/03/chronicles-of-threat-hunter-hunting-for.html +status: experimental +tags: +- attack.defense_evasion +- attack.t1073 +- attack.t1574.002 diff --git a/rules/sigma/windows/image_load/sysmon_susp_office_dotnet_assembly_dll_load.yml b/rules/sigma/windows/image_load/sysmon_susp_office_dotnet_assembly_dll_load.yml new file mode 100644 index 00000000..017745c3 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_susp_office_dotnet_assembly_dll_load.yml @@ -0,0 +1,33 @@ + +title: dotNET DLL Loaded Via Office Applications +author: Antonlovesdnb +date: 2020/02/19 +description: Detects any assembly DLL being loaded by an Office Product +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: + - '*\winword.exe' + - '*\powerpnt.exe' + - '*\excel.exe' + - '*\outlook.exe' + SELECTION_3: + ImageLoaded: + - C:\Windows\assembly\\* + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Alerts on legitimate macro usage as well, will need to filter as appropriate +id: ff0f2b05-09db-4095-b96d-1b75ca24894a +level: high +logsource: + category: image_load + product: windows +modified: 2020/08/23 +references: +- https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16 +status: experimental +tags: +- attack.execution +- attack.t1204 +- attack.t1204.002 diff --git a/rules/sigma/windows/image_load/sysmon_susp_office_dotnet_clr_dll_load.yml b/rules/sigma/windows/image_load/sysmon_susp_office_dotnet_clr_dll_load.yml new file mode 100644 index 00000000..5179191a --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_susp_office_dotnet_clr_dll_load.yml @@ -0,0 +1,33 @@ + +title: CLR DLL Loaded Via Office Applications +author: Antonlovesdnb +date: 2020/02/19 +description: Detects CLR DLL being loaded by an Office Product +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: + - '*\winword.exe' + - '*\powerpnt.exe' + - '*\excel.exe' + - '*\outlook.exe' + SELECTION_3: + ImageLoaded: + - '*\clr.dll*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Alerts on legitimate macro usage as well, will need to filter as appropriate +id: d13c43f0-f66b-4279-8b2c-5912077c1780 +level: high +logsource: + category: image_load + product: windows +modified: 2020/08/23 +references: +- https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16 +status: experimental +tags: +- attack.execution +- attack.t1204 +- attack.t1204.002 diff --git a/rules/sigma/windows/image_load/sysmon_susp_office_dotnet_gac_dll_load.yml b/rules/sigma/windows/image_load/sysmon_susp_office_dotnet_gac_dll_load.yml new file mode 100644 index 00000000..a58112dc --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_susp_office_dotnet_gac_dll_load.yml @@ -0,0 +1,33 @@ + +title: GAC DLL Loaded Via Office Applications +author: Antonlovesdnb +date: 2020/02/19 +description: Detects any GAC DLL being loaded by an Office Product +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: + - '*\winword.exe' + - '*\powerpnt.exe' + - '*\excel.exe' + - '*\outlook.exe' + SELECTION_3: + ImageLoaded: + - C:\Windows\Microsoft.NET\assembly\GAC_MSIL* + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Alerts on legitimate macro usage as well, will need to filter as appropriate +id: 90217a70-13fc-48e4-b3db-0d836c5824ac +level: high +logsource: + category: image_load + product: windows +modified: 2020/08/23 +references: +- https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16 +status: experimental +tags: +- attack.execution +- attack.t1204 +- attack.t1204.002 diff --git a/rules/sigma/windows/image_load/sysmon_susp_office_dsparse_dll_load.yml b/rules/sigma/windows/image_load/sysmon_susp_office_dsparse_dll_load.yml new file mode 100644 index 00000000..b21e9441 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_susp_office_dsparse_dll_load.yml @@ -0,0 +1,33 @@ + +title: Active Directory Parsing DLL Loaded Via Office Applications +author: Antonlovesdnb +date: 2020/02/19 +description: Detects DSParse DLL being loaded by an Office Product +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: + - '*\winword.exe' + - '*\powerpnt.exe' + - '*\excel.exe' + - '*\outlook.exe' + SELECTION_3: + ImageLoaded: + - '*\dsparse.dll*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Alerts on legitimate macro usage as well, will need to filter as appropriate +id: a2a3b925-7bb0-433b-b508-db9003263cc4 +level: high +logsource: + category: image_load + product: windows +modified: 2020/08/23 +references: +- https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16 +status: experimental +tags: +- attack.execution +- attack.t1204 +- attack.t1204.002 diff --git a/rules/sigma/windows/image_load/sysmon_susp_office_kerberos_dll_load.yml b/rules/sigma/windows/image_load/sysmon_susp_office_kerberos_dll_load.yml new file mode 100644 index 00000000..6d0ffd63 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_susp_office_kerberos_dll_load.yml @@ -0,0 +1,33 @@ + +title: Active Directory Kerberos DLL Loaded Via Office Applications +author: Antonlovesdnb +date: 2020/02/19 +description: Detects Kerberos DLL being loaded by an Office Product +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: + - '*\winword.exe' + - '*\powerpnt.exe' + - '*\excel.exe' + - '*\outlook.exe' + SELECTION_3: + ImageLoaded: + - '*\kerberos.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Alerts on legitimate macro usage as well, will need to filter as appropriate +id: 7417e29e-c2e7-4cf6-a2e8-767228c64837 +level: high +logsource: + category: image_load + product: windows +modified: 2020/08/23 +references: +- https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16 +status: experimental +tags: +- attack.execution +- attack.t1204 +- attack.t1204.002 diff --git a/rules/sigma/windows/image_load/sysmon_susp_python_image_load.yml b/rules/sigma/windows/image_load/sysmon_susp_python_image_load.yml new file mode 100644 index 00000000..f92ee9e2 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_susp_python_image_load.yml @@ -0,0 +1,29 @@ + +title: Python Py2Exe Image Load +author: Patrick St. John, OTR (Open Threat Research) +date: 2020/05/03 +description: Detects the image load of Python Core indicative of a Python script bundled + with Py2Exe. +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Description: Python Core + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legit Py2Exe Binaries +fields: +- Description +id: cbb56d62-4060-40f7-9466-d8aaf3123f83 +level: medium +logsource: + category: image_load + product: windows +modified: 2021/05/12 +references: +- https://www.py2exe.org/ +- https://unit42.paloaltonetworks.com/unit-42-technical-analysis-seaduke/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1027.002 diff --git a/rules/sigma/windows/image_load/sysmon_susp_script_dotnet_clr_dll_load.yml b/rules/sigma/windows/image_load/sysmon_susp_script_dotnet_clr_dll_load.yml new file mode 100644 index 00000000..faff2405 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_susp_script_dotnet_clr_dll_load.yml @@ -0,0 +1,35 @@ + +title: CLR DLL Loaded Via Scripting Applications +author: omkar72, oscd.community +date: 2020/10/14 +description: Detects CLR DLL being loaded by an scripting applications +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: + - '*\wscript.exe' + - '*\cscript.exe' + - '*\mshta.exe' + SELECTION_3: + ImageLoaded: + - '*\clr.dll' + - '*\mscoree.dll' + - '*\mscorlib.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- unknown +id: 4508a70e-97ef-4300-b62b-ff27992990ea +level: high +logsource: + category: image_load + product: windows +references: +- https://github.com/tyranid/DotNetToJScript +- https://thewover.github.io/Introducing-Donut/ +- https://blog.menasec.net/2019/07/interesting-difr-traces-of-net-clr.html +status: experimental +tags: +- attack.execution +- attack.privilege_escalation +- attack.t1055 diff --git a/rules/sigma/windows/image_load/sysmon_susp_system_drawing_load.yml b/rules/sigma/windows/image_load/sysmon_susp_system_drawing_load.yml new file mode 100644 index 00000000..0dbc9ee1 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_susp_system_drawing_load.yml @@ -0,0 +1,28 @@ + +title: Suspicious System.Drawing Load +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/05/02 +description: A General detection for processes loading System.Drawing.ni.dll. This + could be an indicator of potential Screen Capture. +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + ImageLoaded: '*\System.Drawing.ni.dll' + SELECTION_3: + Image: '*\WmiPrvSE.exe' + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- unknown +id: 666ecfc7-229d-42b8-821e-1a8f8cb7057c +level: medium +logsource: + category: image_load + product: windows +references: +- https://github.com/OTRF/detection-hackathon-apt29/issues/16 +- https://threathunterplaybook.com/evals/apt29/detections/7.A.1_3B4E5808-3C71-406A-B181-17B0CE3178C9.html +status: experimental +tags: +- attack.collection +- attack.t1113 diff --git a/rules/sigma/windows/image_load/sysmon_susp_winword_vbadll_load.yml b/rules/sigma/windows/image_load/sysmon_susp_winword_vbadll_load.yml new file mode 100644 index 00000000..945e6be0 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_susp_winword_vbadll_load.yml @@ -0,0 +1,35 @@ + +title: VBA DLL Loaded Via Microsoft Word +author: Antonlovesdnb +date: 2020/02/19 +description: Detects DLL's Loaded Via Word Containing VBA Macros +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: + - '*\winword.exe' + - '*\powerpnt.exe' + - '*\excel.exe' + - '*\outlook.exe' + SELECTION_3: + ImageLoaded: + - '*\VBE7.DLL' + - '*\VBEUI.DLL' + - '*\VBE7INTL.DLL' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Alerts on legitimate macro usage as well, will need to filter as appropriate +id: e6ce8457-68b1-485b-9bdd-3c2b5d679aa9 +level: high +logsource: + category: image_load + product: windows +modified: 2020/08/23 +references: +- https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16 +status: experimental +tags: +- attack.execution +- attack.t1204 +- attack.t1204.002 diff --git a/rules/sigma/windows/image_load/sysmon_susp_winword_wmidll_load.yml b/rules/sigma/windows/image_load/sysmon_susp_winword_wmidll_load.yml new file mode 100644 index 00000000..f74c63d2 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_susp_winword_wmidll_load.yml @@ -0,0 +1,37 @@ + +title: Windows Management Instrumentation DLL Loaded Via Microsoft Word +author: Michael R. (@nahamike01) +date: 2019/12/26 +description: Detects DLL's Loaded Via Word Containing VBA Macros Executing WMI Commands +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: + - '*\winword.exe' + - '*\powerpnt.exe' + - '*\excel.exe' + - '*\outlook.exe' + SELECTION_3: + ImageLoaded: + - '*\wmiutils.dll' + - '*\wbemcomn.dll' + - '*\wbemprox.dll' + - '*\wbemdisp.dll' + - '*\wbemsvc.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Possible. Requires further testing. +id: a457f232-7df9-491d-898f-b5aabd2cbe2f +level: high +logsource: + category: image_load + product: windows +references: +- https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16 +- https://www.carbonblack.com/2019/04/24/cb-tau-threat-intelligence-notification-emotet-utilizing-wmi-to-launch-powershell-encoded-code/ +- https://media.cert.europa.eu/static/SecurityAdvisories/2019/CERT-EU-SA2019-021.pdf +status: experimental +tags: +- attack.execution +- attack.t1047 diff --git a/rules/sigma/windows/image_load/sysmon_suspicious_dbghelp_dbgcore_load.yml b/rules/sigma/windows/image_load/sysmon_suspicious_dbghelp_dbgcore_load.yml new file mode 100644 index 00000000..78fe68a3 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_suspicious_dbghelp_dbgcore_load.yml @@ -0,0 +1,73 @@ + +title: Load of dbghelp/dbgcore DLL from Suspicious Process +author: Perez Diego (@darkquassar), oscd.community, Ecco +date: 2019/10/27 +description: Detects the load of dbghelp/dbgcore DLL (used to make memory dumps) by + suspicious processes. Tools like ProcessHacker and some attacker tradecract use + MiniDumpWriteDump API found in dbghelp.dll or dbgcore.dll. As an example, SilentTrynity + C2 Framework has a module that leverages this API to dump the contents of Lsass.exe + and transfer it over the network back to the attacker's machine. +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + ImageLoaded: + - '*\dbghelp.dll' + - '*\dbgcore.dll' + SELECTION_3: + Image: + - '*\msbuild.exe' + - '*\cmd.exe' + - '*\svchost.exe' + - '*\rundll32.exe' + - '*\powershell.exe' + - '*\word.exe' + - '*\excel.exe' + - '*\powerpnt.exe' + - '*\outlook.exe' + - '*\monitoringhost.exe' + - '*\wmic.exe' + - '*\bash.exe' + - '*\wscript.exe' + - '*\cscript.exe' + - '*\mshta.exe' + - '*\regsvr32.exe' + - '*\schtasks.exe' + - '*\dnx.exe' + - '*\regsvcs.exe' + - '*\sc.exe' + - '*\scriptrunner.exe' + SELECTION_4: + Image: '*Visual Studio*' + SELECTION_5: + ImageLoaded: + - '*\dbghelp.dll' + - '*\dbgcore.dll' + SELECTION_6: + Signed: 'FALSE' + SELECTION_7: + Image: '*Visual Studio*' + condition: (SELECTION_1 and (((SELECTION_2 and SELECTION_3) and not (SELECTION_4)) + or ((SELECTION_5 and SELECTION_6) and not (SELECTION_7)))) +falsepositives: +- Penetration tests +fields: +- ComputerName +- User +- Image +- ImageLoaded +id: 0e277796-5f23-4e49-a490-483131d4f6e1 +level: high +logsource: + category: image_load + product: windows +modified: 2020/08/23 +references: +- https://docs.microsoft.com/en-us/windows/win32/api/minidumpapiset/nf-minidumpapiset-minidumpwritedump +- https://www.pinvoke.net/default.aspx/dbghelp/MiniDumpWriteDump.html +- https://medium.com/@fsx30/bypass-edrs-memory-protection-introduction-to-hooking-2efb21acffd6 +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.001 diff --git a/rules/sigma/windows/image_load/sysmon_svchost_dll_search_order_hijack.yml b/rules/sigma/windows/image_load/sysmon_svchost_dll_search_order_hijack.yml new file mode 100644 index 00000000..c21bce53 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_svchost_dll_search_order_hijack.yml @@ -0,0 +1,42 @@ + +title: Svchost DLL Search Order Hijack +author: SBousseaden +date: 2019/10/28 +description: IKEEXT and SessionEnv service, as they call LoadLibrary on files that + do not exist within C:\Windows\System32\ by default. An attacker can place their + malicious logic within the PROCESS_ATTACH block of their library and restart the + aforementioned services "svchost.exe -k netsvcs" to gain code execution on a remote + machine. +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: + - '*\svchost.exe' + SELECTION_3: + ImageLoaded: + - '*\tsmsisrv.dll' + - '*\tsvipsrv.dll' + - '*\wlbsctrl.dll' + SELECTION_4: + ImageLoaded: + - C:\Windows\WinSxS\\* + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Pentest +id: 602a1f13-c640-4d73-b053-be9a2fa58b77 +level: high +logsource: + category: image_load + product: windows +modified: 2020/08/23 +references: +- https://posts.specterops.io/lateral-movement-scm-and-dll-hijacking-primer-d2f61e8ab992 +status: experimental +tags: +- attack.persistence +- attack.defense_evasion +- attack.t1073 +- attack.t1574.002 +- attack.t1038 +- attack.t1574.001 diff --git a/rules/sigma/windows/image_load/sysmon_tttracer_mod_load.yml b/rules/sigma/windows/image_load/sysmon_tttracer_mod_load.yml new file mode 100644 index 00000000..0c26cf85 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_tttracer_mod_load.yml @@ -0,0 +1,33 @@ + +title: Time Travel Debugging Utility Usage +author: Ensar Şamil, @sblmsrsn, @oscd_initiative +date: 2020/10/06 +description: Detects usage of Time Travel Debugging Utility. Adversaries can execute + malicious processes and dump processes, such as lsass.exe, via tttracer.exe. +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + ImageLoaded: + - '*\ttdrecord.dll' + - '*\ttdwriter.dll' + - '*\ttdloader.dll' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate usage by software developers/testers +id: e76c8240-d68f-4773-8880-5c6f63595aaf +level: high +logsource: + category: image_load + product: windows +modified: 2021/09/21 +references: +- https://lolbas-project.github.io/lolbas/Binaries/Tttracer/ +- https://twitter.com/mattifestation/status/1196390321783025666 +- https://twitter.com/oulusoyum/status/1191329746069655553 +status: experimental +tags: +- attack.defense_evasion +- attack.credential_access +- attack.t1218 +- attack.t1003.001 diff --git a/rules/sigma/windows/image_load/sysmon_uac_bypass_via_dism.yml b/rules/sigma/windows/image_load/sysmon_uac_bypass_via_dism.yml new file mode 100644 index 00000000..086be58e --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_uac_bypass_via_dism.yml @@ -0,0 +1,32 @@ + +title: UAC Bypass With Fake DLL +author: oscd.community, Dmitry Uchakin +date: 2020/10/06 +description: Attempts to load dismcore.dll after dropping it +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: + - '*\dism.exe' + SELECTION_3: + ImageLoaded: + - '*\dismcore.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Pentests +- Actions of a legitimate telnet client +id: a5ea83a7-05a5-44c1-be2e-addccbbd8c03 +level: high +logsource: + category: image_load + product: windows +references: +- https://steemit.com/utopian-io/@ah101/uac-bypassing-utility +status: experimental +tags: +- attack.persistence +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1548.002 +- attack.t1574.002 diff --git a/rules/sigma/windows/image_load/sysmon_uipromptforcreds_dlls.yml b/rules/sigma/windows/image_load/sysmon_uipromptforcreds_dlls.yml new file mode 100644 index 00000000..36cb7da3 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_uipromptforcreds_dlls.yml @@ -0,0 +1,34 @@ + +title: UIPromptForCredentials DLLs +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/10/20 +description: Detects potential use of UIPromptForCredentials functions by looking + for some of the DLLs needed for it. +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + ImageLoaded: + - '*\credui.dll' + - '*\wincredui.dll' + SELECTION_3: + OriginalFileName: + - credui.dll + - wincredui.dll + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3)) +falsepositives: +- other legitimate processes loading those DLLs in your environment. +id: 9ae01559-cf7e-4f8e-8e14-4c290a1b4784 +level: medium +logsource: + category: image_load + product: windows +references: +- https://securitydatasets.com/notebooks/small/windows/06_credential_access/SDWIN-201020013208.html +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1056.002/T1056.002.md#atomic-test-2---powershell---prompt-user-for-password +- https://docs.microsoft.com/en-us/windows/win32/api/wincred/nf-wincred-creduipromptforcredentialsa +status: experimental +tags: +- attack.credential_access +- attack.collection +- attack.t1056.002 diff --git a/rules/sigma/windows/image_load/sysmon_unsigned_image_loaded_into_lsass.yml b/rules/sigma/windows/image_load/sysmon_unsigned_image_loaded_into_lsass.yml new file mode 100644 index 00000000..c4bc888e --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_unsigned_image_loaded_into_lsass.yml @@ -0,0 +1,28 @@ + +title: Unsigned Image Loaded Into LSASS Process +author: Teymur Kheirkhabarov, oscd.community +date: 2019/10/22 +description: Loading unsigned image (DLL, EXE) into LSASS process +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: '*\lsass.exe' + SELECTION_3: + Signed: 'false' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Valid user connecting using RDP +id: 857c8db3-c89b-42fb-882b-f681c7cf4da2 +level: medium +logsource: + category: image_load + product: windows +modified: 2020/08/23 +references: +- https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.001 diff --git a/rules/sigma/windows/image_load/sysmon_wmi_module_load.yml b/rules/sigma/windows/image_load/sysmon_wmi_module_load.yml new file mode 100644 index 00000000..e2e25a11 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_wmi_module_load.yml @@ -0,0 +1,52 @@ + +title: WMI Modules Loaded +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/08/10 +description: Detects non wmiprvse loading WMI modules +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + ImageLoaded: + - '*\wmiclnt.dll' + - '*\WmiApRpl.dll' + - '*\wmiprov.dll' + - '*\wmiutils.dll' + - '*\wbemcomn.dll' + - '*\wbemprox.dll' + - '*\WMINet_Utils.dll' + - '*\wbemsvc.dll' + - '*\fastprox.dll' + SELECTION_3: + Image: + - '*\WmiPrvSE.exe' + - '*\WmiApSrv.exe' + - '*\svchost.exe' + - '*\DeviceCensus.exe' + - '*\CompatTelRunner.exe' + - '*\sdiagnhost.exe' + - '*\SIHClient.exe' + - '*\ngentask.exe' + - '*\windows\system32\taskhostw.exe' + - '*\windows\system32\MoUsoCoreWorker.exe' + - '*\windows\system32\wbem\WMIADAP.exe' + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- Unknown +fields: +- ComputerName +- User +- Image +- ImageLoaded +id: 671bb7e3-a020-4824-a00e-2ee5b55f385e +level: high +logsource: + category: image_load + product: windows +modified: 2021/08/18 +references: +- https://threathunterplaybook.com/notebooks/windows/02_execution/WIN-190811201010.html +status: experimental +tags: +- attack.execution +- attack.t1047 diff --git a/rules/sigma/windows/image_load/sysmon_wmi_persistence_commandline_event_consumer.yml b/rules/sigma/windows/image_load/sysmon_wmi_persistence_commandline_event_consumer.yml new file mode 100644 index 00000000..eaa26ec9 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_wmi_persistence_commandline_event_consumer.yml @@ -0,0 +1,28 @@ + +title: WMI Persistence - Command Line Event Consumer +author: Thomas Patzke +date: 2018/03/07 +description: Detects WMI command line event consumers +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: C:\Windows\System32\wbem\WmiPrvSE.exe + SELECTION_3: + ImageLoaded: '*\wbemcons.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown (data set is too small; further testing needed) +id: 05936ce2-ee05-4dae-9d03-9a391cf2d2c6 +level: high +logsource: + category: image_load + product: windows +modified: 2020/08/23 +references: +- https://www.eideon.com/2018-03-02-THL03-WMIBackdoors/ +status: experimental +tags: +- attack.t1084 +- attack.t1546.003 +- attack.persistence diff --git a/rules/sigma/windows/image_load/sysmon_wmic_remote_xsl_scripting_dlls.yml b/rules/sigma/windows/image_load/sysmon_wmic_remote_xsl_scripting_dlls.yml new file mode 100644 index 00000000..1c04b346 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_wmic_remote_xsl_scripting_dlls.yml @@ -0,0 +1,32 @@ + +title: WMIC Loading Scripting Libraries +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/10/17 +description: Detects threat actors proxy executing code and bypassing application + controls by leveraging wmic and the `/FORMAT` argument switch to download and execute + an XSL file (i.e js, vbs, etc). +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: '*\wmic.exe' + SELECTION_3: + ImageLoaded: + - '*\jscript.dll' + - '*\vbscript.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Apparently, wmic os get lastboottuptime loads vbscript.dll +id: 06ce37c2-61ab-4f05-9ff5-b1a96d18ae32 +level: high +logsource: + category: image_load + product: windows +references: +- https://securitydatasets.com/notebooks/small/windows/05_defense_evasion/SDWIN-201017061100.html +- https://twitter.com/dez_/status/986614411711442944 +- https://lolbas-project.github.io/lolbas/Binaries/Wmic/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1220 diff --git a/rules/sigma/windows/image_load/sysmon_wsman_provider_image_load.yml b/rules/sigma/windows/image_load/sysmon_wsman_provider_image_load.yml new file mode 100644 index 00000000..439e60f7 --- /dev/null +++ b/rules/sigma/windows/image_load/sysmon_wsman_provider_image_load.yml @@ -0,0 +1,47 @@ + +title: Suspicious WSMAN Provider Image Loads +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/06/24 +description: Detects signs of potential use of the WSMAN provider from uncommon processes + locally and remote execution. +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + EventID: 7 + SELECTION_3: + ImageLoaded: + - '*\WsmSvc.dll' + - '*\WsmAuto.dll' + - '*\Microsoft.WSMan.Management.ni.dll' + SELECTION_4: + OriginalFileName: + - WsmSvc.dll + - WSMANAUTOMATION.DLL + - Microsoft.WSMan.Management.dll + SELECTION_5: + Image: '*\powershell.exe' + SELECTION_6: + Image: '*\svchost.exe' + SELECTION_7: + OriginalFileName: WsmWmiPl.dll + condition: (SELECTION_1 and ((SELECTION_2 and (SELECTION_3 or SELECTION_4) and not + (SELECTION_5)) or (SELECTION_6 and SELECTION_7))) +falsepositives: +- Unknown +id: ad1f4bb9-8dfb-4765-adb6-2a7cfb6c0f94 +level: medium +logsource: + category: image_load + product: windows +references: +- https://twitter.com/chadtilbury/status/1275851297770610688 +- https://bohops.com/2020/05/12/ws-management-com-another-approach-for-winrm-lateral-movement/ +- https://docs.microsoft.com/en-us/windows/win32/winrm/windows-remote-management-architecture +- https://github.com/bohops/WSMan-WinRM +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.lateral_movement +- attack.t1021.003 diff --git a/rules/sigma/windows/image_load/win_susp_svchost_clfsw32.yml b/rules/sigma/windows/image_load/win_susp_svchost_clfsw32.yml new file mode 100644 index 00000000..227d4579 --- /dev/null +++ b/rules/sigma/windows/image_load/win_susp_svchost_clfsw32.yml @@ -0,0 +1,24 @@ + +title: APT PRIVATELOG Image Load Pattern +author: Florian Roth +date: 2021/09/07 +description: Detects an image load pattern as seen when a tool named PRIVATELOG is + used and rarely observed under legitimate circumstances +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + Image: '*\svchost.exe' + SELECTION_3: + ImageLoaded: '*\clfsw32.dll' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Rarely observed +id: 33a2d1dd-f3b0-40bd-8baf-7974468927cc +level: high +logsource: + category: image_load + product: windows +references: +- https://www.fireeye.com/blog/threat-research/2021/09/unknown-actor-using-clfs-log-files-for-stealth.html +status: experimental diff --git a/rules/sigma/windows/image_load/win_suspicious_vss_ps_load.yml b/rules/sigma/windows/image_load/win_suspicious_vss_ps_load.yml new file mode 100644 index 00000000..2d98af3f --- /dev/null +++ b/rules/sigma/windows/image_load/win_suspicious_vss_ps_load.yml @@ -0,0 +1,42 @@ + +title: Image Load of VSS_PS.dll by Uncommon Executable +author: Markus Neis, @markus_neis +date: 2021/07/07 +description: Detects the image load of vss_ps.dll by uncommon executables using OriginalFileName + datapoint +detection: + SELECTION_1: + EventID: 7 + SELECTION_2: + ImageLoaded: + - '*\vss_ps.dll' + SELECTION_3: + Image: + - '*\svchost.exe' + - '*\msiexec.exe' + - '*\vssvc.exe' + - '*\srtasks.exe' + - '*\tiworker.exe' + - '*\dllhost.exe' + - '*\searchindexer.exe' + - '*dismhost.exe' + - '*taskhostw.exe' + - '*\clussvc.exe' + SELECTION_4: + Image: '*c:\windows\\*' + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3 and SELECTION_4)) +falsepositives: +- unknown +id: 333cdbe8-27bb-4246-bf82-b41a0dca4b70 +level: high +logsource: + category: image_load + product: windows +references: +- 1bd85e1caa1415ebdc8852c91e37bbb7 +- https://twitter.com/am0nsec/status/1412232114980982787 +status: experimental +tags: +- attack.defense_evasion +- attack.impact +- attack.t1490 diff --git a/rules/sigma/windows/malware/av_exploiting.yml b/rules/sigma/windows/malware/av_exploiting.yml new file mode 100644 index 00000000..5a9cd9ba --- /dev/null +++ b/rules/sigma/windows/malware/av_exploiting.yml @@ -0,0 +1,40 @@ + +title: Antivirus Exploitation Framework Detection +author: Florian Roth +date: 2018/09/09 +description: Detects a highly relevant Antivirus alert that reports an exploitation + framework +detection: + SELECTION_1: + Signature: + - '*MeteTool*' + - '*MPreter*' + - '*Meterpreter*' + - '*Metasploit*' + - '*PowerSploit*' + - '*CobaltSrike*' + - '*Swrort*' + - '*Rozena*' + - '*Backdoor.Cobalt*' + - '*CobaltStr*' + - '*COBEACON*' + - '*Cometer*' + - '*Razy*' + condition: SELECTION_1 +falsepositives: +- Unlikely +fields: +- FileName +- User +id: 238527ad-3c2c-4e4f-a1f6-92fd63adb864 +level: critical +logsource: + product: antivirus +modified: 2019/01/16 +references: +- https://www.nextron-systems.com/2018/09/08/antivirus-event-analysis-cheat-sheet-v1-4/ +tags: +- attack.execution +- attack.t1203 +- attack.command_and_control +- attack.t1219 diff --git a/rules/sigma/windows/malware/av_hacktool.yml b/rules/sigma/windows/malware/av_hacktool.yml new file mode 100644 index 00000000..c86cbf79 --- /dev/null +++ b/rules/sigma/windows/malware/av_hacktool.yml @@ -0,0 +1,30 @@ + +title: Antivirus Hacktool Detection +author: Florian Roth +date: 2021/08/16 +description: Detects a highly relevant Antivirus alert that reports a hack tool or + other attack tool +detection: + SELECTION_1: + Signature: + - HTOOL* + - HKTL* + - SecurityTool* + - ATK/* + SELECTION_2: + Signature: + - '*Hacktool*' + condition: (SELECTION_1 or SELECTION_2) +falsepositives: +- Unlikely +fields: +- FileName +- User +id: fa0c05b6-8ad3-468d-8231-c1cbccb64fba +level: high +logsource: + product: antivirus +references: +- https://www.nextron-systems.com/2021/08/16/antivirus-event-analysis-cheat-sheet-v1-8-2/ +tags: +- attack.execution diff --git a/rules/sigma/windows/malware/av_password_dumper.yml b/rules/sigma/windows/malware/av_password_dumper.yml new file mode 100644 index 00000000..df07970c --- /dev/null +++ b/rules/sigma/windows/malware/av_password_dumper.yml @@ -0,0 +1,40 @@ + +title: Antivirus Password Dumper Detection +author: Florian Roth +date: 2018/09/09 +description: Detects a highly relevant Antivirus alert that reports a password dumper +detection: + SELECTION_1: + Signature: + - '*DumpCreds*' + - '*Mimikatz*' + - '*PWCrack*' + - '*HTool/WCE*' + - '*PSWtool*' + - '*PWDump*' + - '*SecurityTool*' + - '*PShlSpy*' + - '*Rubeus*' + - '*Kekeo*' + - '*LsassDump*' + - '*Outflank*' + condition: SELECTION_1 +falsepositives: +- Unlikely +fields: +- FileName +- User +id: 78cc2dd2-7d20-4d32-93ff-057084c38b93 +level: critical +logsource: + product: antivirus +modified: 2019/10/04 +references: +- https://www.nextron-systems.com/2018/09/08/antivirus-event-analysis-cheat-sheet-v1-4/ +- https://www.virustotal.com/gui/file/5fcda49ee7f202559a6cbbb34edb65c33c9a1e0bde9fa2af06a6f11b55ded619/detection +tags: +- attack.credential_access +- attack.t1003 +- attack.t1558 +- attack.t1003.001 +- attack.t1003.002 diff --git a/rules/sigma/windows/malware/av_printernightmare_cve_2021_34527.yml b/rules/sigma/windows/malware/av_printernightmare_cve_2021_34527.yml new file mode 100644 index 00000000..676fcd5e --- /dev/null +++ b/rules/sigma/windows/malware/av_printernightmare_cve_2021_34527.yml @@ -0,0 +1,29 @@ + +title: Antivirus PrinterNightmare CVE-2021-34527 Exploit Detection +author: Sittikorn S, Nuttakorn T +date: 2021/07/01 +description: Detects the suspicious file that is created from PoC code against Windows + Print Spooler Remote Code Execution Vulnerability CVE-2021-34527 (PrinterNightmare), + CVE-2021-1675 . +detection: + SELECTION_1: + FileName: '*C:\Windows\System32\spool\drivers\x64\\*' + condition: SELECTION_1 +falsepositives: +- Unlikely +fields: +- Signature +- FileName +- ComputerName +id: 6fe1719e-ecdf-4caf-bffe-4f501cb0a561 +level: critical +logsource: + product: antivirus +references: +- https://twitter.com/mvelazco/status/1410291741241102338 +- https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-1675 +- https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-34527 +status: stable +tags: +- attack.privilege_escalation +- attack.t1055 diff --git a/rules/sigma/windows/malware/av_relevant_files.yml b/rules/sigma/windows/malware/av_relevant_files.yml new file mode 100644 index 00000000..21f2cee7 --- /dev/null +++ b/rules/sigma/windows/malware/av_relevant_files.yml @@ -0,0 +1,80 @@ + +title: Antivirus Relevant File Paths Alerts +author: Florian Roth, Arnim Rupp +date: 2018/09/09 +description: Detects an Antivirus alert in a highly relevant file path or with a relevant + file name +detection: + SELECTION_1: + FileName: + - C:\Windows\\* + - C:\Temp\\* + - C:\PerfLogs\\* + - C:\Users\Public\\* + - C:\Users\Default\\* + SELECTION_2: + FileName: + - '*\Client\\*' + - '*\tsclient\\*' + - '*\inetpub\\*' + - '*/www/*' + - '*apache*' + - '*tomcat*' + - '*nginx*' + - '*weblogic*' + SELECTION_3: + Filename: + - '*.ps1' + - '*.psm1' + - '*.vbs' + - '*.bat' + - '*.cmd' + - '*.sh' + - '*.chm' + - '*.xml' + - '*.txt' + - '*.jsp' + - '*.jspx' + - '*.asp' + - '*.aspx' + - '*.ashx' + - '*.asax' + - '*.asmx' + - '*.php' + - '*.cfm' + - '*.py' + - '*.pyc' + - '*.pl' + - '*.rb' + - '*.cgi' + - '*.war' + - '*.ear' + - '*.hta' + - '*.lnk' + - '*.scf' + - '*.sct' + - '*.vbe' + - '*.wsf' + - '*.wsh' + - '*.gif' + - '*.png' + - '*.jpg' + - '*.jpeg' + - '*.svg' + - '*.dat' + condition: (SELECTION_1 or SELECTION_2 or SELECTION_3) +falsepositives: +- Unlikely +fields: +- Signature +- User +id: c9a88268-0047-4824-ba6e-4d81ce0b907c +level: high +logsource: + product: antivirus +modified: 2021/05/09 +references: +- https://www.nextron-systems.com/2021/03/25/antivirus-event-analysis-cheat-sheet-v1-8/ +tags: +- attack.resource_development +- attack.t1588 diff --git a/rules/sigma/windows/malware/av_webshell.yml b/rules/sigma/windows/malware/av_webshell.yml new file mode 100644 index 00000000..87f22a1c --- /dev/null +++ b/rules/sigma/windows/malware/av_webshell.yml @@ -0,0 +1,78 @@ + +title: Antivirus Web Shell Detection +author: Florian Roth, Arnim Rupp +date: 2018/09/09 +description: Detects a highly relevant Antivirus alert that reports a web shell. It's + highly recommended to tune this rule to the specific strings used by your anti virus + solution by downloading a big webshell repo from e.g. github and checking the matches. +detection: + SELECTION_1: + Signature: + - PHP/* + - JSP/* + - ASP/* + - Perl/* + - PHP.* + - JSP.* + - ASP.* + - Perl.* + - VBS/Uxor* + - IIS/BackDoor* + - JAVA/Backdoor* + - Troj/ASP* + - Troj/PHP* + - Troj/JSP* + SELECTION_2: + Signature: + - '*Webshell*' + - '*Chopper*' + - '*SinoChoper*' + - '*ASPXSpy*' + - '*Aspdoor*' + - '*filebrowser*' + - '*PHP_*' + - '*JSP_*' + - '*ASP_*' + - '*PHP:*' + - '*JSP:*' + - '*ASP:*' + - '*Perl:*' + - '*PHPShell*' + - '*Trojan.PHP*' + - '*Trojan.ASP*' + - '*Trojan.JSP*' + - '*Trojan.VBS*' + - '*PHP?Agent*' + - '*ASP?Agent*' + - '*JSP?Agent*' + - '*VBS?Agent*' + - '*Backdoor?PHP*' + - '*Backdoor?JSP*' + - '*Backdoor?ASP*' + - '*Backdoor?VBS*' + - '*Backdoor?Java*' + condition: (SELECTION_1 or SELECTION_2) +falsepositives: +- Unlikely +fields: +- FileName +- User +id: fdf135a2-9241-4f96-a114-bb404948f736 +level: critical +logsource: + product: antivirus +modified: 2021/05/08 +references: +- https://www.nextron-systems.com/2021/03/25/antivirus-event-analysis-cheat-sheet-v1-8/ +- https://github.com/tennc/webshell +- https://www.virustotal.com/gui/file/bd1d52289203866645e556e2766a21d2275877fbafa056a76fe0cf884b7f8819/detection +- https://www.virustotal.com/gui/file/308487ed28a3d9abc1fec7ebc812d4b5c07ab025037535421f64c60d3887a3e8/detection +- https://www.virustotal.com/gui/file/7d3cb8a8ff28f82b07f382789247329ad2d7782a72dde9867941f13266310c80/detection +- https://www.virustotal.com/gui/file/e841675a4b82250c75273ebf0861245f80c6a1c3d5803c2d995d9d3b18d5c4b5/detection +- https://www.virustotal.com/gui/file/a80042c61a0372eaa0c2c1e831adf0d13ef09feaf71d1d20b216156269045801/detection +- https://www.virustotal.com/gui/file/b219f7d3c26f8bad7e175934cd5eda4ddb5e3983503e94ff07d39c0666821b7e/detection +- https://www.virustotal.com/gui/file/b8702acf32fd651af9f809ed42d15135f842788cd98d81a8e1b154ee2a2b76a2/detection +tags: +- attack.persistence +- attack.t1100 +- attack.t1505.003 diff --git a/rules/sigma/windows/malware/file_event_mal_octopus_scanner.yml b/rules/sigma/windows/malware/file_event_mal_octopus_scanner.yml new file mode 100644 index 00000000..9e9d151f --- /dev/null +++ b/rules/sigma/windows/malware/file_event_mal_octopus_scanner.yml @@ -0,0 +1,26 @@ + +title: Octopus Scanner Malware +author: NVISO +date: 2020/06/09 +description: Detects Octopus Scanner Malware. +detection: + SELECTION_1: + EventID: 11 + SELECTION_2: + TargetFilename: + - '*\AppData\Local\Microsoft\Cache134.dat' + - '*\AppData\Local\Microsoft\ExplorerSync.db' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 805c55d9-31e6-4846-9878-c34c75054fe9 +level: high +logsource: + category: file_event + product: windows +references: +- https://securitylab.github.com/research/octopus-scanner-malware-open-source-supply-chain +status: experimental +tags: +- attack.t1195 +- attack.t1195.001 diff --git a/rules/sigma/windows/malware/process_creation_mal_blue_mockingbird.yml b/rules/sigma/windows/malware/process_creation_mal_blue_mockingbird.yml new file mode 100644 index 00000000..c193a043 --- /dev/null +++ b/rules/sigma/windows/malware/process_creation_mal_blue_mockingbird.yml @@ -0,0 +1,38 @@ + +title: Blue Mockingbird +author: Trent Liffick (@tliffick) +date: 2020/05/14 +description: Attempts to detect system changes made by Blue Mockingbird +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\cmd.exe' + SELECTION_3: + CommandLine: '*sc config*' + SELECTION_4: + CommandLine: '*wercplsupporte.dll*' + SELECTION_5: + Image: '*\wmic.exe' + SELECTION_6: + CommandLine: '*COR_PROFILER' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3 and SELECTION_4) or (SELECTION_5 + and SELECTION_6))) +falsepositives: +- unknown +id: c3198a27-23a0-4c2c-af19-e5328d49680e +level: high +logsource: + category: process_creation + product: windows +modified: 2021/09/11 +references: +- https://redcanary.com/blog/blue-mockingbird-cryptominer/ +related: +- id: ce239692-aa94-41b3-b32f-9cab259c96ea + type: merged +status: experimental +tags: +- attack.execution +- attack.t1112 +- attack.t1047 diff --git a/rules/sigma/windows/malware/process_creation_mal_darkside_ransomware.yml b/rules/sigma/windows/malware/process_creation_mal_darkside_ransomware.yml new file mode 100644 index 00000000..972dd8c1 --- /dev/null +++ b/rules/sigma/windows/malware/process_creation_mal_darkside_ransomware.yml @@ -0,0 +1,35 @@ + +title: DarkSide Ransomware Pattern +author: Florian Roth +date: 2021/05/14 +description: Detects DarkSide Ransomware and helpers +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - "*=[char][byte]('0x'+*" + - '* -work worker0 -path *' + SELECTION_3: + ParentCommandLine: + - '*DllHost.exe /Processid:{3E5FC7F9-9A51-4367-9063-A120244FBEC7}*' + SELECTION_4: + Image: + - '*\AppData\Local\Temp\\*' + condition: (SELECTION_1 and (SELECTION_2 or (SELECTION_3 and SELECTION_4))) +falsepositives: +- Unknown +- UAC bypass method used by other malware +id: 965fff6c-1d7e-4e25-91fd-cdccd75f7d2c +level: critical +logsource: + category: process_creation + product: windows +references: +- https://www.fireeye.com/blog/threat-research/2021/05/shining-a-light-on-darkside-ransomware-operations.html +- https://app.any.run/tasks/8b9a571b-bcc1-4783-ba32-df4ba623b9c0/ +- https://www.joesandbox.com/analysis/411752/0/html#7048BB9A06B8F2DD9D24C77F389D7B2B58D2 +status: experimental +tags: +- attack.execution +- attack.t1204 diff --git a/rules/sigma/windows/malware/process_creation_mal_lockergoga_ransomware.yml b/rules/sigma/windows/malware/process_creation_mal_lockergoga_ransomware.yml new file mode 100644 index 00000000..efe7aeb7 --- /dev/null +++ b/rules/sigma/windows/malware/process_creation_mal_lockergoga_ransomware.yml @@ -0,0 +1,26 @@ + +title: LockerGoga Ransomware +author: Vasiliy Burov, oscd.community +date: 2020/10/18 +description: Detects LockerGoga Ransomware command line. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*-i SM-tgytutrc -s*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unlikely +id: 74db3488-fd28-480a-95aa-b7af626de068 +level: critical +logsource: + category: process_creation + product: windows +references: +- https://medium.com/@malwaredancer/lockergoga-input-arguments-ipc-communication-and-others-bd4e5a7ba80a +- https://blog.f-secure.com/analysis-of-lockergoga-ransomware/ +- https://www.carbonblack.com/blog/tau-threat-intelligence-notification-lockergoga-ransomware/ +status: experimental +tags: +- attack.impact +- attack.t1486 diff --git a/rules/sigma/windows/malware/process_creation_mal_ryuk.yml b/rules/sigma/windows/malware/process_creation_mal_ryuk.yml new file mode 100644 index 00000000..0a388e82 --- /dev/null +++ b/rules/sigma/windows/malware/process_creation_mal_ryuk.yml @@ -0,0 +1,33 @@ + +title: Ryuk Ransomware +author: Vasiliy Burov +date: 2019/08/06 +description: Detects Ryuk Ransomware command lines +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: + - '*\net.exe' + - '*\net1.exe' + SELECTION_3: + CommandLine: '*stop*' + SELECTION_4: + CommandLine: + - '*samss*' + - '*audioendpointbuilder*' + - '*unistoresvc_?????*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unlikely +id: 0acaad27-9f02-4136-a243-c357202edd74 +level: critical +logsource: + category: process_creation + product: windows +references: +- https://research.checkpoint.com/ryuk-ransomware-targeted-campaign-break/ +status: experimental +tags: +- attack.execution +- attack.t1204 diff --git a/rules/sigma/windows/malware/registry_event_mal_azorult.yml b/rules/sigma/windows/malware/registry_event_mal_azorult.yml new file mode 100644 index 00000000..ad726d65 --- /dev/null +++ b/rules/sigma/windows/malware/registry_event_mal_azorult.yml @@ -0,0 +1,39 @@ + +title: Registry Entries For Azorult Malware +author: Trent Liffick +date: 2020/05/08 +description: Detects the presence of a registry key created during Azorult execution +detection: + SELECTION_1: + EventID: 12 + SELECTION_2: + EventID: 13 + SELECTION_3: + EventID: 14 + SELECTION_4: + EventID: 12 + SELECTION_5: + EventID: 13 + SELECTION_6: + TargetObject: '*SYSTEM\\*' + SELECTION_7: + TargetObject: '*\services\localNETService' + condition: ((SELECTION_1 or SELECTION_2 or SELECTION_3) and (SELECTION_4 or SELECTION_5) + and SELECTION_6 and SELECTION_7) +falsepositives: +- unknown +fields: +- Image +- TargetObject +- TargetDetails +id: f7f9ab88-7557-4a69-b30e-0a8f91b3a0e7 +level: critical +logsource: + category: registry_event + product: windows +references: +- https://www.trendmicro.com/vinfo/us/threat-encyclopedia/malware/trojan.win32.azoruit.a +status: experimental +tags: +- attack.execution +- attack.t1112 diff --git a/rules/sigma/windows/malware/registry_event_mal_blue_mockingbird.yml b/rules/sigma/windows/malware/registry_event_mal_blue_mockingbird.yml new file mode 100644 index 00000000..0c355ce1 --- /dev/null +++ b/rules/sigma/windows/malware/registry_event_mal_blue_mockingbird.yml @@ -0,0 +1,33 @@ + +title: Blue Mockingbird +author: Trent Liffick (@tliffick) +date: 2020/05/14 +description: Attempts to detect system changes made by Blue Mockingbird +detection: + SELECTION_1: + EventID: 12 + SELECTION_2: + EventID: 13 + SELECTION_3: + EventID: 14 + SELECTION_4: + TargetObject: '*\CurrentControlSet\Services\wercplsupport\Parameters\ServiceDll' + condition: ((SELECTION_1 or SELECTION_2 or SELECTION_3) and SELECTION_4) +falsepositives: +- unknown +id: 92b0b372-a939-44ed-a11b-5136cf680e27 +level: high +logsource: + category: registry_event + product: windows +modified: 2021/09/11 +references: +- https://redcanary.com/blog/blue-mockingbird-cryptominer/ +related: +- id: c3198a27-23a0-4c2c-af19-e5328d49680e + type: derived +status: experimental +tags: +- attack.execution +- attack.t1112 +- attack.t1047 diff --git a/rules/sigma/windows/malware/registry_event_mal_flowcloud.yml b/rules/sigma/windows/malware/registry_event_mal_flowcloud.yml new file mode 100644 index 00000000..db1beb5e --- /dev/null +++ b/rules/sigma/windows/malware/registry_event_mal_flowcloud.yml @@ -0,0 +1,35 @@ + +title: FlowCloud Malware +author: NVISO +date: 2020/06/09 +description: Detects FlowCloud malware from threat group TA410. +detection: + SELECTION_1: + EventID: 12 + SELECTION_2: + EventID: 13 + SELECTION_3: + EventID: 14 + SELECTION_4: + TargetObject: + - HKLM\HARDWARE\{804423C2-F490-4ac3-BFA5-13DEDE63A71A} + - HKLM\HARDWARE\{A5124AF5-DF23-49bf-B0ED-A18ED3DEA027} + - HKLM\HARDWARE\{2DB80286-1784-48b5-A751-B6ED1F490303} + SELECTION_5: + TargetObject: + - HKLM\SYSTEM\Setup\PrintResponsor\\* + condition: ((SELECTION_1 or SELECTION_2 or SELECTION_3) and (SELECTION_4 or SELECTION_5)) +falsepositives: +- Unknown +id: 5118765f-6657-4ddb-a487-d7bd673abbf1 +level: critical +logsource: + category: registry_event + product: windows +modified: 2021/07/22 +references: +- https://www.proofpoint.com/us/blog/threat-insight/ta410-group-behind-lookback-attacks-against-us-utilities-sector-returns-new +status: experimental +tags: +- attack.persistence +- attack.t1112 diff --git a/rules/sigma/windows/malware/registry_event_mal_ursnif.yml b/rules/sigma/windows/malware/registry_event_mal_ursnif.yml new file mode 100644 index 00000000..7d6ef855 --- /dev/null +++ b/rules/sigma/windows/malware/registry_event_mal_ursnif.yml @@ -0,0 +1,29 @@ + +title: Ursnif +author: megan201296 +date: 2019/02/13 +description: Detects new registry key created by Ursnif malware. +detection: + SELECTION_1: + EventID: 12 + SELECTION_2: + EventID: 13 + SELECTION_3: + EventID: 14 + SELECTION_4: + TargetObject: '*\Software\AppDataLow\Software\Microsoft\\*' + condition: ((SELECTION_1 or SELECTION_2 or SELECTION_3) and SELECTION_4) +falsepositives: +- Unknown +id: 21f17060-b282-4249-ade0-589ea3591558 +level: critical +logsource: + category: registry_event + product: windows +references: +- https://blog.yoroi.company/research/ursnif-long-live-the-steganography/ +- https://blog.trendmicro.com/trendlabs-security-intelligence/phishing-campaign-uses-hijacked-emails-to-deliver-ursnif-by-replying-to-ongoing-threads/ +status: experimental +tags: +- attack.execution +- attack.t1112 diff --git a/rules/sigma/windows/network_connection/silenttrinity_stager_msbuild_activity.yml b/rules/sigma/windows/network_connection/silenttrinity_stager_msbuild_activity.yml new file mode 100644 index 00000000..fc2be913 --- /dev/null +++ b/rules/sigma/windows/network_connection/silenttrinity_stager_msbuild_activity.yml @@ -0,0 +1,30 @@ + +title: Silenttrinity Stager Msbuild Activity +author: Kiran kumar s, oscd.community +date: 2020/10/11 +description: Detects a possible remote connections to Silenttrinity c2 +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + ParentImage: '*\msbuild.exe' + SELECTION_3: + DestinationPort: + - '80' + - '443' + SELECTION_4: + Initiated: 'true' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- unknown +id: 50e54b8d-ad73-43f8-96a1-5191685b17a4 +level: high +logsource: + category: network_connection + product: windows +references: +- https://www.blackhillsinfosec.com/my-first-joyride-with-silenttrinity/ +status: experimental +tags: +- attack.execution +- attack.t1127.001 diff --git a/rules/sigma/windows/network_connection/sysmon_dllhost_net_connections.yml b/rules/sigma/windows/network_connection/sysmon_dllhost_net_connections.yml new file mode 100644 index 00000000..d8311bee --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_dllhost_net_connections.yml @@ -0,0 +1,52 @@ + +title: Dllhost Internet Connection +author: bartblaze +date: 2020/07/13 +description: Detects Dllhost that communicates with public IP addresses +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + Image: '*\dllhost.exe' + SELECTION_3: + Initiated: 'true' + SELECTION_4: + DestinationIp: + - 10.* + - 192.168.* + - 172.16.* + - 172.17.* + - 172.18.* + - 172.19.* + - 172.20.* + - 172.21.* + - 172.22.* + - 172.23.* + - 172.24.* + - 172.25.* + - 172.26.* + - 172.27.* + - 172.28.* + - 172.29.* + - 172.30.* + - 172.31.* + - 127.* + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Communication to other corporate systems that use IP addresses from public address + spaces +id: cfed2f44-16df-4bf3-833a-79405198b277 +level: medium +logsource: + category: network_connection + product: windows +modified: 2020/08/24 +references: +- https://github.com/Neo23x0/sigma/blob/master/rules/windows/network_connection/sysmon_rundll32_net_connections.yml +status: experimental +tags: +- attack.defense_evasion +- attack.t1218 +- attack.execution +- attack.t1559.001 +- attack.t1175 diff --git a/rules/sigma/windows/network_connection/sysmon_malware_backconnect_ports.yml b/rules/sigma/windows/network_connection/sysmon_malware_backconnect_ports.yml new file mode 100644 index 00000000..88f7e2a4 --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_malware_backconnect_ports.yml @@ -0,0 +1,110 @@ + +title: Suspicious Typical Malware Back Connect Ports +author: Florian Roth +date: 2017/03/19 +description: Detects programs that connect to typical malware back connect ports based + on statistical analysis from two different sandbox system databases +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + Initiated: 'true' + SELECTION_3: + DestinationPort: + - '4443' + - '2448' + - '8143' + - '1777' + - '1443' + - '243' + - '65535' + - '13506' + - '3360' + - '200' + - '198' + - '49180' + - '13507' + - '6625' + - '4444' + - '4438' + - '1904' + - '13505' + - '13504' + - '12102' + - '9631' + - '5445' + - '2443' + - '777' + - '13394' + - '13145' + - '12103' + - '5552' + - '3939' + - '3675' + - '666' + - '473' + - '5649' + - '4455' + - '4433' + - '1817' + - '100' + - '65520' + - '1960' + - '1515' + - '743' + - '700' + - '14154' + - '14103' + - '14102' + - '12322' + - '10101' + - '7210' + - '4040' + - '9943' + SELECTION_4: + EventID: 3 + SELECTION_5: + Image: '*\Program Files*' + SELECTION_6: + DestinationIp: + - 10.* + - 192.168.* + - 172.16.* + - 172.17.* + - 172.18.* + - 172.19.* + - 172.20.* + - 172.21.* + - 172.22.* + - 172.23.* + - 172.24.* + - 172.25.* + - 172.26.* + - 172.27.* + - 172.28.* + - 172.29.* + - 172.30.* + - 172.31.* + - 127.* + SELECTION_7: + DestinationIsIpv6: 'false' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not ((SELECTION_4 + and (SELECTION_5 or (SELECTION_6 and SELECTION_7))))) +falsepositives: +- unknown +id: 4b89abaa-99fe-4232-afdd-8f9aa4d20382 +level: medium +logsource: + category: network_connection + definition: 'Use the following config to generate the necessary Event ID 10 Process + Access events: VBE7.DLLUNKNOWN' + product: windows +modified: 2020/08/24 +references: +- https://docs.google.com/spreadsheets/d/17pSTDNpa0sf6pHeRhusvWG6rThciE8CsXTSlDUAZDyo +status: experimental +tags: +- attack.command_and_control +- attack.t1571 +- attack.t1043 diff --git a/rules/sigma/windows/network_connection/sysmon_notepad_network_connection.yml b/rules/sigma/windows/network_connection/sysmon_notepad_network_connection.yml new file mode 100644 index 00000000..a3b04bc1 --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_notepad_network_connection.yml @@ -0,0 +1,30 @@ + +title: Notepad Making Network Connection +author: EagleEye Team +date: 2020/05/14 +description: Detects suspicious network connection by Notepad +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + Image: '*\notepad.exe' + SELECTION_3: + DestinationPort: '9100' + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- None observed so far +id: e81528db-fc02-45e8-8e98-4e84aba1f10b +level: high +logsource: + category: network_connection + product: windows +modified: 2020/08/24 +references: +- https://www.sans.org/cyber-security-summit/archives/file/summit-archive-1492186586.pdf +- https://blog.cobaltstrike.com/2013/08/08/why-is-notepad-exe-connecting-to-the-internet/ +status: experimental +tags: +- attack.command_and_control +- attack.execution +- attack.defense_evasion +- attack.t1055 diff --git a/rules/sigma/windows/network_connection/sysmon_powershell_network_connection.yml b/rules/sigma/windows/network_connection/sysmon_powershell_network_connection.yml new file mode 100644 index 00000000..58f7e71b --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_powershell_network_connection.yml @@ -0,0 +1,62 @@ + +title: PowerShell Network Connections +author: Florian Roth +date: 2017/03/13 +description: Detects a Powershell process that opens network connections - check for + suspicious target ports and target systems - adjust to your environment (e.g. extend + filters with company's ip range') +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + Image: '*\powershell.exe' + SELECTION_3: + Initiated: 'true' + SELECTION_4: + DestinationIsIpv6: 'false' + SELECTION_5: + DestinationIp: + - 10.* + - 192.168.* + - 172.16.* + - 172.17.* + - 172.18.* + - 172.19.* + - 172.20.* + - 172.21.* + - 172.22.* + - 172.23.* + - 172.24.* + - 172.25.* + - 172.26.* + - 172.27.* + - 172.28.* + - 172.29.* + - 172.30.* + - 172.31.* + - 127.0.0.1* + SELECTION_6: + DestinationIsIpv6: 'false' + SELECTION_7: + User: NT AUTHORITY\SYSTEM + SELECTION_8: + User: '*AUT*' + SELECTION_9: + User: '* NT*' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3 and SELECTION_4) and not + (SELECTION_5 and SELECTION_6 and SELECTION_7 and SELECTION_8 and SELECTION_9)) +falsepositives: +- Administrative scripts +id: 1f21ec3f-810d-4b0e-8045-322202e22b4b +level: low +logsource: + category: network_connection + product: windows +modified: 2021/06/14 +references: +- https://www.youtube.com/watch?v=DLtJTxMWZ2o +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/network_connection/sysmon_rdp_reverse_tunnel.yml b/rules/sigma/windows/network_connection/sysmon_rdp_reverse_tunnel.yml new file mode 100644 index 00000000..e72a8a6f --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_rdp_reverse_tunnel.yml @@ -0,0 +1,41 @@ + +title: RDP Over Reverse SSH Tunnel +author: Samir Bousseaden +date: 2019/02/16 +description: Detects svchost hosting RDP termsvcs communicating with the loopback + address and on TCP port 3389 +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + Image: '*\svchost.exe' + SELECTION_3: + Initiated: 'true' + SELECTION_4: + SourcePort: 3389 + SELECTION_5: + DestinationIp: + - 127.* + SELECTION_6: + DestinationIp: + - ::1 + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3 and SELECTION_4) and (SELECTION_5 + or SELECTION_6)) +falsepositives: +- unknown +id: 5f699bc5-5446-4a4a-a0b7-5ef2885a3eb4 +level: high +logsource: + category: network_connection + product: windows +modified: 2021/05/11 +references: +- https://twitter.com/SBousseaden/status/1096148422984384514 +status: experimental +tags: +- attack.command_and_control +- attack.t1572 +- attack.lateral_movement +- attack.t1021.001 +- attack.t1076 +- car.2013-07-002 diff --git a/rules/sigma/windows/network_connection/sysmon_regsvr32_network_activity.yml b/rules/sigma/windows/network_connection/sysmon_regsvr32_network_activity.yml new file mode 100644 index 00000000..8bba95c9 --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_regsvr32_network_activity.yml @@ -0,0 +1,37 @@ + +title: Regsvr32 Network Activity +author: Dmitriy Lifanov, oscd.community +date: 2019/10/25 +description: Detects network connections and DNS queries initiated by Regsvr32.exe +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + Image: '*\regsvr32.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +fields: +- ComputerName +- User +- Image +- DestinationIp +- DestinationPort +id: c7e91a02-d771-4a6d-a700-42587e0b1095 +level: high +logsource: + category: network_connection + product: windows +modified: 2021/09/21 +references: +- https://pentestlab.blog/2017/05/11/applocker-bypass-regsvr32/ +- https://oddvar.moe/2017/12/13/applocker-case-study-how-insecure-is-it-really-part-1/ +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1117/T1117.md +status: experimental +tags: +- attack.execution +- attack.t1559.001 +- attack.t1175 +- attack.defense_evasion +- attack.t1218.010 +- attack.t1117 diff --git a/rules/sigma/windows/network_connection/sysmon_remote_powershell_session_network.yml b/rules/sigma/windows/network_connection/sysmon_remote_powershell_session_network.yml new file mode 100644 index 00000000..52bcf32d --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_remote_powershell_session_network.yml @@ -0,0 +1,34 @@ + +title: Remote PowerShell Session +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/09/12 +description: Detects remote PowerShell connections by monitoring network outbound + connections to ports 5985 or 5986 from a non-network service account. +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + DestinationPort: 5985 + SELECTION_3: + DestinationPort: 5986 + SELECTION_4: + User: NT AUTHORITY\NETWORK SERVICE + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Legitimate usage of remote PowerShell, e.g. remote administration and monitoring. +id: c539afac-c12a-46ed-b1bd-5a5567c9f045 +level: high +logsource: + category: network_connection + product: windows +modified: 2020/08/24 +references: +- https://threathunterplaybook.com/notebooks/windows/02_execution/WIN-190511223310.html +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 +- attack.lateral_movement +- attack.t1021.006 +- attack.t1028 diff --git a/rules/sigma/windows/network_connection/sysmon_rundll32_net_connections.yml b/rules/sigma/windows/network_connection/sysmon_rundll32_net_connections.yml new file mode 100644 index 00000000..9f88bd02 --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_rundll32_net_connections.yml @@ -0,0 +1,51 @@ + +title: Rundll32 Internet Connection +author: Florian Roth +date: 2017/11/04 +description: Detects a rundll32 that communicates with public IP addresses +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + Image: '*\rundll32.exe' + SELECTION_3: + Initiated: 'true' + SELECTION_4: + DestinationIp: + - 10.* + - 192.168.* + - 172.16.* + - 172.17.* + - 172.18.* + - 172.19.* + - 172.20.* + - 172.21.* + - 172.22.* + - 172.23.* + - 172.24.* + - 172.25.* + - 172.26.* + - 172.27.* + - 172.28.* + - 172.29.* + - 172.30.* + - 172.31.* + - 127.* + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Communication to other corporate systems that use IP addresses from public address + spaces +id: cdc8da7d-c303-42f8-b08c-b4ab47230263 +level: medium +logsource: + category: network_connection + product: windows +modified: 2020/08/24 +references: +- https://www.hybrid-analysis.com/sample/759fb4c0091a78c5ee035715afe3084686a8493f39014aea72dae36869de9ff6?environmentId=100 +status: experimental +tags: +- attack.defense_evasion +- attack.t1218.011 +- attack.t1085 +- attack.execution diff --git a/rules/sigma/windows/network_connection/sysmon_susp_prog_location_network_connection.yml b/rules/sigma/windows/network_connection/sysmon_susp_prog_location_network_connection.yml new file mode 100644 index 00000000..fe34a3c4 --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_susp_prog_location_network_connection.yml @@ -0,0 +1,42 @@ + +title: Suspicious Program Location with Network Connections +author: Florian Roth +date: 2017/03/19 +description: Detects programs with network connections running in suspicious files + system locations +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + Image: + - '*\Users\All Users\\*' + - '*\Users\Default\\*' + - '*\Users\Public\\*' + - '*\Users\Contacts\\*' + - '*\Users\Searches\\*' + - '*\config\systemprofile\\*' + - '*\Windows\Fonts\\*' + - '*\Windows\IME\\*' + - '*\Windows\addins\\*' + SELECTION_3: + Image: + - '*\$Recycle.bin' + SELECTION_4: + Image: + - C:\Perflogs\\* + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3 or SELECTION_4)) +falsepositives: +- unknown +id: 7b434893-c57d-4f41-908d-6a17bf1ae98f +level: high +logsource: + category: network_connection + definition: Use the following config to generate the necessary Event ID 3 Network + Connection events + product: windows +references: +- https://docs.google.com/spreadsheets/d/17pSTDNpa0sf6pHeRhusvWG6rThciE8CsXTSlDUAZDyo +status: experimental +tags: +- attack.command_and_control +- attack.t1105 diff --git a/rules/sigma/windows/network_connection/sysmon_susp_rdp.yml b/rules/sigma/windows/network_connection/sysmon_susp_rdp.yml new file mode 100644 index 00000000..52d85c23 --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_susp_rdp.yml @@ -0,0 +1,51 @@ + +title: Suspicious Outbound RDP Connections +author: Markus Neis - Swisscom +date: 2019/05/15 +description: Detects Non-Standard Tools Connecting to TCP port 3389 indicating possible + lateral movement +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + DestinationPort: 3389 + SELECTION_3: + Initiated: 'true' + SELECTION_4: + Image: + - '*\mstsc.exe' + - '*\RTSApp.exe' + - '*\RTS2App.exe' + - '*\RDCMan.exe' + - '*\ws_TunnelService.exe' + - '*\RSSensor.exe' + - '*\RemoteDesktopManagerFree.exe' + - '*\RemoteDesktopManager.exe' + - '*\RemoteDesktopManager64.exe' + - '*\mRemoteNG.exe' + - '*\mRemote.exe' + - '*\Terminals.exe' + - '*\spiceworks-finder.exe' + - '*\FSDiscovery.exe' + - '*\FSAssessment.exe' + - '*\MobaRTE.exe' + - '*\chrome.exe' + - '*\thor.exe' + - '*\thor64.exe' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Other Remote Desktop RDP tools +id: ed74fe75-7594-4b4b-ae38-e38e3fd2eb23 +level: high +logsource: + category: network_connection + product: windows +modified: 2020/08/24 +references: +- https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-0708 +status: experimental +tags: +- attack.lateral_movement +- attack.t1021.001 +- attack.t1076 +- car.2013-07-002 diff --git a/rules/sigma/windows/network_connection/sysmon_suspicious_outbound_kerberos_connection.yml b/rules/sigma/windows/network_connection/sysmon_suspicious_outbound_kerberos_connection.yml new file mode 100644 index 00000000..8d9c613b --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_suspicious_outbound_kerberos_connection.yml @@ -0,0 +1,38 @@ + +title: Suspicious Outbound Kerberos Connection +author: Ilyas Ochkov, oscd.community +date: 2019/10/24 +description: Detects suspicious outbound network activity via kerberos default port + indicating possible lateral movement or first stage PrivEsc via delegation. +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + DestinationPort: 88 + SELECTION_3: + Initiated: 'true' + SELECTION_4: + Image: + - '*\lsass.exe' + - '*\opera.exe' + - '*\chrome.exe' + - '*\firefox.exe' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Other browsers +id: e54979bd-c5f9-4d6c-967b-a04b19ac4c74 +level: high +logsource: + category: network_connection + product: windows +modified: 2020/08/24 +references: +- https://github.com/GhostPack/Rubeus +status: experimental +tags: +- attack.credential_access +- attack.t1558 +- attack.t1208 +- attack.lateral_movement +- attack.t1550.003 +- attack.t1097 diff --git a/rules/sigma/windows/network_connection/sysmon_win_binary_github_com.yml b/rules/sigma/windows/network_connection/sysmon_win_binary_github_com.yml new file mode 100644 index 00000000..80024fbc --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_win_binary_github_com.yml @@ -0,0 +1,37 @@ + +title: Microsoft Binary Github Communication +author: Michael Haag (idea), Florian Roth (rule) +date: 2017/08/24 +description: Detects an executable in the Windows folder accessing github.com +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + Initiated: 'true' + SELECTION_3: + DestinationHostname: + - '*.github.com' + - '*.githubusercontent.com' + SELECTION_4: + Image: C:\Windows\\* + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +- '@subTee in your network' +id: 635dbb88-67b3-4b41-9ea5-a3af2dd88153 +level: high +logsource: + category: network_connection + product: windows +modified: 2020/08/24 +references: +- https://twitter.com/M_haggis/status/900741347035889665 +- https://twitter.com/M_haggis/status/1032799638213066752 +- https://github.com/EmpireProject/Empire/blob/e37fb2eef8ff8f5a0a689f1589f424906fe13055/data/module_source/exfil/Invoke-ExfilDataToGitHub.ps1 +status: experimental +tags: +- attack.lateral_movement +- attack.t1105 +- attack.exfiltration +- attack.t1567.001 +- attack.t1048 diff --git a/rules/sigma/windows/network_connection/sysmon_win_binary_susp_com.yml b/rules/sigma/windows/network_connection/sysmon_win_binary_susp_com.yml new file mode 100644 index 00000000..2ba79e73 --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_win_binary_susp_com.yml @@ -0,0 +1,32 @@ + +title: Microsoft Binary Suspicious Communication Endpoint +author: Florian Roth +date: 2018/08/30 +description: Detects an executable in the Windows folder accessing suspicious domains +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + Initiated: 'true' + SELECTION_3: + DestinationHostname: + - '*dl.dropboxusercontent.com' + - '*.pastebin.com' + - '*.githubusercontent.com' + SELECTION_4: + Image: C:\Windows\\* + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: e0f8ab85-0ac9-423b-a73a-81b3c7b1aa97 +level: high +logsource: + category: network_connection + product: windows +references: +- https://twitter.com/M_haggis/status/900741347035889665 +- https://twitter.com/M_haggis/status/1032799638213066752 +status: experimental +tags: +- attack.lateral_movement +- attack.t1105 diff --git a/rules/sigma/windows/network_connection/sysmon_wuauclt_network_connection.yml b/rules/sigma/windows/network_connection/sysmon_wuauclt_network_connection.yml new file mode 100644 index 00000000..78ff9b9b --- /dev/null +++ b/rules/sigma/windows/network_connection/sysmon_wuauclt_network_connection.yml @@ -0,0 +1,27 @@ + +title: Wuauclt Network Connection +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/10/12 +description: Detects the use of the Windows Update Client binary (wuauclt.exe) to + proxy execute code and making a network connections. One could easily make the DLL + spawn a new process and inject to it to proxy the network connection and bypass + this rule. +detection: + SELECTION_1: + EventID: 3 + SELECTION_2: + Image: '*wuauclt*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate use of wuauclt.exe over the network. +id: c649a6c7-cd8c-4a78-9c04-000fc76df954 +level: medium +logsource: + category: network_connection + product: windows +references: +- https://dtm.uk/wuauclt/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1218 diff --git a/rules/sigma/windows/other/win_defender_amsi_trigger.yml b/rules/sigma/windows/other/win_defender_amsi_trigger.yml new file mode 100644 index 00000000..c195f99c --- /dev/null +++ b/rules/sigma/windows/other/win_defender_amsi_trigger.yml @@ -0,0 +1,25 @@ + +title: Windows Defender AMSI Trigger Detected +author: Bhabesh Raj +date: 2020/09/14 +description: Detects triggering of AMSI by Windows Defender. +detection: + SELECTION_1: + EventID: 1116 + SELECTION_2: + Source Name: AMSI + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unlikely +id: ea9bf0fa-edec-4fb8-8b78-b119f2528186 +level: high +logsource: + product: windows + service: windefend +modified: 2021/08/06 +references: +- https://docs.microsoft.com/en-us/windows/win32/amsi/how-amsi-helps +status: stable +tags: +- attack.execution +- attack.t1059 diff --git a/rules/sigma/windows/other/win_defender_bypass.yml b/rules/sigma/windows/other/win_defender_bypass.yml new file mode 100644 index 00000000..7d087d3d --- /dev/null +++ b/rules/sigma/windows/other/win_defender_bypass.yml @@ -0,0 +1,33 @@ + +title: Windows Defender Exclusion Set +author: '@BarryShooshooga' +date: 2019/10/26 +description: Detects scenarios where an windows defender exclusion was added in registry + where an entity would want to bypass antivirus scanning from windows defender +detection: + SELECTION_1: + EventID: 4657 + SELECTION_2: + EventID: 4656 + SELECTION_3: + EventID: 4660 + SELECTION_4: + EventID: 4663 + SELECTION_5: + ObjectName: '*\Microsoft\Windows Defender\Exclusions\\*' + condition: ((SELECTION_1 or SELECTION_2 or SELECTION_3 or SELECTION_4) and SELECTION_5) +falsepositives: +- Intended inclusions by administrator +id: e9c8808f-4cfb-4ba9-97d4-e5f3beaa244d +level: high +logsource: + definition: 'Requirements: Audit Policy : Security Settings/Local Policies/Audit + Policy, Registry System Access Control (SACL): Auditing/User' + product: windows + service: security +references: +- https://www.bleepingcomputer.com/news/security/gootkit-malware-bypasses-windows-defender-by-setting-path-exclusions/ +tags: +- attack.defense_evasion +- attack.t1089 +- attack.t1562.001 diff --git a/rules/sigma/windows/other/win_defender_disabled.yml b/rules/sigma/windows/other/win_defender_disabled.yml new file mode 100644 index 00000000..27c285ee --- /dev/null +++ b/rules/sigma/windows/other/win_defender_disabled.yml @@ -0,0 +1,31 @@ + +title: Windows Defender Threat Detection Disabled +author: Ján Trenčanský, frack113 +date: 2020/07/28 +description: Detects disabling Windows Defender threat protection +detection: + SELECTION_1: + EventID: 5001 + SELECTION_2: + EventID: 5010 + SELECTION_3: + EventID: 5012 + SELECTION_4: + EventID: 5101 + condition: (SELECTION_1 or SELECTION_2 or SELECTION_3 or SELECTION_4) +falsepositives: +- Administrator actions +id: fe34868f-6e0e-4882-81f6-c43aa8f15b62 +level: high +logsource: + product: windows + service: windefend +modified: 2021/09/21 +references: +- https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-antivirus/troubleshoot-windows-defender-antivirus +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1562.001/T1562.001.md +status: stable +tags: +- attack.defense_evasion +- attack.t1089 +- attack.t1562.001 diff --git a/rules/sigma/windows/other/win_defender_exclusions.yml b/rules/sigma/windows/other/win_defender_exclusions.yml new file mode 100644 index 00000000..568a4d98 --- /dev/null +++ b/rules/sigma/windows/other/win_defender_exclusions.yml @@ -0,0 +1,26 @@ + +title: Windows Defender Exclusions Added +author: Christian Burkard +date: 2021/07/06 +description: Detects the Setting of Windows Defender Exclusions +detection: + SELECTION_1: + EventID: 5007 + SELECTION_2: + New Value: '*\Microsoft\Windows Defender\Exclusions*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Administrator actions +id: 1321dc4e-a1fe-481d-a016-52c45f0c8b4f +level: medium +logsource: + product: windows + service: windefend +modified: 2021/09/21 +references: +- https://twitter.com/_nullbind/status/1204923340810543109 +status: stable +tags: +- attack.defense_evasion +- attack.t1089 +- attack.t1562.001 diff --git a/rules/sigma/windows/other/win_defender_history_delete.yml b/rules/sigma/windows/other/win_defender_history_delete.yml new file mode 100644 index 00000000..0328eb8f --- /dev/null +++ b/rules/sigma/windows/other/win_defender_history_delete.yml @@ -0,0 +1,30 @@ + +title: Windows Defender Malware Detection History Deletion +author: Cian Heasley +date: 2020/08/13 +description: Windows Defender logs when the history of detected infections is deleted. + Log file will contain the message "Windows Defender Antivirus has removed history + of malware and other potentially unwanted software". +detection: + SELECTION_1: + EventID: 1013 + SELECTION_2: + EventType: 4 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Deletion of Defender malware detections history for legitimate reasons +fields: +- EventID +- EventType +id: 2afe6582-e149-11ea-87d0-0242ac130003 +level: high +logsource: + product: windows + service: windefend +modified: 2021/05/30 +references: +- https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-antivirus/troubleshoot-microsoft-defender-antivirus +status: experimental +tags: +- attack.defense_evasion +- attack.t1070.001 diff --git a/rules/sigma/windows/other/win_defender_psexec_wmi_asr.yml b/rules/sigma/windows/other/win_defender_psexec_wmi_asr.yml new file mode 100644 index 00000000..13818d8f --- /dev/null +++ b/rules/sigma/windows/other/win_defender_psexec_wmi_asr.yml @@ -0,0 +1,32 @@ + +title: PSExec and WMI Process Creations Block +author: Bhabesh Raj +date: 2020/07/14 +description: Detects blocking of process creations originating from PSExec and WMI + commands +detection: + SELECTION_1: + EventID: 1121 + SELECTION_2: + ProcessName: + - '*\wmiprvse.exe' + - '*\psexesvc.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 97b9ce1e-c5ab-11ea-87d0-0242ac130003 +level: high +logsource: + definition: 'Requirements:Enabled Block process creations originating from PSExec + and WMI commands from Attack Surface Reduction (GUID: d1e49aac-8f56-4280-b9ba-993a6d77406c)' + product: windows_defender +references: +- https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-atp/attack-surface-reduction?WT.mc_id=twitter#block-process-creations-originating-from-psexec-and-wmi-commands +- https://twitter.com/duff22b/status/1280166329660497920 +status: experimental +tags: +- attack.execution +- attack.lateral_movement +- attack.t1047 +- attack.t1035 +- attack.t1569.002 diff --git a/rules/sigma/windows/other/win_defender_tamper_protection_trigger.yml b/rules/sigma/windows/other/win_defender_tamper_protection_trigger.yml new file mode 100644 index 00000000..5798cdf7 --- /dev/null +++ b/rules/sigma/windows/other/win_defender_tamper_protection_trigger.yml @@ -0,0 +1,28 @@ + +title: Microsoft Defender Tamper Protection Trigger +author: Bhabesh Raj +date: 2021/07/05 +description: Detects block of attempt to disable real time protection of Microsoft + Defender by tamper protection +detection: + SELECTION_1: + EventID: 5013 + SELECTION_2: + Value: + - '*\Windows Defender\DisableAntiSpyware = 0x1()' + - '*\Real-Time Protection\DisableRealtimeMonitoring = (Current)' + condition: ((SELECTION_1) and SELECTION_2) +falsepositives: +- Administrator actions +id: 49e5bc24-8b86-49f1-b743-535f332c2856 +level: critical +logsource: + product: windows + service: windefend +references: +- https://bhabeshraj.com/post/tampering-with-microsoft-defenders-tamper-protection +status: stable +tags: +- attack.defense_evasion +- attack.t1089 +- attack.t1562.001 diff --git a/rules/sigma/windows/other/win_defender_threat.yml b/rules/sigma/windows/other/win_defender_threat.yml new file mode 100644 index 00000000..bd01bd2d --- /dev/null +++ b/rules/sigma/windows/other/win_defender_threat.yml @@ -0,0 +1,28 @@ + +title: Windows Defender Threat Detected +author: Ján Trenčanský +date: 2020/07/28 +description: Detects all actions taken by Windows Defender malware detection engines +detection: + SELECTION_1: + EventID: 1006 + SELECTION_2: + EventID: 1116 + SELECTION_3: + EventID: 1015 + SELECTION_4: + EventID: 1117 + condition: (SELECTION_1 or SELECTION_2 or SELECTION_3 or SELECTION_4) +falsepositives: +- unlikely +id: 57b649ef-ff42-4fb0-8bf6-62da243a1708 +level: high +logsource: + product: windows + service: windefend +references: +- https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-antivirus/troubleshoot-windows-defender-antivirus +status: stable +tags: +- attack.execution +- attack.t1059 diff --git a/rules/sigma/windows/other/win_exchange_proxyshell_certificate_generation.yml b/rules/sigma/windows/other/win_exchange_proxyshell_certificate_generation.yml new file mode 100644 index 00000000..6e81d25a --- /dev/null +++ b/rules/sigma/windows/other/win_exchange_proxyshell_certificate_generation.yml @@ -0,0 +1,34 @@ + +title: Certificate Request Export to Exchange Webserver +author: Max Altgelt +date: 2021/08/23 +description: Detects a write of an Exchange CSR to an untypical directory or with + aspx name suffix which can be used to place a webshell +detection: + SELECTION_1: + - New-ExchangeCertificate + SELECTION_2: + - ' -GenerateRequest' + SELECTION_3: + - ' -BinaryEncoded' + SELECTION_4: + - ' -RequestFile' + SELECTION_5: + - \\\\localhost\\C$ + - \\\\127.0.0.1\\C$ + - C:\\inetpub + - .aspx + condition: ((SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) and (SELECTION_5)) +falsepositives: +- unlikely +id: b7bc7038-638b-4ffd-880c-292c692209ef +level: critical +logsource: + product: windows + service: msexchange-management +references: +- https://twitter.com/GossiTheDog/status/1429175908905127938 +status: experimental +tags: +- attack.persistence +- attack.t1505.003 diff --git a/rules/sigma/windows/other/win_exchange_proxyshell_mailbox_export.yml b/rules/sigma/windows/other/win_exchange_proxyshell_mailbox_export.yml new file mode 100644 index 00000000..ff00aace --- /dev/null +++ b/rules/sigma/windows/other/win_exchange_proxyshell_mailbox_export.yml @@ -0,0 +1,38 @@ + +title: Mailbox Export to Exchange Webserver +author: Florian Roth, Rich Warren, Christian Burkard +date: 2021/08/09 +description: Detects a successful export of an Exchange mailbox to untypical directory + or with aspx name suffix which can be used to place a webshell or the needed role + assignment for it +detection: + SELECTION_1: + - New-MailboxExportRequest + SELECTION_2: + - ' -Mailbox ' + SELECTION_3: + - -FilePath "\\localhost\C$ + - -FilePath "\\127.0.0.1\C$ + - .aspx + SELECTION_4: + - New-ManagementRoleAssignment + SELECTION_5: + - ' -Role "Mailbox Import Export"' + SELECTION_6: + - ' -User ' + condition: (((SELECTION_1 and SELECTION_2) and (SELECTION_3)) or (SELECTION_4 and + SELECTION_5 and SELECTION_6)) +falsepositives: +- unlikely +id: 516376b4-05cd-4122-bae0-ad7641c38d48 +level: critical +logsource: + product: windows + service: msexchange-management +modified: 2021/08/11 +references: +- https://blog.orange.tw/2021/08/proxylogon-a-new-attack-surface-on-ms-exchange-part-1.html +status: experimental +tags: +- attack.persistence +- attack.t1505.003 diff --git a/rules/sigma/windows/other/win_exchange_proxyshell_remove_mailbox_export.yml b/rules/sigma/windows/other/win_exchange_proxyshell_remove_mailbox_export.yml new file mode 100644 index 00000000..c2261028 --- /dev/null +++ b/rules/sigma/windows/other/win_exchange_proxyshell_remove_mailbox_export.yml @@ -0,0 +1,27 @@ + +title: Remove Exported Mailbox from Exchange Webserver +author: Christian Burkard +date: 2021/08/27 +description: Detects removal of an exported Exchange mailbox which could be to cover + tracks from ProxyShell exploit +detection: + SELECTION_1: + - Remove-MailboxExportRequest + SELECTION_2: + - ' -Identity ' + SELECTION_3: + - ' -Confirm "False"' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- unknown +id: 09570ae5-889e-43ea-aac0-0e1221fb3d95 +level: high +logsource: + product: windows + service: msexchange-management +references: +- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/http/exchange_proxyshell_rce.rb#L430 +status: experimental +tags: +- attack.defense_evasion +- attack.t1070 diff --git a/rules/sigma/windows/other/win_exchange_transportagent_failed.yml b/rules/sigma/windows/other/win_exchange_transportagent_failed.yml new file mode 100644 index 00000000..61c5afe1 --- /dev/null +++ b/rules/sigma/windows/other/win_exchange_transportagent_failed.yml @@ -0,0 +1,27 @@ + +title: Failed MSExchange Transport Agent Installation +author: Tobias Michalski +date: 2021/06/08 +description: Detects a failed installation of a Exchange Transport Agent +detection: + SELECTION_1: + EventID: 6 + SELECTION_2: + - Install-TransportAgent + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- legitimate installations of exchange TransportAgents. AssemblyPath is a good indicator + for this. +fields: +- AssemblyPath +id: c7d16cae-aaf3-42e5-9c1c-fb8553faa6fa +level: high +logsource: + product: windows + service: msexchange-management +references: +- https://twitter.com/blueteamsec1/status/1401290874202382336?s=20 +status: experimental +tags: +- attack.persistence +- attack.t1505.002 diff --git a/rules/sigma/windows/other/win_lateral_movement_condrv.yml b/rules/sigma/windows/other/win_lateral_movement_condrv.yml new file mode 100644 index 00000000..313514f4 --- /dev/null +++ b/rules/sigma/windows/other/win_lateral_movement_condrv.yml @@ -0,0 +1,35 @@ + +title: Lateral Movement Indicator ConDrv +author: Janantha Marasinghe +date: 2021/04/27 +description: This event was observed on the target host during lateral movement. The + process name within the event contains the process spawned post compromise. Account + Name within the event contains the compromised user account name. This event should + to be correlated with 4624 and 4688 for further intrusion context. +detection: + SELECTION_1: + EventID: 4674 + SELECTION_2: + ObjectServer: Security + SELECTION_3: + ObjectType: File + SELECTION_4: + ObjectName: \Device\ConDrv + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Penetration tests where lateral movement has occurred. This event will be created + on the target host. +id: 29d31aee-30f4-4006-85a9-a4a02d65306c +level: high +logsource: + product: windows + service: security +references: +- https://jpcertcc.github.io/ToolAnalysisResultSheet/details/wmiexec-vbs.htm +- https://www.fireeye.com/blog/threat-research/2017/08/monitoring-windows-console-activity-part-one.html +status: stable +tags: +- attack.lateral_movement +- attack.execution +- attack.t1021 +- attack.t1059 diff --git a/rules/sigma/windows/other/win_ldap_recon.yml b/rules/sigma/windows/other/win_ldap_recon.yml new file mode 100644 index 00000000..1b33d585 --- /dev/null +++ b/rules/sigma/windows/other/win_ldap_recon.yml @@ -0,0 +1,81 @@ + +title: LDAP Reconnaissance / Active Directory Enumeration +author: Adeem Mawani +date: 2021/06/22 +description: Detects possible Active Directory enumeration via LDAP +detection: + SELECTION_1: + EventID: 30 + SELECTION_2: + SearchFilter: + - '*(groupType:1.2.840.113556.1.4.803:=2147483648)*' + - '*(groupType:1.2.840.113556.1.4.803:=2147483656)*' + - '*(groupType:1.2.840.113556.1.4.803:=2147483652)*' + - '*(groupType:1.2.840.113556.1.4.803:=2147483650)*' + - '*(sAMAccountType=805306369)*' + - '*(sAMAccountType=805306368)*' + - '*(sAMAccountType=536870913)*' + - '*(sAMAccountType=536870912)*' + - '*(sAMAccountType=268435457)*' + - '*(sAMAccountType=268435456)*' + - '*(objectCategory=groupPolicyContainer)*' + - '*(objectCategory=organizationalUnit)*' + - '*(objectCategory=Computer)*' + - '*(objectCategory=nTDSDSA)*' + - '*(objectCategory=server)*' + - '*(objectCategory=domain)*' + - '*(objectCategory=person)*' + - '*(objectCategory=group)*' + - '*(objectCategory=user)*' + - '*(objectClass=trustedDomain)*' + - '*(objectClass=computer)*' + - '*(objectClass=server)*' + - '*(objectClass=group)*' + - '*(objectClass=user)*' + - '*(primaryGroupID=521)*' + - '*(primaryGroupID=516)*' + - '*(primaryGroupID=515)*' + - '*(primaryGroupID=512)*' + - '*Domain Admins*' + SELECTION_3: + EventID: 30 + SELECTION_4: + SearchFilter: + - '*(domainSid=*)*' + - '*(objectSid=*)*' + SELECTION_5: + EventID: 30 + SELECTION_6: + SearchFilter: + - '*(userAccountControl:1.2.840.113556.1.4.803:=4194304)*' + - '*(userAccountControl:1.2.840.113556.1.4.803:=2097152)*' + - '*!(userAccountControl:1.2.840.113556.1.4.803:=1048574)*' + - '*(userAccountControl:1.2.840.113556.1.4.803:=524288)*' + - '*(userAccountControl:1.2.840.113556.1.4.803:=65536)*' + - '*(userAccountControl:1.2.840.113556.1.4.803:=8192)*' + - '*(userAccountControl:1.2.840.113556.1.4.803:=544)*' + - '*!(UserAccountControl:1.2.840.113556.1.4.803:=2)*' + - '*msDS-AllowedToActOnBehalfOfOtherIdentity*' + - '*msDS-AllowedToDelegateTo*' + - '*(accountExpires=9223372036854775807)*' + - '*(accountExpires=0)*' + - '*(adminCount=1)*' + - '*ms-MCS-AdmPwd*' + condition: (((SELECTION_1 and SELECTION_2) and not (SELECTION_3 and SELECTION_4)) + or (SELECTION_5 and SELECTION_6)) +id: 31d68132-4038-47c7-8f8e-635a39a7c174 +level: medium +logsource: + category: ldap_query + definition: Requires Microsoft-Windows-LDAP-Client/Debug ETW logging + product: windows +references: +- https://techcommunity.microsoft.com/t5/microsoft-defender-for-endpoint/hunting-for-reconnaissance-activities-using-ldap-search-filters/ba-p/824726 +- https://github.com/PowerShellMafia/PowerSploit/blob/master/Recon/PowerView.ps1 +- https://github.com/BloodHoundAD/SharpHound3/blob/master/SharpHound3/LdapBuilder.cs +status: experimental +tags: +- attack.discovery +- attack.t1069.002 +- attack.t1087.002 +- attack.t1482 diff --git a/rules/sigma/windows/other/win_pcap_drivers.yml b/rules/sigma/windows/other/win_pcap_drivers.yml new file mode 100644 index 00000000..41f30ba2 --- /dev/null +++ b/rules/sigma/windows/other/win_pcap_drivers.yml @@ -0,0 +1,42 @@ + +title: Windows Pcap Drivers +author: Cian Heasley +date: 2020/06/10 +description: Detects Windows Pcap driver installation based on a list of associated + .sys files. +detection: + SELECTION_1: + EventID: 4697 + SELECTION_2: + ServiceFileName: + - '*pcap*' + - '*npcap*' + - '*npf*' + - '*nm3*' + - '*ndiscap*' + - '*nmnt*' + - '*windivert*' + - '*USBPcap*' + - '*pktmon*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +fields: +- EventID +- ServiceFileName +- Account_Name +- Computer_Name +- Originating_Computer +- ServiceName +id: 7b687634-ab20-11ea-bb37-0242ac130002 +level: medium +logsource: + product: windows + service: security +references: +- https://ragged-lab.blogspot.com/2020/06/capturing-pcap-driver-installations.html#more +status: experimental +tags: +- attack.discovery +- attack.credential_access +- attack.t1040 diff --git a/rules/sigma/windows/other/win_possible_zerologon_exploitation_using_wellknown_tools.yml b/rules/sigma/windows/other/win_possible_zerologon_exploitation_using_wellknown_tools.yml new file mode 100644 index 00000000..a4a4b044 --- /dev/null +++ b/rules/sigma/windows/other/win_possible_zerologon_exploitation_using_wellknown_tools.yml @@ -0,0 +1,29 @@ + +title: Zerologon Exploitation Using Well-known Tools +author: Demyan Sokolin @_drd0c, Teymur Kheirkhabarov @HeirhabarovT, oscd.community +date: 2020/10/13 +description: This rule is designed to detect attempts to exploit Zerologon (CVE-2020-1472) + vulnerability using mimikatz zerologon module or other exploits from machine with + "kali" hostname. +detection: + SELECTION_1: + EventID: + - '5805' + - '5723' + SELECTION_2: + - kali + - mimikatz + condition: (SELECTION_1 and (SELECTION_2)) +id: 18f37338-b9bd-4117-a039-280c81f7a596 +level: critical +logsource: + product: windows + service: system +modified: 2021/05/30 +references: +- https://www.secura.com/blog/zero-logon +- https://bi-zone.medium.com/hunting-for-zerologon-f65c61586382 +status: stable +tags: +- attack.t1210 +- attack.lateral_movement diff --git a/rules/sigma/windows/other/win_rare_schtask_creation.yml b/rules/sigma/windows/other/win_rare_schtask_creation.yml new file mode 100644 index 00000000..2c57427f --- /dev/null +++ b/rules/sigma/windows/other/win_rare_schtask_creation.yml @@ -0,0 +1,24 @@ + +title: Rare Scheduled Task Creations +author: Florian Roth +date: 2017/03/17 +description: This rule detects rare scheduled task creations. Typically software gets + installed on multiple systems and not only on a few. The aggregation and count function + selects tasks with rare names. +detection: + SELECTION_1: + EventID: 106 + condition: SELECTION_1 | count() by TaskName < 5 +falsepositives: +- Software installation +id: b20f6158-9438-41be-83da-a5a16ac90c2b +level: low +logsource: + product: windows + service: taskscheduler +status: experimental +tags: +- attack.persistence +- attack.t1053 +- attack.s0111 +- attack.t1053.005 diff --git a/rules/sigma/windows/other/win_security_wmi_persistence.yml b/rules/sigma/windows/other/win_security_wmi_persistence.yml new file mode 100644 index 00000000..8d6da1ba --- /dev/null +++ b/rules/sigma/windows/other/win_security_wmi_persistence.yml @@ -0,0 +1,34 @@ + +title: WMI Persistence +author: Florian Roth, Gleb Sukhodolskiy, Timur Zinniatullin oscd.community +date: 2017/08/22 +description: Detects suspicious WMI event filter and command line event consumer based + on WMI and Security Logs. +detection: + SELECTION_1: + EventID: 4662 + SELECTION_2: + ObjectType: WMI Namespace + SELECTION_3: + ObjectName: '*subscription*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown (data set is too small; further testing needed) +id: f033f3f3-fd24-4995-97d8-a3bb17550a88 +level: medium +logsource: + product: windows + service: security +modified: 2021/09/21 +references: +- https://twitter.com/mattifestation/status/899646620148539397 +- https://www.eideon.com/2018-03-02-THL03-WMIBackdoors/ +related: +- id: 0b7889b4-5577-4521-a60a-3376ee7f9f7b + type: derived +status: experimental +tags: +- attack.persistence +- attack.privilege_escalation +- attack.t1084 +- attack.t1546.003 diff --git a/rules/sigma/windows/other/win_system_defender_disabled.yml b/rules/sigma/windows/other/win_system_defender_disabled.yml new file mode 100644 index 00000000..95c99955 --- /dev/null +++ b/rules/sigma/windows/other/win_system_defender_disabled.yml @@ -0,0 +1,32 @@ + +title: Windows Defender Threat Detection Disabled +author: Ján Trenčanský, frack113 +date: 2020/07/28 +description: Detects disabling Windows Defender threat protection +detection: + SELECTION_1: + EventID: 7036 + SELECTION_2: + - Windows Defender Antivirus Service + SELECTION_3: + - stopped + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Administrator actions +id: 6c0a7755-6d31-44fa-80e1-133e57752680 +level: high +logsource: + category: system + product: windows +modified: 2021/09/21 +references: +- https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-antivirus/troubleshoot-windows-defender-antivirus +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1562.001/T1562.001.md +related: +- id: fe34868f-6e0e-4882-81f6-c43aa8f15b62 + type: derived +status: stable +tags: +- attack.defense_evasion +- attack.t1089 +- attack.t1562.001 diff --git a/rules/sigma/windows/other/win_tool_psexec.yml b/rules/sigma/windows/other/win_tool_psexec.yml new file mode 100644 index 00000000..716d9d1c --- /dev/null +++ b/rules/sigma/windows/other/win_tool_psexec.yml @@ -0,0 +1,41 @@ + +title: PsExec Tool Execution +author: Thomas Patzke +date: 2017/06/12 +description: Detects PsExec service installation and execution events (service and + Sysmon) +detection: + SELECTION_1: + ServiceName: PSEXESVC + SELECTION_2: + EventID: 7045 + SELECTION_3: + ServiceFileName: '*\PSEXESVC.exe' + SELECTION_4: + EventID: 7036 + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or SELECTION_4)) +falsepositives: +- unknown +fields: +- EventID +- CommandLine +- ParentCommandLine +- ServiceName +- ServiceFileName +- TargetFilename +- PipeName +id: 42c575ea-e41e-41f1-b248-8093c3e82a28 +level: low +logsource: + product: windows + service: system +modified: 2021/09/21 +references: +- https://www.jpcert.or.jp/english/pub/sr/ir_research.html +- https://jpcertcc.github.io/ToolAnalysisResultSheet +status: experimental +tags: +- attack.execution +- attack.t1035 +- attack.t1569.002 +- attack.s0029 diff --git a/rules/sigma/windows/other/win_wmi_persistence.yml b/rules/sigma/windows/other/win_wmi_persistence.yml new file mode 100644 index 00000000..12064004 --- /dev/null +++ b/rules/sigma/windows/other/win_wmi_persistence.yml @@ -0,0 +1,35 @@ + +title: WMI Persistence +author: Florian Roth, Gleb Sukhodolskiy, Timur Zinniatullin oscd.community +date: 2017/08/22 +description: Detects suspicious WMI event filter and command line event consumer based + on WMI and Security Logs. +detection: + SELECTION_1: + EventID: 5861 + SELECTION_2: + - ActiveScriptEventConsumer + - CommandLineEventConsumer + - CommandLineTemplate + SELECTION_3: + EventID: 5859 + condition: ((SELECTION_1 and (SELECTION_2)) or SELECTION_3) +falsepositives: +- Unknown (data set is too small; further testing needed) +id: 0b7889b4-5577-4521-a60a-3376ee7f9f7b +level: medium +logsource: + definition: WMI Namespaces Auditing and SACL should be configured, EventID 5861 + and 5859 detection requires Windows 10, 2012 and higher + product: windows + service: wmi +modified: 2021/09/21 +references: +- https://twitter.com/mattifestation/status/899646620148539397 +- https://www.eideon.com/2018-03-02-THL03-WMIBackdoors/ +status: experimental +tags: +- attack.persistence +- attack.privilege_escalation +- attack.t1084 +- attack.t1546.003 diff --git a/rules/sigma/windows/pipe_created/pipe_created_tool_psexec.yml b/rules/sigma/windows/pipe_created/pipe_created_tool_psexec.yml new file mode 100644 index 00000000..7d107cc6 --- /dev/null +++ b/rules/sigma/windows/pipe_created/pipe_created_tool_psexec.yml @@ -0,0 +1,42 @@ + +title: PsExec Tool Execution +author: Thomas Patzke +date: 2017/06/12 +description: Detects PsExec service installation and execution events (service and + Sysmon) +detection: + SELECTION_1: + EventID: 17 + SELECTION_2: + EventID: 18 + SELECTION_3: + PipeName: \PSEXESVC + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3) +falsepositives: +- unknown +fields: +- EventID +- CommandLine +- ParentCommandLine +- ServiceName +- ServiceFileName +- TargetFilename +- PipeName +id: f3f3a972-f982-40ad-b63c-bca6afdfad7c +level: low +logsource: + category: pipe_created + product: windows +modified: 2021/09/21 +references: +- https://www.jpcert.or.jp/english/pub/sr/ir_research.html +- https://jpcertcc.github.io/ToolAnalysisResultSheet +related: +- id: 42c575ea-e41e-41f1-b248-8093c3e82a28 + type: derived +status: experimental +tags: +- attack.execution +- attack.t1035 +- attack.t1569.002 +- attack.s0029 diff --git a/rules/sigma/windows/pipe_created/sysmon_alternate_powershell_hosts_pipe.yml b/rules/sigma/windows/pipe_created/sysmon_alternate_powershell_hosts_pipe.yml new file mode 100644 index 00000000..9bef3ed3 --- /dev/null +++ b/rules/sigma/windows/pipe_created/sysmon_alternate_powershell_hosts_pipe.yml @@ -0,0 +1,38 @@ + +title: Alternate PowerShell Hosts Pipe +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/09/12 +description: Detects alternate PowerShell hosts potentially bypassing detections looking + for powershell.exe +detection: + SELECTION_1: + EventID: 17 + SELECTION_2: + EventID: 18 + SELECTION_3: + PipeName: \PSHost* + SELECTION_4: + Image: + - '*\powershell.exe' + - '*\powershell_ise.exe' + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3 and not (SELECTION_4)) +falsepositives: +- Programs using PowerShell directly without invocation of a dedicated interpreter. +fields: +- ComputerName +- User +- Image +- PipeName +id: 58cb02d5-78ce-4692-b3e1-dce850aae41a +level: medium +logsource: + category: pipe_created + product: windows +modified: 2019/11/10 +references: +- https://threathunterplaybook.com/notebooks/windows/02_execution/WIN-190815181010.html +status: experimental +tags: +- attack.execution +- attack.t1086 +- attack.t1059.001 diff --git a/rules/sigma/windows/pipe_created/sysmon_apt_turla_namedpipes.yml b/rules/sigma/windows/pipe_created/sysmon_apt_turla_namedpipes.yml new file mode 100644 index 00000000..92b3e043 --- /dev/null +++ b/rules/sigma/windows/pipe_created/sysmon_apt_turla_namedpipes.yml @@ -0,0 +1,31 @@ + +title: Turla Group Named Pipes +author: Markus Neis +date: 2017/11/06 +description: Detects a named pipe used by Turla group samples +detection: + SELECTION_1: + EventID: 17 + SELECTION_2: + EventID: 18 + SELECTION_3: + PipeName: + - \atctl + - \userpipe + - \iehelper + - \sdlrpc + - \comnap + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3) +falsepositives: +- Unknown +id: 739915e4-1e70-4778-8b8a-17db02f66db1 +level: critical +logsource: + category: pipe_created + definition: Note that you have to configure logging for PipeEvents in Symson config + product: windows +references: +- Internal Research +status: experimental +tags: +- attack.g0010 diff --git a/rules/sigma/windows/pipe_created/sysmon_cred_dump_tools_named_pipes.yml b/rules/sigma/windows/pipe_created/sysmon_cred_dump_tools_named_pipes.yml new file mode 100644 index 00000000..964ae1f2 --- /dev/null +++ b/rules/sigma/windows/pipe_created/sysmon_cred_dump_tools_named_pipes.yml @@ -0,0 +1,35 @@ + +title: Cred Dump-Tools Named Pipes +author: Teymur Kheirkhabarov, oscd.community +date: 2019/11/01 +description: Detects well-known credential dumping tools execution via specific named + pipes +detection: + SELECTION_1: + EventID: 17 + SELECTION_2: + EventID: 18 + SELECTION_3: + PipeName: + - '*\lsadump*' + - '*\cachedump*' + - '*\wceservicepipe*' + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3) +falsepositives: +- Legitimate Administrator using tool for password recovery +id: 961d0ba2-3eea-4303-a930-2cf78bbfcc5e +level: critical +logsource: + category: pipe_created + product: windows +modified: 2020/08/28 +references: +- https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.001 +- attack.t1003.002 +- attack.t1003.004 +- attack.t1003.005 diff --git a/rules/sigma/windows/pipe_created/sysmon_efspotato_namedpipe.yml b/rules/sigma/windows/pipe_created/sysmon_efspotato_namedpipe.yml new file mode 100644 index 00000000..377d9980 --- /dev/null +++ b/rules/sigma/windows/pipe_created/sysmon_efspotato_namedpipe.yml @@ -0,0 +1,31 @@ + +title: EfsPotato Named Pipe +author: Florian Roth +date: 2021/08/23 +description: Detects the pattern of a pipe name as used by the tool EfsPotato +detection: + SELECTION_1: + EventID: 17 + SELECTION_2: + EventID: 18 + SELECTION_3: + PipeName: + - '*\pipe\\*' + - '*\pipe\srvsvc*' + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3) +falsepositives: +- Unknown +id: 637f689e-b4a5-4a86-be0e-0100a0a33ba2 +level: critical +logsource: + category: pipe_created + definition: Note that you have to configure logging for PipeEvents in Sysmon config + product: windows +references: +- https://twitter.com/SBousseaden/status/1429530155291193354?s=20 +- https://github.com/zcgonvh/EfsPotato +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1055 diff --git a/rules/sigma/windows/pipe_created/sysmon_mal_cobaltstrike.yml b/rules/sigma/windows/pipe_created/sysmon_mal_cobaltstrike.yml new file mode 100644 index 00000000..6da4dde1 --- /dev/null +++ b/rules/sigma/windows/pipe_created/sysmon_mal_cobaltstrike.yml @@ -0,0 +1,46 @@ + +title: CobaltStrike Named Pipe +author: Florian Roth, Wojciech Lesicki +date: 2021/05/25 +description: Detects the creation of a named pipe as used by CobaltStrike +detection: + SELECTION_1: + EventID: 17 + SELECTION_2: + EventID: 18 + SELECTION_3: + PipeName: '*\MSSE-*' + SELECTION_4: + PipeName: '*-server*' + SELECTION_5: + PipeName: \postex_* + SELECTION_6: + PipeName: \postex_ssh_* + SELECTION_7: + PipeName: \status_* + SELECTION_8: + PipeName: \msagent_* + condition: ((SELECTION_1 or SELECTION_2) and ((SELECTION_3 and SELECTION_4) or SELECTION_5 + or SELECTION_6 or SELECTION_7 or SELECTION_8)) +falsepositives: +- Unknown +id: d5601f8c-b26f-4ab0-9035-69e11a8d4ad2 +level: critical +logsource: + category: pipe_created + definition: Note that you have to configure logging for Named Pipe Events in Sysmon + config (Event ID 17 and Event ID 18). In the current popular sysmon configuration + (https://github.com/SwiftOnSecurity/sysmon-config) this is not there, you have + to add it yourself or use this extended version that logs the Named Pipes used + in this Sigma repo (https://github.com/Neo23x0/sysmon-config) + product: windows +references: +- https://twitter.com/d4rksystem/status/1357010969264873472 +- https://labs.f-secure.com/blog/detecting-cobalt-strike-default-modules-via-named-pipe-analysis/ +- https://github.com/Neo23x0/sigma/issues/253 +- https://blog.cobaltstrike.com/2021/02/09/learn-pipe-fitting-for-all-of-your-offense-projects/ +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1055 diff --git a/rules/sigma/windows/pipe_created/sysmon_mal_cobaltstrike_re.yml b/rules/sigma/windows/pipe_created/sysmon_mal_cobaltstrike_re.yml new file mode 100644 index 00000000..85900e8e --- /dev/null +++ b/rules/sigma/windows/pipe_created/sysmon_mal_cobaltstrike_re.yml @@ -0,0 +1,75 @@ + +title: CobaltStrike Named Pipe Pattern Regex +author: Florian Roth +date: 2021/07/30 +description: Detects the creation of a named pipe matching a pattern used by CobaltStrike + Malleable C2 profiles +detection: + SELECTION_1: + EventID: 17 + SELECTION_10: + PipeName|re: \\\\ntsvcs_[0-9a-f]{2} + SELECTION_11: + PipeName|re: \\\\scerpc_?[0-9a-f]{2} + SELECTION_12: + PipeName|re: \\\\PGMessagePipe[0-9a-f]{2} + SELECTION_13: + PipeName|re: \\\\MsFteWds[0-9a-f]{2} + SELECTION_14: + PipeName|re: \\\\f4c3[0-9a-f]{2} + SELECTION_15: + PipeName|re: \\\\fullduplex_[0-9a-f]{2} + SELECTION_16: + PipeName|re: \\\\msrpc_[0-9a-f]{4} + SELECTION_17: + PipeName|re: \\\\win\\\\msrpc_[0-9a-f]{2} + SELECTION_18: + PipeName|re: \\\\f53f[0-9a-f]{2} + SELECTION_19: + PipeName|re: \\\\rpc_[0-9a-f]{2} + SELECTION_2: + EventID: 18 + SELECTION_20: + PipeName|re: \\\\spoolss_[0-9a-f]{2} + SELECTION_21: + PipeName|re: \\\\Winsock2\\\\CatalogChangeListener-[0-9a-f]{3}-0, + SELECTION_3: + PipeName|re: \\\\mojo\.5688\.8052\.(?:183894939787088877|35780273329370473)[0-9a-f]{2} + SELECTION_4: + PipeName|re: \\\\wkssvc_?[0-9a-f]{2} + SELECTION_5: + PipeName|re: \\\\ntsvcs[0-9a-f]{2} + SELECTION_6: + PipeName|re: \\\\DserNamePipe[0-9a-f]{2} + SELECTION_7: + PipeName|re: \\\\SearchTextHarvester[0-9a-f]{2} + SELECTION_8: + PipeName|re: \\\\mypipe\-(?:f|h)[0-9a-f]{2} + SELECTION_9: + PipeName|re: \\\\windows\.update\.manager[0-9a-f]{2,3} + condition: ((SELECTION_1 or SELECTION_2) and (SELECTION_3 or SELECTION_4 or SELECTION_5 + or SELECTION_6 or SELECTION_7 or SELECTION_8 or SELECTION_9 or SELECTION_10 or + SELECTION_11 or SELECTION_12 or SELECTION_13 or SELECTION_14 or SELECTION_15 or + SELECTION_16 or SELECTION_17 or SELECTION_18 or SELECTION_19 or SELECTION_20 or + SELECTION_21)) +falsepositives: +- Unknown +id: 0e7163d4-9e19-4fa7-9be6-000c61aad77a +level: critical +logsource: + category: pipe_created + definition: Note that you have to configure logging for Named Pipe Events in Sysmon + config (Event ID 17 and Event ID 18). In the current popular sysmon configuration + (https://github.com/SwiftOnSecurity/sysmon-config) this is not there, you have + to add it yourself or use this extended version that logs the Named Pipes used + in this Sigma repo (https://github.com/Neo23x0/sysmon-config) + product: windows +modified: 2021/09/02 +references: +- https://svch0st.medium.com/guide-to-named-pipes-and-hunting-for-cobalt-strike-pipes-dc46b2c5f575 +- https://gist.github.com/MHaggis/6c600e524045a6d49c35291a21e10752 +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1055 diff --git a/rules/sigma/windows/pipe_created/sysmon_mal_namedpipes.yml b/rules/sigma/windows/pipe_created/sysmon_mal_namedpipes.yml new file mode 100644 index 00000000..ee7b2a27 --- /dev/null +++ b/rules/sigma/windows/pipe_created/sysmon_mal_namedpipes.yml @@ -0,0 +1,49 @@ + +title: Malicious Named Pipe +author: Florian Roth, blueteam0ps +date: 2017/11/06 +description: Detects the creation of a named pipe used by known APT malware +detection: + SELECTION_1: + EventID: 17 + SELECTION_2: + EventID: 18 + SELECTION_3: + PipeName: + - \isapi_http + - \isapi_dg + - \isapi_dg2 + - \sdlrpc + - \ahexec + - \winsession + - \lsassw + - \46a676ab7f179e511e30dd2dc41bd388 + - \9f81f59bc58452127884ce513865ed20 + - \e710f28d59aa529d6792ca6ff0ca1b34 + - \rpchlp_3 + - \NamePipe_MoreWindows + - \pcheap_reuse + - \gruntsvc + - \583da945-62af-10e8-4902-a8f205c72b2e + - \bizkaz + - \svcctl + - \Posh* + - \jaccdpqnvbrrxlaf + - \csexecsvc + - \6e7645c4-32c5-4fe3-aabf-e94c2f4370e7 + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3) +falsepositives: +- Unknown +id: fe3ac066-98bb-432a-b1e7-a5229cb39d4a +level: critical +logsource: + category: pipe_created + definition: Note that you have to configure logging for PipeEvents in Sysmon config + product: windows +references: +- Various sources +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1055 diff --git a/rules/sigma/windows/pipe_created/sysmon_powershell_execution_pipe.yml b/rules/sigma/windows/pipe_created/sysmon_powershell_execution_pipe.yml new file mode 100644 index 00000000..d0b1567f --- /dev/null +++ b/rules/sigma/windows/pipe_created/sysmon_powershell_execution_pipe.yml @@ -0,0 +1,26 @@ + +title: T1086 PowerShell Execution +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2019/09/12 +description: Detects execution of PowerShell +detection: + SELECTION_1: + EventID: 17 + SELECTION_2: + EventID: 18 + SELECTION_3: + PipeName: \PSHost* + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3) +falsepositives: +- Unknown +id: ac7102b4-9e1e-4802-9b4f-17c5524c015c +level: informational +logsource: + category: pipe_created + product: windows +references: +- https://threathunterplaybook.com/notebooks/windows/02_execution/WIN-190410151110.html +status: experimental +tags: +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/pipe_created/sysmon_psexec_pipes_artifacts.yml b/rules/sigma/windows/pipe_created/sysmon_psexec_pipes_artifacts.yml new file mode 100644 index 00000000..eb11448d --- /dev/null +++ b/rules/sigma/windows/pipe_created/sysmon_psexec_pipes_artifacts.yml @@ -0,0 +1,31 @@ + +title: PsExec Pipes Artifacts +author: Nikita Nazarov, oscd.community +date: 2020/05/10 +description: Detecting use PsExec via Pipe Creation/Access to pipes +detection: + SELECTION_1: + EventID: 17 + SELECTION_2: + EventID: 18 + SELECTION_3: + PipeName: + - psexec* + - paexec* + - remcom* + - csexec* + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3) +falsepositives: +- Legitimate Administrator activity +id: 9e77ed63-2ecf-4c7b-b09d-640834882028 +level: medium +logsource: + category: pipe_created + definition: Note that you have to configure logging for PipeEvents in Symson config + product: windows +references: +- https://drive.google.com/file/d/1lKya3_mLnR3UQuCoiYruO3qgu052_iS_/view +status: experimental +tags: +- attack.lateral_movement +- attack.t1021.002 diff --git a/rules/sigma/windows/pipe_created/sysmon_susp_adfs_namedpipe_connection.yml b/rules/sigma/windows/pipe_created/sysmon_susp_adfs_namedpipe_connection.yml new file mode 100644 index 00000000..7715b1ee --- /dev/null +++ b/rules/sigma/windows/pipe_created/sysmon_susp_adfs_namedpipe_connection.yml @@ -0,0 +1,37 @@ + +title: ADFS Database Named Pipe Connection +author: Roberto Rodriguez @Cyb3rWard0g +date: 2021/10/08 +description: Detects suspicious local connections via a named pipe to the AD FS configuration + database (Windows Internal Database). Used to access information such as the AD + FS configuration settings which contains sensitive information used to sign SAML + tokens. +detection: + SELECTION_1: + PipeName: \MICROSOFT##WID\tsql\query + SELECTION_2: + Image: + - '*Microsoft.IdentityServer.ServiceHost.exe' + - '*Microsoft.Identity.Health.Adfs.PshSurrogate.exe' + - '*AzureADConnect.exe' + - '*Microsoft.Tri.Sensor.exe' + - '*wsmprovhost.exe' + - '*mmc.exe' + - '*sqlservr.exe' + condition: (SELECTION_1 and not (SELECTION_2)) +falsepositives: +- Processes in the filter condition +id: 1ea13e8c-03ea-409b-877d-ce5c3d2c1cb3 +level: critical +logsource: + product: windows + service: pipe_connected +modified: 2021/10/08 +references: +- https://github.com/Azure/Azure-Sentinel/blob/master/Detections/SecurityEvent/ADFSDBNamedPipeConnection.yaml +- https://o365blog.com/post/adfs/ +- https://github.com/Azure/SimuLand +status: experimental +tags: +- attack.collection +- attack.t1005 diff --git a/rules/sigma/windows/pipe_created/sysmon_susp_cobaltstrike_pipe_patterns.yml b/rules/sigma/windows/pipe_created/sysmon_susp_cobaltstrike_pipe_patterns.yml new file mode 100644 index 00000000..9783bdd7 --- /dev/null +++ b/rules/sigma/windows/pipe_created/sysmon_susp_cobaltstrike_pipe_patterns.yml @@ -0,0 +1,73 @@ + +title: CobaltStrike Named Pipe Patterns +author: Florian Roth, Christian Burkard +date: 2021/07/30 +description: Detects the creation of a named pipe with a pattern found in CobaltStrike + malleable C2 profiles +detection: + SELECTION_1: + EventID: 17 + SELECTION_2: + EventID: 18 + SELECTION_3: + PipeName: + - \mojo.5688.8052.183894939787088877* + - \mojo.5688.8052.35780273329370473* + - \mypipe-f* + - \mypipe-h* + - \ntsvcs* + - \scerpc* + - \win_svc* + - \spoolss* + - \msrpc_* + - \win\msrpc_* + - \wkssvc* + - \f53f* + - \windows.update.manager* + - \SearchTextHarvester* + - \DserNamePipe* + - \PGMessagePipe* + - \MsFteWds* + - \f4c3* + - \fullduplex_* + - \rpc_* + SELECTION_4: + PipeName: + - \demoagent_11 + - \demoagent_22 + SELECTION_5: + PipeName: \Winsock2\CatalogChangeListener-* + SELECTION_6: + PipeName: '*-0,' + SELECTION_7: + PipeName: + - \wkssvc + - \spoolss + - \scerpc + - \ntsvcs + - \SearchTextHarvester + - \PGMessagePipe + - \MsFteWds + condition: ((SELECTION_1 or SELECTION_2) and ((SELECTION_3 or SELECTION_4) or (SELECTION_5 + and SELECTION_6)) and not (SELECTION_7)) +falsepositives: +- Chrome instances using the exactly same name pipe named mojo.something +id: 85adeb13-4fc9-4e68-8a4a-c7cb2c336eb7 +level: high +logsource: + category: pipe_created + definition: Note that you have to configure logging for Named Pipe Events in Sysmon + config (Event ID 17 and Event ID 18). In the current popular sysmon configuration + (https://github.com/SwiftOnSecurity/sysmon-config) this is not there, you have + to add it yourself or use this extended version that logs the Named Pipes used + in this Sigma repo (https://github.com/Neo23x0/sysmon-config) + product: windows +modified: 2021/08/26 +references: +- https://svch0st.medium.com/guide-to-named-pipes-and-hunting-for-cobalt-strike-pipes-dc46b2c5f575 +- https://gist.github.com/MHaggis/6c600e524045a6d49c35291a21e10752 +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1055 diff --git a/rules/sigma/windows/pipe_created/sysmon_susp_wmi_consumer_namedpipe.yml b/rules/sigma/windows/pipe_created/sysmon_susp_wmi_consumer_namedpipe.yml new file mode 100644 index 00000000..25709e5f --- /dev/null +++ b/rules/sigma/windows/pipe_created/sysmon_susp_wmi_consumer_namedpipe.yml @@ -0,0 +1,28 @@ + +title: WMI Event Consumer Created Named Pipe +author: Florian Roth +date: 2021/09/01 +description: Detects the WMI Event Consumer service scrcons.exe creating a named pipe +detection: + SELECTION_1: + EventID: 17 + SELECTION_2: + EventID: 18 + SELECTION_3: + Image: '*\scrcons.exe' + condition: ((SELECTION_1 or SELECTION_2) and SELECTION_3) +falsepositives: +- Unknown +id: 493fb4ab-cdcc-4c4f-818c-0e363bd1e4bb +level: high +logsource: + category: pipe_created + definition: Note that you have to configure logging for Named Pipe Events in Sysmon + config (Event ID 17 and Event ID 18). In the current popular sysmon configuration + (https://github.com/SwiftOnSecurity/sysmon-config) this is not there, you have + to add it yourself or use this extended version that logs the Named Pipes used + in this Sigma repo (https://github.com/Neo23x0/sysmon-config) + product: windows +references: +- https://github.com/RiccardoAncarani/LiquidSnake +status: experimental diff --git a/rules/sigma/windows/powershell/powershell_classic/powershell_classic_alternate_powershell_hosts.yml b/rules/sigma/windows/powershell/powershell_classic/powershell_classic_alternate_powershell_hosts.yml new file mode 100644 index 00000000..3cdd5505 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_classic/powershell_classic_alternate_powershell_hosts.yml @@ -0,0 +1,35 @@ + +title: Alternate PowerShell Hosts +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/08/11 +description: Detects alternate PowerShell hosts potentially bypassing detections looking + for powershell.exe +detection: + SELECTION_1: + EventID: 400 + SELECTION_2: + HostApplication: '*' + SELECTION_3: + HostApplication: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe* + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) +falsepositives: +- Programs using PowerShell directly without invocation of a dedicated interpreter +- MSP Detection Searcher +- Citrix ConfigSync.ps1 +id: d7326048-328b-4d5e-98af-86e84b17c765 +level: medium +logsource: + definition: fields have to be extract from event + product: windows + service: powershell-classic +modified: 2021/09/21 +references: +- https://threathunterplaybook.com/notebooks/windows/02_execution/WIN-190815181010.html +related: +- id: 64e8e417-c19a-475a-8d19-98ea705394cc + type: derived +status: test +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_classic/powershell_classic_powercat.yml b/rules/sigma/windows/powershell/powershell_classic/powershell_classic_powercat.yml new file mode 100644 index 00000000..3e90e6d1 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_classic/powershell_classic_powercat.yml @@ -0,0 +1,34 @@ + +title: Netcat The Powershell Version +author: frack113 +date: 2021/07/21 +description: Adversaries may use a non-application layer protocol for communication + between host and C2 server or among infected hosts within a network +detection: + SELECTION_1: + EventID: 400 + SELECTION_2: + HostApplication: + - '*powercat *' + - '*powercat.ps1*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: c5b20776-639a-49bf-94c7-84f912b91c15 +level: medium +logsource: + definition: fields have to be extract from event + product: windows + service: powershell-classic +modified: 2021/09/07 +references: +- https://nmap.org/ncat/ +- https://github.com/besimorhino/powercat +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1095/T1095.md +related: +- id: bf7286e7-c0be-460b-a7e8-5b2e07ecc2f2 + type: derived +status: experimental +tags: +- attack.command_and_control +- attack.t1095 diff --git a/rules/sigma/windows/powershell/powershell_classic/powershell_classic_remote_powershell_session.yml b/rules/sigma/windows/powershell/powershell_classic/powershell_classic_remote_powershell_session.yml new file mode 100644 index 00000000..0efa8ae3 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_classic/powershell_classic_remote_powershell_session.yml @@ -0,0 +1,35 @@ + +title: Remote PowerShell Session +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/08/10 +description: Detects remote PowerShell sessions +detection: + SELECTION_1: + EventID: 400 + SELECTION_2: + HostName: ServerRemoteHost + SELECTION_3: + HostApplication: '*wsmprovhost.exe*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Legitimate use remote PowerShell sessions +id: 60167e5c-84b2-4c95-a7ac-86281f27c445 +level: high +logsource: + definition: fields have to be extract from event + product: windows + service: powershell-classic +modified: 2021/09/21 +references: +- https://threathunterplaybook.com/notebooks/windows/02_execution/WIN-190511223310.html +related: +- id: 96b9f619-aa91-478f-bacb-c3e50f8df575 + type: derived +status: test +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 +- attack.lateral_movement +- attack.t1021.006 +- attack.t1028 diff --git a/rules/sigma/windows/powershell/powershell_classic/powershell_classic_susp_athremotefxvgpudisablementcommand.yml b/rules/sigma/windows/powershell/powershell_classic/powershell_classic_susp_athremotefxvgpudisablementcommand.yml new file mode 100644 index 00000000..6cf210da --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_classic/powershell_classic_susp_athremotefxvgpudisablementcommand.yml @@ -0,0 +1,40 @@ + +title: Abusable Invoke-ATHRemoteFXvGPUDisablementCommand +author: frack113 +date: 2021/07/13 +description: RemoteFXvGPUDisablement.exe is an abusable, signed PowerShell host executable + that was introduced in Windows 10 and Server 2019 (OS Build 17763.1339). +detection: + SELECTION_1: + HostApplication: '*Invoke-ATHRemoteFXvGPUDisablementCommand *' + SELECTION_2: + HostApplication: + - '*-ModuleName *' + - '*-ModulePath *' + - '*-ScriptBlock *' + - '*-RemoteFXvGPUDisablementFilePath*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: f65e22f9-819e-4f96-9c7b-498364ae7a25 +level: medium +logsource: + definition: fields have to be extract from event + product: windows + service: powershell-classic +modified: 2021/09/07 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218/T1218.md +- https://github.com/redcanaryco/AtomicTestHarnesses/blob/master/TestHarnesses/T1218_SignedBinaryProxyExecution/InvokeRemoteFXvGPUDisablementCommand.ps1 +related: +- id: 38a7625e-b2cb-485d-b83d-aff137d859f4 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1218 diff --git a/rules/sigma/windows/powershell/powershell_classic/powershell_classic_susp_zip_compress.yml b/rules/sigma/windows/powershell/powershell_classic/powershell_classic_susp_zip_compress.yml new file mode 100644 index 00000000..0effda91 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_classic/powershell_classic_susp_zip_compress.yml @@ -0,0 +1,34 @@ + +title: Zip A Folder With PowerShell For Staging In Temp +author: frack113 +date: 2021/07/20 +description: Use living off the land tools to zip a file and stage it in the Windows + temporary folder for later exfiltration +detection: + SELECTION_1: + HostApplication: '*Compress-Archive *' + SELECTION_2: + HostApplication: '* -Path *' + SELECTION_3: + HostApplication: '* -DestinationPath *' + SELECTION_4: + HostApplication: '*$env:TEMP\\*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: 71ff406e-b633-4989-96ec-bc49d825a412 +level: medium +logsource: + definition: fields have to be extract from event + product: windows + service: powershell-classic +modified: 2021/09/07 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1074.001/T1074.001.md +related: +- id: b7a3c9a3-09ea-4934-8864-6a32cacd98d9 + type: derived +status: experimental +tags: +- attack.collection +- attack.t1074.001 diff --git a/rules/sigma/windows/powershell/powershell_classic/powershell_classic_suspicious_download.yml b/rules/sigma/windows/powershell/powershell_classic/powershell_classic_suspicious_download.yml new file mode 100644 index 00000000..86fec49a --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_classic/powershell_classic_suspicious_download.yml @@ -0,0 +1,32 @@ + +title: Suspicious PowerShell Download +author: Florian Roth +date: 2017/03/05 +description: Detects suspicious PowerShell download command +detection: + SELECTION_1: + EventID: 400 + SELECTION_2: + HostApplication: '*System.Net.WebClient*' + SELECTION_3: + HostApplication: '*.DownloadFile(*' + SELECTION_4: + HostApplication: '*.DownloadString(*' + condition: (SELECTION_1 and SELECTION_2 and (SELECTION_3 or SELECTION_4)) +falsepositives: +- PowerShell scripts that download content from the Internet +id: 3236fcd0-b7e3-4433-b4f8-86ad61a9af2d +level: medium +logsource: + definition: fields have to be extract from event + product: windows + service: powershell-classic +modified: 2021/09/21 +related: +- id: 65531a81-a694-4e31-ae04-f8ba5bc33759 + type: derived +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_classic/powershell_delete_volume_shadow_copies.yml b/rules/sigma/windows/powershell/powershell_classic/powershell_delete_volume_shadow_copies.yml new file mode 100644 index 00000000..bf046280 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_classic/powershell_delete_volume_shadow_copies.yml @@ -0,0 +1,37 @@ + +title: Delete Volume Shadow Copies Via WMI With PowerShell +author: frack113 +date: 2021/06/03 +description: Shadow Copies deletion using operating systems utilities via PowerShell +detection: + SELECTION_1: + HostApplication: '*Get-WmiObject*' + SELECTION_2: + HostApplication: '* Win32_Shadowcopy*' + SELECTION_3: + HostApplication: + - '*Delete()*' + - '*Remove-WmiObject*' + SELECTION_4: + EventID: 400 + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Legitimate Administrator deletes Shadow Copies using operating systems utilities + for legitimate reason +fields: +- HostApplication +id: 87df9ee1-5416-453a-8a08-e8d4a51e9ce1 +level: critical +logsource: + definition: fields have to be extract from event + product: windows + service: powershell-classic +modified: 2021/08/28 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1490/T1490.md +- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/win_shadow_copies_deletion.yml +- https://www.fortinet.com/blog/threat-research/stomping-shadow-copies-a-second-look-into-deletion-methods +status: experimental +tags: +- attack.impact +- attack.t1490 diff --git a/rules/sigma/windows/powershell/powershell_classic/powershell_downgrade_attack.yml b/rules/sigma/windows/powershell/powershell_classic/powershell_downgrade_attack.yml new file mode 100644 index 00000000..7abf18f6 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_classic/powershell_downgrade_attack.yml @@ -0,0 +1,31 @@ + +title: PowerShell Downgrade Attack +author: Florian Roth (rule), Lee Holmes (idea), Harish Segar (improvements) +date: 2017/03/22 +description: Detects PowerShell downgrade attack by comparing the host versions with + the actually used engine version 2.0 +detection: + SELECTION_1: + EventID: 400 + SELECTION_2: + EngineVersion: 2.* + SELECTION_3: + HostVersion: 2.* + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) +falsepositives: +- Penetration Test +- Unknown +id: 6331d09b-4785-4c13-980f-f96661356249 +level: medium +logsource: + definition: fields have to be extract from event + product: windows + service: powershell-classic +references: +- http://www.leeholmes.com/blog/2017/03/17/detecting-and-preventing-powershell-downgrade-attacks/ +status: experimental +tags: +- attack.defense_evasion +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_classic/powershell_exe_calling_ps.yml b/rules/sigma/windows/powershell/powershell_classic/powershell_exe_calling_ps.yml new file mode 100644 index 00000000..1ca34713 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_classic/powershell_exe_calling_ps.yml @@ -0,0 +1,34 @@ + +title: PowerShell Called from an Executable Version Mismatch +author: Sean Metcalf (source), Florian Roth (rule) +date: 2017/03/05 +description: Detects PowerShell called from an executable by the version mismatch + method +detection: + SELECTION_1: + EventID: 400 + SELECTION_2: + EngineVersion: + - 2.* + - 4.* + - 5.* + SELECTION_3: + HostVersion: 3.* + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Penetration Tests +- Unknown +id: c70e019b-1479-4b65-b0cc-cd0c6093a599 +level: high +logsource: + definition: fields have to be extract from event + product: windows + service: powershell-classic +references: +- https://adsecurity.org/?p=2921 +status: experimental +tags: +- attack.defense_evasion +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_classic/powershell_renamed_powershell.yml b/rules/sigma/windows/powershell/powershell_classic/powershell_renamed_powershell.yml new file mode 100644 index 00000000..1dc14c8d --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_classic/powershell_renamed_powershell.yml @@ -0,0 +1,31 @@ + +title: Renamed Powershell Under Powershell Channel +author: Harish Segar, frack113 +date: 2020/06/29 +description: Detects renamed powershell +detection: + SELECTION_1: + EventID: 400 + SELECTION_2: + HostName: ConsoleHost + SELECTION_3: + HostApplication: + - powershell.exe* + - C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe* + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) +falsepositives: +- unknown +id: 30a8cb77-8eb3-4cfb-8e79-ad457c5a4592 +level: low +logsource: + definition: fields have to be extract from event + product: windows + service: powershell-classic +modified: 2021/08/18 +references: +- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse +status: test +tags: +- attack.execution +- attack.t1086 +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_classic/powershell_tamper_with_windows_defender.yml b/rules/sigma/windows/powershell/powershell_classic/powershell_tamper_with_windows_defender.yml new file mode 100644 index 00000000..8c790814 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_classic/powershell_tamper_with_windows_defender.yml @@ -0,0 +1,33 @@ + +title: Tamper Windows Defender +author: frack113 +date: 2021/06/07 +description: Attempting to disable scheduled scanning and other parts of windows defender + atp. +detection: + SELECTION_1: + EventID: 600 + SELECTION_2: + HostApplication: '*Set-MpPreference*' + SELECTION_3: + HostApplication: + - '*-DisableRealtimeMonitoring 1*' + - '*-DisableBehaviorMonitoring 1*' + - '*-DisableScriptScanning 1*' + - '*-DisableBlockAtFirstSeen 1*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: ec19ebab-72dc-40e1-9728-4c0b805d722c +level: high +logsource: + definition: fields have to be extract from event + product: windows + service: powershell-classic +modified: 2021/08/16 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1562.001/T1562.001.md +status: experimental +tags: +- attack.defense_evasion +- attack.t1562.001 diff --git a/rules/sigma/windows/powershell/powershell_classic/powershell_wsman_com_provider_no_powershell.yml b/rules/sigma/windows/powershell/powershell_classic/powershell_wsman_com_provider_no_powershell.yml new file mode 100644 index 00000000..113645d7 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_classic/powershell_wsman_com_provider_no_powershell.yml @@ -0,0 +1,31 @@ + +title: Suspicious Non PowerShell WSMAN COM Provider +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/06/24 +description: Detects suspicious use of the WSMAN provider without PowerShell.exe as + the host application. +detection: + SELECTION_1: + ProviderName: WSMan + SELECTION_2: + HostApplication: '*powershell*' + condition: (SELECTION_1 and not (SELECTION_2)) +falsepositives: +- Unknown +id: df9a0e0e-fedb-4d6c-8668-d765dfc92aa7 +level: medium +logsource: + definition: fields have to be extract from event + product: windows + service: powershell-classic +modified: 2021/08/30 +references: +- https://twitter.com/chadtilbury/status/1275851297770610688 +- https://bohops.com/2020/05/12/ws-management-com-another-approach-for-winrm-lateral-movement/ +- https://github.com/bohops/WSMan-WinRM +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.lateral_movement +- attack.t1021.003 diff --git a/rules/sigma/windows/powershell/powershell_classic/powershell_xor_commandline.yml b/rules/sigma/windows/powershell/powershell_classic/powershell_xor_commandline.yml new file mode 100644 index 00000000..8cd5062f --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_classic/powershell_xor_commandline.yml @@ -0,0 +1,31 @@ + +title: Suspicious XOR Encoded PowerShell Command Line +author: Teymur Kheirkhabarov, Harish Segar (rule) +date: 2020/06/29 +description: Detects suspicious powershell process which includes bxor command, alternative + obfuscation method to b64 encoded commands. +detection: + SELECTION_1: + EventID: 400 + SELECTION_2: + HostName: ConsoleHost + SELECTION_3: + HostApplication: + - '*bxor*' + - '*join*' + - '*char*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- unknown +id: 812837bb-b17f-45e9-8bd0-0ec35d2e3bd6 +level: medium +logsource: + definition: fields have to be extract from event + product: windows + service: powershell-classic +modified: 2021/08/28 +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_alternate_powershell_hosts.yml b/rules/sigma/windows/powershell/powershell_module/powershell_alternate_powershell_hosts.yml new file mode 100644 index 00000000..6448f538 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_alternate_powershell_hosts.yml @@ -0,0 +1,32 @@ + +title: Alternate PowerShell Hosts +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/08/11 +description: Detects alternate PowerShell hosts potentially bypassing detections looking + for powershell.exe +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + ContextInfo: '*' + SELECTION_3: + ContextInfo: '*powershell.exe*' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) +falsepositives: +- Programs using PowerShell directly without invocation of a dedicated interpreter +- MSP Detection Searcher +- Citrix ConfigSync.ps1 +id: 64e8e417-c19a-475a-8d19-98ea705394cc +level: medium +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +modified: 2021/09/21 +references: +- https://threathunterplaybook.com/notebooks/windows/02_execution/WIN-190815181010.html +status: test +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_bad_opsec_artifacts.yml b/rules/sigma/windows/powershell/powershell_module/powershell_bad_opsec_artifacts.yml new file mode 100644 index 00000000..9099136d --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_bad_opsec_artifacts.yml @@ -0,0 +1,42 @@ + +title: Bad Opsec Powershell Code Artifacts +author: ok @securonix invrep_de, oscd.community +date: 2020/10/09 +description: Focuses on trivial artifacts observed in variants of prevalent offensive + ps1 payloads, including Cobalt Strike Beacon, PoshC2, Powerview, Letmein, Empire, + Powersploit, and other attack payloads that often undergo minimal changes by attackers + due to bad opsec. +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload: + - '*$DoIt*' + - '*harmj0y*' + - '*mattifestation*' + - '*_RastaMouse*' + - '*tifkin_*' + - '*0xdeadbeef*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Moderate-to-low; Despite the shorter length/lower entropy for some of these, because + of high specificity, fp appears to be fairly limited in many environments. +id: 8d31a8ce-46b5-4dd6-bdc3-680931f1db86 +level: critical +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://newtonpaul.com/analysing-fileless-malware-cobalt-strike-beacon/ +- https://labs.sentinelone.com/top-tier-russian-organized-cybercrime-group-unveils-fileless-stealthy-powertrick-backdoor-for-high-value-targets/ +- https://www.mdeditor.tw/pl/pgRt +related: +- id: 73e733cc-1ace-3212-a107-ff2523cc9fc3 + type: derived +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_clear_powershell_history.yml b/rules/sigma/windows/powershell/powershell_module/powershell_clear_powershell_history.yml new file mode 100644 index 00000000..80fb93d2 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_clear_powershell_history.yml @@ -0,0 +1,42 @@ + +title: Clear PowerShell History +author: Ilyas Ochkov, Jonhnathan Ribeiro, Daniil Yugoslavskiy, oscd.community +date: 2019/10/25 +description: Detects keywords that could indicate clearing PowerShell history +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload: + - '*del*' + - '*Remove-Item*' + - '*rm*' + SELECTION_3: + Payload: '*(Get-PSReadlineOption).HistorySavePath*' + SELECTION_4: + Payload: '*Set-PSReadlineOption*' + SELECTION_5: + Payload: '*–HistorySaveStyle*' + SELECTION_6: + Payload: '*SaveNothing*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and SELECTION_5 + and SELECTION_6))) +falsepositives: +- Legitimate PowerShell scripts +id: f99276ad-d122-4989-a09a-d00904a5f9d2 +level: medium +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +modified: 2020/11/28 +references: +- https://gist.github.com/hook-s3c/7363a856c3cdbadeb71085147f042c1a +related: +- id: dfba4ce1-e0ea-495f-986e-97140f31af2d + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1070.003 +- attack.t1146 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_decompress_commands.yml b/rules/sigma/windows/powershell/powershell_module/powershell_decompress_commands.yml new file mode 100644 index 00000000..295c8f08 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_decompress_commands.yml @@ -0,0 +1,31 @@ + +title: PowerShell Decompress Commands +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/05/02 +description: A General detection for specific decompress commands in PowerShell logs. + This could be an adversary decompressing files. +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload: '*Expand-Archive*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 1ddc1472-8e52-4f7d-9f11-eab14fc171f5 +level: informational +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/OTRF/detection-hackathon-apt29/issues/8 +- https://threathunterplaybook.com/evals/apt29/detections/4.A.3_09F29912-8E93-461E-9E89-3F06F6763383.html +related: +- id: 81fbdce6-ee49-485a-908d-1a728c5dcb09 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1140 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_get_clipboard.yml b/rules/sigma/windows/powershell/powershell_module/powershell_get_clipboard.yml new file mode 100644 index 00000000..85d9456a --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_get_clipboard.yml @@ -0,0 +1,31 @@ + +title: PowerShell Get Clipboard +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/05/02 +description: A General detection for the Get-Clipboard commands in PowerShell logs. + This could be an adversary capturing clipboard contents. +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload: '*Get-Clipboard*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 4cbd4f12-2e22-43e3-882f-bff3247ffb78 +level: medium +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/OTRF/detection-hackathon-apt29/issues/16 +- https://threathunterplaybook.com/evals/apt29/detections/7.A.2_F4609F7E-C4DB-4327-91D4-59A58C962A02.html +related: +- id: 5486f63a-aa4c-488d-9a61-c9192853099f + type: derived +status: experimental +tags: +- attack.collection +- attack.t1115 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_clip.yml b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_clip.yml new file mode 100644 index 00000000..6184e363 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_clip.yml @@ -0,0 +1,31 @@ + +title: Invoke-Obfuscation CLIP+ Launcher +author: Jonathan Cheong, oscd.community +date: 2020/10/13 +description: Detects Obfuscated use of Clip.exe to execute PowerShell +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload|re: .*cmd.{0,5}(?:/c|/r).+clip(?:\.exe)?.{0,4}&&.+clipboard]::\(\s\\"\{\d\}.+\-f.+" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: a136cde0-61ad-4a61-9b82-8dc490e60dd2 +level: high +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 73e67340-0d25-11eb-adc1-0242ac120002 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_obfuscated_iex.yml b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_obfuscated_iex.yml new file mode 100644 index 00000000..976895c4 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_obfuscated_iex.yml @@ -0,0 +1,44 @@ + +title: Invoke-Obfuscation Obfuscated IEX Invocation +author: Daniel Bohannon (@Mandiant/@FireEye), oscd.community +date: 2019/11/08 +description: Detects all variations of obfuscated powershell IEX invocation code generated + by Invoke-Obfuscation framework from the following code block — https://github.com/danielbohannon/Invoke-Obfuscation/blob/master/Out-ObfuscatedStringCommand.ps1#L873-L888 +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload|re: \$PSHome\[\s*\d{1,3}\s*\]\s*\+\s*\$PSHome\[ + SELECTION_3: + Payload|re: \$ShellId\[\s*\d{1,3}\s*\]\s*\+\s*\$ShellId\[ + SELECTION_4: + Payload|re: \$env:Public\[\s*\d{1,3}\s*\]\s*\+\s*\$env:Public\[ + SELECTION_5: + Payload|re: \$env:ComSpec\[(\s*\d{1,3}\s*,){2} + SELECTION_6: + Payload|re: \\\\*mdr\\\\*\W\s*\)\.Name + SELECTION_7: + Payload|re: \$VerbosePreference\.ToString\( + SELECTION_8: + Payload|re: \String\]\s*\$VerbosePreference + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3 or SELECTION_4 or SELECTION_5 + or SELECTION_6 or SELECTION_7 or SELECTION_8)) +falsepositives: +- Unknown +id: 2f211361-7dce-442d-b78a-c04039677378 +level: high +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +related: +- id: 1b9dc62e-6e9e-42a3-8990-94d7a10007f7 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_stdin.yml b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_stdin.yml new file mode 100644 index 00000000..28b41cc7 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_stdin.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation STDIN+ Launcher +author: Jonathan Cheong, oscd.community +date: 2020/10/15 +description: Detects Obfuscated use of stdin to execute PowerShell +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload|re: .*cmd.{0,5}(?:/c|/r).+powershell.+(?:\$\{?input\}?|noexit).+" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 9ac8b09b-45de-4a07-9da1-0de8c09304a3 +level: high +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 779c8c12-0eb1-11eb-adc1-0242ac120002 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_var.yml b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_var.yml new file mode 100644 index 00000000..369eac7f --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_var.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation VAR+ Launcher +author: Jonathan Cheong, oscd.community +date: 2020/10/15 +description: Detects Obfuscated use of Environment Variables to execute PowerShell +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload|re: .*cmd.{0,5}(?:/c|/r)(?:\s|)"set\s[a-zA-Z]{3,6}.*(?:\{\d\}){1,}\\"\s+?\-f(?:.*\)){1,}.*" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 6bfb8fa7-b2e7-4f6c-8d9d-824e5d06ea9e +level: high +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 0adfbc14-0ed1-11eb-adc1-0242ac120002 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_compress.yml b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_compress.yml new file mode 100644 index 00000000..0bc19a74 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_compress.yml @@ -0,0 +1,31 @@ + +title: Invoke-Obfuscation COMPRESS OBFUSCATION +author: Timur Zinniatullin, oscd.community +date: 2020/10/18 +description: Detects Obfuscated Powershell via COMPRESS OBFUSCATION +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload|re: (?i).*new-object.*(?:system\.io\.compression\.deflatestream|system\.io\.streamreader).*text\.encoding\]::ascii.*readtoend + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 7034cbbb-cc55-4dc2-8dad-36c0b942e8f1 +level: medium +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 20e5497e-331c-4cd5-8d36-935f6e2a9a07 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_rundll.yml b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_rundll.yml new file mode 100644 index 00000000..a677e012 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_rundll.yml @@ -0,0 +1,31 @@ + +title: Invoke-Obfuscation RUNDLL LAUNCHER +author: Timur Zinniatullin, oscd.community +date: 2020/10/18 +description: Detects Obfuscated Powershell via RUNDLL LAUNCHER +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload|re: (?i).*rundll32(?:\.exe)?(?:\s+)?shell32\.dll.*shellexec_rundll.*powershell.*" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: a23791fe-8846-485a-b16b-ca691e1b03d4 +level: medium +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: e6cb92b4-b470-4eb8-8a9d-d63e8583aae0 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_stdin.yml b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_stdin.yml new file mode 100644 index 00000000..da15627c --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_stdin.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation Via Stdin +author: Nikita Nazarov, oscd.community +date: 2020/10/12 +description: Detects Obfuscated Powershell via Stdin in Scripts +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload|re: (?i).*(set).*&&\s?set.*(environment|invoke|\$\{?input).*&&.*" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: c72aca44-8d52-45ad-8f81-f96c4d3c755e +level: high +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: 86b896ba-ffa1-4fea-83e3-ee28a4c915c7 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_use_clip.yml b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_use_clip.yml new file mode 100644 index 00000000..e69a7375 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_use_clip.yml @@ -0,0 +1,30 @@ + +title: Invoke-Obfuscation Via Use Clip +author: Nikita Nazarov, oscd.community +date: 2020/10/09 +description: Detects Obfuscated Powershell via use Clip.exe in Scripts +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload|re: (?i).*?echo.*clip.*&&.*(Clipboard|i`?n`?v`?o`?k`?e`?).* + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: ebdf49d8-b89c-46c9-8fdf-2c308406f6bd +level: high +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: db92dd33-a3ad-49cf-8c2c-608c3e30ace0 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_use_mhsta.yml b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_use_mhsta.yml new file mode 100644 index 00000000..e3b53014 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_use_mhsta.yml @@ -0,0 +1,31 @@ + +title: Invoke-Obfuscation Via Use MSHTA +author: Nikita Nazarov, oscd.community +date: 2020/10/08 +description: Detects Obfuscated Powershell via use MSHTA in Scripts +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload|re: (?i).*(set).*(&&).*(mshta).*(vbscript:createobject).*(\.run).*\(window\.close\).*" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 07ad2ea8-6a55-4ac6-bf3e-91b8e59676eb +level: high +logsource: + definition: PowerShell Module Logging must be enabledd + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: e55a5195-4724-480e-a77e-3ebe64bd3759 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_use_rundll32.yml b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_use_rundll32.yml new file mode 100644 index 00000000..80330a47 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_use_rundll32.yml @@ -0,0 +1,31 @@ + +title: Invoke-Obfuscation Via Use Rundll32 +author: Nikita Nazarov, oscd.community +date: 2019/10/08 +description: Detects Obfuscated Powershell via use Rundll32 in Scripts +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload|re: (?i).*&&.*rundll32.*shell32\.dll.*shellexec_rundll.*(value|invoke|comspec|iex).*" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 88a22f69-62f9-4b8a-aa00-6b0212f2f05a +level: high +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: a5a30a6e-75ca-4233-8b8c-42e0f2037d3b + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_var.yml b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_var.yml new file mode 100644 index 00000000..f86e34c8 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_invoke_obfuscation_via_var.yml @@ -0,0 +1,31 @@ + +title: Invoke-Obfuscation VAR++ LAUNCHER OBFUSCATION +author: Timur Zinniatullin, oscd.community +date: 2020/10/13 +description: Detects Obfuscated Powershell via VAR++ LAUNCHER +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + Payload|re: (?i).*&&set.*(\{\d\}){2,}\\"\s+?\-f.*&&.*cmd.*/c + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: f3c89218-8c3d-4ba9-9974-f1d8e6a1b4a6 +level: high +logsource: + definition: PowerShell Module Logging must be enabledd + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +related: +- id: e54f5149-6ba3-49cf-b153-070d24679126 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_powercat.yml b/rules/sigma/windows/powershell/powershell_module/powershell_powercat.yml new file mode 100644 index 00000000..9e8ca4ea --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_powercat.yml @@ -0,0 +1,31 @@ + +title: Netcat The Powershell Version +author: frack113 +date: 2021/07/21 +description: Adversaries may use a non-application layer protocol for communication + between host and C2 server or among infected hosts within a network +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + ContextInfo: + - '*powercat *' + - '*powercat.ps1*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: bf7286e7-c0be-460b-a7e8-5b2e07ecc2f2 +level: medium +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +modified: 2021/09/07 +references: +- https://nmap.org/ncat/ +- https://github.com/besimorhino/powercat +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1095/T1095.md +status: experimental +tags: +- attack.command_and_control +- attack.t1095 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_remote_powershell_session.yml b/rules/sigma/windows/powershell/powershell_module/powershell_remote_powershell_session.yml new file mode 100644 index 00000000..2c6ef1dd --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_remote_powershell_session.yml @@ -0,0 +1,32 @@ + +title: Remote PowerShell Session +author: Roberto Rodriguez @Cyb3rWard0g +date: 2019/08/10 +description: Detects remote PowerShell sessions +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + ContextInfo: '* = ServerRemoteHost *' + SELECTION_3: + ContextInfo: '*wsmprovhost.exe*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Legitimate use remote PowerShell sessions +id: 96b9f619-aa91-478f-bacb-c3e50f8df575 +level: high +logsource: + definition: PowerShell Module Logging must be enabled + product: windows + service: powershell +modified: 2021/09/21 +references: +- https://threathunterplaybook.com/notebooks/windows/02_execution/WIN-190511223310.html +status: test +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 +- attack.lateral_movement +- attack.t1021.006 +- attack.t1028 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_susp_athremotefxvgpudisablementcommand.yml b/rules/sigma/windows/powershell/powershell_module/powershell_susp_athremotefxvgpudisablementcommand.yml new file mode 100644 index 00000000..1d136398 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_susp_athremotefxvgpudisablementcommand.yml @@ -0,0 +1,39 @@ + +title: Abusable Invoke-ATHRemoteFXvGPUDisablementCommand +author: frack113 +date: 2021/07/13 +description: RemoteFXvGPUDisablement.exe is an abusable, signed PowerShell host executable + that was introduced in Windows 10 and Server 2019 (OS Build 17763.1339). +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + ContextInfo: '*Invoke-ATHRemoteFXvGPUDisablementCommand *' + SELECTION_3: + ContextInfo: + - '*-ModuleName *' + - '*-ModulePath *' + - '*-ScriptBlock *' + - '*-RemoteFXvGPUDisablementFilePath*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: 38a7625e-b2cb-485d-b83d-aff137d859f4 +level: medium +logsource: + definition: PowerShell Module Logging must be enabledd + product: windows + service: powershell +modified: 2021/09/07 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218/T1218.md +- https://github.com/redcanaryco/AtomicTestHarnesses/blob/master/TestHarnesses/T1218_SignedBinaryProxyExecution/InvokeRemoteFXvGPUDisablementCommand.ps1 +status: experimental +tags: +- attack.defense_evasion +- attack.t1218 diff --git a/rules/sigma/windows/powershell/powershell_module/powershell_susp_zip_compress.yml b/rules/sigma/windows/powershell/powershell_module/powershell_susp_zip_compress.yml new file mode 100644 index 00000000..fe41efea --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_module/powershell_susp_zip_compress.yml @@ -0,0 +1,36 @@ + +title: Zip A Folder With PowerShell For Staging In Temp +author: frack113 +date: 2021/07/20 +description: Use living off the land tools to zip a file and stage it in the Windows + temporary folder for later exfiltration +detection: + SELECTION_1: + EventID: 4103 + SELECTION_2: + ContextInfo: '*Compress-Archive *' + SELECTION_3: + ContextInfo: '* -Path *' + SELECTION_4: + ContextInfo: '* -DestinationPath *' + SELECTION_5: + ContextInfo: '*$env:TEMP\\*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Unknown +id: daf7eb81-35fd-410d-9d7a-657837e602bb +level: medium +logsource: + definition: PowerShell Module Logging must be enabledd + product: windows + service: powershell +modified: 2021/10/09 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1074.001/T1074.001.md +related: +- id: b7a3c9a3-09ea-4934-8864-6a32cacd98d9 + type: derived +status: experimental +tags: +- attack.collection +- attack.t1074.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_accessing_win_api.yml b/rules/sigma/windows/powershell/powershell_script/powershell_accessing_win_api.yml new file mode 100644 index 00000000..68cee9f1 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_accessing_win_api.yml @@ -0,0 +1,74 @@ + +title: Accessing WinAPI in PowerShell +author: Nikita Nazarov, oscd.community +date: 2020/10/06 +description: Detecting use WinAPI Functions in PowerShell +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*WaitForSingleObject*' + - '*QueueUserApc*' + - '*RtlCreateUserThread*' + - '*OpenProcess*' + - '*VirtualAlloc*' + - '*VirtualFree*' + - '*WriteProcessMemory*' + - '*CreateUserThread*' + - '*CloseHandle*' + - '*GetDelegateForFunctionPointer*' + - '*CreateThread*' + - '*memcpy*' + - '*LoadLibrary*' + - '*GetModuleHandle*' + - '*GetProcAddress*' + - '*VirtualProtect*' + - '*FreeLibrary*' + - '*ReadProcessMemory*' + - '*CreateRemoteThread*' + - '*AdjustTokenPrivileges*' + - '*WriteByte*' + - '*WriteInt32*' + - '*OpenThreadToken*' + - '*PtrToString*' + - '*FreeHGlobal*' + - '*ZeroFreeGlobalAllocUnicode*' + - '*OpenProcessToken*' + - '*GetTokenInformation*' + - '*SetThreadToken*' + - '*ImpersonateLoggedOnUser*' + - '*RevertToSelf*' + - '*GetLogonSessionData*' + - '*CreateProcessWithToken*' + - '*DuplicateTokenEx*' + - '*OpenWindowStation*' + - '*OpenDesktop*' + - '*MiniDumpWriteDump*' + - '*AddSecurityPackage*' + - '*EnumerateSecurityPackages*' + - '*GetProcessHandle*' + - '*DangerousGetHandle*' + - '*kernel32*' + - '*Advapi32*' + - '*msvcrt*' + - '*ntdll*' + - '*user32*' + - '*secur32*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Carbon PowerShell Module (https://github.com/webmd-health-services/Carbon) +id: 03d83090-8cba-44a0-b02f-0b756a050306 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/08/04 +references: +- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1106 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_adrecon_execution.yml b/rules/sigma/windows/powershell/powershell_script/powershell_adrecon_execution.yml new file mode 100644 index 00000000..f9eed4aa --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_adrecon_execution.yml @@ -0,0 +1,30 @@ + +title: PowerShell ADRecon Execution +author: Bhabesh Raj +date: 2021/07/16 +description: Detects execution of ADRecon.ps1 for AD reconnaissance which has been + reported to be actively used by FIN7 +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*Function Get-ADRExcelComOb*' + - '*ADRecon-Report.xlsx*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: bf72941a-cba0-41ea-b18c-9aca3925690d +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +references: +- https://github.com/sense-of-security/ADRecon +- https://bi-zone.medium.com/from-pentest-to-apt-attack-cybercriminal-group-fin7-disguises-its-malware-as-an-ethical-hackers-c23c9a75e319 +status: experimental +tags: +- attack.discovery +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_automated_collection.yml b/rules/sigma/windows/powershell/powershell_script/powershell_automated_collection.yml new file mode 100644 index 00000000..46f12b02 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_automated_collection.yml @@ -0,0 +1,41 @@ + +title: Automated Collection Command PowerShell +author: frack113 +date: 2021/07/28 +description: Once established within a system or network, an adversary may use automated + techniques for collecting internal data. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*.doc*' + - '*.docx*' + - '*.xls*' + - '*.xlsx*' + - '*.ppt*' + - '*.pptx*' + - '*.rtf*' + - '*.pdf*' + - '*.txt*' + SELECTION_3: + ScriptBlockText: '*Get-ChildItem*' + SELECTION_4: + ScriptBlockText: '* -Recurse *' + SELECTION_5: + ScriptBlockText: '* -Include *' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Unknown +id: c1dda054-d638-4c16-afc8-53e007f3fbc5 +level: medium +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1119/T1119.md +status: experimental +tags: +- attack.collection +- attack.t1119 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_cl_invocation_lolscript.yml b/rules/sigma/windows/powershell/powershell_script/powershell_cl_invocation_lolscript.yml new file mode 100644 index 00000000..eef3f81e --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_cl_invocation_lolscript.yml @@ -0,0 +1,29 @@ + +title: Execution via CL_Invocation.ps1 +author: oscd.community, Natalia Shornikova +date: 2020/10/14 +description: Detects Execution via SyncInvoke in CL_Invocation.ps1 module +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*CL_Invocation.ps1*' + SELECTION_3: + ScriptBlockText: '*SyncInvoke*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 4cd29327-685a-460e-9dac-c3ab96e549dc +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/05/21 +references: +- https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSScripts/Cl_invocation.yml +- https://twitter.com/bohops/status/948061991012327424 +status: experimental +tags: +- attack.defense_evasion +- attack.t1216 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_cl_invocation_lolscript_count.yml b/rules/sigma/windows/powershell/powershell_script/powershell_cl_invocation_lolscript_count.yml new file mode 100644 index 00000000..d7fdeb8b --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_cl_invocation_lolscript_count.yml @@ -0,0 +1,30 @@ + +title: Execution via CL_Invocation.ps1 (2 Lines) +author: oscd.community, Natalia Shornikova +date: 2020/10/14 +description: Detects Execution via SyncInvoke in CL_Invocation.ps1 module +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*CL_Invocation.ps1*' + - '*SyncInvoke*' + condition: (SELECTION_1 and SELECTION_2) | count(ScriptBlockText) by Computer > + 2 +falsepositives: +- Unknown +id: f588e69b-0750-46bb-8f87-0e9320d57536 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/05/21 +references: +- https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSScripts/Cl_invocation.yml +- https://twitter.com/bohops/status/948061991012327424 +status: experimental +tags: +- attack.defense_evasion +- attack.t1216 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_cl_mutexverifiers_lolscript.yml b/rules/sigma/windows/powershell/powershell_script/powershell_cl_mutexverifiers_lolscript.yml new file mode 100644 index 00000000..d4c05a46 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_cl_mutexverifiers_lolscript.yml @@ -0,0 +1,30 @@ + +title: Execution via CL_Mutexverifiers.ps1 +author: oscd.community, Natalia Shornikova +date: 2020/10/14 +description: Detects Execution via runAfterCancelProcess in CL_Mutexverifiers.ps1 + module +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*CL_Mutexverifiers.ps1*' + SELECTION_3: + ScriptBlockText: '*runAfterCancelProcess*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 39776c99-1c7b-4ba0-b5aa-641525eee1a4 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/05/21 +references: +- https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSScripts/CL_mutexverifiers.yml +- https://twitter.com/pabraeken/status/995111125447577600 +status: experimental +tags: +- attack.defense_evasion +- attack.t1216 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_cl_mutexverifiers_lolscript_count.yml b/rules/sigma/windows/powershell/powershell_script/powershell_cl_mutexverifiers_lolscript_count.yml new file mode 100644 index 00000000..5d4f6921 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_cl_mutexverifiers_lolscript_count.yml @@ -0,0 +1,31 @@ + +title: Execution via CL_Mutexverifiers.ps1 (2 Lines) +author: oscd.community, Natalia Shornikova +date: 2020/10/14 +description: Detects Execution via runAfterCancelProcess in CL_Mutexverifiers.ps1 + module +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*CL_Mutexverifiers.ps1*' + - '*runAfterCancelProcess*' + condition: (SELECTION_1 and SELECTION_2) | count(ScriptBlockText) by Computer > + 2 +falsepositives: +- Unknown +id: 6609c444-9670-4eab-9636-fe4755a851ce +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/05/21 +references: +- https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSScripts/CL_mutexverifiers.yml +- https://twitter.com/pabraeken/status/995111125447577600 +status: experimental +tags: +- attack.defense_evasion +- attack.t1216 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_create_local_user.yml b/rules/sigma/windows/powershell/powershell_script/powershell_create_local_user.yml new file mode 100644 index 00000000..79d58161 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_create_local_user.yml @@ -0,0 +1,30 @@ + +title: PowerShell Create Local User +author: '@ROxPinTeddy' +date: 2020/04/11 +description: Detects creation of a local user via PowerShell +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*New-LocalUser*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate user creation +id: 243de76f-4725-4f2e-8225-a8a69b15ad61 +level: medium +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/08/04 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1136/T1136.md +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 +- attack.persistence +- attack.t1136.001 +- attack.t1136 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_data_compressed.yml b/rules/sigma/windows/powershell/powershell_script/powershell_data_compressed.yml new file mode 100644 index 00000000..f929c7da --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_data_compressed.yml @@ -0,0 +1,33 @@ + +title: Data Compressed - PowerShell +author: Timur Zinniatullin, oscd.community +date: 2019/10/21 +description: An adversary may compress data (e.g., sensitive documents) that is collected + prior to exfiltration in order to make it portable and minimize the amount of data + sent over the network. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*-Recurse*' + SELECTION_3: + ScriptBlockText: '*|*' + SELECTION_4: + ScriptBlockText: '*Compress-Archive*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Highly likely if archive operations are done via PowerShell. +id: 6dc5d284-69ea-42cf-9311-fb1c3932a69a +level: low +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/07/06 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1560/T1560.md +status: experimental +tags: +- attack.exfiltration +- attack.t1560 +- attack.t1002 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_detect_vm_env.yml b/rules/sigma/windows/powershell/powershell_script/powershell_detect_vm_env.yml new file mode 100644 index 00000000..391c8b81 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_detect_vm_env.yml @@ -0,0 +1,33 @@ + +title: Powershell Detect Virtualization Environment +author: frack113 +date: 2021/08/03 +description: Adversaries may employ various system checks to detect and avoid virtualization + and analysis environments. This may include changing behaviors based on the results + of checks for the presence of artifacts indicative of a virtual machine environment + (VME) or sandbox +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*Get-WmiObject*' + SELECTION_3: + ScriptBlockText: + - '*MSAcpi_ThermalZoneTemperature*' + - '*Win32_ComputerSystem*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: d93129cd-1ee0-479f-bc03-ca6f129882e3 +level: medium +logsource: + definition: EnableScriptBlockLogging must be set to enable + product: windows + service: powershell +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1497.001/T1497.001.md +- https://techgenix.com/malicious-powershell-scripts-evade-detection/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1497.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_dnscat_execution.yml b/rules/sigma/windows/powershell/powershell_script/powershell_dnscat_execution.yml new file mode 100644 index 00000000..ee63b69a --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_dnscat_execution.yml @@ -0,0 +1,27 @@ + +title: Dnscat Execution +author: Daniil Yugoslavskiy, oscd.community +date: 2019/10/24 +description: Dnscat exfiltration tool execution +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*Start-Dnscat2*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate usage of PowerShell Dnscat2 — DNS Exfiltration tool (unlikely) +id: a6d67db4-6220-436d-8afc-f3842fe05d43 +level: critical +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2020/08/24 +status: experimental +tags: +- attack.exfiltration +- attack.t1048 +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_icmp_exfiltration.yml b/rules/sigma/windows/powershell/powershell_script/powershell_icmp_exfiltration.yml new file mode 100644 index 00000000..eb64e0fd --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_icmp_exfiltration.yml @@ -0,0 +1,31 @@ + +title: PowerShell ICMP Exfiltration +author: Bartlomiej Czyz @bczyz1, oscd.community +date: 2020/10/10 +description: Detects Exfiltration Over Alternative Protocol - ICMP. Adversaries may + steal data by exfiltrating it over an un-encrypted network protocol other than that + of the existing command and control channel. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*New-Object*' + SELECTION_3: + ScriptBlockText: '*System.Net.NetworkInformation.Ping*' + SELECTION_4: + ScriptBlockText: '*.Send(*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Legitimate usage of System.Net.NetworkInformation.Ping class +id: 4c4af3cd-2115-479c-8193-6b8bfce9001c +level: medium +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1048.003/T1048.003.md#atomic-test-2---exfiltration-over-alternative-protocol---icmp +status: experimental +tags: +- attack.exfiltration +- attack.t1048.003 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_invoke_nightmare.yml b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_nightmare.yml new file mode 100644 index 00000000..d0a6ddee --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_nightmare.yml @@ -0,0 +1,25 @@ + +title: PrintNightmare Powershell Exploitation +author: Max Altgelt, Tobias Michalski +date: 2021/08/09 +description: Detects Commandlet name for PrintNightmare exploitation. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*Invoke-Nightmare*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 6d3f1399-a81c-4409-aff3-1ecfe9330baf +level: high +logsource: + definition: Script Block Logging must be enable + product: windows + service: powershell +modified: 2021/08/31 +references: +- https://github.com/calebstewart/CVE-2021-1675 +status: test +tags: +- attack.privilege_escalation diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_clip_in_scriptblocktext.yml b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_clip_in_scriptblocktext.yml new file mode 100644 index 00000000..b7a9eba4 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_clip_in_scriptblocktext.yml @@ -0,0 +1,28 @@ + +title: Invoke-Obfuscation CLIP+ Launcher +author: Jonathan Cheong, oscd.community +date: 2020/10/13 +description: Detects Obfuscated use of Clip.exe to execute PowerShell +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText|re: .*cmd.{0,5}(?:/c|/r).+clip(?:\.exe)?.{0,4}&&.+clipboard]::\(\s\\"\{\d\}.+\-f.+" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 73e67340-0d25-11eb-adc1-0242ac120002 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_obfuscated_iex_in_scriptblocktext.yml b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_obfuscated_iex_in_scriptblocktext.yml new file mode 100644 index 00000000..6457598d --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_obfuscated_iex_in_scriptblocktext.yml @@ -0,0 +1,41 @@ + +title: Invoke-Obfuscation Obfuscated IEX Invocation +author: Daniel Bohannon (@Mandiant/@FireEye), oscd.community +date: 2019/11/08 +description: Detects all variations of obfuscated powershell IEX invocation code generated + by Invoke-Obfuscation framework from the following code block — https://github.com/danielbohannon/Invoke-Obfuscation/blob/master/Out-ObfuscatedStringCommand.ps1#L873-L888 +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText|re: \$PSHome\[\s*\d{1,3}\s*\]\s*\+\s*\$PSHome\[ + SELECTION_3: + ScriptBlockText|re: \$ShellId\[\s*\d{1,3}\s*\]\s*\+\s*\$ShellId\[ + SELECTION_4: + ScriptBlockText|re: \$env:Public\[\s*\d{1,3}\s*\]\s*\+\s*\$env:Public\[ + SELECTION_5: + ScriptBlockText|re: \$env:ComSpec\[(\s*\d{1,3}\s*,){2} + SELECTION_6: + ScriptBlockText|re: \\\\*mdr\\\\*\W\s*\)\.Name + SELECTION_7: + ScriptBlockText|re: \$VerbosePreference\.ToString\( + SELECTION_8: + ScriptBlockText|re: \String\]\s*\$VerbosePreference + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3 or SELECTION_4 or SELECTION_5 + or SELECTION_6 or SELECTION_7 or SELECTION_8)) +falsepositives: +- Unknown +id: 1b9dc62e-6e9e-42a3-8990-94d7a10007f7 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_stdin_in_scriptblocktext.yml b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_stdin_in_scriptblocktext.yml new file mode 100644 index 00000000..3ee4178a --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_stdin_in_scriptblocktext.yml @@ -0,0 +1,28 @@ + +title: Invoke-Obfuscation STDIN+ Launcher +author: Jonathan Cheong, oscd.community +date: 2020/10/15 +description: Detects Obfuscated use of stdin to execute PowerShell +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText|re: .*cmd.{0,5}(?:/c|/r).+powershell.+(?:\$\{?input\}?|noexit).+" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 779c8c12-0eb1-11eb-adc1-0242ac120002 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_var_in_scriptblocktext.yml b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_var_in_scriptblocktext.yml new file mode 100644 index 00000000..5b7fcf10 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_var_in_scriptblocktext.yml @@ -0,0 +1,28 @@ + +title: Invoke-Obfuscation VAR+ Launcher +author: Jonathan Cheong, oscd.community +date: 2020/10/15 +description: Detects Obfuscated use of Environment Variables to execute PowerShell +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText|re: .*cmd.{0,5}(?:/c|/r)(?:\s|)"set\s[a-zA-Z]{3,6}.*(?:\{\d\}){1,}\\"\s+?\-f(?:.*\)){1,}.*" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 0adfbc14-0ed1-11eb-adc1-0242ac120002 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_compress_in_scriptblocktext.yml b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_compress_in_scriptblocktext.yml new file mode 100644 index 00000000..1f60f702 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_compress_in_scriptblocktext.yml @@ -0,0 +1,28 @@ + +title: Invoke-Obfuscation COMPRESS OBFUSCATION +author: Timur Zinniatullin, oscd.community +date: 2020/10/18 +description: Detects Obfuscated Powershell via COMPRESS OBFUSCATION +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText|re: (?i).*new-object.*(?:system\.io\.compression\.deflatestream|system\.io\.streamreader).*text\.encoding\]::ascii.*readtoend + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 20e5497e-331c-4cd5-8d36-935f6e2a9a07 +level: medium +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_rundll_in_scriptblocktext.yml b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_rundll_in_scriptblocktext.yml new file mode 100644 index 00000000..9b29b8cd --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_rundll_in_scriptblocktext.yml @@ -0,0 +1,28 @@ + +title: Invoke-Obfuscation RUNDLL LAUNCHER +author: Timur Zinniatullin, oscd.community +date: 2020/10/18 +description: Detects Obfuscated Powershell via RUNDLL LAUNCHER +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText|re: (?i).*rundll32(?:\.exe)?(?:\s+)?shell32\.dll.*shellexec_rundll.*powershell.*" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: e6cb92b4-b470-4eb8-8a9d-d63e8583aae0 +level: medium +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_stdin_in_scriptblocktext.yml b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_stdin_in_scriptblocktext.yml new file mode 100644 index 00000000..871e6ce1 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_stdin_in_scriptblocktext.yml @@ -0,0 +1,28 @@ + +title: Invoke-Obfuscation Via Stdin +author: Nikita Nazarov, oscd.community +date: 2020/10/12 +description: Detects Obfuscated Powershell via Stdin in Scripts +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText|re: (?i).*(set).*&&\s?set.*(environment|invoke|\$\{?input).*&&.*" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 86b896ba-ffa1-4fea-83e3-ee28a4c915c7 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_use_clip_in_scriptblocktext.yml b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_use_clip_in_scriptblocktext.yml new file mode 100644 index 00000000..9b58ffb0 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_use_clip_in_scriptblocktext.yml @@ -0,0 +1,28 @@ + +title: Invoke-Obfuscation Via Use Clip +author: Nikita Nazarov, oscd.community +date: 2020/10/09 +description: Detects Obfuscated Powershell via use Clip.exe in Scripts +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText|re: (?i).*?echo.*clip.*&&.*(Clipboard|i`?n`?v`?o`?k`?e`?).* + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: db92dd33-a3ad-49cf-8c2c-608c3e30ace0 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_use_mhsta_in_scriptblocktext.yml b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_use_mhsta_in_scriptblocktext.yml new file mode 100644 index 00000000..d00b373f --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_use_mhsta_in_scriptblocktext.yml @@ -0,0 +1,28 @@ + +title: Invoke-Obfuscation Via Use MSHTA +author: Nikita Nazarov, oscd.community +date: 2020/10/08 +description: Detects Obfuscated Powershell via use MSHTA in Scripts +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText|re: (?i).*(set).*(&&).*(mshta).*(vbscript:createobject).*(\.run).*\(window\.close\).*" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: e55a5195-4724-480e-a77e-3ebe64bd3759 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_use_rundll32_in_scriptblocktext.yml b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_use_rundll32_in_scriptblocktext.yml new file mode 100644 index 00000000..98a14913 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_use_rundll32_in_scriptblocktext.yml @@ -0,0 +1,28 @@ + +title: Invoke-Obfuscation Via Use Rundll32 +author: Nikita Nazarov, oscd.community +date: 2019/10/08 +description: Detects Obfuscated Powershell via use Rundll32 in Scripts +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText|re: (?i).*&&.*rundll32.*shell32\.dll.*shellexec_rundll.*(value|invoke|comspec|iex).*" + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: a5a30a6e-75ca-4233-8b8c-42e0f2037d3b +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_var_in_scriptblocktext.yml b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_var_in_scriptblocktext.yml new file mode 100644 index 00000000..dafe6471 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_invoke_obfuscation_via_var_in_scriptblocktext.yml @@ -0,0 +1,28 @@ + +title: Invoke-Obfuscation VAR++ LAUNCHER OBFUSCATION +author: Timur Zinniatullin, oscd.community +date: 2020/10/13 +description: Detects Obfuscated Powershell via VAR++ LAUNCHER +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText|re: (?i).*&&set.*(\{\d\}){2,}\\"\s+?\-f.*&&.*cmd.*/c + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: e54f5149-6ba3-49cf-b153-070d24679126 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/10/07 +references: +- https://github.com/Neo23x0/sigma/issues/1009 +status: experimental +tags: +- attack.defense_evasion +- attack.t1027 +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_keylogging.yml b/rules/sigma/windows/powershell/powershell_script/powershell_keylogging.yml new file mode 100644 index 00000000..d9044899 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_keylogging.yml @@ -0,0 +1,31 @@ + +title: Powershell Keylogging +author: frack113 +date: 2021/07/30 +description: Adversaries may log user keystrokes to intercept credentials as the user + types them. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*Get-Keystrokes*' + SELECTION_3: + ScriptBlockText: '*Get-ProcAddress user32.dll GetAsyncKeyState*' + SELECTION_4: + ScriptBlockText: '*Get-ProcAddress user32.dll GetForegroundWindow*' + condition: (SELECTION_1 and (SELECTION_2 or (SELECTION_3 and SELECTION_4))) +falsepositives: +- Unknown +id: 34f90d3c-c297-49e9-b26d-911b05a4866c +level: medium +logsource: + definition: EnableScriptBlockLogging must be set to enable + product: windows + service: powershell +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218/T1218.md +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1056.001/src/Get-Keystrokes.ps1 +status: experimental +tags: +- attack.collection +- attack.t1056.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_malicious_commandlets.yml b/rules/sigma/windows/powershell/powershell_script/powershell_malicious_commandlets.yml new file mode 100644 index 00000000..793cecb4 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_malicious_commandlets.yml @@ -0,0 +1,125 @@ + +title: Malicious PowerShell Commandlets +author: Sean Metcalf (source), Florian Roth (rule), Bartlomiej Czyz @bczyz1 (update), + oscd.community (update) +date: 2017/03/05 +description: Detects Commandlet names from well-known PowerShell exploitation frameworks +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*Invoke-DllInjection*' + - '*Invoke-Shellcode*' + - '*Invoke-WmiCommand*' + - '*Get-GPPPassword*' + - '*Get-Keystrokes*' + - '*Get-TimedScreenshot*' + - '*Get-VaultCredential*' + - '*Invoke-CredentialInjection*' + - '*Invoke-Mimikatz*' + - '*Invoke-NinjaCopy*' + - '*Invoke-TokenManipulation*' + - '*Out-Minidump*' + - '*VolumeShadowCopyTools*' + - '*Invoke-ReflectivePEInjection*' + - '*Invoke-UserHunter*' + - '*Find-GPOLocation*' + - '*Invoke-ACLScanner*' + - '*Invoke-DowngradeAccount*' + - '*Get-ServiceUnquoted*' + - '*Get-ServiceFilePermission*' + - '*Get-ServicePermission*' + - '*Invoke-ServiceAbuse*' + - '*Install-ServiceBinary*' + - '*Get-RegAutoLogon*' + - '*Get-VulnAutoRun*' + - '*Get-VulnSchTask*' + - '*Get-UnattendedInstallFile*' + - '*Get-ApplicationHost*' + - '*Get-RegAlwaysInstallElevated*' + - '*Get-Unconstrained*' + - '*Add-RegBackdoor*' + - '*Add-ScrnSaveBackdoor*' + - '*Gupt-Backdoor*' + - '*Invoke-ADSBackdoor*' + - '*Enabled-DuplicateToken*' + - '*Invoke-PsUaCme*' + - '*Remove-Update*' + - '*Check-VM*' + - '*Get-LSASecret*' + - '*Get-PassHashes*' + - '*Show-TargetScreen*' + - '*Port-Scan*' + - '*Invoke-PoshRatHttp*' + - '*Invoke-PowerShellTCP*' + - '*Invoke-PowerShellWMI*' + - '*Add-Exfiltration*' + - '*Add-Persistence*' + - '*Do-Exfiltration*' + - '*Start-CaptureServer*' + - '*Get-ChromeDump*' + - '*Get-ClipboardContents*' + - '*Get-FoxDump*' + - '*Get-IndexedItem*' + - '*Get-Screenshot*' + - '*Invoke-Inveigh*' + - '*Invoke-NetRipper*' + - '*Invoke-EgressCheck*' + - '*Invoke-PostExfil*' + - '*Invoke-PSInject*' + - '*Invoke-RunAs*' + - '*MailRaider*' + - '*New-HoneyHash*' + - '*Set-MacAttribute*' + - '*Invoke-DCSync*' + - '*Invoke-PowerDump*' + - '*Exploit-Jboss*' + - '*Invoke-ThunderStruck*' + - '*Invoke-VoiceTroll*' + - '*Set-Wallpaper*' + - '*Invoke-InveighRelay*' + - '*Invoke-PsExec*' + - '*Invoke-SSHCommand*' + - '*Get-SecurityPackages*' + - '*Install-SSP*' + - '*Invoke-BackdoorLNK*' + - '*PowerBreach*' + - '*Get-SiteListPassword*' + - '*Get-System*' + - '*Invoke-BypassUAC*' + - '*Invoke-Tater*' + - '*Invoke-WScriptBypassUAC*' + - '*PowerUp*' + - '*PowerView*' + - '*Get-RickAstley*' + - '*Find-Fruit*' + - '*HTTP-Login*' + - '*Find-TrustedDocuments*' + - '*Invoke-Paranoia*' + - '*Invoke-WinEnum*' + - '*Invoke-ARPScan*' + - '*Invoke-PortScan*' + - '*Invoke-ReverseDNSLookup*' + - '*Invoke-SMBScanner*' + - '*Invoke-Mimikittenz*' + - '*Invoke-AllChecks*' + SELECTION_3: + ScriptBlockText: '*Get-SystemDriveInfo*' + condition: ((SELECTION_1 and SELECTION_2) and not (SELECTION_3)) +falsepositives: +- Penetration testing +id: 89819aa4-bbd6-46bc-88ec-c7f7fe30efa6 +level: high +logsource: + definition: Script Block Logging must be enable + product: windows + service: powershell +modified: 2021/08/21 +references: +- https://adsecurity.org/?p=2921 +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_malicious_keywords.yml b/rules/sigma/windows/powershell/powershell_script/powershell_malicious_keywords.yml new file mode 100644 index 00000000..fceca17e --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_malicious_keywords.yml @@ -0,0 +1,48 @@ + +title: Malicious PowerShell Keywords +author: Sean Metcalf (source), Florian Roth (rule) +date: 2017/03/05 +description: Detects keywords from well-known PowerShell exploitation frameworks +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*AdjustTokenPrivileges*' + - '*IMAGE_NT_OPTIONAL_HDR64_MAGIC*' + - '*Microsoft.Win32.UnsafeNativeMethods*' + - '*ReadProcessMemory.Invoke*' + - '*SE_PRIVILEGE_ENABLED*' + - '*LSA_UNICODE_STRING*' + - '*MiniDumpWriteDump*' + - '*PAGE_EXECUTE_READ*' + - '*SECURITY_DELEGATION*' + - '*TOKEN_ADJUST_PRIVILEGES*' + - '*TOKEN_ALL_ACCESS*' + - '*TOKEN_ASSIGN_PRIMARY*' + - '*TOKEN_DUPLICATE*' + - '*TOKEN_ELEVATION*' + - '*TOKEN_IMPERSONATE*' + - '*TOKEN_INFORMATION_CLASS*' + - '*TOKEN_PRIVILEGES*' + - '*TOKEN_QUERY*' + - '*Metasploit*' + - '*Mimikatz*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Penetration tests +id: f62176f3-8128-4faa-bf6c-83261322e5eb +level: high +logsource: + definition: It is recommended to use the new "Script Block Logging" of PowerShell + v5 https://adsecurity.org/?p=2277 + product: windows + service: powershell +modified: 2021/08/21 +references: +- https://adsecurity.org/?p=2921 +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_memorydump_getstoragediagnosticinfo.yml b/rules/sigma/windows/powershell/powershell_script/powershell_memorydump_getstoragediagnosticinfo.yml new file mode 100644 index 00000000..6e893205 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_memorydump_getstoragediagnosticinfo.yml @@ -0,0 +1,27 @@ + +title: Live Memory Dump Using Powershell +author: Max Altgelt +date: 2021/09/21 +description: Detects usage of a PowerShell command to dump the live memory of a Windows + machine +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*Get-StorageDiagnosticInfo*' + SELECTION_3: + ScriptBlockText: '*-IncludeLiveDump*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Diagnostics +id: cd185561-4760-45d6-a63e-a51325112cae +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +references: +- https://docs.microsoft.com/en-us/powershell/module/storage/get-storagediagnosticinfo +status: experimental +tags: +- attack.t1003 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_nishang_malicious_commandlets.yml b/rules/sigma/windows/powershell/powershell_script/powershell_nishang_malicious_commandlets.yml new file mode 100644 index 00000000..99b051ff --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_nishang_malicious_commandlets.yml @@ -0,0 +1,98 @@ + +title: Malicious Nishang PowerShell Commandlets +author: Alec Costello +date: 2019/05/16 +description: Detects Commandlet names and arguments from the Nishang exploitation + framework +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*Add-ConstrainedDelegationBackdoor*' + - '*Set-DCShadowPermissions*' + - '*DNS_TXT_Pwnage*' + - '*Execute-OnTime*' + - '*HTTP-Backdoor*' + - '*Set-RemotePSRemoting*' + - '*Set-RemoteWMI*' + - '*Invoke-AmsiBypass*' + - '*Out-CHM*' + - '*Out-HTA*' + - '*Out-SCF*' + - '*Out-SCT*' + - '*Out-Shortcut*' + - '*Out-WebQuery*' + - '*Out-Word*' + - '*Enable-Duplication*' + - '*Remove-Update*' + - '*Download-Execute-PS*' + - '*Download_Execute*' + - '*Execute-Command-MSSQL*' + - '*Execute-DNSTXT-Code*' + - '*Out-RundllCommand*' + - '*Copy-VSS*' + - '*FireBuster*' + - '*FireListener*' + - '*Get-Information*' + - '*Get-PassHints*' + - '*Get-WLAN-Keys*' + - '*Get-Web-Credentials*' + - '*Invoke-CredentialsPhish*' + - '*Invoke-MimikatzWDigestDowngrade*' + - '*Invoke-SSIDExfil*' + - '*Invoke-SessionGopher*' + - '*Keylogger*' + - '*Invoke-Interceptor*' + - '*Create-MultipleSessions*' + - '*Invoke-NetworkRelay*' + - '*Run-EXEonRemote*' + - '*Invoke-Prasadhak*' + - '*Invoke-BruteForce*' + - '*Password-List*' + - '*Invoke-JSRatRegsvr*' + - '*Invoke-JSRatRundll*' + - '*Invoke-PoshRatHttps*' + - '*Invoke-PowerShellIcmp*' + - '*Invoke-PowerShellUdp*' + - '*Invoke-PSGcat*' + - '*Invoke-PsGcatAgent*' + - '*Remove-PoshRat*' + - '*Add-Persistance*' + - '*ExetoText*' + - '*Invoke-Decode*' + - '*Invoke-Encode*' + - '*Parse_Keys*' + - '*Remove-Persistence*' + - '*StringtoBase64*' + - '*TexttoExe*' + - '*Powerpreter*' + - '*Nishang*' + - '*DataToEncode*' + - '*LoggedKeys*' + - '*OUT-DNSTXT*' + - '*ExfilOption*' + - '*DumpCerts*' + - '*DumpCreds*' + - '*Shellcode32*' + - '*Shellcode64*' + - '*NotAllNameSpaces*' + - '*exfill*' + - '*FakeDC*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Penetration testing +id: f772cee9-b7c2-4cb2-8f07-49870adc02e0 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/08/21 +references: +- https://github.com/samratashok/nishang +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_ntfs_ads_access.yml b/rules/sigma/windows/powershell/powershell_script/powershell_ntfs_ads_access.yml new file mode 100644 index 00000000..61bcbd1f --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_ntfs_ads_access.yml @@ -0,0 +1,37 @@ + +title: NTFS Alternate Data Stream +author: Sami Ruohonen +date: 2018/07/24 +description: Detects writing data into NTFS alternate data streams from powershell. + Needs Script Block Logging. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*set-content*' + - '*add-content*' + SELECTION_3: + ScriptBlockText: + - '*-stream*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- unknown +id: 8c521530-5169-495d-a199-0a3a881ad24e +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/08/21 +references: +- http://www.powertheshell.com/ntfsstreams/ +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1564.004/T1564.004.md +status: experimental +tags: +- attack.defense_evasion +- attack.t1564.004 +- attack.t1096 +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_powerview_malicious_commandlets.yml b/rules/sigma/windows/powershell/powershell_script/powershell_powerview_malicious_commandlets.yml new file mode 100644 index 00000000..4738f736 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_powerview_malicious_commandlets.yml @@ -0,0 +1,151 @@ + +title: Malicious PowerView PowerShell Commandlets +author: Bhabesh Raj +date: 2021/05/18 +description: Detects Commandlet names from PowerView of PowerSploit exploitation framework. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*Export-PowerViewCSV*' + - '*Get-IPAddress*' + - '*Resolve-IPAddress*' + - '*Convert-NameToSid*' + - '*ConvertTo-SID*' + - '*Convert-ADName*' + - '*ConvertFrom-UACValue*' + - '*Add-RemoteConnection*' + - '*Remove-RemoteConnection*' + - '*Invoke-UserImpersonation*' + - '*Invoke-RevertToSelf*' + - '*Request-SPNTicket*' + - '*Get-DomainSPNTicket*' + - '*Invoke-Kerberoast*' + - '*Get-PathAcl*' + - '*Get-DNSZone*' + - '*Get-DomainDNSZone*' + - '*Get-DNSRecord*' + - '*Get-DomainDNSRecord*' + - '*Get-NetDomain*' + - '*Get-Domain*' + - '*Get-NetDomainController*' + - '*Get-DomainController*' + - '*Get-NetForest*' + - '*Get-Forest*' + - '*Get-NetForestDomain*' + - '*Get-ForestDomain*' + - '*Get-NetForestCatalog*' + - '*Get-ForestGlobalCatalog*' + - '*Find-DomainObjectPropertyOutlier*' + - '*Get-NetUser*' + - '*Get-DomainUser*' + - '*New-DomainUser*' + - '*Set-DomainUserPassword*' + - '*Get-UserEvent*' + - '*Get-DomainUserEvent*' + - '*Get-NetComputer*' + - '*Get-DomainComputer*' + - '*Get-ADObject*' + - '*Get-DomainObject*' + - '*Set-ADObject*' + - '*Set-DomainObject*' + - '*Get-ObjectAcl*' + - '*Get-DomainObjectAcl*' + - '*Add-ObjectAcl*' + - '*Add-DomainObjectAcl*' + - '*Invoke-ACLScanner*' + - '*Find-InterestingDomainAcl*' + - '*Get-NetOU*' + - '*Get-DomainOU*' + - '*Get-NetSite*' + - '*Get-DomainSite*' + - '*Get-NetSubnet*' + - '*Get-DomainSubnet*' + - '*Get-DomainSID*' + - '*Get-NetGroup*' + - '*Get-DomainGroup*' + - '*New-DomainGroup*' + - '*Find-ManagedSecurityGroups*' + - '*Get-DomainManagedSecurityGroup*' + - '*Get-NetGroupMember*' + - '*Get-DomainGroupMember*' + - '*Add-DomainGroupMember*' + - '*Get-NetFileServer*' + - '*Get-DomainFileServer*' + - '*Get-DFSshare*' + - '*Get-DomainDFSShare*' + - '*Get-NetGPO*' + - '*Get-DomainGPO*' + - '*Get-NetGPOGroup*' + - '*Get-DomainGPOLocalGroup*' + - '*Find-GPOLocation*' + - '*Get-DomainGPOUserLocalGroupMapping*' + - '*Find-GPOComputerAdmin*' + - '*Get-DomainGPOComputerLocalGroupMapping*' + - '*Get-DomainPolicy*' + - '*Get-NetLocalGroup*' + - '*Get-NetLocalGroupMember*' + - '*Get-NetShare*' + - '*Get-NetLoggedon*' + - '*Get-NetSession*' + - '*Get-LoggedOnLocal*' + - '*Get-RegLoggedOn*' + - '*Get-NetRDPSession*' + - '*Invoke-CheckLocalAdminAccess*' + - '*Test-AdminAccess*' + - '*Get-SiteName*' + - '*Get-NetComputerSiteName*' + - '*Get-Proxy*' + - '*Get-WMIRegProxy*' + - '*Get-LastLoggedOn*' + - '*Get-WMIRegLastLoggedOn*' + - '*Get-CachedRDPConnection*' + - '*Get-WMIRegCachedRDPConnection*' + - '*Get-RegistryMountedDrive*' + - '*Get-WMIRegMountedDrive*' + - '*Get-NetProcess*' + - '*Get-WMIProcess*' + - '*Find-InterestingFile*' + - '*Invoke-UserHunter*' + - '*Find-DomainUserLocation*' + - '*Invoke-ProcessHunter*' + - '*Find-DomainProcess*' + - '*Invoke-EventHunter*' + - '*Find-DomainUserEvent*' + - '*Invoke-ShareFinder*' + - '*Find-DomainShare*' + - '*Invoke-FileFinder*' + - '*Find-InterestingDomainShareFile*' + - '*Find-LocalAdminAccess*' + - '*Invoke-EnumerateLocalAdmin*' + - '*Find-DomainLocalGroupMember*' + - '*Get-NetDomainTrust*' + - '*Get-DomainTrust*' + - '*Get-NetForestTrust*' + - '*Get-ForestTrust*' + - '*Find-ForeignUser*' + - '*Get-DomainForeignUser*' + - '*Find-ForeignGroup*' + - '*Get-DomainForeignGroupMember*' + - '*Invoke-MapDomainTrust*' + - '*Get-DomainTrustMapping*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Should not be any as administrators do not use this tool +id: dcd74b95-3f36-4ed9-9598-0490951643aa +level: high +logsource: + definition: Script Block Logging must be enable + product: windows + service: powershell +modified: 2021/08/21 +references: +- https://powersploit.readthedocs.io/en/stable/Recon/README +- https://github.com/PowerShellMafia/PowerSploit/tree/master/Recon +- https://thedfirreport.com/2020/10/08/ryuks-return +- https://adsecurity.org/?p=2277 +status: experimental +tags: +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_prompt_credentials.yml b/rules/sigma/windows/powershell/powershell_script/powershell_prompt_credentials.yml new file mode 100644 index 00000000..9d38cd82 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_prompt_credentials.yml @@ -0,0 +1,29 @@ + +title: PowerShell Credential Prompt +author: John Lambert (idea), Florian Roth (rule) +date: 2017/04/09 +description: Detects PowerShell calling a credential prompt +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*PromptForCredential*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: ca8b77a9-d499-4095-b793-5d5f330d450e +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/08/04 +references: +- https://twitter.com/JohnLaTwC/status/850381440629981184 +- https://t.co/ezOTGy1a1G +status: experimental +tags: +- attack.credential_access +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_psattack.yml b/rules/sigma/windows/powershell/powershell_script/powershell_psattack.yml new file mode 100644 index 00000000..8306bd54 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_psattack.yml @@ -0,0 +1,27 @@ + +title: PowerShell PSAttack +author: Sean Metcalf (source), Florian Roth (rule) +date: 2017/03/05 +description: Detects the use of PSAttack PowerShell hack tool +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*PS ATTACK!!!*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Pentesters +id: b7ec41a4-042c-4f31-a5db-d0fcde9fa5c5 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/08/21 +references: +- https://adsecurity.org/?p=2921 +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_shellcode_b64.yml b/rules/sigma/windows/powershell/powershell_script/powershell_shellcode_b64.yml new file mode 100644 index 00000000..0a19b285 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_shellcode_b64.yml @@ -0,0 +1,34 @@ + +title: PowerShell ShellCode +author: David Ledbetter (shellcode), Florian Roth (rule) +date: 2018/11/17 +description: Detects Base64 encoded Shellcode +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*AAAAYInlM*' + SELECTION_3: + ScriptBlockText: + - '*OiCAAAAYInlM*' + - '*OiJAAAAYInlM*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 16b37b70-6fcf-4814-a092-c36bd3aafcbd +level: critical +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2020/12/01 +references: +- https://twitter.com/cyb3rops/status/1063072865992523776 +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1055 +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_shellintel_malicious_commandlets.yml b/rules/sigma/windows/powershell/powershell_script/powershell_shellintel_malicious_commandlets.yml new file mode 100644 index 00000000..580ee0cb --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_shellintel_malicious_commandlets.yml @@ -0,0 +1,30 @@ + +title: Malicious ShellIntel PowerShell Commandlets +author: Max Altgelt, Tobias Michalski +date: 2021/08/09 +description: Detects Commandlet names from ShellIntel exploitation scripts. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*Invoke-SMBAutoBrute*' + - '*Invoke-GPOLinks*' + - '*Out-Minidump*' + - '*Invoke-Potato*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 402e1e1d-ad59-47b6-bf80-1ee44985b3a7 +level: high +logsource: + definition: Script Block Logging must be enable + product: windows + service: powershell +modified: 2021/08/21 +references: +- https://github.com/Shellntel/scripts/ +status: experimental +tags: +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_store_file_in_alternate_data_stream.yml b/rules/sigma/windows/powershell/powershell_script/powershell_store_file_in_alternate_data_stream.yml new file mode 100644 index 00000000..c87cac7c --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_store_file_in_alternate_data_stream.yml @@ -0,0 +1,31 @@ + +title: Powershell Store File In Alternate Data Stream +author: frack113 +date: 2021/09/02 +description: Storing files in Alternate Data Stream (ADS) similar to Astaroth malware. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*Start-Process*' + SELECTION_3: + ScriptBlockText: '*-FilePath "$env:comspec" *' + SELECTION_4: + ScriptBlockText: '*-ArgumentList *' + SELECTION_5: + ScriptBlockText: '*>*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Unknown +id: a699b30e-d010-46c8-bbd1-ee2e26765fe9 +level: medium +logsource: + definition: EnableScriptBlockLogging must be set to enable + product: windows + service: powershell +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1564.004/T1564.004.md +status: experimental +tags: +- attack.defense_evasion +- attack.t1564.004 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_susp_zip_compress_in_scriptblocktext.yml b/rules/sigma/windows/powershell/powershell_script/powershell_susp_zip_compress_in_scriptblocktext.yml new file mode 100644 index 00000000..3d560728 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_susp_zip_compress_in_scriptblocktext.yml @@ -0,0 +1,33 @@ + +title: Zip A Folder With PowerShell For Staging In Temp +author: frack113 +date: 2021/07/20 +description: Use living off the land tools to zip a file and stage it in the Windows + temporary folder for later exfiltration +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*Compress-Archive *' + SELECTION_3: + ScriptBlockText: '* -Path *' + SELECTION_4: + ScriptBlockText: '* -DestinationPath *' + SELECTION_5: + ScriptBlockText: '*$env:TEMP\\*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Unknown +id: b7a3c9a3-09ea-4934-8864-6a32cacd98d9 +level: medium +logsource: + definition: Script Block Logging must be enable + product: windows + service: powershell +modified: 2021/10/09 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1074.001/T1074.001.md +status: experimental +tags: +- attack.collection +- attack.t1074.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_export_pfxcertificate.yml b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_export_pfxcertificate.yml new file mode 100644 index 00000000..bce06c29 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_export_pfxcertificate.yml @@ -0,0 +1,30 @@ + +title: Suspicious Export-PfxCertificate +author: Florian Roth +date: 2021/04/23 +description: Detects Commandlet that is used to export certificates from the local + certificate store and sometimes used by threat actors to steal private keys from + compromised machines +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*Export-PfxCertificate*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate certificate exports invoked by administrators or users (depends on processes + in the environment - filter if unusable) +id: aa7a3fce-bef5-4311-9cc1-5f04bb8c308c +level: high +logsource: + definition: Script Block Logging must be enable + product: windows + service: powershell +modified: 2021/08/04 +references: +- https://us-cert.cisa.gov/ncas/analysis-reports/ar21-112a +- https://docs.microsoft.com/en-us/powershell/module/pki/export-pfxcertificate +status: experimental +tags: +- attack.credential_access +- attack.t1552.004 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_getprocess_lsass.yml b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_getprocess_lsass.yml new file mode 100644 index 00000000..953344bf --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_getprocess_lsass.yml @@ -0,0 +1,28 @@ + +title: PowerShell Get-Process LSASS in ScriptBlock +author: Florian Roth +date: 2021/04/23 +description: Detects a Get-Process command on lsass process, which is in almost all + cases a sign of malicious activity +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*Get-Process lsass*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate certificate exports invoked by administrators or users (depends on processes + in the environment - filter if unusable) +id: 84c174ab-d3ef-481f-9c86-a50d0b8e3edb +level: high +logsource: + definition: Script Block Logging must be enable + product: windows + service: powershell +modified: 2021/08/04 +references: +- https://twitter.com/PythonResponder/status/1385064506049630211 +status: experimental +tags: +- attack.credential_access +- attack.t1003.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_keywords.yml b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_keywords.yml new file mode 100644 index 00000000..64311b7d --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_keywords.yml @@ -0,0 +1,41 @@ + +title: Suspicious PowerShell Keywords +author: Florian Roth, Perez Diego (@darkquassar) +date: 2019/02/11 +description: Detects keywords that could indicate the use of some PowerShell exploitation + framework +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*System.Reflection.Assembly.Load($*' + - '*[System.Reflection.Assembly]::Load($*' + - '*[Reflection.Assembly]::Load($*' + - '*System.Reflection.AssemblyName*' + - '*Reflection.Emit.AssemblyBuilderAccess*' + - '*Runtime.InteropServices.DllImportAttribute*' + - '*SuspendThread*' + - '*rundll32*' + - '*Invoke-WMIMethod*' + - '*http://127.0.0.1*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Penetration tests +id: 1f49f2ab-26bc-48b3-96cc-dcffbc93eadf +level: high +logsource: + definition: Script block logging must be enabled for 4104 + product: windows + service: powershell +modified: 2021/08/30 +references: +- https://posts.specterops.io/entering-a-covenant-net-command-and-control-e11038bcf462 +- https://github.com/PowerShellMafia/PowerSploit/blob/master/CodeExecution/Invoke-ReflectivePEInjection.ps1 +- https://github.com/hlldz/Invoke-Phant0m/blob/master/Invoke-Phant0m.ps1 +- https://gist.github.com/MHaggis/0dbe00ad401daa7137c81c99c268cfb7 +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_mail_acces.yml b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_mail_acces.yml new file mode 100644 index 00000000..75c1160c --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_mail_acces.yml @@ -0,0 +1,31 @@ + +title: Powershell Local Email Collection +author: frack113 +date: 2021/07/21 +description: Adversaries may target user email on local systems to collect sensitive + information. Files containing email data can be acquired from a user’s local system, + such as Outlook storage or cache files. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*Get-Inbox.ps1*' + - '*Microsoft.Office.Interop.Outlook*' + - '*Microsoft.Office.Interop.Outlook.olDefaultFolders*' + - '*-comobject outlook.application*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 2837e152-93c8-43d2-85ba-c3cd3c2ae614 +level: medium +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1114.001/T1114.001.md +status: experimental +tags: +- attack.collection +- attack.t1114.001 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_mounted_share_deletion.yml b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_mounted_share_deletion.yml new file mode 100644 index 00000000..ab4788f6 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_mounted_share_deletion.yml @@ -0,0 +1,29 @@ + +title: PowerShell Deleted Mounted Share +author: oscd.community, @redcanary, Zach Stanford @svch0st +date: 2020/10/08 +description: Detects when when a mounted share is removed. Adversaries may remove + share connections that are no longer useful in order to clean up traces of their + operation +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*Remove-SmbShare*' + - '*Remove-FileShare*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Administrators or Power users may remove their shares via cmd line +id: 66a4d409-451b-4151-94f4-a55d559c49b0 +level: medium +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1070.005/T1070.005.md +status: experimental +tags: +- attack.defense_evasion +- attack.t1070.005 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_recon.yml b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_recon.yml new file mode 100644 index 00000000..5adff1f6 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_recon.yml @@ -0,0 +1,31 @@ + +title: Recon Information for Export with PowerShell +author: frack113 +date: 2021/07/30 +description: Once established within a system or network, an adversary may use automated + techniques for collecting internal data +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*Get-Service *' + - '*Get-ChildItem *' + - '*Get-Process *' + SELECTION_3: + ScriptBlockText: '*> $env:TEMP\\*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: a9723fcc-881c-424c-8709-fd61442ab3c3 +level: medium +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1119/T1119.md +status: experimental +tags: +- attack.collection +- attack.t1119 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_win32_pnpentity.yml b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_win32_pnpentity.yml new file mode 100644 index 00000000..62dd85f3 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_suspicious_win32_pnpentity.yml @@ -0,0 +1,26 @@ + +title: Powershell Suspicious Win32_PnPEntity +author: frack113 +date: 2021/08/23 +description: Adversaries may attempt to gather information about attached peripheral + devices and components connected to a computer system. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*Win32_PnPEntity*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- admin script +id: b26647de-4feb-4283-af6b-6117661283c5 +level: low +logsource: + definition: EnableScriptBlockLogging must be set to enable + product: windows + service: powershell +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1120/T1120.md +status: experimental +tags: +- attack.discovery +- attack.t1120 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_timestomp.yml b/rules/sigma/windows/powershell/powershell_script/powershell_timestomp.yml new file mode 100644 index 00000000..6eca8c2b --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_timestomp.yml @@ -0,0 +1,35 @@ + +title: Powershell Timestomp +author: frack113 +date: 2021/08/03 +description: Adversaries may modify file time attributes to hide new or changes to + existing files. Timestomping is a technique that modifies the timestamps of a file + (the modify, access, create, and change times), often to mimic files that are in + the same folder. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*.CreationTime =*' + - '*.LastWriteTime =*' + - '*.LastAccessTime =*' + - '*[IO.File]::SetCreationTime*' + - '*[IO.File]::SetLastAccessTime*' + - '*[IO.File]::SetLastWriteTime*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- legitime admin script +id: c6438007-e081-42ce-9483-b067fbef33c3 +level: medium +logsource: + definition: EnableScriptBlockLogging must be set to enable + product: windows + service: powershell +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1070.006/T1070.006.md +- https://www.offensive-security.com/metasploit-unleashed/timestomp/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1070.006 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_trigger_profiles.yml b/rules/sigma/windows/powershell/powershell_script/powershell_trigger_profiles.yml new file mode 100644 index 00000000..dea6fc05 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_trigger_profiles.yml @@ -0,0 +1,34 @@ + +title: Powershell Trigger Profiles by Add_Content +author: frack113 +date: 2021/08/18 +description: Adversaries may gain persistence and elevate privileges by executing + malicious content triggered by PowerShell profiles. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*Add-Content*' + SELECTION_3: + ScriptBlockText: '*$profile*' + SELECTION_4: + ScriptBlockText: '*-Value*' + SELECTION_5: + ScriptBlockText: + - '*Start-Process*' + - '*""*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Unknown +id: 05b3e303-faf0-4f4a-9b30-46cc13e69152 +level: medium +logsource: + definition: EnableScriptBlockLogging must be set to enable + product: windows + service: powershell +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1546.013/T1546.013.md +status: experimental +tags: +- attack.privilege_escalation +- attack.t1546.013 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_web_request.yml b/rules/sigma/windows/powershell/powershell_script/powershell_web_request.yml new file mode 100644 index 00000000..89e01487 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_web_request.yml @@ -0,0 +1,38 @@ + +title: Windows PowerShell Web Request +author: James Pemberton / @4A616D6573 +date: 2019/10/24 +description: Detects the use of various web request methods (including aliases) via + Windows PowerShell command +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*Invoke-WebRequest*' + - '*iwr *' + - '*wget *' + - '*curl *' + - '*Net.WebClient*' + - '*Start-BitsTransfer*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Use of Get-Command and Get-Help modules to reference Invoke-WebRequest and Start-BitsTransfer. +id: 1139d2e2-84b1-4226-b445-354492eba8ba +level: medium +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/09/21 +references: +- https://4sysops.com/archives/use-powershell-to-download-a-file-with-http-https-and-ftp/ +- https://blog.jourdant.me/post/3-ways-to-download-files-with-powershell +related: +- id: 9fc51a3c-81b3-4fa7-b35f-7c02cf10fd2d + type: derived +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_windows_firewall_profile_disabled.yml b/rules/sigma/windows/powershell/powershell_script/powershell_windows_firewall_profile_disabled.yml new file mode 100644 index 00000000..b3eaa6ba --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_windows_firewall_profile_disabled.yml @@ -0,0 +1,33 @@ + +title: Windows Firewall Profile Disabled +author: Austin Songer @austinsonger +date: 2021/10/12 +description: Detects when a user disables the Windows Firewall via a Profile to help + evade defense. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*Set-NetFirewallProfile*' + SELECTION_3: + ScriptBlockText: '*-Profile*' + SELECTION_4: + ScriptBlockText: '*-Enabled*' + SELECTION_5: + ScriptBlockText: '*False*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Unknown +id: 488b44e7-3781-4a71-888d-c95abfacf44d +level: high +logsource: + product: windows + service: powershell +references: +- https://docs.microsoft.com/en-us/powershell/module/netsecurity/set-netfirewallprofile?view=windowsserver2019-ps +- https://www.tutorialspoint.com/how-to-get-windows-firewall-profile-settings-using-powershell +- http://powershellhelp.space/commands/set-netfirewallrule-psv5.php +- http://woshub.com/manage-windows-firewall-powershell/ +status: experimental +tags: +- attack.defense_evasion diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_winlogon_helper_dll.yml b/rules/sigma/windows/powershell/powershell_script/powershell_winlogon_helper_dll.yml new file mode 100644 index 00000000..c76c087f --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_winlogon_helper_dll.yml @@ -0,0 +1,37 @@ + +title: Winlogon Helper DLL +author: Timur Zinniatullin, oscd.community +date: 2019/10/21 +description: Winlogon.exe is a Windows component responsible for actions at logon/logoff + as well as the secure attention sequence (SAS) triggered by Ctrl-Alt-Delete. Registry + entries in HKLM\Software[Wow6432Node]Microsoft\Windows NT\CurrentVersion\Winlogon\ + and HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\ are used to manage + additional helper programs and functionalities that support Winlogon. Malicious + modifications to these Registry keys may cause Winlogon to load and execute malicious + DLLs and/or executables. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*CurrentVersion\Winlogon*' + SELECTION_3: + ScriptBlockText: + - '*Set-ItemProperty*' + - '*New-Item*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 851c506b-6b7c-4ce2-8802-c703009d03c0 +level: medium +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2020/12/01 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1547.004/T1547.004.md +status: experimental +tags: +- attack.persistence +- attack.t1547.004 +- attack.t1004 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_wmi_persistence.yml b/rules/sigma/windows/powershell/powershell_script/powershell_wmi_persistence.yml new file mode 100644 index 00000000..933759ee --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_wmi_persistence.yml @@ -0,0 +1,37 @@ + +title: Powershell WMI Persistence +author: frack113 +date: 2021/08/19 +description: Adversaries may establish persistence and elevate privileges by executing + malicious content triggered by a Windows Management Instrumentation (WMI) event + subscription. +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: '*New-CimInstance *' + SELECTION_3: + ScriptBlockText: '*-Namespace root/subscription *' + SELECTION_4: + ScriptBlockText: '*-Property *' + SELECTION_5: + ScriptBlockText: '*-ClassName __EventFilter *' + SELECTION_6: + ScriptBlockText: '*-ClassName CommandLineEventConsumer *' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and (SELECTION_5 + or SELECTION_6)) +falsepositives: +- Unknown +id: 9e07f6e7-83aa-45c6-998e-0af26efd0a85 +level: medium +logsource: + definition: EnableScriptBlockLogging must be set to enable + product: windows + service: powershell +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1546.003/T1546.003.md +- https://github.com/EmpireProject/Empire/blob/master/data/module_source/persistence/Persistence.psm1#L545 +status: experimental +tags: +- attack.privilege_escalation +- attack.t1546.003 diff --git a/rules/sigma/windows/powershell/powershell_script/powershell_wmimplant.yml b/rules/sigma/windows/powershell/powershell_script/powershell_wmimplant.yml new file mode 100644 index 00000000..c7503b32 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_script/powershell_wmimplant.yml @@ -0,0 +1,46 @@ + +title: WMImplant Hack Tool +author: NVISO +date: 2020/03/26 +description: Detects parameters used by WMImplant +detection: + SELECTION_1: + EventID: 4104 + SELECTION_2: + ScriptBlockText: + - '*WMImplant*' + - '* change_user *' + - '* gen_cli *' + - '* command_exec *' + - '* disable_wdigest *' + - '* disable_winrm *' + - '* enable_wdigest *' + - '* enable_winrm *' + - '* registry_mod *' + - '* remote_posh *' + - '* sched_job *' + - '* service_mod *' + - '* process_kill *' + - '* active_users *' + - '* basic_info *' + - '* power_off *' + - '* vacant_system *' + - '* logon_events *' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Administrative scripts that use the same keywords. +id: 8028c2c3-e25a-46e3-827f-bbb5abf181d7 +level: high +logsource: + definition: Script block logging must be enabled + product: windows + service: powershell +modified: 2021/08/30 +references: +- https://github.com/FortyNorthSecurity/WMImplant +status: experimental +tags: +- attack.execution +- attack.t1047 +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_suspicious_download.yml b/rules/sigma/windows/powershell/powershell_suspicious_download.yml new file mode 100644 index 00000000..5f437bc0 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_suspicious_download.yml @@ -0,0 +1,25 @@ + +title: Suspicious PowerShell Download +author: Florian Roth +date: 2017/03/05 +description: Detects suspicious PowerShell download command +detection: + SELECTION_1: + - System.Net.WebClient + SELECTION_2: + - .DownloadFile( + - .DownloadString( + condition: (SELECTION_1 and (SELECTION_2)) +falsepositives: +- PowerShell scripts that download content from the Internet +id: 65531a81-a694-4e31-ae04-f8ba5bc33759 +level: medium +logsource: + product: windows + service: powershell +modified: 2021/09/21 +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_suspicious_invocation_generic.yml b/rules/sigma/windows/powershell/powershell_suspicious_invocation_generic.yml new file mode 100644 index 00000000..f54581ce --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_suspicious_invocation_generic.yml @@ -0,0 +1,30 @@ + +title: Suspicious PowerShell Invocations - Generic +author: Florian Roth (rule) +date: 2017/03/12 +description: Detects suspicious PowerShell invocation command parameters +detection: + SELECTION_1: + - ' -enc ' + - ' -EncodedCommand ' + SELECTION_2: + - ' -w hidden ' + - ' -window hidden ' + - ' -windowstyle hidden ' + SELECTION_3: + - ' -noni ' + - ' -noninteractive ' + condition: ((SELECTION_1) and (SELECTION_2) and (SELECTION_3)) +falsepositives: +- Penetration tests +- Very special / sneaky PowerShell scripts +id: 3d304fda-78aa-43ed-975c-d740798a49c1 +level: high +logsource: + product: windows + service: powershell +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_suspicious_invocation_specific.yml b/rules/sigma/windows/powershell/powershell_suspicious_invocation_specific.yml new file mode 100644 index 00000000..b7cf187e --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_suspicious_invocation_specific.yml @@ -0,0 +1,78 @@ + +title: Suspicious PowerShell Invocations - Specific +author: Florian Roth (rule), Jonhnathan Ribeiro +date: 2017/03/05 +description: Detects suspicious PowerShell invocation command parameters +detection: + SELECTION_1: + - ' -w ' + SELECTION_10: + - bypass + SELECTION_11: + - -Enc + SELECTION_12: + - powershell + SELECTION_13: + - reg + SELECTION_14: + - add + SELECTION_15: + - HKCU\software\microsoft\windows\currentversion\run + SELECTION_16: + - bypass + SELECTION_17: + - -noprofile + SELECTION_18: + - -windowstyle + SELECTION_19: + - hidden + SELECTION_2: + - hidden + SELECTION_20: + - new-object + SELECTION_21: + - system.net.webclient + SELECTION_22: + - .download + SELECTION_23: + - iex + SELECTION_24: + - New-Object + SELECTION_25: + - Net.WebClient + SELECTION_26: + - .Download + SELECTION_3: + - -nop + SELECTION_4: + - ' -c ' + SELECTION_5: + - '[Convert]::FromBase64String' + SELECTION_6: + - -noni + SELECTION_7: + - iex + SELECTION_8: + - New-Object + SELECTION_9: + - -ep + condition: ((((SELECTION_1 and SELECTION_2 and ((SELECTION_3 and SELECTION_4 and + ((SELECTION_6 and SELECTION_7 and SELECTION_8) or SELECTION_5)) or (SELECTION_9 + and SELECTION_10 and SELECTION_11))) or (SELECTION_12 and SELECTION_13 and SELECTION_14 + and SELECTION_15)) or (SELECTION_16 and SELECTION_17 and SELECTION_18 and SELECTION_19 + and SELECTION_20 and SELECTION_21 and SELECTION_22)) or (SELECTION_23 and SELECTION_24 + and SELECTION_25 and SELECTION_26)) +falsepositives: +- Penetration tests +id: fce5f582-cc00-41e1-941a-c6fabf0fdb8c +level: high +logsource: + definition: Script block logging must be enabled for 4104, Module Logging must be + enabled for 4103 + product: windows + service: powershell +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/powershell/powershell_syncappvpublishingserver_exe.yml b/rules/sigma/windows/powershell/powershell_syncappvpublishingserver_exe.yml new file mode 100644 index 00000000..52059627 --- /dev/null +++ b/rules/sigma/windows/powershell/powershell_syncappvpublishingserver_exe.yml @@ -0,0 +1,24 @@ + +title: SyncAppvPublishingServer Execution to Bypass Powershell Restriction +author: Ensar Şamil, @sblmsrsn, OSCD Community +date: 2020/10/05 +description: Detects SyncAppvPublishingServer process execution which usually utilized + by adversaries to bypass PowerShell execution restrictions. +detection: + condition: SyncAppvPublishingServer.exe +falsepositives: +- App-V clients +id: 9f7aa113-9da6-4a8d-907c-5f1a4b908299 +level: medium +logsource: + product: windows + service: powershell +modified: 2021/09/11 +references: +- https://lolbas-project.github.io/lolbas/Binaries/Syncappvpublishingserver/ +related: +- id: fde7929d-8beb-4a4c-b922-be9974671667 + type: derived +tags: +- attack.defense_evasion +- attack.t1218 diff --git a/rules/sigma/windows/process_access/sysmon_cmstp_execution_by_access.yml b/rules/sigma/windows/process_access/sysmon_cmstp_execution_by_access.yml new file mode 100644 index 00000000..2e1b415e --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_cmstp_execution_by_access.yml @@ -0,0 +1,37 @@ + +title: CMSTP Execution Process Access +author: Nik Seetharaman +date: 2018/07/16 +description: Detects various indicators of Microsoft Connection Manager Profile Installer + execution +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + CallTrace: '*cmlua.dll*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate CMSTP use (unlikely in modern enterprise environments) +fields: +- CommandLine +- ParentCommandLine +- Details +id: 3b4b232a-af90-427c-a22f-30b0c0837b95 +level: high +logsource: + category: process_access + product: windows +modified: 2021/06/27 +references: +- https://web.archive.org/web/20190720093911/http://www.endurant.io/cmstp/detecting-cmstp-enabled-code-execution-and-uac-bypass-with-sysmon/ +status: stable +tags: +- attack.defense_evasion +- attack.t1218.003 +- attack.t1191 +- attack.execution +- attack.t1559.001 +- attack.t1175 +- attack.g0069 +- attack.g0080 +- car.2019-04-001 diff --git a/rules/sigma/windows/process_access/sysmon_cmstp_execution_by_access.yml.yml b/rules/sigma/windows/process_access/sysmon_cmstp_execution_by_access.yml.yml new file mode 100644 index 00000000..2e1b415e --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_cmstp_execution_by_access.yml.yml @@ -0,0 +1,37 @@ + +title: CMSTP Execution Process Access +author: Nik Seetharaman +date: 2018/07/16 +description: Detects various indicators of Microsoft Connection Manager Profile Installer + execution +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + CallTrace: '*cmlua.dll*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate CMSTP use (unlikely in modern enterprise environments) +fields: +- CommandLine +- ParentCommandLine +- Details +id: 3b4b232a-af90-427c-a22f-30b0c0837b95 +level: high +logsource: + category: process_access + product: windows +modified: 2021/06/27 +references: +- https://web.archive.org/web/20190720093911/http://www.endurant.io/cmstp/detecting-cmstp-enabled-code-execution-and-uac-bypass-with-sysmon/ +status: stable +tags: +- attack.defense_evasion +- attack.t1218.003 +- attack.t1191 +- attack.execution +- attack.t1559.001 +- attack.t1175 +- attack.g0069 +- attack.g0080 +- car.2019-04-001 diff --git a/rules/sigma/windows/process_access/sysmon_cobaltstrike_bof_injection_pattern.yml b/rules/sigma/windows/process_access/sysmon_cobaltstrike_bof_injection_pattern.yml new file mode 100644 index 00000000..0aaa09de --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_cobaltstrike_bof_injection_pattern.yml @@ -0,0 +1,32 @@ + +title: CobaltStrike BOF Injection Pattern +author: Christian Burkard +date: 2021/08/04 +description: Detects a typical pattern of a CobaltStrike BOF which inject into other + processes +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + CallTrace|re: ^C:\\\\Windows\\\\SYSTEM32\\\\ntdll\\.dll\+[a-z0-9]{4,6}\|C:\\\\Windows\\\\System32\\\\KERNELBASE\\.dll\+[a-z0-9]{4,6}\|UNKNOWN\([A-Z0-9]{16}\)$ + SELECTION_3: + GrantedAccess: + - '0x1028' + - '0x1fffff' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- unknown +id: 09706624-b7f6-455d-9d02-adee024cee1d +level: high +logsource: + category: process_access + product: windows +references: +- https://github.com/boku7/injectAmsiBypass +- https://github.com/boku7/spawn +status: experimental +tags: +- attack.execution +- attack.t1106 +- attack.defense_evasion +- attack.t1562.001 diff --git a/rules/sigma/windows/process_access/sysmon_cobaltstrike_bof_injection_pattern.yml.yml b/rules/sigma/windows/process_access/sysmon_cobaltstrike_bof_injection_pattern.yml.yml new file mode 100644 index 00000000..87b32a79 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_cobaltstrike_bof_injection_pattern.yml.yml @@ -0,0 +1,32 @@ + +title: CobaltStrike BOF Injection Pattern +author: Christian Burkard +date: 2021/08/04 +description: Detects a typical pattern of a CobaltStrike BOF which inject into other + processes +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + CallTrace|re: ^C:\\\\Windows\\\\SYSTEM32\\\\ntdll\\.dll\+[a-z0-9]{4,6}\|C:\\\\Windows\\\\System32\\\\KERNELBASE\\.dll\+[a-z0-9]{4,6}\|UNKNOWN\([A-Z0-9]{16}\)$ + SELECTION_3: + GrantedAccess: '0x1028' + SELECTION_4: + GrantedAccess: '0x1fffff' + condition: (SELECTION_1 and SELECTION_2 and (SELECTION_3 or SELECTION_4)) +falsepositives: +- unknown +id: 09706624-b7f6-455d-9d02-adee024cee1d +level: high +logsource: + category: process_access + product: windows +references: +- https://github.com/boku7/injectAmsiBypass +- https://github.com/boku7/spawn +status: experimental +tags: +- attack.execution +- attack.t1106 +- attack.defense_evasion +- attack.t1562.001 diff --git a/rules/sigma/windows/process_access/sysmon_cred_dump_lsass_access.yml b/rules/sigma/windows/process_access/sysmon_cred_dump_lsass_access.yml new file mode 100644 index 00000000..dc437516 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_cred_dump_lsass_access.yml @@ -0,0 +1,65 @@ + +title: Credentials Dumping Tools Accessing LSASS Memory +author: Florian Roth, Roberto Rodriguez, Dimitrios Slamaris, Mark Russinovich, Thomas + Patzke, Teymur Kheirkhabarov, Sherif Eldeeb, James Dickenson, Aleksey Potapov, oscd.community + (update) +date: 2017/02/16 +description: Detects process access LSASS memory which is typical for credentials + dumping tools +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\lsass.exe' + SELECTION_3: + GrantedAccess: + - '*0x40*' + - '*0x1000*' + - '*0x1400*' + - '*0x100000*' + - '*0x1410*' + - '*0x1010*' + - '*0x1438*' + - '*0x143a*' + - '*0x1418*' + - '*0x1f0fff*' + - '*0x1f1fff*' + - '*0x1f2fff*' + - '*0x1f3fff*' + SELECTION_4: + ProcessName: + - '*\wmiprvse.exe' + - '*\taskmgr.exe' + - '*\procexp64.exe' + - '*\procexp.exe' + - '*\lsm.exe' + - '*\MsMpEng.exe' + - '*\csrss.exe' + - '*\wininit.exe' + - '*\vmtoolsd.exe' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Legitimate software accessing LSASS process for legitimate reason; update the whitelist + with it +fields: +- ComputerName +- User +- SourceImage +id: 32d0d3e2-e58d-4d41-926b-18b520b2b32d +level: high +logsource: + category: process_access + product: windows +modified: 2021/05/16 +references: +- https://onedrive.live.com/view.aspx?resid=D026B4699190F1E6!2843&ithint=file%2cpptx&app=PowerPoint&authkey=!AMvCRTKB_V1J5ow +- https://cyberwardog.blogspot.com/2017/03/chronicles-of-threat-hunter-hunting-for_22.html +- https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment +- http://security-research.dyndns.org/pub/slides/FIRST2017/FIRST-2017_Tom-Ueltschi_Sysmon_FINAL_notes.pdf +status: experimental +tags: +- attack.credential_access +- attack.t1003.001 +- attack.t1003 +- attack.s0002 +- car.2019-04-004 diff --git a/rules/sigma/windows/process_access/sysmon_cred_dump_lsass_access.yml.yml b/rules/sigma/windows/process_access/sysmon_cred_dump_lsass_access.yml.yml new file mode 100644 index 00000000..7369cfa6 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_cred_dump_lsass_access.yml.yml @@ -0,0 +1,92 @@ + +title: Credentials Dumping Tools Accessing LSASS Memory +author: Florian Roth, Roberto Rodriguez, Dimitrios Slamaris, Mark Russinovich, Thomas + Patzke, Teymur Kheirkhabarov, Sherif Eldeeb, James Dickenson, Aleksey Potapov, oscd.community + (update) +date: 2017/02/16 +description: Detects process access LSASS memory which is typical for credentials + dumping tools +detection: + SELECTION_1: + EventID: 10 + SELECTION_10: + GrantedAccess: '*0x1438*' + SELECTION_11: + GrantedAccess: '*0x143a*' + SELECTION_12: + GrantedAccess: '*0x1418*' + SELECTION_13: + GrantedAccess: '*0x1f0fff*' + SELECTION_14: + GrantedAccess: '*0x1f1fff*' + SELECTION_15: + GrantedAccess: '*0x1f2fff*' + SELECTION_16: + GrantedAccess: '*0x1f3fff*' + SELECTION_17: + EventID: 10 + SELECTION_18: + ProcessName: '*\wmiprvse.exe' + SELECTION_19: + ProcessName: '*\taskmgr.exe' + SELECTION_2: + EventID: 10 + SELECTION_20: + ProcessName: '*\procexp64.exe' + SELECTION_21: + ProcessName: '*\procexp.exe' + SELECTION_22: + ProcessName: '*\lsm.exe' + SELECTION_23: + ProcessName: '*\MsMpEng.exe' + SELECTION_24: + ProcessName: '*\csrss.exe' + SELECTION_25: + ProcessName: '*\wininit.exe' + SELECTION_26: + ProcessName: '*\vmtoolsd.exe' + SELECTION_3: + TargetImage: '*\lsass.exe' + SELECTION_4: + GrantedAccess: '*0x40*' + SELECTION_5: + GrantedAccess: '*0x1000*' + SELECTION_6: + GrantedAccess: '*0x1400*' + SELECTION_7: + GrantedAccess: '*0x100000*' + SELECTION_8: + GrantedAccess: '*0x1410*' + SELECTION_9: + GrantedAccess: '*0x1010*' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3 and (SELECTION_4 or SELECTION_5 + or SELECTION_6 or SELECTION_7 or SELECTION_8 or SELECTION_9 or SELECTION_10 or + SELECTION_11 or SELECTION_12 or SELECTION_13 or SELECTION_14 or SELECTION_15 or + SELECTION_16)) and not ((SELECTION_17 and (SELECTION_18 or SELECTION_19 or SELECTION_20 + or SELECTION_21 or SELECTION_22 or SELECTION_23 or SELECTION_24 or SELECTION_25 + or SELECTION_26)))) +falsepositives: +- Legitimate software accessing LSASS process for legitimate reason; update the whitelist + with it +fields: +- ComputerName +- User +- SourceImage +id: 32d0d3e2-e58d-4d41-926b-18b520b2b32d +level: high +logsource: + category: process_access + product: windows +modified: 2021/05/16 +references: +- https://onedrive.live.com/view.aspx?resid=D026B4699190F1E6!2843&ithint=file%2cpptx&app=PowerPoint&authkey=!AMvCRTKB_V1J5ow +- https://cyberwardog.blogspot.com/2017/03/chronicles-of-threat-hunter-hunting-for_22.html +- https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment +- http://security-research.dyndns.org/pub/slides/FIRST2017/FIRST-2017_Tom-Ueltschi_Sysmon_FINAL_notes.pdf +status: experimental +tags: +- attack.credential_access +- attack.t1003.001 +- attack.t1003 +- attack.s0002 +- car.2019-04-004 diff --git a/rules/sigma/windows/process_access/sysmon_direct_syscall_ntopenprocess.yml b/rules/sigma/windows/process_access/sysmon_direct_syscall_ntopenprocess.yml new file mode 100644 index 00000000..00bce1d0 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_direct_syscall_ntopenprocess.yml @@ -0,0 +1,25 @@ + +title: Direct Syscall of NtOpenProcess +author: Christian Burkard +date: 2021/07/28 +description: Detects the usage of the direct syscall of NtOpenProcess which might + be done from a CobaltStrike BOF. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + CallTrace: UNKNOWN* + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 3f3f3506-1895-401b-9cc3-e86b16e630d0 +level: critical +logsource: + category: process_access + product: windows +references: +- https://medium.com/falconforce/falconfriday-direct-system-calls-and-cobalt-strike-bofs-0xff14-741fa8e1bdd6 +status: experimental +tags: +- attack.execution +- attack.t1106 diff --git a/rules/sigma/windows/process_access/sysmon_direct_syscall_ntopenprocess.yml.yml b/rules/sigma/windows/process_access/sysmon_direct_syscall_ntopenprocess.yml.yml new file mode 100644 index 00000000..00bce1d0 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_direct_syscall_ntopenprocess.yml.yml @@ -0,0 +1,25 @@ + +title: Direct Syscall of NtOpenProcess +author: Christian Burkard +date: 2021/07/28 +description: Detects the usage of the direct syscall of NtOpenProcess which might + be done from a CobaltStrike BOF. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + CallTrace: UNKNOWN* + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 3f3f3506-1895-401b-9cc3-e86b16e630d0 +level: critical +logsource: + category: process_access + product: windows +references: +- https://medium.com/falconforce/falconfriday-direct-system-calls-and-cobalt-strike-bofs-0xff14-741fa8e1bdd6 +status: experimental +tags: +- attack.execution +- attack.t1106 diff --git a/rules/sigma/windows/process_access/sysmon_in_memory_assembly_execution.yml b/rules/sigma/windows/process_access/sysmon_in_memory_assembly_execution.yml new file mode 100644 index 00000000..cf9e8515 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_in_memory_assembly_execution.yml @@ -0,0 +1,76 @@ + +title: Suspicious In-Memory Module Execution +author: Perez Diego (@darkquassar), oscd.community, Jonhnathan Ribeiro +date: 2019/10/27 +description: Detects the access to processes by other suspicious processes which have + reflectively loaded libraries in their memory space. An example is SilentTrinity + C2 behaviour. Generally speaking, when Sysmon EventID 10 cannot reference a stack + call to a dll loaded from disk (the standard way), it will display "UNKNOWN" as + the module name. Usually this means the stack call points to a module that was reflectively + loaded in memory. Adding to this, it is not common to see such few calls in the + stack (ntdll.dll --> kernelbase.dll --> unknown) which essentially means that most + of the functions required by the process to execute certain routines are already + present in memory, not requiring any calls to external libraries. The latter should + also be considered suspicious. +detection: + SELECTION_1: + EventID: 10 + SELECTION_10: + EventID: 10 + SELECTION_11: + CallTrace: '*UNKNOWN*' + SELECTION_12: + GrantedAccess: + - '0x1F0FFF' + - '0x1F1FFF' + - '0x143A' + - '0x1410' + - '0x1010' + - '0x1F2FFF' + - '0x1F3FFF' + - '0x1FFFFF' + SELECTION_13: + SourceImage: + - '*\Windows\System32\sdiagnhost.exe' + SELECTION_2: + EventID: 10 + SELECTION_3: + CallTrace: '*C:\\Windows\\SYSTEM32\\ntdll.dll+*' + SELECTION_4: + CallTrace: '*|C:\\Windows\\System32\\KERNELBASE.dll+*' + SELECTION_5: + CallTrace: '*|UNKNOWN(*' + SELECTION_6: + CallTrace: '*)*' + SELECTION_7: + CallTrace: '*UNKNOWN(*' + SELECTION_8: + CallTrace: '*)|UNKNOWN(*' + SELECTION_9: + CallTrace: '*)' + condition: (SELECTION_1 and ((SELECTION_2 and ((SELECTION_3 and SELECTION_4 and + SELECTION_5 and SELECTION_6) or (SELECTION_7 and SELECTION_8 and SELECTION_9))) + or ((SELECTION_10 and SELECTION_11 and SELECTION_12) and not (SELECTION_13)))) +falsepositives: +- Low +fields: +- ComputerName +- User +- SourceImage +- TargetImage +- CallTrace +id: 5f113a8f-8b61-41ca-b90f-d374fa7e4a39 +level: critical +logsource: + category: process_access + product: windows +modified: 2021/05/16 +references: +- https://azure.microsoft.com/en-ca/blog/detecting-in-memory-attacks-with-sysmon-and-azure-security-center/ +status: experimental +tags: +- attack.privilege_escalation +- attack.defense_evasion +- attack.t1055.001 +- attack.t1055.002 +- attack.t1055 diff --git a/rules/sigma/windows/process_access/sysmon_in_memory_assembly_execution.yml.yml b/rules/sigma/windows/process_access/sysmon_in_memory_assembly_execution.yml.yml new file mode 100644 index 00000000..7c4c0ae9 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_in_memory_assembly_execution.yml.yml @@ -0,0 +1,83 @@ + +title: Suspicious In-Memory Module Execution +author: Perez Diego (@darkquassar), oscd.community, Jonhnathan Ribeiro +date: 2019/10/27 +description: Detects the access to processes by other suspicious processes which have + reflectively loaded libraries in their memory space. An example is SilentTrinity + C2 behaviour. Generally speaking, when Sysmon EventID 10 cannot reference a stack + call to a dll loaded from disk (the standard way), it will display "UNKNOWN" as + the module name. Usually this means the stack call points to a module that was reflectively + loaded in memory. Adding to this, it is not common to see such few calls in the + stack (ntdll.dll --> kernelbase.dll --> unknown) which essentially means that most + of the functions required by the process to execute certain routines are already + present in memory, not requiring any calls to external libraries. The latter should + also be considered suspicious. +detection: + SELECTION_1: + EventID: 10 + SELECTION_10: + CallTrace: '*UNKNOWN*' + SELECTION_11: + GrantedAccess: '0x1F0FFF' + SELECTION_12: + GrantedAccess: '0x1F1FFF' + SELECTION_13: + GrantedAccess: '0x143A' + SELECTION_14: + GrantedAccess: '0x1410' + SELECTION_15: + GrantedAccess: '0x1010' + SELECTION_16: + GrantedAccess: '0x1F2FFF' + SELECTION_17: + GrantedAccess: '0x1F3FFF' + SELECTION_18: + GrantedAccess: '0x1FFFFF' + SELECTION_19: + EventID: 10 + SELECTION_2: + CallTrace: '*C:\\Windows\\SYSTEM32\\ntdll.dll+*' + SELECTION_20: + SourceImage: '*\Windows\System32\sdiagnhost.exe' + SELECTION_3: + CallTrace: '*|C:\\Windows\\System32\\KERNELBASE.dll+*' + SELECTION_4: + CallTrace: '*|UNKNOWN(*' + SELECTION_5: + CallTrace: '*)*' + SELECTION_6: + CallTrace: '*UNKNOWN(*' + SELECTION_7: + CallTrace: '*)|UNKNOWN(*' + SELECTION_8: + CallTrace: '*)' + SELECTION_9: + EventID: 10 + condition: (SELECTION_1 and (((SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7 and SELECTION_8)) or ((SELECTION_9 and SELECTION_10 + and (SELECTION_11 or SELECTION_12 or SELECTION_13 or SELECTION_14 or SELECTION_15 + or SELECTION_16 or SELECTION_17 or SELECTION_18)) and not ((SELECTION_19 and + SELECTION_20))))) +falsepositives: +- Low +fields: +- ComputerName +- User +- SourceImage +- TargetImage +- CallTrace +id: 5f113a8f-8b61-41ca-b90f-d374fa7e4a39 +level: critical +logsource: + category: process_access + product: windows +modified: 2021/05/16 +references: +- https://azure.microsoft.com/en-ca/blog/detecting-in-memory-attacks-with-sysmon-and-azure-security-center/ +status: experimental +tags: +- attack.privilege_escalation +- attack.defense_evasion +- attack.t1055.001 +- attack.t1055.002 +- attack.t1055 diff --git a/rules/sigma/windows/process_access/sysmon_invoke_phantom.yml b/rules/sigma/windows/process_access/sysmon_invoke_phantom.yml new file mode 100644 index 00000000..359a6225 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_invoke_phantom.yml @@ -0,0 +1,33 @@ + +title: Suspect Svchost Memory Asccess +author: Tim Burrell +date: 2020/01/02 +description: Detects suspect access to svchost process memory such as that used by + Invoke-Phantom to kill the winRM windows event logging service. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\windows\system32\svchost.exe' + SELECTION_3: + GrantedAccess: '0x1f3fff' + SELECTION_4: + CallTrace: + - '*unknown*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- unknown +id: 166e9c50-8cd9-44af-815d-d1f0c0e90dde +level: high +logsource: + category: process_access + product: windows +modified: 2020/08/24 +references: +- https://github.com/hlldz/Invoke-Phant0m +- https://twitter.com/timbmsft/status/900724491076214784 +status: experimental +tags: +- attack.defense_evasion +- attack.t1562.002 +- attack.t1089 diff --git a/rules/sigma/windows/process_access/sysmon_invoke_phantom.yml.yml b/rules/sigma/windows/process_access/sysmon_invoke_phantom.yml.yml new file mode 100644 index 00000000..79196691 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_invoke_phantom.yml.yml @@ -0,0 +1,32 @@ + +title: Suspect Svchost Memory Asccess +author: Tim Burrell +date: 2020/01/02 +description: Detects suspect access to svchost process memory such as that used by + Invoke-Phantom to kill the winRM windows event logging service. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\windows\system32\svchost.exe' + SELECTION_3: + GrantedAccess: '0x1f3fff' + SELECTION_4: + CallTrace: '*unknown*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- unknown +id: 166e9c50-8cd9-44af-815d-d1f0c0e90dde +level: high +logsource: + category: process_access + product: windows +modified: 2020/08/24 +references: +- https://github.com/hlldz/Invoke-Phant0m +- https://twitter.com/timbmsft/status/900724491076214784 +status: experimental +tags: +- attack.defense_evasion +- attack.t1562.002 +- attack.t1089 diff --git a/rules/sigma/windows/process_access/sysmon_lazagne_cred_dump_lsass_access.yml b/rules/sigma/windows/process_access/sysmon_lazagne_cred_dump_lsass_access.yml new file mode 100644 index 00000000..c7344327 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_lazagne_cred_dump_lsass_access.yml @@ -0,0 +1,36 @@ + +title: Credential Dumping by LaZagne +author: Bhabesh Raj, Jonhnathan Ribeiro +date: 2020/09/09 +description: Detects LSASS process access by LaZagne for credential dumping. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\lsass.exe' + SELECTION_3: + CallTrace: '*C:\\Windows\\SYSTEM32\\ntdll.dll+*' + SELECTION_4: + CallTrace: '*|C:\\Windows\\System32\\KERNELBASE.dll+*' + SELECTION_5: + CallTrace: '*_ctypes.pyd+*' + SELECTION_6: + CallTrace: '*python27.dll+*' + SELECTION_7: + GrantedAccess: '0x1FFFFF' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5 + and SELECTION_6 and SELECTION_7) +falsepositives: +- Unknown +id: 4b9a8556-99c4-470b-a40c-9c8d02c77ed0 +level: critical +logsource: + category: process_access + product: windows +references: +- https://twitter.com/bh4b3sh/status/1303674603819081728 +status: stable +tags: +- attack.credential_access +- attack.t1003.001 +- attack.s0349 diff --git a/rules/sigma/windows/process_access/sysmon_lazagne_cred_dump_lsass_access.yml.yml b/rules/sigma/windows/process_access/sysmon_lazagne_cred_dump_lsass_access.yml.yml new file mode 100644 index 00000000..c7344327 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_lazagne_cred_dump_lsass_access.yml.yml @@ -0,0 +1,36 @@ + +title: Credential Dumping by LaZagne +author: Bhabesh Raj, Jonhnathan Ribeiro +date: 2020/09/09 +description: Detects LSASS process access by LaZagne for credential dumping. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\lsass.exe' + SELECTION_3: + CallTrace: '*C:\\Windows\\SYSTEM32\\ntdll.dll+*' + SELECTION_4: + CallTrace: '*|C:\\Windows\\System32\\KERNELBASE.dll+*' + SELECTION_5: + CallTrace: '*_ctypes.pyd+*' + SELECTION_6: + CallTrace: '*python27.dll+*' + SELECTION_7: + GrantedAccess: '0x1FFFFF' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5 + and SELECTION_6 and SELECTION_7) +falsepositives: +- Unknown +id: 4b9a8556-99c4-470b-a40c-9c8d02c77ed0 +level: critical +logsource: + category: process_access + product: windows +references: +- https://twitter.com/bh4b3sh/status/1303674603819081728 +status: stable +tags: +- attack.credential_access +- attack.t1003.001 +- attack.s0349 diff --git a/rules/sigma/windows/process_access/sysmon_littlecorporal_generated_maldoc.yml b/rules/sigma/windows/process_access/sysmon_littlecorporal_generated_maldoc.yml new file mode 100644 index 00000000..70671a30 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_littlecorporal_generated_maldoc.yml @@ -0,0 +1,29 @@ + +title: LittleCorporal Generated Maldoc Injection +author: Christian Burkard +date: 2021/08/09 +description: Detects the process injection of a LittleCorporal generated Maldoc. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + SourceImage: '*winword.exe' + SELECTION_3: + CallTrace: '*:\Windows\Microsoft.NET\Framework64\v2.*' + SELECTION_4: + CallTrace: '*UNKNOWN*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- unknown +id: 7bdde3bf-2a42-4c39-aa31-a92b3e17afac +level: high +logsource: + category: process_access + product: windows +references: +- https://github.com/connormcgarr/LittleCorporal +status: experimental +tags: +- attack.execution +- attack.t1204.002 +- attack.t1055.003 diff --git a/rules/sigma/windows/process_access/sysmon_littlecorporal_generated_maldoc.yml.yml b/rules/sigma/windows/process_access/sysmon_littlecorporal_generated_maldoc.yml.yml new file mode 100644 index 00000000..70671a30 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_littlecorporal_generated_maldoc.yml.yml @@ -0,0 +1,29 @@ + +title: LittleCorporal Generated Maldoc Injection +author: Christian Burkard +date: 2021/08/09 +description: Detects the process injection of a LittleCorporal generated Maldoc. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + SourceImage: '*winword.exe' + SELECTION_3: + CallTrace: '*:\Windows\Microsoft.NET\Framework64\v2.*' + SELECTION_4: + CallTrace: '*UNKNOWN*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- unknown +id: 7bdde3bf-2a42-4c39-aa31-a92b3e17afac +level: high +logsource: + category: process_access + product: windows +references: +- https://github.com/connormcgarr/LittleCorporal +status: experimental +tags: +- attack.execution +- attack.t1204.002 +- attack.t1055.003 diff --git a/rules/sigma/windows/process_access/sysmon_load_undocumented_autoelevated_com_interface.yml b/rules/sigma/windows/process_access/sysmon_load_undocumented_autoelevated_com_interface.yml new file mode 100644 index 00000000..5bc48ff5 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_load_undocumented_autoelevated_com_interface.yml @@ -0,0 +1,32 @@ + +title: Load Undocumented Autoelevated COM Interface +author: oscd.community, Dmitry Uchakin +date: 2020/10/07 +description: COM interface (EditionUpgradeManager) that is not used by standard executables. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + CallTrace: '*editionupgrademanagerobj.dll*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +fields: +- ComputerName +- User +- SourceImage +- TargetImage +- CallTrace +id: fb3722e4-1a06-46b6-b772-253e2e7db933 +level: high +logsource: + category: process_access + product: windows +references: +- https://www.snip2code.com/Snippet/4397378/UAC-bypass-using-EditionUpgradeManager-C/ +- https://gist.github.com/hfiref0x/de9c83966623236f5ebf8d9ae2407611 +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/process_access/sysmon_load_undocumented_autoelevated_com_interface.yml.yml b/rules/sigma/windows/process_access/sysmon_load_undocumented_autoelevated_com_interface.yml.yml new file mode 100644 index 00000000..5bc48ff5 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_load_undocumented_autoelevated_com_interface.yml.yml @@ -0,0 +1,32 @@ + +title: Load Undocumented Autoelevated COM Interface +author: oscd.community, Dmitry Uchakin +date: 2020/10/07 +description: COM interface (EditionUpgradeManager) that is not used by standard executables. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + CallTrace: '*editionupgrademanagerobj.dll*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +fields: +- ComputerName +- User +- SourceImage +- TargetImage +- CallTrace +id: fb3722e4-1a06-46b6-b772-253e2e7db933 +level: high +logsource: + category: process_access + product: windows +references: +- https://www.snip2code.com/Snippet/4397378/UAC-bypass-using-EditionUpgradeManager-C/ +- https://gist.github.com/hfiref0x/de9c83966623236f5ebf8d9ae2407611 +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/process_access/sysmon_lsass_dump_comsvcs_dll.yml b/rules/sigma/windows/process_access/sysmon_lsass_dump_comsvcs_dll.yml new file mode 100644 index 00000000..1797721a --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_lsass_dump_comsvcs_dll.yml @@ -0,0 +1,31 @@ + +title: Lsass Memory Dump via Comsvcs DLL +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/10/20 +description: Detects adversaries leveraging the MiniDump export function from comsvcs.dll + via rundll32 to perform a memory dump from lsass. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\lsass.exe' + SELECTION_3: + SourceImage: C:\Windows\System32\rundll32.exe + SELECTION_4: + CallTrace: '*comsvcs.dll*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: a49fa4d5-11db-418c-8473-1e014a8dd462 +level: critical +logsource: + category: process_access + product: windows +modified: 2021/06/21 +references: +- https://twitter.com/shantanukhande/status/1229348874298388484 +- https://modexp.wordpress.com/2019/08/30/minidumpwritedump-via-com-services-dll/ +status: experimental +tags: +- attack.credential_access +- attack.t1003.001 diff --git a/rules/sigma/windows/process_access/sysmon_lsass_dump_comsvcs_dll.yml.yml b/rules/sigma/windows/process_access/sysmon_lsass_dump_comsvcs_dll.yml.yml new file mode 100644 index 00000000..1797721a --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_lsass_dump_comsvcs_dll.yml.yml @@ -0,0 +1,31 @@ + +title: Lsass Memory Dump via Comsvcs DLL +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/10/20 +description: Detects adversaries leveraging the MiniDump export function from comsvcs.dll + via rundll32 to perform a memory dump from lsass. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\lsass.exe' + SELECTION_3: + SourceImage: C:\Windows\System32\rundll32.exe + SELECTION_4: + CallTrace: '*comsvcs.dll*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: a49fa4d5-11db-418c-8473-1e014a8dd462 +level: critical +logsource: + category: process_access + product: windows +modified: 2021/06/21 +references: +- https://twitter.com/shantanukhande/status/1229348874298388484 +- https://modexp.wordpress.com/2019/08/30/minidumpwritedump-via-com-services-dll/ +status: experimental +tags: +- attack.credential_access +- attack.t1003.001 diff --git a/rules/sigma/windows/process_access/sysmon_lsass_memdump.yml b/rules/sigma/windows/process_access/sysmon_lsass_memdump.yml new file mode 100644 index 00000000..0d7e7e72 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_lsass_memdump.yml @@ -0,0 +1,34 @@ + +title: LSASS Memory Dump +author: Samir Bousseaden +date: 2019/04/03 +description: Detects process LSASS memory dump using procdump or taskmgr based on + the CallTrace pointing to dbghelp.dll or dbgcore.dll for win10 +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\lsass.exe' + SELECTION_3: + GrantedAccess: '0x1fffff' + SELECTION_4: + CallTrace: + - '*dbghelp.dll*' + - '*dbgcore.dll*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- unknown +id: 5ef9853e-4d0e-4a70-846f-a9ca37d876da +level: high +logsource: + category: process_access + product: windows +modified: 2021/06/21 +references: +- https://blog.menasec.net/2019/02/threat-hunting-21-procdump-or-taskmgr.html +status: experimental +tags: +- attack.credential_access +- attack.t1003.001 +- attack.t1003 +- attack.s0002 diff --git a/rules/sigma/windows/process_access/sysmon_lsass_memdump.yml.yml b/rules/sigma/windows/process_access/sysmon_lsass_memdump.yml.yml new file mode 100644 index 00000000..4a894a4c --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_lsass_memdump.yml.yml @@ -0,0 +1,37 @@ + +title: LSASS Memory Dump +author: Samir Bousseaden +date: 2019/04/03 +description: Detects process LSASS memory dump using procdump or taskmgr based on + the CallTrace pointing to dbghelp.dll or dbgcore.dll for win10 +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + EventID: 10 + SELECTION_3: + TargetImage: '*\lsass.exe' + SELECTION_4: + GrantedAccess: '0x1fffff' + SELECTION_5: + CallTrace: '*dbghelp.dll*' + SELECTION_6: + CallTrace: '*dbgcore.dll*' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and SELECTION_4 and (SELECTION_5 + or SELECTION_6)) +falsepositives: +- unknown +id: 5ef9853e-4d0e-4a70-846f-a9ca37d876da +level: high +logsource: + category: process_access + product: windows +modified: 2021/06/21 +references: +- https://blog.menasec.net/2019/02/threat-hunting-21-procdump-or-taskmgr.html +status: experimental +tags: +- attack.credential_access +- attack.t1003.001 +- attack.t1003 +- attack.s0002 diff --git a/rules/sigma/windows/process_access/sysmon_malware_verclsid_shellcode.yml b/rules/sigma/windows/process_access/sysmon_malware_verclsid_shellcode.yml new file mode 100644 index 00000000..3ad5ee8f --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_malware_verclsid_shellcode.yml @@ -0,0 +1,40 @@ + +title: Malware Shellcode in Verclsid Target Process +author: John Lambert (tech), Florian Roth (rule) +date: 2017/03/04 +description: Detects a process access to verclsid.exe that injects shellcode from + a Microsoft Office application / VBA macro +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\verclsid.exe' + SELECTION_3: + GrantedAccess: '0x1FFFFF' + SELECTION_4: + CallTrace: '*|UNKNOWN(*' + SELECTION_5: + CallTrace: '*VBE7.DLL*' + SELECTION_6: + SourceImage: '*\Microsoft Office\\*' + SELECTION_7: + CallTrace: '*|UNKNOWN*' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and ((SELECTION_4 and + SELECTION_5) or (SELECTION_6 and SELECTION_7))) +falsepositives: +- unknown +id: b7967e22-3d7e-409b-9ed5-cdae3f9243a1 +level: high +logsource: + category: process_access + definition: 'Use the following config to generate the necessary Event ID 10 Process + Access events: VBE7.DLLUNKNOWN' + product: windows +references: +- https://twitter.com/JohnLaTwC/status/837743453039534080 +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1055 diff --git a/rules/sigma/windows/process_access/sysmon_malware_verclsid_shellcode.yml.yml b/rules/sigma/windows/process_access/sysmon_malware_verclsid_shellcode.yml.yml new file mode 100644 index 00000000..ab1541cb --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_malware_verclsid_shellcode.yml.yml @@ -0,0 +1,42 @@ + +title: Malware Shellcode in Verclsid Target Process +author: John Lambert (tech), Florian Roth (rule) +date: 2017/03/04 +description: Detects a process access to verclsid.exe that injects shellcode from + a Microsoft Office application / VBA macro +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + EventID: 10 + SELECTION_3: + TargetImage: '*\verclsid.exe' + SELECTION_4: + GrantedAccess: '0x1FFFFF' + SELECTION_5: + CallTrace: '*|UNKNOWN(*' + SELECTION_6: + CallTrace: '*VBE7.DLL*' + SELECTION_7: + SourceImage: '*\Microsoft Office\\*' + SELECTION_8: + CallTrace: '*|UNKNOWN*' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3 and SELECTION_4) and ((SELECTION_5 + and SELECTION_6) or (SELECTION_7 and SELECTION_8))) +falsepositives: +- unknown +id: b7967e22-3d7e-409b-9ed5-cdae3f9243a1 +level: high +logsource: + category: process_access + definition: 'Use the following config to generate the necessary Event ID 10 Process + Access events: VBE7.DLLUNKNOWN' + product: windows +references: +- https://twitter.com/JohnLaTwC/status/837743453039534080 +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1055 diff --git a/rules/sigma/windows/process_access/sysmon_mimikatz_trough_winrm.yml b/rules/sigma/windows/process_access/sysmon_mimikatz_trough_winrm.yml new file mode 100644 index 00000000..7a508673 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_mimikatz_trough_winrm.yml @@ -0,0 +1,36 @@ + +title: Mimikatz through Windows Remote Management +author: Patryk Prauze - ING Tech +date: 2019/05/20 +description: Detects usage of mimikatz through WinRM protocol by monitoring access + to lsass process by wsmprovhost.exe. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\lsass.exe' + SELECTION_3: + SourceImage: C:\Windows\system32\wsmprovhost.exe + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- low +id: aa35a627-33fb-4d04-a165-d33b4afca3e8 +level: high +logsource: + category: process_access + product: windows +modified: 2021/06/21 +references: +- https://pentestlab.blog/2018/05/15/lateral-movement-winrm/ +status: stable +tags: +- attack.credential_access +- attack.execution +- attack.t1003.001 +- attack.t1003 +- attack.t1059.001 +- attack.t1086 +- attack.lateral_movement +- attack.t1021.006 +- attack.t1028 +- attack.s0002 diff --git a/rules/sigma/windows/process_access/sysmon_mimikatz_trough_winrm.yml.yml b/rules/sigma/windows/process_access/sysmon_mimikatz_trough_winrm.yml.yml new file mode 100644 index 00000000..7a508673 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_mimikatz_trough_winrm.yml.yml @@ -0,0 +1,36 @@ + +title: Mimikatz through Windows Remote Management +author: Patryk Prauze - ING Tech +date: 2019/05/20 +description: Detects usage of mimikatz through WinRM protocol by monitoring access + to lsass process by wsmprovhost.exe. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\lsass.exe' + SELECTION_3: + SourceImage: C:\Windows\system32\wsmprovhost.exe + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- low +id: aa35a627-33fb-4d04-a165-d33b4afca3e8 +level: high +logsource: + category: process_access + product: windows +modified: 2021/06/21 +references: +- https://pentestlab.blog/2018/05/15/lateral-movement-winrm/ +status: stable +tags: +- attack.credential_access +- attack.execution +- attack.t1003.001 +- attack.t1003 +- attack.t1059.001 +- attack.t1086 +- attack.lateral_movement +- attack.t1021.006 +- attack.t1028 +- attack.s0002 diff --git a/rules/sigma/windows/process_access/sysmon_pypykatz_cred_dump_lsass_access.yml b/rules/sigma/windows/process_access/sysmon_pypykatz_cred_dump_lsass_access.yml new file mode 100644 index 00000000..0b85033c --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_pypykatz_cred_dump_lsass_access.yml @@ -0,0 +1,37 @@ + +title: Credential Dumping by Pypykatz +author: Bhabesh Raj +date: 2021/08/03 +description: Detects LSASS process access by pypykatz for credential dumping. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\lsass.exe' + SELECTION_3: + CallTrace: '*C:\Windows\SYSTEM32\ntdll.dll+*' + SELECTION_4: + CallTrace: '*C:\Windows\System32\KERNELBASE.dll+*' + SELECTION_5: + CallTrace: '*libffi-7.dll*' + SELECTION_6: + CallTrace: '*_ctypes.pyd+*' + SELECTION_7: + CallTrace: '*python3*.dll+*' + SELECTION_8: + GrantedAccess: '0x1FFFFF' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5 + and SELECTION_6 and SELECTION_7 and SELECTION_8) +falsepositives: +- Unknown +id: 7186e989-4ed7-4f4e-a656-4674b9e3e48b +level: critical +logsource: + category: process_access + product: windows +references: +- https://github.com/skelsec/pypykatz +status: experimental +tags: +- attack.credential_access +- attack.t1003.001 diff --git a/rules/sigma/windows/process_access/sysmon_pypykatz_cred_dump_lsass_access.yml.yml b/rules/sigma/windows/process_access/sysmon_pypykatz_cred_dump_lsass_access.yml.yml new file mode 100644 index 00000000..0b85033c --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_pypykatz_cred_dump_lsass_access.yml.yml @@ -0,0 +1,37 @@ + +title: Credential Dumping by Pypykatz +author: Bhabesh Raj +date: 2021/08/03 +description: Detects LSASS process access by pypykatz for credential dumping. +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\lsass.exe' + SELECTION_3: + CallTrace: '*C:\Windows\SYSTEM32\ntdll.dll+*' + SELECTION_4: + CallTrace: '*C:\Windows\System32\KERNELBASE.dll+*' + SELECTION_5: + CallTrace: '*libffi-7.dll*' + SELECTION_6: + CallTrace: '*_ctypes.pyd+*' + SELECTION_7: + CallTrace: '*python3*.dll+*' + SELECTION_8: + GrantedAccess: '0x1FFFFF' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5 + and SELECTION_6 and SELECTION_7 and SELECTION_8) +falsepositives: +- Unknown +id: 7186e989-4ed7-4f4e-a656-4674b9e3e48b +level: critical +logsource: + category: process_access + product: windows +references: +- https://github.com/skelsec/pypykatz +status: experimental +tags: +- attack.credential_access +- attack.t1003.001 diff --git a/rules/sigma/windows/process_access/sysmon_svchost_cred_dump.yml b/rules/sigma/windows/process_access/sysmon_svchost_cred_dump.yml new file mode 100644 index 00000000..e3be6658 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_svchost_cred_dump.yml @@ -0,0 +1,27 @@ + +title: SVCHOST Credential Dump +author: Florent Labouyrie +date: 2021/04/30 +description: Detects when a process, such as mimikatz, accesses the memory of svchost + to dump credentials +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + TargetImage: '*\svchost.exe' + SELECTION_3: + GrantedAccess: '0x143a' + SELECTION_4: + SourceImage: + - '*\services.exe' + - '*\msiexec.exe' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Non identified legit exectubale +id: 174afcfa-6e40-4ae9-af64-496546389294 +level: critical +logsource: + category: process_access + product: windows +tags: +- attack.t1548 diff --git a/rules/sigma/windows/process_access/sysmon_svchost_cred_dump.yml.yml b/rules/sigma/windows/process_access/sysmon_svchost_cred_dump.yml.yml new file mode 100644 index 00000000..e7268d26 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_svchost_cred_dump.yml.yml @@ -0,0 +1,32 @@ + +title: SVCHOST Credential Dump +author: Florent Labouyrie +date: 2021/04/30 +description: Detects when a process, such as mimikatz, accesses the memory of svchost + to dump credentials +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + EventID: 10 + SELECTION_3: + TargetImage: '*\svchost.exe' + SELECTION_4: + GrantedAccess: '0x143a' + SELECTION_5: + EventID: 10 + SELECTION_6: + SourceImage: '*\services.exe' + SELECTION_7: + SourceImage: '*\msiexec.exe' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3 and SELECTION_4) and not + ((SELECTION_5 and (SELECTION_6 or SELECTION_7)))) +falsepositives: +- Non identified legit exectubale +id: 174afcfa-6e40-4ae9-af64-496546389294 +level: critical +logsource: + category: process_access + product: windows +tags: +- attack.t1548 diff --git a/rules/sigma/windows/process_access/sysmon_uac_bypass_wow64_logger.yml b/rules/sigma/windows/process_access/sysmon_uac_bypass_wow64_logger.yml new file mode 100644 index 00000000..95c8faa9 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_uac_bypass_wow64_logger.yml @@ -0,0 +1,30 @@ + +title: UAC Bypass Using WOW64 Logger DLL Hijack +author: Christian Burkard +date: 2021/08/23 +description: Detects the pattern of UAC Bypass using a WoW64 logger DLL hijack (UACMe + 30) +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + SourceImage: '*:\Windows\SysWOW64\\*' + SELECTION_3: + GrantedAccess: '0x1fffff' + SELECTION_4: + CallTrace: UNKNOWN(0000000000000000)|UNKNOWN(0000000000000000)|* + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: 4f6c43e2-f989-4ea5-bcd8-843b49a0317c +level: high +logsource: + category: process_access + product: windows +references: +- https://github.com/hfiref0x/UACME +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/process_access/sysmon_uac_bypass_wow64_logger.yml.yml b/rules/sigma/windows/process_access/sysmon_uac_bypass_wow64_logger.yml.yml new file mode 100644 index 00000000..95c8faa9 --- /dev/null +++ b/rules/sigma/windows/process_access/sysmon_uac_bypass_wow64_logger.yml.yml @@ -0,0 +1,30 @@ + +title: UAC Bypass Using WOW64 Logger DLL Hijack +author: Christian Burkard +date: 2021/08/23 +description: Detects the pattern of UAC Bypass using a WoW64 logger DLL hijack (UACMe + 30) +detection: + SELECTION_1: + EventID: 10 + SELECTION_2: + SourceImage: '*:\Windows\SysWOW64\\*' + SELECTION_3: + GrantedAccess: '0x1fffff' + SELECTION_4: + CallTrace: UNKNOWN(0000000000000000)|UNKNOWN(0000000000000000)|* + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: 4f6c43e2-f989-4ea5-bcd8-843b49a0317c +level: high +logsource: + category: process_access + product: windows +references: +- https://github.com/hfiref0x/UACME +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/process_access/win_susp_shell_spawn_from_winrm.yml b/rules/sigma/windows/process_access/win_susp_shell_spawn_from_winrm.yml new file mode 100644 index 00000000..1be3400d --- /dev/null +++ b/rules/sigma/windows/process_access/win_susp_shell_spawn_from_winrm.yml @@ -0,0 +1,35 @@ + +title: Suspicious Shells Spawn by WinRM +author: Andreas Hunkeler (@Karneades), Markus Neis +date: 2021/05/20 +description: Detects suspicious shell spawn from WinRM host process +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*\wsmprovhost.exe' + SELECTION_3: + Image: + - '*\cmd.exe' + - '*\sh.exe' + - '*\bash.exe' + - '*\powershell.exe' + - '*\schtasks.exe' + - '*\certutil.exe' + - '*\whoami.exe' + - '*\bitsadmin.exe' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Legitimate WinRM usage +id: 5cc2cda8-f261-4d88-a2de-e9e193c86716 +level: high +logsource: + category: process_creation + product: windows +modified: 2021/05/22 +status: experimental +tags: +- attack.t1190 +- attack.initial_access +- attack.persistence +- attack.privilege_escalation diff --git a/rules/sigma/windows/process_access/win_susp_shell_spawn_from_winrm.yml.yml b/rules/sigma/windows/process_access/win_susp_shell_spawn_from_winrm.yml.yml new file mode 100644 index 00000000..81d9da08 --- /dev/null +++ b/rules/sigma/windows/process_access/win_susp_shell_spawn_from_winrm.yml.yml @@ -0,0 +1,42 @@ + +title: Suspicious Shells Spawn by WinRM +author: Andreas Hunkeler (@Karneades), Markus Neis +date: 2021/05/20 +description: Detects suspicious shell spawn from WinRM host process +detection: + SELECTION_1: + EventID: 1 + SELECTION_10: + Image: '*\bitsadmin.exe' + SELECTION_2: + ParentImage: '*\wsmprovhost.exe' + SELECTION_3: + Image: '*\cmd.exe' + SELECTION_4: + Image: '*\sh.exe' + SELECTION_5: + Image: '*\bash.exe' + SELECTION_6: + Image: '*\powershell.exe' + SELECTION_7: + Image: '*\schtasks.exe' + SELECTION_8: + Image: '*\certutil.exe' + SELECTION_9: + Image: '*\whoami.exe' + condition: (SELECTION_1 and SELECTION_2 and (SELECTION_3 or SELECTION_4 or SELECTION_5 + or SELECTION_6 or SELECTION_7 or SELECTION_8 or SELECTION_9 or SELECTION_10)) +falsepositives: +- Legitimate WinRM usage +id: 5cc2cda8-f261-4d88-a2de-e9e193c86716 +level: high +logsource: + category: process_creation + product: windows +modified: 2021/05/22 +status: experimental +tags: +- attack.t1190 +- attack.initial_access +- attack.persistence +- attack.privilege_escalation diff --git a/rules/sigma/windows/process_creation/process_creation_abusing_windows_telemetry_for_persistence.yml b/rules/sigma/windows/process_creation/process_creation_abusing_windows_telemetry_for_persistence.yml new file mode 100644 index 00000000..4ed438a4 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_abusing_windows_telemetry_for_persistence.yml @@ -0,0 +1,37 @@ + +title: Abusing Windows Telemetry For Persistence +author: Sreeman +date: 2020/09/29 +description: Windows telemetry makes use of the binary CompatTelRunner.exe to run + a variety of commands and perform the actual telemetry collections. This binary + was created to be easily extensible, and to that end, it relies on the registry + to instruct on which commands to run. The problem is, it will run any arbitrary + command without restriction of location or type. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine|re: (?i).*schtasks.*(-|/)r.*\\\\Application Experience\\\\Microsoft + Compatibility Appraiser.* + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- none +fields: +- EventID +- CommandLine +- TargetObject +- Details +id: f548a603-c9f2-4c89-b511-b089f7e94549 +level: high +logsource: + category: process_creation + product: windows +modified: 2021/09/09 +references: +- https://www.trustedsec.com/blog/abusing-windows-telemetry-for-persistence/ +status: experimental +tags: +- attack.defense_evasion +- attack.persistence +- attack.t1112 +- attack.t1053 diff --git a/rules/sigma/windows/process_creation/process_creation_advanced_ip_scanner.yml b/rules/sigma/windows/process_creation/process_creation_advanced_ip_scanner.yml new file mode 100644 index 00000000..cbe02627 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_advanced_ip_scanner.yml @@ -0,0 +1,30 @@ + +title: Advanced IP Scanner +author: '@ROxPinTeddy' +date: 2020/05/12 +description: Detects the use of Advanced IP Scanner. Seems to be a popular tool for + ransomware groups. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\advanced_ip_scanner*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate administrative use +id: bef37fa2-f205-4a7b-b484-0759bfd5f86f +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/09/12 +references: +- https://news.sophos.com/en-us/2019/12/09/snatch-ransomware-reboots-pcs-into-safe-mode-to-bypass-protection/ +- https://www.fireeye.com/blog/threat-research/2020/05/tactics-techniques-procedures-associated-with-maze-ransomware-incidents.html +- https://labs.f-secure.com/blog/prelude-to-ransomware-systembc +- https://assets.documentcloud.org/documents/20444693/fbi-pin-egregor-ransomware-bc-01062021.pdf +- https://thedfirreport.com/2021/01/18/all-that-for-a-coinminer +status: experimental +tags: +- attack.discovery +- attack.t1046 diff --git a/rules/sigma/windows/process_creation/process_creation_alternate_data_streams.yml b/rules/sigma/windows/process_creation/process_creation_alternate_data_streams.yml new file mode 100644 index 00000000..77dcc021 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_alternate_data_streams.yml @@ -0,0 +1,51 @@ + +title: Execute From Alternate Data Streams +author: frack113 +date: 2021/09/01 +description: Adversaries may use NTFS file attributes to hide their malicious data + in order to evade detection +detection: + SELECTION_1: + EventID: 1 + SELECTION_10: + CommandLine: '* /E *' + SELECTION_11: + CommandLine: '*esentutl *' + SELECTION_12: + CommandLine: '* /y *' + SELECTION_13: + CommandLine: '* /d *' + SELECTION_14: + CommandLine: '* /o *' + SELECTION_2: + CommandLine: '*txt:*' + SELECTION_3: + CommandLine: '*type *' + SELECTION_4: + CommandLine: '* > *' + SELECTION_5: + CommandLine: '*makecab *' + SELECTION_6: + CommandLine: '*.cab*' + SELECTION_7: + CommandLine: '*reg *' + SELECTION_8: + CommandLine: '* export *' + SELECTION_9: + CommandLine: '*regedit *' + condition: (SELECTION_1 and SELECTION_2 and ((SELECTION_3 and SELECTION_4) or (SELECTION_5 + and SELECTION_6) or (SELECTION_7 and SELECTION_8) or (SELECTION_9 and SELECTION_10) + or (SELECTION_11 and SELECTION_12 and SELECTION_13 and SELECTION_14))) +falsepositives: +- Unknown +id: 7f43c430-5001-4f8b-aaa9-c3b88f18fa5c +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1564.004/T1564.004.md +status: experimental +tags: +- attack.defense_evasion +- attack.t1564.004 diff --git a/rules/sigma/windows/process_creation/process_creation_apt_gallium.yml b/rules/sigma/windows/process_creation/process_creation_apt_gallium.yml new file mode 100644 index 00000000..26b228dc --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_apt_gallium.yml @@ -0,0 +1,35 @@ + +title: GALLIUM Artefacts +author: Tim Burrell +date: 2020/02/07 +description: Detects artefacts associated with activity group GALLIUM - Microsoft + Threat Intelligence Center indicators released in December 2019. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + sha1: + - e570585edc69f9074cb5e8a790708336bd45ca0f + SELECTION_3: + Image: + - '*:\Program Files(x86)\\*' + - '*:\Program Files\\*' + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- unknown +id: 18739897-21b1-41da-8ee4-5b786915a676 +level: high +logsource: + category: process_creation + product: windows +modified: 2021/09/19 +references: +- https://www.microsoft.com/security/blog/2019/12/12/gallium-targeting-global-telecom/ +- https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn800669(v=ws.11) +related: +- id: 440a56bf-7873-4439-940a-1c8a671073c2 + type: derived +status: experimental +tags: +- attack.credential_access +- attack.command_and_control diff --git a/rules/sigma/windows/process_creation/process_creation_apt_gallium_sha1.yml b/rules/sigma/windows/process_creation/process_creation_apt_gallium_sha1.yml new file mode 100644 index 00000000..e8b2636e --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_apt_gallium_sha1.yml @@ -0,0 +1,46 @@ + +title: GALLIUM Artefacts +author: Tim Burrell +date: 2020/02/07 +description: Detects artefacts associated with activity group GALLIUM - Microsoft + Threat Intelligence Center indicators released in December 2019. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + sha1: + - 53a44c2396d15c3a03723fa5e5db54cafd527635 + - 9c5e496921e3bc882dc40694f1dcc3746a75db19 + - aeb573accfd95758550cf30bf04f389a92922844 + - 79ef78a797403a4ed1a616c68e07fff868a8650a + - 4f6f38b4cec35e895d91c052b1f5a83d665c2196 + - 1e8c2cac2e4ce7cbd33c3858eb2e24531cb8a84d + - e841a63e47361a572db9a7334af459ddca11347a + - c28f606df28a9bc8df75a4d5e5837fc5522dd34d + - 2e94b305d6812a9f96e6781c888e48c7fb157b6b + - dd44133716b8a241957b912fa6a02efde3ce3025 + - 8793bf166cb89eb55f0593404e4e933ab605e803 + - a39b57032dbb2335499a51e13470a7cd5d86b138 + - 41cc2b15c662bc001c0eb92f6cc222934f0beeea + - d209430d6af54792371174e70e27dd11d3def7a7 + - 1c6452026c56efd2c94cea7e0f671eb55515edb0 + - c6b41d3afdcdcaf9f442bbe772f5da871801fd5a + - 4923d460e22fbbf165bbbaba168e5a46b8157d9f + - f201504bd96e81d0d350c3a8332593ee1c9e09de + - ddd2db1127632a2a52943a2fe516a2e7d05d70d2 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 440a56bf-7873-4439-940a-1c8a671073c2 +level: high +logsource: + category: process_creation + product: windows +modified: 2021/09/19 +references: +- https://www.microsoft.com/security/blog/2019/12/12/gallium-targeting-global-telecom/ +- https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn800669(v=ws.11) +status: experimental +tags: +- attack.credential_access +- attack.command_and_control diff --git a/rules/sigma/windows/process_creation/process_creation_apt_pandemic.yml b/rules/sigma/windows/process_creation/process_creation_apt_pandemic.yml new file mode 100644 index 00000000..ddf58638 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_apt_pandemic.yml @@ -0,0 +1,36 @@ + +title: Pandemic Registry Key +author: Florian Roth +date: 2017/06/01 +description: Detects Pandemic Windows Implant +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*loaddll -a *' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +fields: +- EventID +- CommandLine +- ParentCommandLine +- Image +- User +- TargetObject +id: 9fefd33c-339d-4495-9cba-b96ca006f512 +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/09/12 +references: +- https://wikileaks.org/vault7/#Pandemic +- https://twitter.com/MalwareJake/status/870349480356454401 +related: +- id: 47e0852a-cf81-4494-a8e6-31864f8c86ed + type: derived +status: experimental +tags: +- attack.lateral_movement +- attack.t1105 diff --git a/rules/sigma/windows/process_creation/process_creation_apt_slingshot.yml b/rules/sigma/windows/process_creation/process_creation_apt_slingshot.yml new file mode 100644 index 00000000..e1901c9a --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_apt_slingshot.yml @@ -0,0 +1,33 @@ + +title: Defrag Deactivation +author: Florian Roth, Bartlomiej Czyz (@bczyz1) +date: 2019/03/04 +description: Detects the deactivation and disabling of the Scheduled defragmentation + task as seen by Slingshot APT group +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\schtasks.exe' + SELECTION_3: + CommandLine: + - '*/delete*' + - '*/change*' + SELECTION_4: + CommandLine: '*/TN*' + SELECTION_5: + CommandLine: '*\Microsoft\Windows\Defrag\ScheduledDefrag*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Unknown +id: 958d81aa-8566-4cea-a565-59ccd4df27b0 +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/09/19 +references: +- https://securelist.com/apt-slingshot/84312/ +tags: +- attack.persistence +- attack.s0111 diff --git a/rules/sigma/windows/process_creation/process_creation_apt_turla_commands_critical.yml b/rules/sigma/windows/process_creation/process_creation_apt_turla_commands_critical.yml new file mode 100644 index 00000000..8b67f48a --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_apt_turla_commands_critical.yml @@ -0,0 +1,35 @@ + +title: Turla Group Lateral Movement +author: Markus Neis +date: 2017/11/07 +description: Detects automated lateral movement by Turla group +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - net use \\%DomainController%\C$ "P@ssw0rd" * + - dir c:\\*.doc* /s + - dir %TEMP%\\*.exe + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: c601f20d-570a-4cde-a7d6-e17f99cb8e7f +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/09/19 +references: +- https://securelist.com/the-epic-turla-operation/65545/ +status: experimental +tags: +- attack.g0010 +- attack.execution +- attack.t1059 +- attack.lateral_movement +- attack.t1077 +- attack.t1021.002 +- attack.discovery +- attack.t1083 +- attack.t1135 diff --git a/rules/sigma/windows/process_creation/process_creation_apt_wocao.yml b/rules/sigma/windows/process_creation/process_creation_apt_wocao.yml new file mode 100644 index 00000000..89e3ba6a --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_apt_wocao.yml @@ -0,0 +1,48 @@ + +title: Operation Wocao Activity +author: Florian Roth, frack113 +date: 2019/12/20 +description: Detects activity mentioned in Operation Wocao report +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*checkadmin.exe 127.0.0.1 -all*' + - '*netsh advfirewall firewall add rule name=powershell dir=in*' + - '*cmd /c powershell.exe -ep bypass -file c:\s.ps1*' + - '*/tn win32times /f*' + - '*create win32times binPath=*' + - '*\c$\windows\system32\devmgr.dll*' + - '* -exec bypass -enc JgAg*' + - '*type *keepass\KeePass.config.xml*' + - '*iie.exe iie.txt*' + - '*reg query HKEY_CURRENT_USER\Software\\*\PuTTY\Sessions\\*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Administrators that use checkadmin.exe tool to enumerate local administrators +id: 1cfac73c-be78-4f9a-9b08-5bde0c3953ab +level: high +logsource: + category: process_creation + product: windows +modified: 2021/09/19 +references: +- https://www.fox-it.com/en/news/whitepapers/operation-wocao-shining-a-light-on-one-of-chinas-hidden-hacking-groups/ +- https://twitter.com/SBousseaden/status/1207671369963646976 +related: +- id: 74ad4314-482e-4c3e-b237-3f7ed3b9ca8d + type: derived +status: experimental +tags: +- attack.discovery +- attack.t1012 +- attack.defense_evasion +- attack.t1036.004 +- attack.t1036 +- attack.t1027 +- attack.execution +- attack.t1053.005 +- attack.t1053 +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/process_creation/process_creation_automated_collection.yml b/rules/sigma/windows/process_creation/process_creation_automated_collection.yml new file mode 100644 index 00000000..156d4a86 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_automated_collection.yml @@ -0,0 +1,45 @@ + +title: Automated Collection Command Prompt +author: frack113 +date: 2021/07/28 +description: Once established within a system or network, an adversary may use automated + techniques for collecting internal data. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*.doc*' + - '*.docx*' + - '*.xls*' + - '*.xlsx*' + - '*.ppt*' + - '*.pptx*' + - '*.rtf*' + - '*.pdf*' + - '*.txt*' + SELECTION_3: + CommandLine: '*dir *' + SELECTION_4: + CommandLine: '* /b *' + SELECTION_5: + CommandLine: '* /s *' + SELECTION_6: + OriginalFileName: FINDSTR.EXE + SELECTION_7: + CommandLine: '* /e *' + condition: (SELECTION_1 and SELECTION_2 and ((SELECTION_3 and SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7))) +falsepositives: +- Unknown +id: f576a613-2392-4067-9d1a-9345fb58d8d1 +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1119/T1119.md +status: experimental +tags: +- attack.collection +- attack.t1119 diff --git a/rules/sigma/windows/process_creation/process_creation_c3_load_by_rundll32.yml b/rules/sigma/windows/process_creation/process_creation_c3_load_by_rundll32.yml new file mode 100644 index 00000000..bc1e8098 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_c3_load_by_rundll32.yml @@ -0,0 +1,28 @@ + +title: F-Secure C3 Load by Rundll32 +author: Alfie Champion (ajpc500) +date: 2021/06/02 +description: F-Secure C3 produces DLLs with a default exported StartNodeRelay function. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*rundll32.exe*' + SELECTION_3: + CommandLine: '*.dll*' + SELECTION_4: + CommandLine: '*StartNodeRelay*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: b18c9d4c-fac9-4708-bd06-dd5bfacf200f +level: critical +logsource: + category: process_creation + product: windows +references: +- https://github.com/FSecureLABS/C3/blob/master/Src/NodeRelayDll/NodeRelayDll.cpp#L12 +status: experimental +tags: +- attack.defense_evasion +- attack.t1218.011 diff --git a/rules/sigma/windows/process_creation/process_creation_clip.yml b/rules/sigma/windows/process_creation/process_creation_clip.yml new file mode 100644 index 00000000..bf91eaa3 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_clip.yml @@ -0,0 +1,26 @@ + +title: Use of CLIP +author: frack113 +date: 2021/07/27 +description: Adversaries may collect data stored in the clipboard from users copying + information within or between applications. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + OriginalFileName: clip.exe + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: ddeff553-5233-4ae9-bbab-d64d2bd634be +level: low +logsource: + category: process_creation + product: windows +references: +- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/clip +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1115/T1115.md +status: experimental +tags: +- attack.collection +- attack.t1115 diff --git a/rules/sigma/windows/process_creation/process_creation_cobaltstrike_load_by_rundll32.yml b/rules/sigma/windows/process_creation/process_creation_cobaltstrike_load_by_rundll32.yml new file mode 100644 index 00000000..d44fdbef --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_cobaltstrike_load_by_rundll32.yml @@ -0,0 +1,31 @@ + +title: CobaltStrike Load by Rundll32 +author: Wojciech Lesicki +date: 2021/06/01 +description: Rundll32 can be use by Cobalt Strike with StartW function to load DLLs + from the command line. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*rundll32.exe*' + SELECTION_3: + CommandLine: '*.dll*' + SELECTION_4: + CommandLine: '*StartW*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: ae9c6a7c-9521-42a6-915e-5aaa8689d529 +level: critical +logsource: + category: process_creation + product: windows +references: +- https://www.cobaltstrike.com/help-windows-executable +- https://redcanary.com/threat-detection-report/ +- https://thedfirreport.com/2020/10/18/ryuk-in-5-hours/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1218.011 diff --git a/rules/sigma/windows/process_creation/process_creation_command_execution_by_office_applications.yml b/rules/sigma/windows/process_creation/process_creation_command_execution_by_office_applications.yml new file mode 100644 index 00000000..5ec7a6ec --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_command_execution_by_office_applications.yml @@ -0,0 +1,36 @@ + +title: WMI Command Execution by Office Applications +author: Vadim Khrykov (ThreatIntel), Cyb3rEng (Rule) +date: 2021/08/23 +description: Initial execution of malicious document calls wmic Win32_Process::Create + to execute the file with regsvr32 +detection: + SELECTION_1: + EventLog: EDR + SELECTION_2: + EventType: WMIExecution + SELECTION_3: + WMIcommand: '*Win32_Process\:\:Create*' + SELECTION_4: + Image: + - '*\winword.exe' + - '*\excel.exe' + - '*\powerpnt.exe' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: 3ee1bba8-b9e2-4e35-bec5-7fb66b6b3815 +level: high +logsource: + category: process_creation + product: EndPoint Detection Logs +references: +- https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/ +- https://github.com/vadim-hunter/Detection-Ideas-Rules/blob/main/Threat%20Intelligence/The%20DFIR%20Report/20210329_Sodinokibi_(aka_REvil)_Ransomware.yaml +status: experimental +tags: +- attack.t1204.002 +- attack.t1047 +- attack.t1218.010 +- attack.execution +- attack.defense_evasion diff --git a/rules/sigma/windows/process_creation/process_creation_conti_cmd_ransomware.yml b/rules/sigma/windows/process_creation/process_creation_conti_cmd_ransomware.yml new file mode 100644 index 00000000..7650a607 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_conti_cmd_ransomware.yml @@ -0,0 +1,37 @@ + +title: Conti Ransomware Execution +author: frack113 +date: 2021/10/12 +description: Conti ransomware command line ioc +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*-m *' + SELECTION_3: + CommandLine: '*-net *' + SELECTION_4: + CommandLine: '*-size *' + SELECTION_5: + CommandLine: '*-nomutex *' + SELECTION_6: + CommandLine: '*-p \\\*' + SELECTION_7: + CommandLine: '*$*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5 + and SELECTION_6 and SELECTION_7) +falsepositives: +- Unknown should be low +id: 689308fc-cfba-4f72-9897-796c1dc61487 +level: critical +logsource: + category: process_creation + product: windows +references: +- https://news.sophos.com/en-us/2021/09/03/conti-affiliates-use-proxyshell-exchange-exploit-in-ransomware-attacks/ +- https://twitter.com/VK_Intel/status/1447795359900704769?t=Xz7vaLTvaaCZ5kHoZa6gMw&s=19 +status: experimental +tags: +- attack.impact +- attack.s0575 +- attack.t1486 diff --git a/rules/sigma/windows/process_creation/process_creation_coti_sqlcmd.yml b/rules/sigma/windows/process_creation/process_creation_coti_sqlcmd.yml new file mode 100644 index 00000000..e390a5b9 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_coti_sqlcmd.yml @@ -0,0 +1,34 @@ + +title: Conti Backup Database +author: frack113 +date: 2021/08/16 +description: Detects a command used by conti to dump database +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*sqlcmd *' + - '*sqlcmd.exe*' + SELECTION_3: + CommandLine: '* -S localhost *' + SELECTION_4: + CommandLine: + - '*sys.sysprocesses*' + - '*master.dbo.sysdatabases*' + - '*BACKUP DATABASE*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: 2f47f1fd-0901-466e-a770-3b7092834a1b +level: high +logsource: + category: process_creation + product: windows +references: +- https://twitter.com/vxunderground/status/1423336151860002816?s=20 +- https://www.virustotal.com/gui/file/03e9b8c2e86d6db450e5eceec057d7e369ee2389b9daecaf06331a95410aa5f8/detection +- https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-ver15 +status: experimental +tags: +- attack.collection diff --git a/rules/sigma/windows/process_creation/process_creation_discover_private_keys.yml b/rules/sigma/windows/process_creation/process_creation_discover_private_keys.yml new file mode 100644 index 00000000..4123a159 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_discover_private_keys.yml @@ -0,0 +1,44 @@ + +title: Discover Private Keys +author: frack113 +date: 2021/07/20 +description: Adversaries may search for private key certificate files on compromised + systems for insecurely stored credential +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*dir *' + - '*findstr *' + SELECTION_3: + CommandLine: + - '*.key*' + - '*.pgp*' + - '*.gpg*' + - '*.ppk*' + - '*.p12*' + - '*.pem*' + - '*.pfx*' + - '*.cer*' + - '*.p7b*' + - '*.asc*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: 213d6a77-3d55-4ce8-ba74-fcfef741974e +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1552.004/T1552.004.md +status: experimental +tags: +- attack.credential_access +- attack.t1552.004 diff --git a/rules/sigma/windows/process_creation/process_creation_dns_serverlevelplugindll.yml b/rules/sigma/windows/process_creation/process_creation_dns_serverlevelplugindll.yml new file mode 100644 index 00000000..d8758df3 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_dns_serverlevelplugindll.yml @@ -0,0 +1,43 @@ + +title: DNS ServerLevelPluginDll Install +author: Florian Roth +date: 2017/05/08 +description: Detects the installation of a plugin DLL via ServerLevelPluginDll parameter + in Registry, which can be used to execute code in context of the DNS server (restart + required) +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\dnscmd.exe' + SELECTION_3: + CommandLine: '*/config*' + SELECTION_4: + CommandLine: '*/serverlevelplugindll*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- unknown +fields: +- EventID +- CommandLine +- ParentCommandLine +- Image +- User +- TargetObject +id: f63b56ee-3f79-4b8a-97fb-5c48007e8573 +level: high +logsource: + category: process_creation + product: windows +modified: 2021/09/12 +references: +- https://medium.com/@esnesenon/feature-not-bug-dnsadmin-to-dc-compromise-in-one-line-a0f779b8dc83 +related: +- id: e61e8a88-59a9-451c-874e-70fcc9740d67 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1073 +- attack.t1574.002 +- attack.t1112 diff --git a/rules/sigma/windows/process_creation/process_creation_dotnet.yml b/rules/sigma/windows/process_creation/process_creation_dotnet.yml new file mode 100644 index 00000000..05f07ba5 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_dotnet.yml @@ -0,0 +1,37 @@ + +title: Dotnet.exe Exec Dll and Execute Unsigned Code LOLBIN +author: Beyu Denis, oscd.community +date: 2020/10/18 +description: dotnet.exe will execute any DLL and execute unsigned code +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*.dll' + - '*.csproj' + SELECTION_3: + Image: + - '*\dotnet.exe' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- System administrator Usage +- Penetration test +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: d80d5c81-04ba-45b4-84e4-92eba40e0ad3 +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OtherMSBinaries/Dotnet.yml +- https://twitter.com/_felamos/status/1204705548668555264 +- https://bohops.com/2019/08/19/dotnet-core-a-vector-for-awl-bypass-defense-evasion/ +status: experimental +tags: +- attack.execution +- attack.t1218 diff --git a/rules/sigma/windows/process_creation/process_creation_hack_dumpert.yml b/rules/sigma/windows/process_creation/process_creation_hack_dumpert.yml new file mode 100644 index 00000000..99503438 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_hack_dumpert.yml @@ -0,0 +1,28 @@ + +title: Dumpert Process Dumper +author: Florian Roth +date: 2020/02/04 +description: Detects the use of Dumpert process dumper, which dumps the lsass.exe + process memory +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Imphash: 09D278F9DE118EF09163C6140255C690 + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Very unlikely +id: 2704ab9e-afe2-4854-a3b1-0c0706d03578 +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/09/21 +references: +- https://github.com/outflanknl/Dumpert +- https://unit42.paloaltonetworks.com/actors-still-exploiting-sharepoint-vulnerability/ +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.001 diff --git a/rules/sigma/windows/process_creation/process_creation_infdefaultinstall.yml b/rules/sigma/windows/process_creation/process_creation_infdefaultinstall.yml new file mode 100644 index 00000000..b808f3ef --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_infdefaultinstall.yml @@ -0,0 +1,33 @@ + +title: InfDefaultInstall.exe .inf Execution +author: frack113 +date: 2021/07/13 +description: Executes SCT script using scrobj.dll from a command in entered into a + specially prepared INF file. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*InfDefaultInstall.exe *' + SELECTION_3: + CommandLine: '*.inf*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: ce7cf472-6fcc-490a-9481-3786840b5d9b +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218/T1218.md +- https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSBinaries/Infdefaultinstall.yml +status: experimental +tags: +- attack.defense_evasion +- attack.t1562.001 diff --git a/rules/sigma/windows/process_creation/process_creation_lolbas_data_exfiltration_by_using_datasvcutil.yml b/rules/sigma/windows/process_creation/process_creation_lolbas_data_exfiltration_by_using_datasvcutil.yml new file mode 100644 index 00000000..2692492b --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_lolbas_data_exfiltration_by_using_datasvcutil.yml @@ -0,0 +1,42 @@ + +title: LOLBAS Data Exfiltration by DataSvcUtil.exe +author: Ialle Teixeira @teixeira0xfffff, Austin Songer @austinsonger +date: 2021/09/30 +description: Detects when a user performs data exfiltration by using DataSvcUtil.exe +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*/in:*' + SELECTION_3: + CommandLine: '*/out:*' + SELECTION_4: + Image: + - '*\DataSvcUtil.exe' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- DataSvcUtil.exe being used may be performed by a system administrator. +- Verify whether the user identity, user agent, and/or hostname should be making changes + in your environment. +- DataSvcUtil.exe being executed from unfamiliar users should be investigated. If + known behavior is causing false positives, it can be exempted from the rule. +- Penetration Testing +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: e290b10b-1023-4452-a4a9-eb31a9013b3a +level: medium +logsource: + category: process_creation + product: windows +references: +- https://gist.github.com/teixeira0xfffff/837e5bfed0d1b0a29a7cb1e5dbdd9ca6 +- https://docs.microsoft.com/en-us/dotnet/framework/data/wcf/wcf-data-service-client-utility-datasvcutil-exe +- https://docs.microsoft.com/en-us/dotnet/framework/data/wcf/generating-the-data-service-client-library-wcf-data-services +- https://docs.microsoft.com/en-us/dotnet/framework/data/wcf/how-to-add-a-data-service-reference-wcf-data-services +status: experimental +tags: +- attack.exfiltration +- attack.t1567 diff --git a/rules/sigma/windows/process_creation/process_creation_lolbins_by_office_applications.yml b/rules/sigma/windows/process_creation/process_creation_lolbins_by_office_applications.yml new file mode 100644 index 00000000..4efea4e6 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_lolbins_by_office_applications.yml @@ -0,0 +1,37 @@ + +title: New Lolbin Process by Office Applications +author: Vadim Khrykov (ThreatIntel), Cyb3rEng (Rule) +date: 2021/08/23 +description: This rule will monitor any office apps that spins up a new LOLBin process. + This activity is pretty suspicious and should be investigated. +detection: + SELECTION_1: + Image: + - '*regsvr32' + - '*rundll32' + - '*msiexec' + - '*mshta' + - '*verclsid' + SELECTION_2: + ParentImage: + - '*winword.exe' + - '*excel.exe' + - '*powerpnt.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 23daeb52-e6eb-493c-8607-c4f0246cb7d8 +level: high +logsource: + category: process_creation + product: Windows +references: +- https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/ +- https://github.com/vadim-hunter/Detection-Ideas-Rules/blob/main/Threat%20Intelligence/The%20DFIR%20Report/20210329_Sodinokibi_(aka_REvil)_Ransomware.yaml +status: experimental +tags: +- attack.t1204.002 +- attack.t1047 +- attack.t1218.010 +- attack.execution +- attack.defense_evasion diff --git a/rules/sigma/windows/process_creation/process_creation_lolbins_with_wmiprvse_parent_process.yml b/rules/sigma/windows/process_creation/process_creation_lolbins_with_wmiprvse_parent_process.yml new file mode 100644 index 00000000..18111329 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_lolbins_with_wmiprvse_parent_process.yml @@ -0,0 +1,34 @@ + +title: Lolbins Process Creation with WmiPrvse +author: Vadim Khrykov (ThreatIntel), Cyb3rEng (Rule) +date: 2021/08/23 +description: This rule will monitor LOLBin process creations by wmiprvse. Add more + LOLBins to rule logic if needed. +detection: + SELECTION_1: + Image: + - '*regsvr32' + - '*rundll32' + - '*msiexec' + - '*mshta' + - '*verclsid' + SELECTION_2: + ParentImage: '*\wbem\WmiPrvSE.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Unknown +id: 8a582fe2-0882-4b89-a82a-da6b2dc32937 +level: high +logsource: + category: process_creation + product: Windows +references: +- https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/ +- https://github.com/vadim-hunter/Detection-Ideas-Rules/blob/main/Threat%20Intelligence/The%20DFIR%20Report/20210329_Sodinokibi_(aka_REvil)_Ransomware.yaml +status: experimental +tags: +- attack.t1204.002 +- attack.t1047 +- attack.t1218.010 +- attack.execution +- attack.defense_evasion diff --git a/rules/sigma/windows/process_creation/process_creation_msdeploy.yml b/rules/sigma/windows/process_creation/process_creation_msdeploy.yml new file mode 100644 index 00000000..830f1258 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_msdeploy.yml @@ -0,0 +1,39 @@ + +title: Execute Files with Msdeploy.exe +author: Beyu Denis, oscd.community +date: 2020/10/18 +description: Detects file execution using the msdeploy.exe lolbin +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*verb:sync*' + SELECTION_3: + CommandLine: '*-source:RunCommand*' + SELECTION_4: + CommandLine: '*-dest:runCommand*' + SELECTION_5: + Image: + - '*\msdeploy.exe' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- System administrator Usage +- Penetration test +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: 646bc99f-6682-4b47-a73a-17b1b64c9d34 +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OtherMSBinaries/Msdeploy.yml +- https://twitter.com/pabraeken/status/995837734379032576 +- https://twitter.com/pabraeken/status/999090532839313408 +status: experimental +tags: +- attack.execution +- attack.t1218 diff --git a/rules/sigma/windows/process_creation/process_creation_office_applications_spawning_wmi_commandline.yml b/rules/sigma/windows/process_creation/process_creation_office_applications_spawning_wmi_commandline.yml new file mode 100644 index 00000000..5e16099f --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_office_applications_spawning_wmi_commandline.yml @@ -0,0 +1,41 @@ + +title: Office Applications Spawning Wmi Cli +author: Vadim Khrykov (ThreatIntel), Cyb3rEng (Rule) +date: 2021/08/23 +description: Initial execution of malicious document calls wmic to execute the file + with regsvr32 +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: \wbem\WMIC.exe + SELECTION_3: + CommandLine: '*wmic *' + SELECTION_4: + OriginalFileName: wmic.exe + SELECTION_5: + Description: WMI Commandline Utility + SELECTION_6: + ParentPrcessName: + - '*winword.exe' + - '*excel.exe' + - '*powerpnt.exe' + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3 or SELECTION_4 or SELECTION_5) + and SELECTION_6) +falsepositives: +- Unknown +id: 518643ba-7d9c-4fa5-9f37-baed36059f6a +level: high +logsource: + category: process_creation + product: windows +references: +- https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/ +- https://github.com/vadim-hunter/Detection-Ideas-Rules/blob/main/Threat%20Intelligence/The%20DFIR%20Report/20210329_Sodinokibi_(aka_REvil)_Ransomware.yaml +status: experimental +tags: +- attack.t1204.002 +- attack.t1047 +- attack.t1218.010 +- attack.execution +- attack.defense_evasion diff --git a/rules/sigma/windows/process_creation/process_creation_office_from_proxy_executing_regsvr32_payload.yml b/rules/sigma/windows/process_creation/process_creation_office_from_proxy_executing_regsvr32_payload.yml new file mode 100644 index 00000000..6b83c280 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_office_from_proxy_executing_regsvr32_payload.yml @@ -0,0 +1,55 @@ + +title: Excel Proxy Executing Regsvr32 With Payload +author: Vadim Khrykov (ThreatIntel), Cyb3rEng (Rule) +date: 2021/08/23 +description: Excel called wmic to finally proxy execute regsvr32 with the payload. + An attacker wanted to break suspicious parent-child chain (Office app spawns LOLBin).But + we have command-line in the event which allow us to "restore" this suspicious parent-child + chain and detect it. Monitor process creation with "wmic process call create" and + LOLBins in command-line with parent Office application processes. +detection: + SELECTION_1: + Image: '*\wbem\WMIC.exe' + SELECTION_2: + ProcessCommandLine: '*wmic *' + SELECTION_3: + OriginalFileName: wmic.exe + SELECTION_4: + Description: WMI Commandline Utility + SELECTION_5: + CommandLine: + - '*regsvr32*' + - '*rundll32*' + - '*msiexec*' + - '*mshta*' + - '*verclsid*' + SELECTION_6: + ParentImage: + - '*winword.exe' + - '*excel.exe' + - '*powerpnt.exe' + SELECTION_7: + processCommandLine: '*process*' + SELECTION_8: + processCommandLine: '*create*' + SELECTION_9: + processCommandLine: '*call*' + condition: ((SELECTION_1 or SELECTION_2 or SELECTION_3 or SELECTION_4) and SELECTION_5 + and SELECTION_6 and SELECTION_7 and SELECTION_8 and SELECTION_9) +falsepositives: +- Unknown +id: 9d1c72f5-43f0-4da5-9320-648cf2099dd0 +level: high +logsource: + category: process_creation + product: Windows +references: +- https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/ +- https://github.com/vadim-hunter/Detection-Ideas-Rules/blob/main/Threat%20Intelligence/The%20DFIR%20Report/20210329_Sodinokibi_(aka_REvil)_Ransomware.yaml +status: experimental +tags: +- attack.t1204.002 +- attack.t1047 +- attack.t1218.010 +- attack.execution +- attack.defense_evasion diff --git a/rules/sigma/windows/process_creation/process_creation_office_from_proxy_executing_regsvr32_payload2.yml b/rules/sigma/windows/process_creation/process_creation_office_from_proxy_executing_regsvr32_payload2.yml new file mode 100644 index 00000000..312d3ab9 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_office_from_proxy_executing_regsvr32_payload2.yml @@ -0,0 +1,51 @@ + +title: Excel Proxy Executing Regsvr32 With Payload +author: Vadim Khrykov (ThreatIntel), Cyb3rEng (Rule) +date: 2021/08/23 +description: Excel called wmic to finally proxy execute regsvr32 with the payload. + An attacker wanted to break suspicious parent-child chain (Office app spawns LOLBin).But + we have command-line in the event which allow us to "restore" this suspicious parent-child + chain and detect it. Monitor process creation with "wmic process call create" and + LOLBins in command-line with parent Office application processes. +detection: + SELECTION_1: + ProcessCommandLine: + - '*regsvr32*' + - '*rundll32*' + - '*msiexec*' + - '*mshta*' + - '*verclsid*' + SELECTION_2: + Image: '*\wbem\WMIC.exe' + SELECTION_3: + ProcessCommandLine: '*wmic *' + SELECTION_4: + ParentImage: + - '*winword.exe' + - '*excel.exe' + - '*powerpnt.exe' + SELECTION_5: + processCommandLine: '*process*' + SELECTION_6: + processCommandLine: '*create*' + SELECTION_7: + processCommandLine: '*call*' + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3) and SELECTION_4 and SELECTION_5 + and SELECTION_6 and SELECTION_7) +falsepositives: +- Unknown +id: c0e1c3d5-4381-4f18-8145-2583f06a1fe5 +level: high +logsource: + category: process_creation + product: Windows +references: +- https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/ +- https://github.com/vadim-hunter/Detection-Ideas-Rules/blob/main/Threat%20Intelligence/The%20DFIR%20Report/20210329_Sodinokibi_(aka_REvil)_Ransomware.yaml +status: experimental +tags: +- attack.t1204.002 +- attack.t1047 +- attack.t1218.010 +- attack.execution +- attack.defense_evasion diff --git a/rules/sigma/windows/process_creation/process_creation_office_spawning_wmi_commandline.yml b/rules/sigma/windows/process_creation/process_creation_office_spawning_wmi_commandline.yml new file mode 100644 index 00000000..f23daba4 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_office_spawning_wmi_commandline.yml @@ -0,0 +1,36 @@ + +title: Office Applications Spawning Wmi Cli +author: Vadim Khrykov (ThreatIntel), Cyb3rEng (Rule) +date: 2021/08/23 +description: Initial execution of malicious document calls wmic to execute the file + with regsvr32 +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\wbem\WMIC.exe' + SELECTION_3: + ProcessCommandLine: '*wmic *' + SELECTION_4: + ParentImage: + - winword.exe + - excel.exe + - powerpnt.exe + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3) and SELECTION_4) +falsepositives: +- Unknown +id: 04f5363a-6bca-42ff-be70-0d28bf629ead +level: high +logsource: + category: process_creation + product: windows +references: +- https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/ +- https://github.com/vadim-hunter/Detection-Ideas-Rules/blob/main/Threat%20Intelligence/The%20DFIR%20Report/20210329_Sodinokibi_(aka_REvil)_Ransomware.yaml +status: experimental +tags: +- attack.t1204.002 +- attack.t1047 +- attack.t1218.010 +- attack.execution +- attack.defense_evasion diff --git a/rules/sigma/windows/process_creation/process_creation_pingback_backdoor.yml b/rules/sigma/windows/process_creation/process_creation_pingback_backdoor.yml new file mode 100644 index 00000000..864e6773 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_pingback_backdoor.yml @@ -0,0 +1,36 @@ + +title: Pingback Backdoor +author: Bhabesh Raj +date: 2021/05/05 +description: Detects the use of Pingback backdoor that creates ICMP tunnel for C2 + as described in the trustwave report +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*updata.exe' + SELECTION_3: + CommandLine: '*config*' + SELECTION_4: + CommandLine: '*msdtc*' + SELECTION_5: + CommandLine: '*start*' + SELECTION_6: + CommandLine: '*auto*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5 + and SELECTION_6) +falsepositives: +- Very unlikely +id: b2400ffb-7680-47c0-b08a-098a7de7e7a9 +level: high +logsource: + category: process_creation + product: windows +modified: 2021/09/09 +references: +- https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/backdoor-at-the-end-of-the-icmp-tunnel +- https://app.any.run/tasks/4a54c651-b70b-4b72-84d7-f34d301d6406 +status: experimental +tags: +- attack.persistence +- attack.t1574.001 diff --git a/rules/sigma/windows/process_creation/process_creation_powershell_web_request.yml b/rules/sigma/windows/process_creation/process_creation_powershell_web_request.yml new file mode 100644 index 00000000..cb796c59 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_powershell_web_request.yml @@ -0,0 +1,34 @@ + +title: Windows PowerShell Web Request +author: James Pemberton / @4A616D6573 +date: 2019/10/24 +description: Detects the use of various web request methods (including aliases) via + Windows PowerShell command +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*Invoke-WebRequest*' + - '*iwr *' + - '*wget *' + - '*curl *' + - '*Net.WebClient*' + - '*Start-BitsTransfer*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Use of Get-Command and Get-Help modules to reference Invoke-WebRequest and Start-BitsTransfer. +id: 9fc51a3c-81b3-4fa7-b35f-7c02cf10fd2d +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/09/21 +references: +- https://4sysops.com/archives/use-powershell-to-download-a-file-with-http-https-and-ftp/ +- https://blog.jourdant.me/post/3-ways-to-download-files-with-powershell +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/process_creation/process_creation_protocolhandler_suspicious_file.yml b/rules/sigma/windows/process_creation/process_creation_protocolhandler_suspicious_file.yml new file mode 100644 index 00000000..08ee1334 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_protocolhandler_suspicious_file.yml @@ -0,0 +1,34 @@ + +title: ProtocolHandler.exe Downloaded Suspicious File +author: frack113 +date: 2021/07/13 +description: Emulates attack via documents through protocol handler in Microsoft Office. + On successful execution you should see Microsoft Word launch a blank file. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\protocolhandler.exe' + SELECTION_3: + CommandLine: '*"ms-word*' + SELECTION_4: + CommandLine: '*.docx"*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: 104cdb48-a7a8-4ca7-a453-32942c6e5dcb +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218/T1218.md +status: experimental +tags: +- attack.defense_evasion +- attack.t1218 diff --git a/rules/sigma/windows/process_creation/process_creation_root_certificate_installed.yml b/rules/sigma/windows/process_creation/process_creation_root_certificate_installed.yml new file mode 100644 index 00000000..5d17a358 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_root_certificate_installed.yml @@ -0,0 +1,39 @@ + +title: Root Certificate Installed +author: oscd.community, @redcanary, Zach Stanford @svch0st +date: 2020/10/10 +description: Adversaries may install a root certificate on a compromised system to + avoid warnings when connecting to adversary controlled web servers. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*root*' + SELECTION_3: + Image: '*\certutil.exe' + SELECTION_4: + CommandLine: '*-addstore*' + SELECTION_5: + Image: '*\CertMgr.exe' + SELECTION_6: + CommandLine: '*/add*' + condition: (SELECTION_1 and SELECTION_2 and ((SELECTION_3 and SELECTION_4) or (SELECTION_5 + and SELECTION_6))) +falsepositives: +- Help Desk or IT may need to manually add a corporate Root CA on occasion. Need to + test if GPO push doesn't trigger FP +id: 46591fae-7a4c-46ea-aec3-dff5e6d785dc +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/09/21 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1553.004/T1553.004.md +related: +- id: 42821614-9264-4761-acfc-5772c3286f76 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1553.004 diff --git a/rules/sigma/windows/process_creation/process_creation_sdelete.yml b/rules/sigma/windows/process_creation/process_creation_sdelete.yml new file mode 100644 index 00000000..863a6111 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_sdelete.yml @@ -0,0 +1,35 @@ + +title: Sysinternals SDelete Delete File +author: frack113 +date: 2021/06/03 +description: Use of SDelete to erase a file not the free space +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + OriginalFileName: sdelete.exe + SELECTION_3: + CommandLine: + - '* -h*' + - '* -c*' + - '* -z*' + - '* /?*' + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- System administrator Usage +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: a4824fca-976f-4964-b334-0621379e84c4 +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1485/T1485.md +status: experimental +tags: +- attack.impact +- attack.t1485 diff --git a/rules/sigma/windows/process_creation/process_creation_software_discovery.yml b/rules/sigma/windows/process_creation/process_creation_software_discovery.yml new file mode 100644 index 00000000..4225cf8a --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_software_discovery.yml @@ -0,0 +1,40 @@ + +title: Detected Windows Software Discovery +author: Nikita Nazarov, oscd.community +date: 2020/10/16 +description: Adversaries may attempt to enumerate software for a variety of reasons, + such as figuring out what security measures are present or if the compromised system + has a version of software that is vulnerable. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\reg.exe' + SELECTION_3: + CommandLine: '*query*' + SELECTION_4: + CommandLine: '*\software\\*' + SELECTION_5: + CommandLine: '*/v*' + SELECTION_6: + CommandLine: '*svcversion*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5 + and SELECTION_6) +falsepositives: +- Legitimate administration activities +id: e13f668e-7f95-443d-98d2-1816a7648a7b +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/09/21 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1518/T1518.md +- https://github.com/harleyQu1nn/AggressorScripts +related: +- id: 2650dd1a-eb2a-412d-ac36-83f06c4f2282 + type: derived +status: experimental +tags: +- attack.discovery +- attack.t1518 diff --git a/rules/sigma/windows/process_creation/process_creation_stickykey_like_backdoor.yml b/rules/sigma/windows/process_creation/process_creation_stickykey_like_backdoor.yml new file mode 100644 index 00000000..3c0d6bf0 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_stickykey_like_backdoor.yml @@ -0,0 +1,43 @@ + +title: Sticky Key Like Backdoor Usage +author: Florian Roth, @twjackomo, Jonhnathan Ribeiro, oscd.community +date: 2018/03/15 +description: Detects the usage and installation of a backdoor that uses an option + to register a malicious debugger for built-in tools that are accessible in the login + screen +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*\winlogon.exe' + SELECTION_3: + Image: '*\cmd.exe' + SELECTION_4: + CommandLine: + - '*sethc.exe*' + - '*utilman.exe*' + - '*osk.exe*' + - '*Magnify.exe*' + - '*Narrator.exe*' + - '*DisplaySwitch.exe*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unlikely +id: 2fdefcb3-dbda-401e-ae23-f0db027628bc +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/09/12 +references: +- https://blogs.technet.microsoft.com/jonathantrull/2016/10/03/detecting-sticky-key-backdoors/ +related: +- id: baca5663-583c-45f9-b5dc-ea96a22ce542 + type: derived +tags: +- attack.privilege_escalation +- attack.persistence +- attack.t1015 +- attack.t1546.008 +- car.2014-11-003 +- car.2014-11-008 diff --git a/rules/sigma/windows/process_creation/process_creation_susp_7z.yml b/rules/sigma/windows/process_creation/process_creation_susp_7z.yml new file mode 100644 index 00000000..89b4264d --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_susp_7z.yml @@ -0,0 +1,37 @@ + +title: Compress Data and Lock With Password for Exfiltration With 7-ZIP +author: frack113 +date: 2021/07/27 +description: An adversary may compress or encrypt data that is collected prior to + exfiltration using 3rd party utilities +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*7z.exe*' + - '*7za.exe*' + SELECTION_3: + CommandLine: '* -p*' + SELECTION_4: + CommandLine: + - '* a *' + - '* u *' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Command line parameter combinations that contain all included strings +fields: +- CommandLine +- ParentCommandLine +- CurrentDirectory +id: 9fbf5927-5261-4284-a71d-f681029ea574 +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1560.001/T1560.001.md +status: experimental +tags: +- attack.collection +- attack.t1560.001 diff --git a/rules/sigma/windows/process_creation/process_creation_susp_athremotefxvgpudisablementcommand.yml b/rules/sigma/windows/process_creation/process_creation_susp_athremotefxvgpudisablementcommand.yml new file mode 100644 index 00000000..6db8e7ed --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_susp_athremotefxvgpudisablementcommand.yml @@ -0,0 +1,41 @@ + +title: Abusable Invoke-ATHRemoteFXvGPUDisablementCommand +author: frack113 +date: 2021/07/13 +description: RemoteFXvGPUDisablement.exe is an abusable, signed PowerShell host executable + that was introduced in Windows 10 and Server 2019 (OS Build 17763.1339). +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*Invoke-ATHRemoteFXvGPUDisablementCommand *' + SELECTION_3: + CommandLine: + - '*-ModuleName *' + - '*-ModulePath *' + - '*-ScriptBlock *' + - '*-RemoteFXvGPUDisablementFilePath*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: a6fc3c46-23b8-4996-9ea2-573f4c4d88c5 +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/09/07 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218/T1218.md +- https://github.com/redcanaryco/AtomicTestHarnesses/blob/master/TestHarnesses/T1218_SignedBinaryProxyExecution/InvokeRemoteFXvGPUDisablementCommand.ps1 +related: +- id: 38a7625e-b2cb-485d-b83d-aff137d859f4 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.t1218 diff --git a/rules/sigma/windows/process_creation/process_creation_susp_recon.yml b/rules/sigma/windows/process_creation/process_creation_susp_recon.yml new file mode 100644 index 00000000..07c6cc1d --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_susp_recon.yml @@ -0,0 +1,31 @@ + +title: Recon Information for Export with Command Prompt +author: frack113 +date: 2021/07/30 +description: Once established within a system or network, an adversary may use automated + techniques for collecting internal data. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: + - '*\tree.com' + - '*\WMIC.exe' + - '*\doskey.exe' + - '*\sc.exe' + SELECTION_3: + ParentCommandLine: '* > %TEMP%\\*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: aa2efee7-34dd-446e-8a37-40790a66efd7 +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1119/T1119.md +status: experimental +tags: +- attack.collection +- attack.t1119 diff --git a/rules/sigma/windows/process_creation/process_creation_susp_winzip.yml b/rules/sigma/windows/process_creation/process_creation_susp_winzip.yml new file mode 100644 index 00000000..6d165697 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_susp_winzip.yml @@ -0,0 +1,34 @@ + +title: Compress Data and Lock With Password for Exfiltration With WINZIP +author: frack113 +date: 2021/07/27 +description: An adversary may compress or encrypt data that is collected prior to + exfiltration using 3rd party utilities +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*winzip.exe*' + - '*winzip64.exe*' + SELECTION_3: + CommandLine: + - '*-s"*' + SELECTION_4: + CommandLine: + - '* -min *' + - '* -a *' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: e2e80da2-8c66-4e00-ae3c-2eebd29f6b6d +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1560.001/T1560.001.md +status: experimental +tags: +- attack.collection +- attack.t1560.001 diff --git a/rules/sigma/windows/process_creation/process_creation_susp_zip_compress.yml b/rules/sigma/windows/process_creation/process_creation_susp_zip_compress.yml new file mode 100644 index 00000000..4afc6d49 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_susp_zip_compress.yml @@ -0,0 +1,35 @@ + +title: Zip A Folder With PowerShell For Staging In Temp +author: frack113 +date: 2021/07/20 +description: Use living off the land tools to zip a file and stage it in the Windows + temporary folder for later exfiltration +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*Compress-Archive *' + SELECTION_3: + CommandLine: '* -Path *' + SELECTION_4: + CommandLine: '* -DestinationPath *' + SELECTION_5: + CommandLine: '*$env:TEMP\\*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Unknown +id: 85a8e5ba-bd03-4bfb-bbfa-a4409a8f8b98 +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/09/07 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1074.001/T1074.001.md +related: +- id: b7a3c9a3-09ea-4934-8864-6a32cacd98d9 + type: derived +status: experimental +tags: +- attack.collection +- attack.t1074.001 diff --git a/rules/sigma/windows/process_creation/process_creation_syncappvpublishingserver_execute_arbitrary_powershell.yml b/rules/sigma/windows/process_creation/process_creation_syncappvpublishingserver_execute_arbitrary_powershell.yml new file mode 100644 index 00000000..9979f413 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_syncappvpublishingserver_execute_arbitrary_powershell.yml @@ -0,0 +1,36 @@ + +title: SyncAppvPublishingServer Execute Arbitrary PowerShell Code +author: frack113 +date: 2021/07/12 +description: Executes arbitrary PowerShell code using SyncAppvPublishingServer.exe. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\SyncAppvPublishingServer.exe' + SELECTION_3: + CommandLine: '*"n; *' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- App-V clients +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: fbd7c32d-db2a-4418-b92c-566eb8911133 +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/09/12 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218/T1218.md +- https://lolbas-project.github.io/lolbas/Binaries/Syncappvpublishingserver/ +related: +- id: fde7929d-8beb-4a4c-b922-be9974671667 + type: obsoletes +status: experimental +tags: +- attack.defense_evasion +- attack.t1218 diff --git a/rules/sigma/windows/process_creation/process_creation_syncappvpublishingserver_vbs_execute_powershell.yml b/rules/sigma/windows/process_creation/process_creation_syncappvpublishingserver_vbs_execute_powershell.yml new file mode 100644 index 00000000..3472d02b --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_syncappvpublishingserver_vbs_execute_powershell.yml @@ -0,0 +1,34 @@ + +title: SyncAppvPublishingServer VBS Execute Arbitrary PowerShell Code +author: frack113 +date: 2021/07/16 +description: Executes arbitrary PowerShell code using SyncAppvPublishingServer.vbs +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*\SyncAppvPublishingServer.vbs*' + SELECTION_3: + CommandLine: '*"n;*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: 36475a7d-0f6d-4dce-9b01-6aeb473bbaf1 +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/09/12 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1216/T1216.md +- https://lolbas-project.github.io/lolbas/Binaries/Syncappvpublishingserver/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1218 +- attack.t1216 diff --git a/rules/sigma/windows/process_creation/process_creation_sysinternals_eula_accepted.yml b/rules/sigma/windows/process_creation/process_creation_sysinternals_eula_accepted.yml new file mode 100644 index 00000000..e7722dd8 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_sysinternals_eula_accepted.yml @@ -0,0 +1,30 @@ + +title: Usage of Sysinternals Tools +author: Markus Neis +date: 2017/08/28 +description: Detects the usage of Sysinternals Tools due to accepteula key being added + to Registry +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '* -accepteula*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate use of SysInternals tools +- Programs that use the same Registry Key +id: 7cccd811-7ae9-4ebe-9afd-cb5c406b824b +level: low +logsource: + category: process_creation + product: windows +modified: 2021/09/12 +references: +- https://twitter.com/Moti_B/status/1008587936735035392 +related: +- id: 25ffa65d-76d8-4da5-a832-3f2b0136e133 + type: derived +status: experimental +tags: +- attack.resource_development +- attack.t1588.002 diff --git a/rules/sigma/windows/process_creation/process_creation_sysmon_uac_bypass_eventvwr.yml b/rules/sigma/windows/process_creation/process_creation_sysmon_uac_bypass_eventvwr.yml new file mode 100644 index 00000000..23ca6e38 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_sysmon_uac_bypass_eventvwr.yml @@ -0,0 +1,37 @@ + +title: UAC Bypass via Event Viewer +author: Florian Roth +date: 2017/03/19 +description: Detects UAC bypass method using Windows event viewer +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*\eventvwr.exe' + SELECTION_3: + Image: '*\mmc.exe' + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- unknown +fields: +- CommandLine +- ParentCommandLine +id: be344333-921d-4c4d-8bb8-e584cf584780 +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/09/12 +references: +- https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/ +- https://www.hybrid-analysis.com/sample/e122bc8bf291f15cab182a5d2d27b8db1e7019e4e96bb5cdbd1dfe7446f3f51f?environmentId=100 +related: +- id: 7c81fec3-1c1d-43b0-996a-46753041b1b6 + type: derived +status: experimental +tags: +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1088 +- attack.t1548.002 +- car.2019-04-001 diff --git a/rules/sigma/windows/process_creation/process_creation_tool_psexec.yml b/rules/sigma/windows/process_creation/process_creation_tool_psexec.yml new file mode 100644 index 00000000..4476fa14 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_tool_psexec.yml @@ -0,0 +1,42 @@ + +title: PsExec Tool Execution +author: Thomas Patzke +date: 2017/06/12 +description: Detects PsExec service installation and execution events (service and + Sysmon) +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\PSEXESVC.exe' + SELECTION_3: + User: NT AUTHORITY\SYSTEM* + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- unknown +fields: +- EventID +- CommandLine +- ParentCommandLine +- ServiceName +- ServiceFileName +- TargetFilename +- PipeName +id: fa91cc36-24c9-41ce-b3c8-3bbc3f2f67ba +level: low +logsource: + category: process_creation + product: windows +modified: 2021/09/21 +references: +- https://www.jpcert.or.jp/english/pub/sr/ir_research.html +- https://jpcertcc.github.io/ToolAnalysisResultSheet +related: +- id: 42c575ea-e41e-41f1-b248-8093c3e82a28 + type: derived +status: experimental +tags: +- attack.execution +- attack.t1035 +- attack.t1569.002 +- attack.s0029 diff --git a/rules/sigma/windows/process_creation/process_creation_win_exchange_transportagent.yml b/rules/sigma/windows/process_creation/process_creation_win_exchange_transportagent.yml new file mode 100644 index 00000000..93108f3d --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creation_win_exchange_transportagent.yml @@ -0,0 +1,28 @@ + +title: MSExchange Transport Agent Installation +author: Tobias Michalski +date: 2021/06/08 +description: Detects the Installation of a Exchange Transport Agent +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*Install-TransportAgent*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- legitimate installations of exchange TransportAgents. AssemblyPath is a good indicator + for this. +fields: +- AssemblyPath +id: 83809e84-4475-4b69-bc3e-4aad8568612f +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/09/19 +references: +- https://twitter.com/blueteamsec1/status/1401290874202382336?s=20 +status: experimental +tags: +- attack.persistence +- attack.t1505.002 diff --git a/rules/sigma/windows/process_creation/process_creationn_apt_chafer_mar18.yml b/rules/sigma/windows/process_creation/process_creationn_apt_chafer_mar18.yml new file mode 100644 index 00000000..5b4bb2eb --- /dev/null +++ b/rules/sigma/windows/process_creation/process_creationn_apt_chafer_mar18.yml @@ -0,0 +1,57 @@ + +title: Chafer Activity +author: Florian Roth, Markus Neis, Jonhnathan Ribeiro, Daniil Yugoslavskiy, oscd.community +date: 2018/03/23 +description: Detects Chafer activity attributed to OilRig as reported in Nyotron report + in March 2018 +detection: + SELECTION_1: + EventID: 1 + SELECTION_10: + ParentImage: '*\Autoit*' + SELECTION_2: + CommandLine: '*\Service.exe*' + SELECTION_3: + CommandLine: + - '*i' + - '*u' + SELECTION_4: + CommandLine: '*\microsoft\Taskbar\autoit3.exe' + SELECTION_5: + CommandLine: C:\wsc.exe* + SELECTION_6: + Image: '*\Windows\Temp\DB\\*' + SELECTION_7: + Image: '*.exe' + SELECTION_8: + CommandLine: '*\nslookup.exe*' + SELECTION_9: + CommandLine: '*-q=TXT*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 or SELECTION_5) + or (SELECTION_6 and SELECTION_7) or (SELECTION_8 and SELECTION_9 and SELECTION_10))) +falsepositives: +- Unknown +id: ce6e34ca-966d-41c9-8d93-5b06c8b97a06 +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/09/19 +references: +- https://nyotron.com/nyotron-discovers-next-generation-oilrig-attacks/ +related: +- id: 53ba33fd-3a50-4468-a5ef-c583635cfa92 + type: derived +tags: +- attack.persistence +- attack.g0049 +- attack.t1053 +- attack.t1053.005 +- attack.s0111 +- attack.t1050 +- attack.t1543.003 +- attack.defense_evasion +- attack.t1112 +- attack.command_and_control +- attack.t1071 +- attack.t1071.004 diff --git a/rules/sigma/windows/process_creation/process_mailboxexport_share.yml b/rules/sigma/windows/process_creation/process_mailboxexport_share.yml new file mode 100644 index 00000000..95071c03 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_mailboxexport_share.yml @@ -0,0 +1,36 @@ + +title: Suspicious PowerShell Mailbox Export to Share +author: Florian Roth +date: 2021/08/07 +description: Detects a PowerShell New-MailboxExportRequest that exports a mailbox + to a local share, as used in ProxyShell exploitations +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*New-MailboxExport*' + SELECTION_3: + CommandLine: '* -Mailbox *' + SELECTION_4: + CommandLine: '* -FilePath \\127.0.0.1\C$*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- unknown +fields: +- CommandLine +- ParentCommandLine +id: 889719ef-dd62-43df-86c3-768fb08dc7c0 +level: critical +logsource: + category: process_creation + product: windows +references: +- https://youtu.be/5mqid-7zp8k?t=2481 +- https://blog.orange.tw/2021/08/proxylogon-a-new-attack-surface-on-ms-exchange-part-1.html +- https://peterjson.medium.com/reproducing-the-proxyshell-pwn2own-exploit-49743a4ea9a1 +status: experimental +tags: +- attack.persistence +- attack.t1505.003 +- attack.resource_development +- attack.t1584.006 diff --git a/rules/sigma/windows/process_creation/process_susp_esentutl_params.yml b/rules/sigma/windows/process_creation/process_susp_esentutl_params.yml new file mode 100644 index 00000000..c1f06134 --- /dev/null +++ b/rules/sigma/windows/process_creation/process_susp_esentutl_params.yml @@ -0,0 +1,36 @@ + +title: Esentutl Gather Credentials +author: sam0x90 +date: 2021/08/06 +description: Conti recommendation to its affiliates to use esentult to access NTDS + dumped file. Trickbot also uses this utilities to get MSEdge info via its module + pwgrab. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*esentutl*' + SELECTION_3: + CommandLine: '* /p*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- To be determined +fields: +- User +- CommandLine +- ParentCommandLine +- CurrentDirectory +id: 7df1713a-1a5b-4a4b-a071-dc83b144a101 +level: medium +logsource: + category: process_creation + product: windows +references: +- https://twitter.com/vxunderground/status/1423336151860002816 +- https://attack.mitre.org/software/S0404/ +- https://thedfirreport.com/2021/08/01/bazarcall-to-conti-ransomware-via-trickbot-and-cobalt-strike/ +status: experimental +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.003 diff --git a/rules/sigma/windows/process_creation/sysmon_abusing_debug_privilege.yml b/rules/sigma/windows/process_creation/sysmon_abusing_debug_privilege.yml new file mode 100644 index 00000000..810a8011 --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_abusing_debug_privilege.yml @@ -0,0 +1,50 @@ + +title: Abused Debug Privilege by Arbitrary Parent Processes +author: Semanur Guneysu @semanurtg, oscd.community +date: 2020/10/28 +description: Detection of unusual child processes by different system processes +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: + - '*\winlogon.exe' + - '*\services.exe' + - '*\lsass.exe' + - '*\csrss.exe' + - '*\smss.exe' + - '*\wininit.exe' + - '*\spoolsv.exe' + - '*\searchindexer.exe' + SELECTION_3: + Image: + - '*\powershell.exe' + - '*\cmd.exe' + SELECTION_4: + User: + - NT AUTHORITY\SYSTEM* + - AUTORITE NT\Sys* + SELECTION_5: + CommandLine: '* route *' + SELECTION_6: + CommandLine: '* ADD *' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3 and SELECTION_4) and not + (SELECTION_5 and SELECTION_6)) +falsepositives: +- unknown +fields: +- ParentImage +- Image +- User +- CommandLine +id: d522eca2-2973-4391-a3e0-ef0374321dae +level: high +logsource: + category: process_creation + product: windows +references: +- https://image.slidesharecdn.com/kheirkhabarovoffzonefinal-181117201458/95/hunting-for-privilege-escalation-in-windows-environment-74-638.jpg +status: experimental +tags: +- attack.privilege_escalation +- attack.t1548 diff --git a/rules/sigma/windows/process_creation/sysmon_accesschk_usage_after_priv_escalation.yml b/rules/sigma/windows/process_creation/sysmon_accesschk_usage_after_priv_escalation.yml new file mode 100644 index 00000000..5e6561e5 --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_accesschk_usage_after_priv_escalation.yml @@ -0,0 +1,35 @@ + +title: Accesschk Usage After Privilege Escalation +author: Teymur Kheirkhabarov (idea), Mangatas Tondang (rule), oscd.community +date: 2020/10/13 +description: Accesschk is an access and privilege audit tool developed by SysInternal + and often being used by attacker to verify if a privilege escalation process successful + or not +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + IntegrityLevel: Medium + SELECTION_3: + Product: '*AccessChk' + SELECTION_4: + Description: '*Reports effective permissions*' + condition: (SELECTION_1 and SELECTION_2 and (SELECTION_3 or SELECTION_4)) +falsepositives: +- System administrator Usage +- Penetration test +fields: +- IntegrityLevel +- Product +- Description +id: c625d754-6a3d-4f65-9c9a-536aea960d37 +level: high +logsource: + category: process_creation + product: windows +references: +- https://image.slidesharecdn.com/kheirkhabarovoffzonefinal-181117201458/95/hunting-for-privilege-escalation-in-windows-environment-43-638.jpg +status: experimental +tags: +- attack.discovery +- attack.t1069.001 diff --git a/rules/sigma/windows/process_creation/sysmon_always_install_elevated_msi_spawned_cmd_and_powershell.yml b/rules/sigma/windows/process_creation/sysmon_always_install_elevated_msi_spawned_cmd_and_powershell.yml new file mode 100644 index 00000000..fdd4403a --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_always_install_elevated_msi_spawned_cmd_and_powershell.yml @@ -0,0 +1,37 @@ + +title: Always Install Elevated MSI Spawned Cmd And Powershell +author: Teymur Kheirkhabarov (idea), Mangatas Tondang (rule), oscd.community +date: 2020/10/13 +description: This rule will looks for Windows Installer service (msiexec.exe) spawned + command line and/or powershell +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: + - '*\cmd.exe' + - '*\powershell.exe' + SELECTION_3: + ParentImage: '*\Windows\Installer\\*' + SELECTION_4: + ParentImage: '*msi*' + SELECTION_5: + ParentImage: + - '*tmp' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- Penetration test +fields: +- Image +- ParentImage +id: 1e53dd56-8d83-4eb4-a43e-b790a05510aa +level: medium +logsource: + category: process_creation + product: windows +references: +- https://image.slidesharecdn.com/kheirkhabarovoffzonefinal-181117201458/95/hunting-for-privilege-escalation-in-windows-environment-50-638.jpg +status: experimental +tags: +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/process_creation/sysmon_always_install_elevated_windows_installer.yml b/rules/sigma/windows/process_creation/sysmon_always_install_elevated_windows_installer.yml new file mode 100644 index 00000000..911fc9aa --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_always_install_elevated_windows_installer.yml @@ -0,0 +1,46 @@ + +title: Always Install Elevated Windows Installer +author: Teymur Kheirkhabarov (idea), Mangatas Tondang (rule), oscd.community +date: 2020/10/13 +description: This rule will looks for Windows Installer service (msiexec.exe) when + it tries to install MSI packages with SYSTEM privilege +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + User: + - NT AUTHORITY\SYSTEM* + - AUTORITE NT\Sys* + SELECTION_3: + Image: '*\Windows\Installer\\*' + SELECTION_4: + Image: '*msi*' + SELECTION_5: + Image: + - '*tmp' + SELECTION_6: + Image: + - '*\msiexec.exe' + SELECTION_7: + IntegrityLevel: System + condition: (SELECTION_1 and SELECTION_2 and ((SELECTION_3 and SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7))) +falsepositives: +- System administrator Usage +- Penetration test +fields: +- IntegrityLevel +- User +- Image +id: cd951fdc-4b2f-47f5-ba99-a33bf61e3770 +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/08/26 +references: +- https://image.slidesharecdn.com/kheirkhabarovoffzonefinal-181117201458/95/hunting-for-privilege-escalation-in-windows-environment-48-638.jpg +status: experimental +tags: +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/process_creation/sysmon_apt_muddywater_dnstunnel.yml b/rules/sigma/windows/process_creation/sysmon_apt_muddywater_dnstunnel.yml new file mode 100644 index 00000000..3e0b8cdb --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_apt_muddywater_dnstunnel.yml @@ -0,0 +1,33 @@ + +title: DNS Tunnel Technique from MuddyWater +author: '@caliskanfurkan_' +date: 2020/06/04 +description: Detecting DNS tunnel activity for Muddywater actor +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: + - '*\powershell.exe' + SELECTION_3: + ParentImage: + - '*\excel.exe' + SELECTION_4: + CommandLine: + - '*DataExchange.dll*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +id: 36222790-0d43-4fe8-86e4-674b27809543 +level: critical +logsource: + category: process_creation + product: windows +references: +- https://www.virustotal.com/gui/file/5ad401c3a568bd87dd13f8a9ddc4e450ece61cd9ce4d1b23f68ce0b1f3c190b7/ +- https://www.vmray.com/analyses/5ad401c3a568/report/overview.html +status: experimental +tags: +- attack.command_and_control +- attack.t1071 +- attack.t1071.004 diff --git a/rules/sigma/windows/process_creation/sysmon_apt_sourgrum.yml b/rules/sigma/windows/process_creation/sysmon_apt_sourgrum.yml new file mode 100644 index 00000000..eddf6811 --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_apt_sourgrum.yml @@ -0,0 +1,48 @@ + +title: SOURGUM Actor Behaviours +author: MSTIC, FPT.EagleEye +date: 2021/06/15 +description: Suspicious behaviours related to an actor tracked by Microsoft as SOURGUM +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*windows\system32\Physmem.sys*' + SELECTION_3: + Image: + - '*Windows\system32\ime\SHARED\WimBootConfigurations.ini*' + - '*Windows\system32\ime\IMEJP\WimBootConfigurations.ini*' + - '*Windows\system32\ime\IMETC\WimBootConfigurations.ini*' + SELECTION_4: + EventID: 1 + SELECTION_5: + Image: + - '*windows\system32\filepath2*' + - '*windows\system32\ime*' + SELECTION_6: + CommandLine: + - '*reg add*' + SELECTION_7: + CommandLine: + - '*HKEY_LOCAL_MACHINE\software\classes\clsid\{7c857801-7381-11cf-884d-00aa004b2e24}\inprocserver32*' + - '*HKEY_LOCAL_MACHINE\software\classes\clsid\{cf4cc405-e2c5-4ddd-b3ce-5e7582d8c9fa}\inprocserver32*' + condition: (SELECTION_1 and ((SELECTION_2 or SELECTION_3) or (SELECTION_4 and SELECTION_5 + and SELECTION_6 and SELECTION_7))) +falsepositives: +- Unknown +id: 7ba08e95-1e0b-40cd-9db5-b980555e42fd +level: high +logsource: + category: process_creation + product: windows +modified: 2021/07/30 +references: +- https://www.virustotal.com/gui/file/c299063e3eae8ddc15839767e83b9808fd43418dc5a1af7e4f44b97ba53fbd3d/detection +- https://github.com/Azure/Azure-Sentinel/blob/master/Detections/MultipleDataSources/SOURGUM_IOC.yaml +- https://www.microsoft.com/security/blog/2021/07/15/protecting-customers-from-a-private-sector-offensive-actor-using-0-day-exploits-and-devilstongue-malware/ +status: experimental +tags: +- attack.t1546 +- attack.t1546.015 +- attack.persistence +- attack.privilege_escalation diff --git a/rules/sigma/windows/process_creation/sysmon_atlassian_confluence_cve_2021_26084_exploit.yml b/rules/sigma/windows/process_creation/sysmon_atlassian_confluence_cve_2021_26084_exploit.yml new file mode 100644 index 00000000..33f81cd8 --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_atlassian_confluence_cve_2021_26084_exploit.yml @@ -0,0 +1,38 @@ + +title: Atlassian Confluence CVE-2021-26084 +author: Bhabesh Raj +date: 2021/09/08 +description: Detects spawning of suspicious child processes by Atlassian Confluence + server which may indicate successful exploitation of CVE-2021-26084 +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*\Atlassian\Confluence\jre\bin\java.exe' + SELECTION_3: + CommandLine: + - '*cmd /c*' + - '*cmd /k*' + - '*powershell*' + - '*certutil*' + - '*curl*' + - '*whoami*' + - '*ipconfig*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 245f92e3-c4da-45f1-9070-bc552e06db11 +level: high +logsource: + category: process_creation + product: windows +references: +- https://nvd.nist.gov/vuln/detail/CVE-2021-26084 +- https://confluence.atlassian.com/doc/confluence-security-advisory-2021-08-25-1077906215.html +- https://github.com/h3v0x/CVE-2021-26084_Confluence +status: experimental +tags: +- attack.initial_access +- attack.execution +- attack.t1190 +- attack.t1059 diff --git a/rules/sigma/windows/process_creation/sysmon_cmstp_execution_by_creation.yml b/rules/sigma/windows/process_creation/sysmon_cmstp_execution_by_creation.yml new file mode 100644 index 00000000..f03dc1eb --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_cmstp_execution_by_creation.yml @@ -0,0 +1,34 @@ + +title: CMSTP Execution Process Creation +author: Nik Seetharaman +date: 2018/07/16 +description: Detects various indicators of Microsoft Connection Manager Profile Installer + execution +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*\cmstp.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Legitimate CMSTP use (unlikely in modern enterprise environments) +fields: +- CommandLine +- ParentCommandLine +- Details +id: 7d4cdc5a-0076-40ca-aac8-f7e714570e47 +level: high +logsource: + category: process_creation + product: windows +modified: 2020/12/23 +references: +- https://web.archive.org/web/20190720093911/http://www.endurant.io/cmstp/detecting-cmstp-enabled-code-execution-and-uac-bypass-with-sysmon/ +status: stable +tags: +- attack.defense_evasion +- attack.execution +- attack.t1191 +- attack.t1218.003 +- attack.g0069 +- car.2019-04-001 diff --git a/rules/sigma/windows/process_creation/sysmon_creation_mavinject_dll.yml b/rules/sigma/windows/process_creation/sysmon_creation_mavinject_dll.yml new file mode 100644 index 00000000..28c3af54 --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_creation_mavinject_dll.yml @@ -0,0 +1,37 @@ + +title: Mavinject Inject DLL Into Running Process +author: frack113 +date: 2021/07/12 +description: Injects arbitrary DLL into running process specified by process ID. Requires + Windows 10. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '* /INJECTRUNNING*' + SELECTION_3: + CommandLine: '*.dll*' + SELECTION_4: + OriginalFileName: '*mavinject*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: 4f73421b-5a0b-4bbf-a892-5a7fb99bea66 +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218/T1218.md +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1056.004/T1056.004.md +status: experimental +tags: +- attack.defense_evasion +- attack.collection +- attack.t1218 +- attack.t1056.004 diff --git a/rules/sigma/windows/process_creation/sysmon_cve_2021_26857_msexchange.yml b/rules/sigma/windows/process_creation/sysmon_cve_2021_26857_msexchange.yml new file mode 100644 index 00000000..0c7f2a3d --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_cve_2021_26857_msexchange.yml @@ -0,0 +1,32 @@ + +title: CVE-2021-26857 Exchange Exploitation +author: Bhabesh Raj +date: 2021/03/03 +description: Detects possible successful exploitation for vulnerability described + in CVE-2021-26857 by looking for | abnormal subprocesses spawning by Exchange Server’s + Unified Messaging service +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*UMWorkerProcess.exe' + SELECTION_3: + Image: + - '*wermgr.exe' + - '*WerFault.exe' + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- Unknown +id: cd479ccc-d8f0-4c66-ba7d-e06286f3f887 +level: critical +logsource: + category: process_creation + product: windows +references: +- https://cve.mitre.org/cgi-bin/cvename.cgi?name=2021-26857 +- https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/ +- https://nvd.nist.gov/vuln/detail/cve-2021-26857 +status: experimental +tags: +- attack.t1203 +- attack.execution diff --git a/rules/sigma/windows/process_creation/sysmon_expand_cabinet_files.yml b/rules/sigma/windows/process_creation/sysmon_expand_cabinet_files.yml new file mode 100644 index 00000000..9a05f81f --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_expand_cabinet_files.yml @@ -0,0 +1,42 @@ + +title: Cabinet File Expansion +author: Bhabesh Raj +date: 2021/07/30 +description: Adversaries can use the inbuilt expand utility to decompress cab files + as seen in recent Iranian MeteorExpress attack +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: + - '*\expand.exe' + SELECTION_3: + CommandLine: + - '*.cab*' + - '*/F:*' + - '*-F:*' + - '*C:\ProgramData\\*' + - '*C:\Public\\*' + - '*\AppData\Local\Temp\\*' + - '*\AppData\Roaming\Temp\\*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- System administrator Usage +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: 9f107a84-532c-41af-b005-8d12a607639f +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/08/31 +references: +- https://labs.sentinelone.com/meteorexpress-mysterious-wiper-paralyzes-iranian-trains-with-epic-troll +- https://blog.malwarebytes.com/threat-intelligence/2021/08/new-variant-of-konni-malware-used-in-campaign-targetting-russia/ +status: experimental +tags: +- attack.execution +- attack.t1218 diff --git a/rules/sigma/windows/process_creation/sysmon_hack_wce.yml b/rules/sigma/windows/process_creation/sysmon_hack_wce.yml new file mode 100644 index 00000000..996a2872 --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_hack_wce.yml @@ -0,0 +1,37 @@ + +title: Windows Credential Editor +author: Florian Roth +date: 2019/12/31 +description: Detects the use of Windows Credential Editor (WCE) +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + EventID: 1 + SELECTION_3: + Imphash: + - a53a02b997935fd8eedcb5f7abab9b9f + - e96a73c7bf33a464c510ede582318bf2 + SELECTION_4: + CommandLine: '*.exe -S' + SELECTION_5: + ParentImage: '*\services.exe' + SELECTION_6: + Image: '*\clussvc.exe' + condition: (SELECTION_1 and (SELECTION_2 and (SELECTION_3 or (SELECTION_4 and SELECTION_5))) + and not (SELECTION_6)) +falsepositives: +- Another service that uses a single -s command line switch +id: 7aa7009a-28b9-4344-8c1f-159489a390df +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/07/15 +references: +- https://www.ampliasecurity.com/research/windows-credentials-editor/ +tags: +- attack.credential_access +- attack.t1003 +- attack.t1003.001 +- attack.s0005 diff --git a/rules/sigma/windows/process_creation/sysmon_high_integrity_sdclt.yml b/rules/sigma/windows/process_creation/sysmon_high_integrity_sdclt.yml new file mode 100644 index 00000000..92ec9d82 --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_high_integrity_sdclt.yml @@ -0,0 +1,29 @@ + +title: High Integrity Sdclt Process +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/05/02 +description: A General detection for sdclt being spawned as an elevated process. This + could be an indicator of sdclt being used for bypass UAC techniques. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*sdclt.exe' + SELECTION_3: + IntegrityLevel: High + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- unknown +id: 40f9af16-589d-4984-b78d-8c2aec023197 +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/OTRF/detection-hackathon-apt29/issues/6 +- https://threathunterplaybook.com/evals/apt29/detections/3.B.2_C36B49B5-DF58-4A34-9FE9-56189B9DEFEA.html +status: experimental +tags: +- attack.privilege_escalation +- attack.defense_evasion +- attack.t1548.002 diff --git a/rules/sigma/windows/process_creation/sysmon_logon_scripts_userinitmprlogonscript_proc.yml b/rules/sigma/windows/process_creation/sysmon_logon_scripts_userinitmprlogonscript_proc.yml new file mode 100644 index 00000000..4c4689fc --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_logon_scripts_userinitmprlogonscript_proc.yml @@ -0,0 +1,38 @@ + +title: Logon Scripts (UserInitMprLogonScript) +author: Tom Ueltschi (@c_APT_ure) +date: 2019/01/12 +description: Detects creation or execution of UserInitMprLogonScript persistence method +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + EventID: 1 + SELECTION_3: + ParentImage: '*\userinit.exe' + SELECTION_4: + Image: '*\explorer.exe' + SELECTION_5: + CommandLine: + - '*netlogon.bat*' + - '*UsrLogon.cmd*' + SELECTION_6: + CommandLine: '*UserInitMprLogonScript*' + condition: (SELECTION_1 and ((SELECTION_2 and (SELECTION_3 and not (SELECTION_4)) + and not (SELECTION_5)) or SELECTION_6)) +falsepositives: +- exclude legitimate logon scripts +- penetration tests, red teaming +id: 0a98a10c-685d-4ab0-bddc-b6bdd1d48458 +level: high +logsource: + category: process_creation + product: windows +modified: 2020/08/26 +references: +- https://attack.mitre.org/techniques/T1037/ +status: experimental +tags: +- attack.t1037 +- attack.t1037.001 +- attack.persistence diff --git a/rules/sigma/windows/process_creation/sysmon_long_powershell_commandline.yml b/rules/sigma/windows/process_creation/sysmon_long_powershell_commandline.yml new file mode 100644 index 00000000..13385e3f --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_long_powershell_commandline.yml @@ -0,0 +1,33 @@ + +title: Too Long PowerShell Commandlines +author: oscd.community, Natalia Shornikova +date: 2020/10/06 +description: Detects Too long PowerShell command lines +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*powershell*' + - '*pwsh*' + SELECTION_3: + Description: Windows Powershell + SELECTION_4: + Product: PowerShell Core 6 + SELECTION_5: + CommandLine|re: .{1000,} + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3 or SELECTION_4) and SELECTION_5) +falsepositives: +- Unknown +id: d0d28567-4b9a-45e2-8bbc-fb1b66a1f7f6 +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/05/21 +references: +- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse +status: experimental +tags: +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/process_creation/sysmon_netcat_execution.yml b/rules/sigma/windows/process_creation/sysmon_netcat_execution.yml new file mode 100644 index 00000000..b3a01fae --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_netcat_execution.yml @@ -0,0 +1,33 @@ + +title: Ncat Execution +author: frack113 +date: 2021/07/21 +description: Adversaries may use a non-application layer protocol for communication + between host and C2 server or among infected hosts within a network +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: + - '*\ncat.exe' + SELECTION_3: + CommandLine: + - '* -lvp *' + - '* -l --proxy-type http *' + - '* --exec cmd.exe *' + - '* -vnl --exec *' + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3)) +falsepositives: +- Legitimate ncat use +id: e31033fc-33f0-4020-9a16-faf9b31cbf08 +level: high +logsource: + category: process_creation + product: windows +references: +- https://nmap.org/ncat/ +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1095/T1095.md +status: experimental +tags: +- attack.command_and_control +- attack.t1095 diff --git a/rules/sigma/windows/process_creation/sysmon_proxy_execution_wuauclt.yml b/rules/sigma/windows/process_creation/sysmon_proxy_execution_wuauclt.yml new file mode 100644 index 00000000..772e528c --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_proxy_execution_wuauclt.yml @@ -0,0 +1,39 @@ + +title: Proxy Execution via Wuauclt +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research), Florian Roth +date: 2020/10/12 +description: Detects the use of the Windows Update Client binary (wuauclt.exe) to + proxy execute code. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*wuauclt*' + SELECTION_3: + OriginalFileName: wuauclt.exe + SELECTION_4: + CommandLine: '*UpdateDeploymentProvider*' + SELECTION_5: + CommandLine: '*.dll*' + SELECTION_6: + CommandLine: '*RunHandlerComServer*' + SELECTION_7: + CommandLine: + - '* /UpdateDeploymentProvider UpdateDeploymentProvider.dll *' + - '* wuaueng.dll *' + condition: (SELECTION_1 and ((SELECTION_2 or SELECTION_3) and (SELECTION_4 and SELECTION_5 + and SELECTION_6)) and not (SELECTION_7)) +falsepositives: +- Unknown +id: af77cf95-c469-471c-b6a0-946c685c4798 +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/05/10 +references: +- https://dtm.uk/wuauclt/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1218 diff --git a/rules/sigma/windows/process_creation/sysmon_rclone_execution.yml b/rules/sigma/windows/process_creation/sysmon_rclone_execution.yml new file mode 100644 index 00000000..b847a568 --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_rclone_execution.yml @@ -0,0 +1,53 @@ + +title: RClone Execution +author: Bhabesh Raj, Sittikorn S +date: 2021/05/10 +description: Detects execution of RClone utility for exfiltration as used by various + ransomwares strains like REvil, Conti, FiveHands, etc +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Description: Rsync for cloud storage + SELECTION_3: + CommandLine: '*--config *' + SELECTION_4: + CommandLine: '*--no-check-certificate *' + SELECTION_5: + CommandLine: '* copy *' + SELECTION_6: + Image: + - '*\rclone.exe' + SELECTION_7: + CommandLine: + - '*mega*' + - '*pcloud*' + - '*ftp*' + - '*--progress*' + - '*--ignore-existing*' + - '*--auto-confirm*' + - '*--transfers*' + - '*--multi-thread-streams*' + condition: (SELECTION_1 and (SELECTION_2 or (SELECTION_3 and SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7))) +falsepositives: +- Legitimate RClone use +fields: +- CommandLine +- ParentCommandLine +- Details +id: a0d63692-a531-4912-ad39-4393325b2a9c +level: high +logsource: + category: process_creation + product: windows +modified: 2021/06/29 +references: +- https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware +- https://us-cert.cisa.gov/ncas/analysis-reports/ar21-126a +- https://labs.sentinelone.com/egregor-raas-continues-the-chaos-with-cobalt-strike-and-rclone +- https://www.splunk.com/en_us/blog/security/darkside-ransomware-splunk-threat-update-and-detections.html +status: experimental +tags: +- attack.exfiltration +- attack.t1567.002 diff --git a/rules/sigma/windows/process_creation/sysmon_remove_windows_defender_definition_files.yml b/rules/sigma/windows/process_creation/sysmon_remove_windows_defender_definition_files.yml new file mode 100644 index 00000000..2cfdf710 --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_remove_windows_defender_definition_files.yml @@ -0,0 +1,35 @@ + +title: Remove Windows Defender Definition Files +author: frack113 +date: 2021/07/07 +description: Adversaries may disable security tools to avoid possible detection of + their tools and activities by removing Windows Defender Definition Files +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + OriginalFileName: MpCmdRun.exe + SELECTION_3: + CommandLine: '* -RemoveDefinitions*' + SELECTION_4: + CommandLine: '* -All*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unknown +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: 9719a8aa-401c-41af-8108-ced7ec9cd75c +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1562.001/T1562.001.md +- https://unit42.paloaltonetworks.com/unit42-gorgon-group-slithering-nation-state-cybercrime/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1562.001 diff --git a/rules/sigma/windows/process_creation/sysmon_sdclt_child_process.yml b/rules/sigma/windows/process_creation/sysmon_sdclt_child_process.yml new file mode 100644 index 00000000..6f3c9696 --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_sdclt_child_process.yml @@ -0,0 +1,26 @@ + +title: Sdclt Child Processes +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/05/02 +description: A General detection for sdclt spawning new processes. This could be an + indicator of sdclt being used for bypass UAC techniques. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*\sdclt.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: da2738f2-fadb-4394-afa7-0a0674885afa +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/OTRF/detection-hackathon-apt29/issues/6 +- https://threathunterplaybook.com/evals/apt29/detections/3.B.2_C36B49B5-DF58-4A34-9FE9-56189B9DEFEA.html +status: experimental +tags: +- attack.privilege_escalation +- attack.t1548.002 diff --git a/rules/sigma/windows/process_creation/sysmon_susp_plink_remote_forward.yml b/rules/sigma/windows/process_creation/sysmon_susp_plink_remote_forward.yml new file mode 100644 index 00000000..70e384ab --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_susp_plink_remote_forward.yml @@ -0,0 +1,29 @@ + +title: Suspicious Plink Remote Forwarding +author: Florian Roth +date: 2021/01/19 +description: Detects suspicious Plink tunnel remote forarding to a local port +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Description: Command-line SSH, Telnet, and Rlogin client + SELECTION_3: + CommandLine: '* -R *' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Administrative activity using a remote port forwarding to a local port +id: 48a61b29-389f-4032-b317-b30de6b95314 +level: high +logsource: + category: process_creation + product: windows +references: +- https://www.real-sec.com/2019/04/bypassing-network-restrictions-through-rdp-tunneling/ +- https://medium.com/@informationsecurity/remote-ssh-tunneling-with-plink-exe-7831072b3d7d +status: experimental +tags: +- attack.command_and_control +- attack.t1572 +- attack.lateral_movement +- attack.t1021.001 diff --git a/rules/sigma/windows/process_creation/sysmon_susp_service_modification.yml b/rules/sigma/windows/process_creation/sysmon_susp_service_modification.yml new file mode 100644 index 00000000..f13fd76e --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_susp_service_modification.yml @@ -0,0 +1,37 @@ + +title: Stop Or Remove Antivirus Service +author: frack113 +date: 2021/07/07 +description: Adversaries may disable security tools to avoid possible detection of + their tools and activities by stopping antivirus service +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*Stop-Service *' + - '*Remove-Service *' + SELECTION_3: + CommandLine: + - '* McAfeeDLPAgentService*' + - '* Trend Micro Deep Security Manager*' + - '* TMBMServer*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: 6783aa9e-0dc3-49d4-a94a-8b39c5fd700b +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1562.001/T1562.001.md +status: experimental +tags: +- attack.defense_evasion +- attack.t1562.001 diff --git a/rules/sigma/windows/process_creation/sysmon_susp_webdav_client_execution.yml b/rules/sigma/windows/process_creation/sysmon_susp_webdav_client_execution.yml new file mode 100644 index 00000000..b5323fd2 --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_susp_webdav_client_execution.yml @@ -0,0 +1,29 @@ + +title: Suspicious WebDav Client Execution +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/05/02 +description: A General detection for svchost.exe spawning rundll32.exe with command + arguments like C:\windows\system32\davclnt.dll,DavSetCookie. This could be an indicator + of exfiltration or use of WebDav to launch code (hosted on WebDav Server). +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\rundll32.exe' + SELECTION_3: + CommandLine: '*C:\windows\system32\davclnt.dll,DavSetCookie*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- unknown +id: 2dbd9d3d-9e27-42a8-b8df-f13825c6c3d5 +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/OTRF/detection-hackathon-apt29/issues/17 +- https://threathunterplaybook.com/evals/apt29/detections/7.B.4_C10730EA-6345-4934-AA0F-B0EFCA0C4BA6.html +status: experimental +tags: +- attack.exfiltration +- attack.t1048.003 diff --git a/rules/sigma/windows/process_creation/sysmon_uninstall_crowdstrike_falcon.yml b/rules/sigma/windows/process_creation/sysmon_uninstall_crowdstrike_falcon.yml new file mode 100644 index 00000000..cae61af4 --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_uninstall_crowdstrike_falcon.yml @@ -0,0 +1,34 @@ + +title: Uninstall Crowdstrike Falcon +author: frack113 +date: 2021/07/12 +description: Adversaries may disable security tools to avoid possible detection of + their tools and activities by uninstalling Crowdstrike Falcon +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*\WindowsSensor.exe*' + SELECTION_3: + CommandLine: '* /uninstall*' + SELECTION_4: + CommandLine: '* /quiet*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Uninstall by admin +fields: +- ComputerName +- User +- CommandLine +- ParentCommandLine +id: f0f7be61-9cf5-43be-9836-99d6ef448a18 +level: medium +logsource: + category: process_creation + product: windows +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1562.001/T1562.001.md +status: experimental +tags: +- attack.defense_evasion +- attack.t1562.001 diff --git a/rules/sigma/windows/process_creation/sysmon_vmtoolsd_susp_child_process.yml b/rules/sigma/windows/process_creation/sysmon_vmtoolsd_susp_child_process.yml new file mode 100644 index 00000000..291620cc --- /dev/null +++ b/rules/sigma/windows/process_creation/sysmon_vmtoolsd_susp_child_process.yml @@ -0,0 +1,45 @@ + +title: VMToolsd Suspicious Child Process +author: behops, Bhabesh Raj +date: 2021/10/08 +description: Detects suspicious child process creations of VMware Tools process which + may indicate persistence setup +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*\vmtoolsd.exe' + SELECTION_3: + Image: + - '*\cmd.exe' + - '*\powershell.exe' + - '*\rundll32.exe' + - '*\regsvr32.exe' + - '*\wscript.exe' + - '*\cscript.exe' + SELECTION_4: + CommandLine: + - '*\VMware\VMware Tools\poweron-vm-default.bat*' + - '*\VMware\VMware Tools\poweroff-vm-default.bat*' + - '*\VMware\VMware Tools\resume-vm-default.bat*' + - '*\VMware\VMware Tools\suspend-vm-default.bat*' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not (SELECTION_4)) +falsepositives: +- Legitimate use by adminstrator +fields: +- CommandLine +- ParentCommandLine +- Details +id: 5687f942-867b-4578-ade7-1e341c46e99a +level: high +logsource: + category: process_creation + product: windows +modified: 2021/10/10 +references: +- https://bohops.com/2021/10/08/analyzing-and-detecting-a-vmtools-persistence-technique/ +status: experimental +tags: +- attack.execution +- attack.persistence +- attack.t1059 diff --git a/rules/sigma/windows/process_creation/win_ad_find_discovery.yml b/rules/sigma/windows/process_creation/win_ad_find_discovery.yml new file mode 100644 index 00000000..88760312 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_ad_find_discovery.yml @@ -0,0 +1,47 @@ + +title: AdFind Usage Detection +author: Janantha Marasinghe (https://github.com/blueteam0ps) +date: 2021/02/02 +description: AdFind continues to be seen across majority of breaches. It is used to + domain trust discovery to plan out subsequent steps in the attack chain. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*domainlist*' + - '*trustdmp*' + - '*dcmodes*' + - '*adinfo*' + - '* dclist *' + - '*computer_pwdnotreqd*' + - '*objectcategory=*' + - '*-subnets -f*' + - '*name="Domain Admins"*' + - '*-sc u:*' + - '*domainncs*' + - '*dompol*' + - '* oudmp *' + - '*subnetdmp*' + - '*gpodmp*' + - '*fspdmp*' + - '*users_noexpire*' + - '*computers_active*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Admin activity +id: 9a132afa-654e-11eb-ae93-0242ac130002 +level: high +logsource: + category: process_creation + product: windows +modified: 2021/02/02 +references: +- https://thedfirreport.com/2020/05/08/adfind-recon/ +- https://thedfirreport.com/2021/01/11/trickbot-still-alive-and-well/ +- https://www.microsoft.com/security/blog/2021/01/20/deep-dive-into-the-solorigate-second-stage-activation-from-sunburst-to-teardrop-and-raindrop/ +status: experimental +tags: +- attack.discovery +- attack.t1482 +- attack.t1018 diff --git a/rules/sigma/windows/process_creation/win_anydesk_silent_install.yml b/rules/sigma/windows/process_creation/win_anydesk_silent_install.yml new file mode 100644 index 00000000..1a6558b0 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_anydesk_silent_install.yml @@ -0,0 +1,33 @@ + +title: AnyDesk Silent Installation +author: Ján Trenčanský +date: 2021/08/06 +description: AnyDesk Remote Desktop silent installation can be used by attacker to + gain remote access. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*--install*' + SELECTION_3: + CommandLine: '*--start-with-win*' + SELECTION_4: + CommandLine: '*--silent*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Legitimate deployment of AnyDesk +fields: +- CommandLine +- ParentCommandLine +- CurrentDirectory +id: 114e7f1c-f137-48c8-8f54-3088c24ce4b9 +level: high +logsource: + category: process_creation + product: windows +references: +- https://twitter.com/TheDFIRReport/status/1423361119926816776?s=20 +- https://support.anydesk.com/Automatic_Deployment +status: experimental +tags: +- attack.t1219 diff --git a/rules/sigma/windows/process_creation/win_apt_apt29_thinktanks.yml b/rules/sigma/windows/process_creation/win_apt_apt29_thinktanks.yml new file mode 100644 index 00000000..b3e7713d --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_apt29_thinktanks.yml @@ -0,0 +1,35 @@ + +title: APT29 +author: Florian Roth +date: 2018/12/04 +description: This method detects a suspicious PowerShell command line combination + as used by APT29 in a campaign against U.S. think tanks. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*-noni*' + SELECTION_3: + CommandLine: '*-ep*' + SELECTION_4: + CommandLine: '*bypass*' + SELECTION_5: + CommandLine: '*$*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5) +falsepositives: +- unknown +id: 033fe7d6-66d1-4240-ac6b-28908009c71f +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/08/26 +references: +- https://www.microsoft.com/security/blog/2018/12/03/analysis-of-cyberattack-on-u-s-think-tanks-non-profits-public-sector-by-unidentified-attackers/ +- https://www.fireeye.com/blog/threat-research/2018/11/not-so-cozy-an-uncomfortable-examination-of-a-suspected-apt29-phishing-campaign.html +tags: +- attack.execution +- attack.g0016 +- attack.t1086 +- attack.t1059 +- attack.t1059.001 diff --git a/rules/sigma/windows/process_creation/win_apt_babyshark.yml b/rules/sigma/windows/process_creation/win_apt_babyshark.yml new file mode 100644 index 00000000..e4cf610c --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_babyshark.yml @@ -0,0 +1,37 @@ + +title: Baby Shark Activity +author: Florian Roth +date: 2019/02/24 +description: Detects activity that could be related to Baby Shark malware +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - reg query "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default" + - powershell.exe mshta.exe http* + - cmd.exe /c taskkill /im cmd.exe + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 2b30fa36-3a18-402f-a22d-bf4ce2189f35 +level: high +logsource: + category: process_creation + product: windows +modified: 2020/08/26 +references: +- https://unit42.paloaltonetworks.com/new-babyshark-malware-targets-u-s-national-security-think-tanks/ +status: experimental +tags: +- attack.execution +- attack.t1059 +- attack.t1086 +- attack.t1059.003 +- attack.t1059.001 +- attack.discovery +- attack.t1012 +- attack.defense_evasion +- attack.t1170 +- attack.t1218 +- attack.t1218.005 diff --git a/rules/sigma/windows/process_creation/win_apt_bear_activity_gtr19.yml b/rules/sigma/windows/process_creation/win_apt_bear_activity_gtr19.yml new file mode 100644 index 00000000..cc6f853d --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_bear_activity_gtr19.yml @@ -0,0 +1,50 @@ + +title: Judgement Panda Credential Access Activity +author: Florian Roth +date: 2019/02/21 +description: Detects Russian group activity as described in Global Threat Report 2019 + by Crowdstrike +detection: + SELECTION_1: + EventID: 1 + SELECTION_10: + CommandLine: '*-snapshot*' + SELECTION_11: + CommandLine: '*""*' + SELECTION_12: + CommandLine: '*c:\users\\*' + SELECTION_2: + Image: '*\xcopy.exe' + SELECTION_3: + CommandLine: '*/S*' + SELECTION_4: + CommandLine: '*/E*' + SELECTION_5: + CommandLine: '*/C*' + SELECTION_6: + CommandLine: '*/Q*' + SELECTION_7: + CommandLine: '*/H*' + SELECTION_8: + CommandLine: '*\\\*' + SELECTION_9: + Image: '*\adexplorer.exe' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5 + and SELECTION_6 and SELECTION_7 and SELECTION_8) or (SELECTION_9 and SELECTION_10 + and SELECTION_11 and SELECTION_12))) +falsepositives: +- unknown +id: b83f5166-9237-4b5e-9cd4-7b5d52f4d8ee +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/08/26 +references: +- https://www.crowdstrike.com/resources/reports/2019-crowdstrike-global-threat-report/ +tags: +- attack.credential_access +- attack.t1081 +- attack.t1003 +- attack.t1552.001 +- attack.t1003.003 diff --git a/rules/sigma/windows/process_creation/win_apt_bluemashroom.yml b/rules/sigma/windows/process_creation/win_apt_bluemashroom.yml new file mode 100644 index 00000000..1aa02e81 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_bluemashroom.yml @@ -0,0 +1,30 @@ + +title: BlueMashroom DLL Load +author: Florian Roth +date: 2019/10/02 +description: Detects a suspicious DLL loading from AppData Local path as described + in BlueMashroom report +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*\AppData\Local\\*' + SELECTION_3: + CommandLine: '*\regsvr32*' + SELECTION_4: + CommandLine: '*,DllEntry*' + condition: (SELECTION_1 and SELECTION_2 and (SELECTION_3 or SELECTION_4)) +falsepositives: +- Unlikely +id: bd70d3f8-e60e-4d25-89f0-0b5a9cff20e0 +level: critical +logsource: + category: process_creation + product: windows +references: +- https://www.virusbulletin.com/conference/vb2019/abstracts/apt-cases-exploiting-vulnerabilities-region-specific-software +status: experimental +tags: +- attack.defense_evasion +- attack.t1117 +- attack.t1218.010 diff --git a/rules/sigma/windows/process_creation/win_apt_cloudhopper.yml b/rules/sigma/windows/process_creation/win_apt_cloudhopper.yml new file mode 100644 index 00000000..d7924e7b --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_cloudhopper.yml @@ -0,0 +1,32 @@ + +title: WMIExec VBS Script +author: Florian Roth +date: 2017/04/07 +description: Detects suspicious file execution by wscript and cscript +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\cscript.exe' + SELECTION_3: + CommandLine: '*.vbs*' + SELECTION_4: + CommandLine: '*/shell*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Unlikely +fields: +- CommandLine +- ParentCommandLine +id: 966e4016-627f-44f7-8341-f394905c361f +level: critical +logsource: + category: process_creation + product: windows +references: +- https://www.pwc.co.uk/cyber-security/pdf/cloud-hopper-annex-b-final.pdf +tags: +- attack.execution +- attack.g0045 +- attack.t1064 +- attack.t1059.005 diff --git a/rules/sigma/windows/process_creation/win_apt_dragonfly.yml b/rules/sigma/windows/process_creation/win_apt_dragonfly.yml new file mode 100644 index 00000000..04fb0b6c --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_dragonfly.yml @@ -0,0 +1,24 @@ + +title: CrackMapExecWin +author: Markus Neis +date: 2018/04/08 +description: Detects CrackMapExecWin Activity as Described by NCSC +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: + - '*\crackmapexec.exe' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- None +id: 04d9079e-3905-4b70-ad37-6bdf11304965 +level: critical +logsource: + category: process_creation + product: windows +references: +- https://www.ncsc.gov.uk/alerts/hostile-state-actors-compromising-uk-organisations-focus-engineering-and-industrial-control +status: experimental +tags: +- attack.g0035 diff --git a/rules/sigma/windows/process_creation/win_apt_elise.yml b/rules/sigma/windows/process_creation/win_apt_elise.yml new file mode 100644 index 00000000..d0f2dd4f --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_elise.yml @@ -0,0 +1,33 @@ + +title: Elise Backdoor +author: Florian Roth +date: 2018/01/31 +description: Detects Elise backdoor acitivty as used by APT32 +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: C:\Windows\SysWOW64\cmd.exe + SELECTION_3: + CommandLine: '*\Windows\Caches\NavShExt.dll *' + SELECTION_4: + CommandLine: '*\AppData\Roaming\MICROS~1\Windows\Caches\NavShExt.dll,Setting' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or SELECTION_4)) +falsepositives: +- Unknown +id: e507feb7-5f73-4ef6-a970-91bb6f6d744f +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/08/26 +references: +- https://community.rsa.com/community/products/netwitness/blog/2018/02/13/lotus-blossom-continues-asean-targeting +status: experimental +tags: +- attack.g0030 +- attack.g0050 +- attack.s0081 +- attack.execution +- attack.t1059 +- attack.t1059.003 diff --git a/rules/sigma/windows/process_creation/win_apt_emissarypanda_sep19.yml b/rules/sigma/windows/process_creation/win_apt_emissarypanda_sep19.yml new file mode 100644 index 00000000..ebb10f90 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_emissarypanda_sep19.yml @@ -0,0 +1,30 @@ + +title: Emissary Panda Malware SLLauncher +author: Florian Roth +date: 2018/09/03 +description: Detects the execution of DLL side-loading malware used by threat group + Emissary Panda aka APT27 +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*\sllauncher.exe' + SELECTION_3: + Image: '*\svchost.exe' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 9aa01d62-7667-4d3b-acb8-8cb5103e2014 +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/08/27 +references: +- https://app.any.run/tasks/579e7587-f09d-4aae-8b07-472833262965 +- https://twitter.com/cyb3rops/status/1168863899531132929 +status: experimental +tags: +- attack.defense_evasion +- attack.t1073 +- attack.t1574.002 diff --git a/rules/sigma/windows/process_creation/win_apt_empiremonkey.yml b/rules/sigma/windows/process_creation/win_apt_empiremonkey.yml new file mode 100644 index 00000000..94ae08ec --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_empiremonkey.yml @@ -0,0 +1,29 @@ + +title: Empire Monkey +author: Markus Neis +date: 2019/04/02 +description: Detects EmpireMonkey APT reported Activity +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*/i:%APPDATA%\logs.txt scrobj.dll' + SELECTION_3: + Image: '*\cutil.exe' + SELECTION_4: + Description: Microsoft(C) Registerserver + condition: (SELECTION_1 and SELECTION_2 and (SELECTION_3 or SELECTION_4)) +falsepositives: +- Very Unlikely +id: 10152a7b-b566-438f-a33c-390b607d1c8d +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/08/27 +references: +- https://app.any.run/tasks/a4107649-8cb0-41af-ad75-113152d4d57b +tags: +- attack.defense_evasion +- attack.t1218.010 +- attack.t1117 diff --git a/rules/sigma/windows/process_creation/win_apt_equationgroup_dll_u_load.yml b/rules/sigma/windows/process_creation/win_apt_equationgroup_dll_u_load.yml new file mode 100644 index 00000000..94f1794d --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_equationgroup_dll_u_load.yml @@ -0,0 +1,32 @@ + +title: Equation Group DLL_U Load +author: Florian Roth +date: 2019/03/04 +description: Detects a specific tool and export used by EquationGroup +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\rundll32.exe' + SELECTION_3: + CommandLine: '*,dll_u' + SELECTION_4: + CommandLine: '* -export dll_u *' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or SELECTION_4)) +falsepositives: +- Unknown +id: d465d1d8-27a2-4cca-9621-a800f37cf72e +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/08/27 +references: +- https://github.com/adamcaudill/EquationGroupLeak/search?utf8=%E2%9C%93&q=dll_u&type= +- https://securelist.com/apt-slingshot/84312/ +- https://twitter.com/cyb3rops/status/972186477512839170 +tags: +- attack.g0020 +- attack.defense_evasion +- attack.t1085 +- attack.t1218.011 diff --git a/rules/sigma/windows/process_creation/win_apt_evilnum_jul20.yml b/rules/sigma/windows/process_creation/win_apt_evilnum_jul20.yml new file mode 100644 index 00000000..41625fdd --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_evilnum_jul20.yml @@ -0,0 +1,37 @@ + +title: EvilNum Golden Chickens Deployment via OCX Files +author: Florian Roth +date: 2020/07/10 +description: Detects Golden Chickens deployment method as used by Evilnum in report + published in July 2020 +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*regsvr32*' + SELECTION_3: + CommandLine: '*/s*' + SELECTION_4: + CommandLine: '*/i*' + SELECTION_5: + CommandLine: '*\AppData\Roaming\\*' + SELECTION_6: + CommandLine: '*.ocx*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5 + and SELECTION_6) +falsepositives: +- Unknown +id: 8acf3cfa-1e8c-4099-83de-a0c4038e18f0 +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/08/27 +references: +- https://www.welivesecurity.com/2020/07/09/more-evil-deep-look-evilnum-toolset/ +- https://app.any.run/tasks/33d37fdf-158d-4930-aa68-813e1d5eb8ba/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1085 +- attack.t1218.011 diff --git a/rules/sigma/windows/process_creation/win_apt_greenbug_may20.yml b/rules/sigma/windows/process_creation/win_apt_greenbug_may20.yml new file mode 100644 index 00000000..264040d5 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_greenbug_may20.yml @@ -0,0 +1,62 @@ + +title: Greenbug Campaign Indicators +author: Florian Roth +date: 2020/05/20 +description: Detects tools and process executions as observed in a Greenbug campaign + in May 2020 +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*bitsadmin*' + SELECTION_3: + CommandLine: '*/transfer*' + SELECTION_4: + CommandLine: '*CSIDL_APPDATA*' + SELECTION_5: + CommandLine: + - '*CSIDL_SYSTEM_DRIVE*' + SELECTION_6: + CommandLine: + - '*\msf.ps1*' + - '*8989 -e cmd.exe*' + - '*system.Data.SqlClient.SqlDataAdapter($cmd); [void]$da.fill*' + - '*-nop -w hidden -c $k=new-object*' + - '*[Net.CredentialCache]::DefaultCredentials;IEX *' + - '* -nop -w hidden -c $m=new-object net.webclient;$m*' + - '*-noninteractive -executionpolicy bypass whoami*' + - '*-noninteractive -executionpolicy bypass netstat -a*' + - '*L3NlcnZlcj1*' + SELECTION_7: + Image: + - '*\adobe\Adobe.exe' + - '*\oracle\local.exe' + - '*\revshell.exe' + - '*infopagesbackup\ncat.exe' + - '*CSIDL_SYSTEM\cmd.exe' + - '*\programdata\oracle\java.exe' + - '*CSIDL_COMMON_APPDATA\comms\comms.exe' + - '*\Programdata\VMware\Vmware.exe' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3 and SELECTION_4) or SELECTION_5 + or SELECTION_6 or SELECTION_7)) +falsepositives: +- Unknown +id: 3711eee4-a808-4849-8a14-faf733da3612 +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/09/21 +references: +- https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/greenbug-espionage-telco-south-asia +status: experimental +tags: +- attack.g0049 +- attack.execution +- attack.t1059.001 +- attack.t1086 +- attack.command_and_control +- attack.t1105 +- attack.defense_evasion +- attack.t1036 +- attack.t1036.005 diff --git a/rules/sigma/windows/process_creation/win_apt_hafnium.yml b/rules/sigma/windows/process_creation/win_apt_hafnium.yml new file mode 100644 index 00000000..7f34eaad --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_hafnium.yml @@ -0,0 +1,93 @@ + +title: Exchange Exploitation Activity +author: Florian Roth +date: 2021/03/09 +description: Detects activity observed by different researchers to be HAFNIUM group + activity (or related) on Exchange servers +detection: + SELECTION_1: + EventID: 1 + SELECTION_10: + CommandLine: '*Temp\__output*' + SELECTION_11: + CommandLine: '*%TEMP%\execute.bat*' + SELECTION_12: + Image: '*Users\Public\opera\Opera_browser.exe' + SELECTION_13: + Image: '*Opera_browser.exe' + SELECTION_14: + ParentImage: + - '*\services.exe' + - '*\svchost.exe' + SELECTION_15: + Image: '*\ProgramData\VSPerfMon\\*' + SELECTION_16: + CommandLine: '* -t7z *' + SELECTION_17: + CommandLine: '*C:\Programdata\pst*' + SELECTION_18: + CommandLine: '*\it.zip*' + SELECTION_19: + Image: '*\makecab.exe' + SELECTION_2: + CommandLine: '*attrib*' + SELECTION_20: + CommandLine: + - '*Microsoft\Exchange Server\\*' + - '*inetpub\wwwroot*' + SELECTION_21: + CommandLine: + - '*\Temp\xx.bat*' + - '*Windows\WwanSvcdcs*' + - '*Windows\Temp\cw.exe*' + SELECTION_22: + CommandLine: '*\comsvcs.dll*' + SELECTION_23: + CommandLine: '*Minidump*' + SELECTION_24: + CommandLine: '*\inetpub\wwwroot*' + SELECTION_25: + CommandLine: '*dsquery*' + SELECTION_26: + CommandLine: '* -uco *' + SELECTION_27: + CommandLine: '*\inetpub\wwwroot*' + SELECTION_3: + CommandLine: '* +h *' + SELECTION_4: + CommandLine: '* +s *' + SELECTION_5: + CommandLine: '* +r *' + SELECTION_6: + CommandLine: '*.aspx*' + SELECTION_7: + CommandLine: '*schtasks*' + SELECTION_8: + CommandLine: '*VSPerfMon*' + SELECTION_9: + CommandLine: '*vssadmin list shadows*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3 and SELECTION_4 and SELECTION_5 + and SELECTION_6) or (SELECTION_7 and SELECTION_8) or (SELECTION_9 and SELECTION_10) + or SELECTION_11 or SELECTION_12 or (SELECTION_13 and SELECTION_14) or SELECTION_15 + or (SELECTION_16 and SELECTION_17 and SELECTION_18) or (SELECTION_19 and SELECTION_20) + or SELECTION_21 or (SELECTION_22 and SELECTION_23 and SELECTION_24) or (SELECTION_25 + and SELECTION_26 and SELECTION_27))) +falsepositives: +- Unknown +id: bbb2dedd-a0e3-46ab-ba6c-6c82ae7a9aa7 +level: high +logsource: + category: process_creation + product: windows +modified: 2021/03/16 +references: +- https://blog.truesec.com/2021/03/07/exchange-zero-day-proxylogon-and-hafnium/ +- https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/ +- https://discuss.elastic.co/t/detection-and-response-for-hafnium-activity/266289/3 +- https://twitter.com/GadixCRK/status/1369313704869834753?s=20 +- https://twitter.com/BleepinComputer/status/1372218235949617161 +status: experimental +tags: +- attack.persistence +- attack.t1546 +- attack.t1053 diff --git a/rules/sigma/windows/process_creation/win_apt_hurricane_panda.yml b/rules/sigma/windows/process_creation/win_apt_hurricane_panda.yml new file mode 100644 index 00000000..2eb25834 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_hurricane_panda.yml @@ -0,0 +1,32 @@ + +title: Hurricane Panda Activity +author: Florian Roth +date: 2019/03/04 +description: Detects Hurricane Panda Activity +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*localgroup*' + SELECTION_3: + CommandLine: '*admin*' + SELECTION_4: + CommandLine: '*/add*' + SELECTION_5: + CommandLine: + - '*\Win64.exe*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3 and SELECTION_4) or SELECTION_5)) +falsepositives: +- Unknown +id: 0eb2107b-a596-422e-b123-b389d5594ed7 +level: high +logsource: + category: process_creation + product: windows +references: +- https://www.crowdstrike.com/blog/crowdstrike-discovers-use-64-bit-zero-day-privilege-escalation-exploit-cve-2014-4113-hurricane-panda/ +status: experimental +tags: +- attack.privilege_escalation +- attack.g0009 +- attack.t1068 diff --git a/rules/sigma/windows/process_creation/win_apt_judgement_panda_gtr19.yml b/rules/sigma/windows/process_creation/win_apt_judgement_panda_gtr19.yml new file mode 100644 index 00000000..d6ede255 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_judgement_panda_gtr19.yml @@ -0,0 +1,42 @@ + +title: Judgement Panda Exfil Activity +author: Florian Roth +date: 2019/02/21 +description: Detects Judgement Panda activity as described in Global Threat Report + 2019 by Crowdstrike +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*eprod.ldf' + SELECTION_3: + CommandLine: + - '*\ldifde.exe -f -n *' + - '*\7za.exe a 1.7z *' + - '*\aaaa\procdump64.exe*' + - '*\aaaa\netsess.exe*' + - '*\aaaa\7za.exe*' + - '*copy .\1.7z \\*' + - '*copy \\client\c$\aaaa\\*' + SELECTION_4: + Image: C:\Users\Public\7za.exe + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3 or SELECTION_4)) +falsepositives: +- unknown +id: 03e2746e-2b31-42f1-ab7a-eb39365b2422 +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/08/27 +references: +- https://www.crowdstrike.com/resources/reports/2019-crowdstrike-global-threat-report/ +tags: +- attack.lateral_movement +- attack.g0010 +- attack.credential_access +- attack.t1003 +- attack.t1003.001 +- attack.exfiltration +- attack.t1002 +- attack.t1560.001 diff --git a/rules/sigma/windows/process_creation/win_apt_ke3chang_regadd.yml b/rules/sigma/windows/process_creation/win_apt_ke3chang_regadd.yml new file mode 100644 index 00000000..a3c317a8 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_ke3chang_regadd.yml @@ -0,0 +1,31 @@ + +title: Ke3chang Registry Key Modifications +author: Markus Neis, Swisscom +date: 2020/06/18 +description: Detects Registry modifications performed by Ke3chang malware in campaigns + running in 2019 and 2020 +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*-Property DWORD -name DisableFirstRunCustomize -value 2 -Force*' + - '*-Property String -name Check_Associations -value*' + - '*-Property DWORD -name IEHarden -value 0 -Force*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Will need to be looked for combinations of those processes +id: 7b544661-69fc-419f-9a59-82ccc328f205 +level: critical +logsource: + category: process_creation + product: windows +references: +- https://www.verfassungsschutz.de/embed/broschuere-2020-06-bfv-cyber-brief-2020-01.pdf +- https://unit42.paloaltonetworks.com/operation-ke3chang-resurfaces-with-new-tidepool-malware/ +status: experimental +tags: +- attack.g0004 +- attack.defense_evasion +- attack.t1089 +- attack.t1562.001 diff --git a/rules/sigma/windows/process_creation/win_apt_lazarus_activity_apr21.yml b/rules/sigma/windows/process_creation/win_apt_lazarus_activity_apr21.yml new file mode 100644 index 00000000..c64a23b1 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_lazarus_activity_apr21.yml @@ -0,0 +1,40 @@ + +title: Lazarus Activity +author: Bhabesh Raj +date: 2021/04/20 +description: Detects different process creation events as described in Malwarebytes's + threat report on Lazarus group activity +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*mshta*' + SELECTION_3: + CommandLine: '*.zip*' + SELECTION_4: + ParentImage: + - C:\Windows\System32\wbem\wmiprvse.exe + SELECTION_5: + Image: + - C:\Windows\System32\mshta.exe + SELECTION_6: + ParentImage: + - '*:\Users\Public\\*' + SELECTION_7: + Image: + - C:\Windows\System32\rundll32.exe + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7))) +falsepositives: +- Should not be any false positives +id: 4a12fa47-c735-4032-a214-6fab5b120670 +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/06/27 +references: +- https://blog.malwarebytes.com/malwarebytes-news/2021/04/lazarus-apt-conceals-malicious-code-within-bmp-file-to-drop-its-rat/ +status: experimental +tags: +- attack.g0032 diff --git a/rules/sigma/windows/process_creation/win_apt_lazarus_activity_dec20.yml b/rules/sigma/windows/process_creation/win_apt_lazarus_activity_dec20.yml new file mode 100644 index 00000000..256d2819 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_lazarus_activity_dec20.yml @@ -0,0 +1,43 @@ + +title: Lazarus Activity +author: Florian Roth +date: 2020/12/23 +description: Detects different process creation events as described in various threat + reports on Lazarus group activity +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*reg.exe save hklm\sam %temp%\~reg_sam.save*' + - '*1q2w3e4r@#$@#$@#$*' + - '* -hp1q2w3e4 *' + - '*.dat data03 10000 -p *' + SELECTION_3: + CommandLine: '*process call create*' + SELECTION_4: + CommandLine: '* > %temp%\~*' + SELECTION_5: + CommandLine: '*netstat -aon | find *' + SELECTION_6: + CommandLine: '* > %temp%\~*' + SELECTION_7: + CommandLine: + - '*.255 10 C:\ProgramData\\*' + condition: (SELECTION_1 and (SELECTION_2 or (SELECTION_3 and SELECTION_4) or (SELECTION_5 + and SELECTION_6) or SELECTION_7)) +falsepositives: +- Overlap with legitimate process activity in some cases (especially selection 3 and + 4) +id: 24c4d154-05a4-4b99-b57d-9b977472443a +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/06/27 +references: +- https://securelist.com/lazarus-covets-covid-19-related-intelligence/99906/ +- https://www.hvs-consulting.de/lazarus-report/ +status: experimental +tags: +- attack.g0032 diff --git a/rules/sigma/windows/process_creation/win_apt_lazarus_loader.yml b/rules/sigma/windows/process_creation/win_apt_lazarus_loader.yml new file mode 100644 index 00000000..fb8a26f1 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_lazarus_loader.yml @@ -0,0 +1,45 @@ + +title: Lazarus Loaders +author: Florian Roth, wagga +date: 2020/12/23 +description: Detects different loaders as described in various threat reports on Lazarus + group activity +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*cmd.exe /c *' + SELECTION_3: + CommandLine: '* -p 0x*' + SELECTION_4: + CommandLine: + - '*C:\ProgramData\\*' + - '*C:\RECYCLER\\*' + SELECTION_5: + CommandLine: '*rundll32.exe *' + SELECTION_6: + CommandLine: '*C:\ProgramData\\*' + SELECTION_7: + CommandLine: + - '*.bin,*' + - '*.tmp,*' + - '*.dat,*' + - '*.io,*' + - '*.ini,*' + - '*.db,*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3 and SELECTION_4) or (SELECTION_5 + and SELECTION_6 and SELECTION_7))) +falsepositives: +- unknown +id: 7b49c990-4a9a-4e65-ba95-47c9cc448f6e +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/06/27 +references: +- https://www.hvs-consulting.de/lazarus-report/ +- https://securelist.com/lazarus-covets-covid-19-related-intelligence/99906/ +status: experimental +tags: +- attack.g0032 diff --git a/rules/sigma/windows/process_creation/win_apt_lazarus_session_highjack.yml b/rules/sigma/windows/process_creation/win_apt_lazarus_session_highjack.yml new file mode 100644 index 00000000..10d97282 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_lazarus_session_highjack.yml @@ -0,0 +1,32 @@ + +title: Lazarus Session Highjacker +author: Trent Liffick (@tliffick), Bartlomiej Czyz (@bczyz1) +date: 2020/06/03 +description: Detects executables launched outside their default directories as used + by Lazarus Group (Bluenoroff) +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: + - '*\msdtc.exe' + - '*\gpvc.exe' + SELECTION_3: + Image: + - C:\Windows\System32\\* + - C:\Windows\SysWOW64\\* + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- unknown +id: 3f7f5b0b-5b16-476c-a85f-ab477f6dd24b +level: high +logsource: + category: process_creation + product: windows +references: +- https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2018/03/07180244/Lazarus_Under_The_Hood_PDF_final.pdf +status: experimental +tags: +- attack.defense_evasion +- attack.t1036 +- attack.t1036.005 diff --git a/rules/sigma/windows/process_creation/win_apt_mustangpanda.yml b/rules/sigma/windows/process_creation/win_apt_mustangpanda.yml new file mode 100644 index 00000000..868b160f --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_mustangpanda.yml @@ -0,0 +1,44 @@ + +title: Mustang Panda Dropper +author: Florian Roth, oscd.community +date: 2019/10/30 +description: Detects specific process parameters as used by Mustang Panda droppers +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*Temp\wtask.exe /create*' + - '*%windir:~-3,1%%PUBLIC:~-9,1%*' + - '*/tn "Security Script *' + - '*%windir:~-1,1%*' + SELECTION_3: + CommandLine: '*/E:vbscript*' + SELECTION_4: + CommandLine: '*C:\Users\\*' + SELECTION_5: + CommandLine: '*.txt*' + SELECTION_6: + CommandLine: '*/F*' + SELECTION_7: + Image: '*Temp\winwsh.exe' + condition: (SELECTION_1 and (SELECTION_2 or (SELECTION_3 and SELECTION_4 and SELECTION_5 + and SELECTION_6) or SELECTION_7)) +falsepositives: +- Unlikely +fields: +- CommandLine +- ParentCommandLine +id: 2d87d610-d760-45ee-a7e6-7a6f2a65de00 +level: high +logsource: + category: process_creation + product: windows +references: +- https://app.any.run/tasks/7ca5661d-a67b-43ec-98c1-dd7a8103c256/ +- https://app.any.run/tasks/b12cccf3-1c22-4e28-9d3e-c7a6062f3914/ +- https://www.anomali.com/blog/china-based-apt-mustang-panda-targets-minority-groups-public-and-private-sector-organizations +status: experimental +tags: +- attack.t1587.001 +- attack.resource_development diff --git a/rules/sigma/windows/process_creation/win_apt_revil_kaseya.yml b/rules/sigma/windows/process_creation/win_apt_revil_kaseya.yml new file mode 100644 index 00000000..03f7b9f9 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_revil_kaseya.yml @@ -0,0 +1,47 @@ + +title: REvil Kaseya Incident Malware Patterns +author: Florian Roth +date: 2021/07/03 +description: Detects process command line patterns and locations used by REvil group + in Kaseya incident (can also match on other malware) +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*C:\Windows\cert.exe*' + - '*Set-MpPreference -DisableRealtimeMonitoring $true -DisableIntrusionPreventionSystem + $true -DisableIOAVProtection $true -DisableScriptScanning $true -EnableControlledFolderAccess + Disabled -EnableNetworkProtection AuditMode -Force -MAPSReporting Disabled*' + - '*del /q /f c:\kworking\agent.crt*' + - '*Kaseya VSA Agent Hot-fix*' + - '*\AppData\Local\Temp\MsMpEng.exe*' + - '*rmdir /s /q %SystemDrive%\inetpub\logs*' + - '*del /s /q /f %SystemDrive%\\*.log*' + - '*c:\kworking1\agent.exe*' + - '*c:\kworking1\agent.crt*' + SELECTION_3: + Image: + - C:\Windows\MsMpEng.exe + - C:\Windows\cert.exe + - C:\kworking\agent.exe + - C:\kworking1\agent.exe + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 5de632bc-7fbd-4c8a-944a-fce55c59eae5 +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/07/05 +references: +- https://community.sophos.com/b/security-blog/posts/active-ransomware-attack-on-kaseya-customers +- https://www.joesandbox.com/analysis/443736/0/html +- https://doublepulsar.com/kaseya-supply-chain-attack-delivers-mass-ransomware-event-to-us-companies-76e4ec6ec64b +- https://therecord.media/revil-ransomware-executes-supply-chain-attack-via-malicious-kaseya-update/ +- https://blog.truesec.com/2021/07/04/kaseya-supply-chain-attack-targeting-msps-to-deliver-revil-ransomware/ +status: experimental +tags: +- attack.execution +- attack.g0115 diff --git a/rules/sigma/windows/process_creation/win_apt_sofacy.yml b/rules/sigma/windows/process_creation/win_apt_sofacy.yml new file mode 100644 index 00000000..3ad219ac --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_sofacy.yml @@ -0,0 +1,39 @@ + +title: Sofacy Trojan Loader Activity +author: Florian Roth, Jonhnathan Ribeiro, oscd.community +date: 2018/03/01 +description: Detects Trojan loader acitivty as used by APT28 +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*rundll32.exe*' + SELECTION_3: + CommandLine: '*%APPDATA%\\*' + SELECTION_4: + CommandLine: '*.dat",*' + SELECTION_5: + CommandLine: '*.dll",#1' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and (SELECTION_4 or SELECTION_5)) +falsepositives: +- Unknown +id: ba778144-5e3d-40cf-8af9-e28fb1df1e20 +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/11/28 +references: +- https://researchcenter.paloaltonetworks.com/2018/02/unit42-sofacy-attacks-multiple-government-entities/ +- https://www.reverse.it/sample/e3399d4802f9e6d6d539e3ae57e7ea9a54610a7c4155a6541df8e94d67af086e?environmentId=100 +- https://twitter.com/ClearskySec/status/960924755355369472 +status: experimental +tags: +- attack.g0007 +- attack.execution +- attack.t1059 +- attack.t1059.003 +- attack.defense_evasion +- attack.t1085 +- car.2013-10-002 +- attack.t1218.011 diff --git a/rules/sigma/windows/process_creation/win_apt_ta17_293a_ps.yml b/rules/sigma/windows/process_creation/win_apt_ta17_293a_ps.yml new file mode 100644 index 00000000..d99bc137 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_ta17_293a_ps.yml @@ -0,0 +1,28 @@ + +title: Ps.exe Renamed SysInternals Tool +author: Florian Roth +date: 2017/10/22 +description: Detects renamed SysInternals tool execution with a binary named ps.exe + as used by Dragonfly APT group and documented in TA17-293A report +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: ps.exe -accepteula + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Renamed SysInternals tool +id: 18da1007-3f26-470f-875d-f77faf1cab31 +level: high +logsource: + category: process_creation + product: windows +modified: 2020/08/27 +references: +- https://www.us-cert.gov/ncas/alerts/TA17-293A +tags: +- attack.defense_evasion +- attack.g0035 +- attack.t1036 +- attack.t1036.003 +- car.2013-05-009 diff --git a/rules/sigma/windows/process_creation/win_apt_ta505_dropper.yml b/rules/sigma/windows/process_creation/win_apt_ta505_dropper.yml new file mode 100644 index 00000000..9d9b8d6e --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_ta505_dropper.yml @@ -0,0 +1,27 @@ + +title: TA505 Dropper Load Pattern +author: Florian Roth +date: 2020/12/08 +description: Detects mshta loaded by wmiprvse as parent as used by TA505 malicious + documents +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\mshta.exe' + SELECTION_3: + ParentImage: '*\wmiprvse.exe' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- unknown +id: 18cf6cf0-39b0-4c22-9593-e244bdc9a2d4 +level: critical +logsource: + category: process_creation + product: windows +references: +- https://twitter.com/ForensicITGuy/status/1334734244120309760 +status: experimental +tags: +- attack.execution +- attack.g0092 diff --git a/rules/sigma/windows/process_creation/win_apt_taidoor.yml b/rules/sigma/windows/process_creation/win_apt_taidoor.yml new file mode 100644 index 00000000..ebe10664 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_taidoor.yml @@ -0,0 +1,36 @@ + +title: TAIDOOR RAT DLL Load +author: Florian Roth +date: 2020/07/30 +description: Detects specific process characteristics of Chinese TAIDOOR RAT malware + load +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*dll,MyStart*' + - '*dll MyStart*' + SELECTION_3: + EventID: 1 + SELECTION_4: + CommandLine: + - '* MyStart' + SELECTION_5: + CommandLine: + - '*rundll32.exe*' + condition: (SELECTION_1 and (SELECTION_2 or (SELECTION_3 and SELECTION_4 and SELECTION_5))) +falsepositives: +- Unknown +id: d1aa3382-abab-446f-96ea-4de52908210b +level: critical +logsource: + category: process_creation + product: windows +references: +- https://us-cert.cisa.gov/ncas/analysis-reports/ar20-216a +status: experimental +tags: +- attack.execution +- attack.t1055 +- attack.t1055.001 diff --git a/rules/sigma/windows/process_creation/win_apt_tropictrooper.yml b/rules/sigma/windows/process_creation/win_apt_tropictrooper.yml new file mode 100644 index 00000000..badba166 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_tropictrooper.yml @@ -0,0 +1,25 @@ + +title: TropicTrooper Campaign November 2018 +author: '@41thexplorer, Microsoft Defender ATP' +date: 2019/11/12 +description: Detects TropicTrooper activity, an actor who targeted high-profile organizations + in the energy and food and beverage sectors in Asia +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*abCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc*' + condition: (SELECTION_1 and SELECTION_2) +id: 8c7090c3-e0a0-4944-bd08-08c3a0cecf79 +level: high +logsource: + category: process_creation + product: windows +modified: 2020/08/27 +references: +- https://cloudblogs.microsoft.com/microsoftsecure/2018/11/28/windows-defender-atp-device-risk-score-exposes-new-cyberattack-drives-conditional-access-to-protect-networks/ +status: stable +tags: +- attack.execution +- attack.t1059 +- attack.t1059.001 diff --git a/rules/sigma/windows/process_creation/win_apt_turla_comrat_may20.yml b/rules/sigma/windows/process_creation/win_apt_turla_comrat_may20.yml new file mode 100644 index 00000000..62912b86 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_turla_comrat_may20.yml @@ -0,0 +1,37 @@ + +title: Turla Group Commands May 2020 +author: Florian Roth +date: 2020/05/26 +description: Detects commands used by Turla group as reported by ESET in May 2020 +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*tracert -h 10 yahoo.com*' + - '*.WSqmCons))|iex;*' + - '*Fr`omBa`se6`4Str`ing*' + SELECTION_3: + CommandLine: '*net use https://docs.live.net*' + SELECTION_4: + CommandLine: '*@aol.co.uk*' + condition: (SELECTION_1 and (SELECTION_2 or (SELECTION_3 and SELECTION_4))) +falsepositives: +- Unknown +id: 9e2e51c5-c699-4794-ba5a-29f5da40ac0c +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/08/27 +references: +- https://www.welivesecurity.com/wp-content/uploads/2020/05/ESET_Turla_ComRAT.pdf +status: experimental +tags: +- attack.g0010 +- attack.execution +- attack.t1086 +- attack.t1059.001 +- attack.t1053 +- attack.t1053.005 +- attack.t1027 diff --git a/rules/sigma/windows/process_creation/win_apt_unc2452_cmds.yml b/rules/sigma/windows/process_creation/win_apt_unc2452_cmds.yml new file mode 100644 index 00000000..a20216d6 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_unc2452_cmds.yml @@ -0,0 +1,60 @@ + +title: UNC2452 Process Creation Patterns +author: Florian Roth +date: 2021/01/22 +description: Detects a specific process creation patterns as seen used by UNC2452 + and provided by Microsoft as Microsoft Defender ATP queries +detection: + SELECTION_1: + EventID: 1 + SELECTION_10: + CommandLine: '*cmd.exe /C *' + SELECTION_11: + CommandLine: '*rundll32 c:\windows\\*' + SELECTION_12: + CommandLine: '*.dll *' + SELECTION_13: + EventID: 1 + SELECTION_14: + ParentImage: '*\rundll32.exe' + SELECTION_15: + Image: '*\dllhost.exe' + SELECTION_16: + CommandLine: + - ' ' + - '' + SELECTION_2: + CommandLine: + - '*7z.exe a -v500m -mx9 -r0 -p*' + SELECTION_3: + ParentCommandLine: '*wscript.exe*' + SELECTION_4: + ParentCommandLine: '*.vbs*' + SELECTION_5: + CommandLine: '*rundll32.exe*' + SELECTION_6: + CommandLine: '*C:\Windows*' + SELECTION_7: + CommandLine: '*.dll,Tk_*' + SELECTION_8: + ParentImage: '*\rundll32.exe' + SELECTION_9: + ParentCommandLine: '*C:\Windows*' + condition: (SELECTION_1 and ((((SELECTION_2 or (SELECTION_3 and SELECTION_4 and + SELECTION_5 and SELECTION_6 and SELECTION_7)) or (SELECTION_8 and SELECTION_9 + and SELECTION_10)) or (SELECTION_11 and SELECTION_12)) or (SELECTION_13 and (SELECTION_14 + and SELECTION_15) and not (SELECTION_16)))) +falsepositives: +- Unknown +id: 9be34ad0-b6a7-4fbd-91cf-fc7ec1047f5f +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/06/27 +references: +- https://www.microsoft.com/security/blog/2021/01/20/deep-dive-into-the-solorigate-second-stage-activation-from-sunburst-to-teardrop-and-raindrop/ +status: experimental +tags: +- attack.execution +- attack.t1059.001 diff --git a/rules/sigma/windows/process_creation/win_apt_unc2452_ps.yml b/rules/sigma/windows/process_creation/win_apt_unc2452_ps.yml new file mode 100644 index 00000000..8d4f87bf --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_unc2452_ps.yml @@ -0,0 +1,34 @@ + +title: UNC2452 PowerShell Pattern +author: Florian Roth +date: 2021/01/20 +description: Detects a specific PowerShell command line pattern used by the UNC2452 + actors as mentioned in Microsoft and Symantec reports +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*Invoke-WMIMethod win32_process -name create -argumentlist*' + SELECTION_3: + CommandLine: '*rundll32 c:\windows*' + SELECTION_4: + CommandLine: '*wmic /node:*' + SELECTION_5: + CommandLine: '*process call create "rundll32 c:\windows*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and SELECTION_5))) +falsepositives: +- Unknown, unlikely, but possible +id: b7155193-8a81-4d8f-805d-88de864ca50c +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/01/22 +references: +- https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/solarwinds-raindrop-malware +- https://www.microsoft.com/security/blog/2020/12/18/analyzing-solorigate-the-compromised-dll-file-that-started-a-sophisticated-cyberattack-and-how-microsoft-defender-helps-protect/ +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1047/T1047.md#atomic-test-7---create-a-process-using-wmi-query-and-an-encoded-command +tags: +- attack.execution +- attack.t1059.001 +- attack.t1047 diff --git a/rules/sigma/windows/process_creation/win_apt_unidentified_nov_18.yml b/rules/sigma/windows/process_creation/win_apt_unidentified_nov_18.yml new file mode 100644 index 00000000..ed9f69de --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_unidentified_nov_18.yml @@ -0,0 +1,28 @@ + +title: Unidentified Attacker November 2018 +author: '@41thexplorer, Microsoft Defender ATP' +date: 2018/11/20 +description: A sigma rule detecting an unidetefied attacker who used phishing emails + to target high profile orgs on November 2018. The Actor shares some TTPs with YYTRIUM/APT29 + campaign in 2016. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*cyzfc.dat,*' + SELECTION_3: + CommandLine: '*PointFunctionCall' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +id: 7453575c-a747-40b9-839b-125a0aae324b +level: high +logsource: + category: process_creation + product: windows +modified: 2021/09/19 +references: +- https://twitter.com/DrunkBinary/status/1063075530180886529 +status: stable +tags: +- attack.execution +- attack.t1218.011 +- attack.t1085 diff --git a/rules/sigma/windows/process_creation/win_apt_winnti_mal_hk_jan20.yml b/rules/sigma/windows/process_creation/win_apt_winnti_mal_hk_jan20.yml new file mode 100644 index 00000000..bc531f20 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_winnti_mal_hk_jan20.yml @@ -0,0 +1,46 @@ + +title: Winnti Malware HK University Campaign +author: Florian Roth, Markus Neis +date: 2020/02/01 +description: Detects specific process characteristics of Winnti malware noticed in + Dec/Jan 2020 in a campaign against Honk Kong universities +detection: + SELECTION_1: + EventID: 1 + SELECTION_10: + Image: '*\SearchFilterHost.exe' + SELECTION_2: + ParentImage: + - '*C:\Windows\Temp*' + - '*\hpqhvind.exe*' + SELECTION_3: + Image: C:\ProgramData\DRM* + SELECTION_4: + ParentImage: C:\ProgramData\DRM* + SELECTION_5: + Image: '*\wmplayer.exe' + SELECTION_6: + ParentImage: '*\Test.exe' + SELECTION_7: + Image: '*\wmplayer.exe' + SELECTION_8: + Image: C:\ProgramData\DRM\CLR\CLR.exe + SELECTION_9: + ParentImage: C:\ProgramData\DRM\Windows* + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7) or SELECTION_8 or (SELECTION_9 and SELECTION_10))) +falsepositives: +- Unlikely +id: 3121461b-5aa0-4a41-b910-66d25524edbb +level: critical +logsource: + category: process_creation + product: windows +references: +- https://www.welivesecurity.com/2020/01/31/winnti-group-targeting-universities-hong-kong/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1574.002 +- attack.t1073 +- attack.g0044 diff --git a/rules/sigma/windows/process_creation/win_apt_winnti_pipemon.yml b/rules/sigma/windows/process_creation/win_apt_winnti_pipemon.yml new file mode 100644 index 00000000..f8228429 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_winnti_pipemon.yml @@ -0,0 +1,35 @@ + +title: Winnti Pipemon Characteristics +author: Florian Roth, oscd.community +date: 2020/07/30 +description: Detects specific process characteristics of Winnti Pipemon malware reported + by ESET +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*setup0.exe -p*' + SELECTION_3: + CommandLine: '*setup.exe*' + SELECTION_4: + CommandLine: + - '*-x:0' + - '*-x:1' + - '*-x:2' + condition: (SELECTION_1 and (SELECTION_2 or (SELECTION_3 and SELECTION_4))) +falsepositives: +- Legitimate setups that use similar flags +id: 73d70463-75c9-4258-92c6-17500fe972f2 +level: critical +logsource: + category: process_creation + product: windows +references: +- https://www.welivesecurity.com/2020/05/21/no-game-over-winnti-group/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1574.002 +- attack.t1073 +- attack.g0044 diff --git a/rules/sigma/windows/process_creation/win_apt_zxshell.yml b/rules/sigma/windows/process_creation/win_apt_zxshell.yml new file mode 100644 index 00000000..b44a0c4f --- /dev/null +++ b/rules/sigma/windows/process_creation/win_apt_zxshell.yml @@ -0,0 +1,38 @@ + +title: ZxShell Malware +author: Florian Roth, oscd.community, Jonhnathan Ribeiro +date: 2017/07/20 +description: Detects a ZxShell start by the called and well-known function name +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: + - '*\rundll32.exe' + SELECTION_3: + CommandLine: + - '*zxFunction*' + - '*RemoteDiskXXXXX*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unlikely +fields: +- CommandLine +- ParentCommandLine +id: f0b70adb-0075-43b0-9745-e82a1c608fcc +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/08/26 +references: +- https://www.hybrid-analysis.com/sample/5d2a4cde9fa7c2fdbf39b2e2ffd23378d0c50701a3095d1e91e3cf922d7b0b16?environmentId=100 +tags: +- attack.execution +- attack.t1059.003 +- attack.t1059 +- attack.defense_evasion +- attack.t1218.011 +- attack.t1085 +- attack.s0412 +- attack.g0001 diff --git a/rules/sigma/windows/process_creation/win_attrib_hiding_files.yml b/rules/sigma/windows/process_creation/win_attrib_hiding_files.yml new file mode 100644 index 00000000..55099e81 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_attrib_hiding_files.yml @@ -0,0 +1,43 @@ + +title: Hiding Files with Attrib.exe +author: Sami Ruohonen +date: 2019/01/16 +description: Detects usage of attrib.exe to hide files from users. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\attrib.exe' + SELECTION_3: + CommandLine: '* +h *' + SELECTION_4: + EventID: 1 + SELECTION_5: + CommandLine: '*\desktop.ini *' + SELECTION_6: + ParentImage: '*\cmd.exe' + SELECTION_7: + CommandLine: +R +H +S +A \\*.cui + SELECTION_8: + ParentCommandLine: C:\WINDOWS\system32\\*.bat + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and not ((SELECTION_4 + and (SELECTION_5 or (SELECTION_6 and SELECTION_7 and SELECTION_8))))) +falsepositives: +- igfxCUIService.exe hiding *.cui files via .bat script (attrib.exe a child of cmd.exe + and igfxCUIService.exe is the parent of the cmd.exe) +- msiexec.exe hiding desktop.ini +fields: +- CommandLine +- ParentCommandLine +- User +id: 4281cb20-2994-4580-aa63-c8b86d019934 +level: low +logsource: + category: process_creation + product: windows +modified: 2020/08/27 +status: experimental +tags: +- attack.defense_evasion +- attack.t1564.001 +- attack.t1158 diff --git a/rules/sigma/windows/process_creation/win_bad_opsec_sacrificial_processes.yml b/rules/sigma/windows/process_creation/win_bad_opsec_sacrificial_processes.yml new file mode 100644 index 00000000..70a4a4fb --- /dev/null +++ b/rules/sigma/windows/process_creation/win_bad_opsec_sacrificial_processes.yml @@ -0,0 +1,63 @@ + +title: Bad Opsec Defaults Sacrificial Processes With Improper Arguments +author: Oleg Kolesnikov @securonix invrep_de, oscd.community, Florian Roth, Christian + Burkard +date: 2020/10/23 +description: Detects attackers using tooling with bad opsec defaults e.g. spawning + a sacrificial process to inject a capability into the process without taking into + account how the process is normally run, one trivial example of this is using rundll32.exe + without arguments as a sacrificial process (default in CS, now highlighted by c2lint), + running WerFault without arguments (Kraken - credit am0nsec), and other examples. +detection: + SELECTION_1: + EventID: 1 + SELECTION_10: + Image: '*\regsvr32.exe' + SELECTION_11: + CommandLine: '*\regsvr32.exe' + SELECTION_2: + Image: '*\WerFault.exe' + SELECTION_3: + CommandLine: '*\WerFault.exe' + SELECTION_4: + Image: '*\rundll32.exe' + SELECTION_5: + CommandLine: '*\rundll32.exe' + SELECTION_6: + Image: '*\regsvcs.exe' + SELECTION_7: + CommandLine: '*\regsvcs.exe' + SELECTION_8: + Image: '*\regasm.exe' + SELECTION_9: + CommandLine: '*\regasm.exe' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7) or (SELECTION_8 and SELECTION_9) or (SELECTION_10 + and SELECTION_11))) +falsepositives: +- Unlikely +fields: +- ParentImage +- ParentCommandLine +id: a7c3d773-caef-227e-a7e7-c2f13c622329 +level: high +logsource: + category: process_creation + product: windows +modified: 2021/09/01 +references: +- https://blog.malwarebytes.com/malwarebytes-news/2020/10/kraken-attack-abuses-wer-service/ +- https://www.cobaltstrike.com/help-opsec +- https://twitter.com/CyberRaiju/status/1251492025678983169 +- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/regsvr32 +- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/rundll32 +- https://docs.microsoft.com/en-us/dotnet/framework/tools/regasm-exe-assembly-registration-tool +- https://docs.microsoft.com/en-us/dotnet/framework/tools/regsvcs-exe-net-services-installation-tool#feedback +related: +- id: f5647edc-a7bf-4737-ab50-ef8c60dc3add + type: obsoletes +status: experimental +tags: +- attack.defense_evasion +- attack.t1085 +- attack.t1218.011 diff --git a/rules/sigma/windows/process_creation/win_bootconf_mod.yml b/rules/sigma/windows/process_creation/win_bootconf_mod.yml new file mode 100644 index 00000000..3061bb34 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_bootconf_mod.yml @@ -0,0 +1,42 @@ + +title: Modification of Boot Configuration +author: E.M. Anhaus (originally from Atomic Blue Detections, Endgame), oscd.community +date: 2019/10/24 +description: Identifies use of the bcdedit command to delete boot configuration data. + This tactic is sometimes used as by malware or an attacker as a destructive technique. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\bcdedit.exe' + SELECTION_3: + CommandLine: '*set*' + SELECTION_4: + CommandLine: '*bootstatuspolicy*' + SELECTION_5: + CommandLine: '*ignoreallfailures*' + SELECTION_6: + CommandLine: '*recoveryenabled*' + SELECTION_7: + CommandLine: '*no*' + condition: (SELECTION_1 and (SELECTION_2 and SELECTION_3) and ((SELECTION_4 and + SELECTION_5) or (SELECTION_6 and SELECTION_7))) +falsepositives: +- Unlikely +fields: +- ComputerName +- User +- CommandLine +id: 1444443e-6757-43e4-9ea4-c8fc705f79a2 +level: high +logsource: + category: process_creation + product: windows +modified: 2019/11/11 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1490/T1490.md +- https://eqllib.readthedocs.io/en/latest/analytics/c4732632-9c1d-4980-9fa8-1d98c93f918e.html +status: experimental +tags: +- attack.impact +- attack.t1490 diff --git a/rules/sigma/windows/process_creation/win_bypass_squiblytwo.yml b/rules/sigma/windows/process_creation/win_bypass_squiblytwo.yml new file mode 100644 index 00000000..cf159c1a --- /dev/null +++ b/rules/sigma/windows/process_creation/win_bypass_squiblytwo.yml @@ -0,0 +1,47 @@ + +title: SquiblyTwo +author: Markus Neis / Florian Roth +date: 2019/01/16 +description: Detects WMI SquiblyTwo Attack with possible renamed WMI by looking for + imphash +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*http*' + SELECTION_3: + Image: + - '*\wmic.exe' + SELECTION_4: + CommandLine: '*wmic*' + SELECTION_5: + CommandLine: '*format*' + SELECTION_6: + Imphash: + - 1B1A3F43BF37B5BFE60751F2EE2F326E + - 37777A96245A3C74EB217308F3546F4C + - 9D87C9D67CE724033C0B40CC4CA1B206 + SELECTION_7: + CommandLine: '*format:*' + condition: (SELECTION_1 and SELECTION_2 and ((SELECTION_3 and SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7))) +falsepositives: +- Unknown +id: 8d63dadf-b91b-4187-87b6-34a1114577ea +level: medium +logsource: + category: process_creation + product: windows +modified: 2020/08/27 +references: +- https://subt0x11.blogspot.ch/2018/04/wmicexe-whitelisting-bypass-hacking.html +- https://twitter.com/mattifestation/status/986280382042595328 +status: experimental +tags: +- attack.defense_evasion +- attack.t1047 +- attack.t1220 +- attack.execution +- attack.t1059.005 +- attack.t1059.007 +- attack.t1059 diff --git a/rules/sigma/windows/process_creation/win_change_default_file_association.yml b/rules/sigma/windows/process_creation/win_change_default_file_association.yml new file mode 100644 index 00000000..39f864a9 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_change_default_file_association.yml @@ -0,0 +1,43 @@ + +title: Change Default File Association +author: Timur Zinniatullin, oscd.community +date: 2019/10/21 +description: When a file is opened, the default program used to open the file (also + called the file association or handler) is checked. File association selections + are stored in the Windows Registry and can be edited by users, administrators, or + programs that have Registry access or by administrators using the built-in assoc + utility. Applications can modify the file association for a given file extension + to call an arbitrary program when a file with the given extension is opened. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*cmd*' + SELECTION_3: + CommandLine: '*/c*' + SELECTION_4: + CommandLine: '*assoc*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Admin activity +fields: +- Image +- CommandLine +- User +- LogonGuid +- Hashes +- ParentProcessGuid +- ParentCommandLine +id: 3d3aa6cd-6272-44d6-8afc-7e88dfef7061 +level: low +logsource: + category: process_creation + product: windows +modified: 2019/11/04 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1546.001/T1546.001.md +status: experimental +tags: +- attack.persistence +- attack.t1546.001 +- attack.t1042 diff --git a/rules/sigma/windows/process_creation/win_cl_invocation_lolscript.yml b/rules/sigma/windows/process_creation/win_cl_invocation_lolscript.yml new file mode 100644 index 00000000..ce9958b5 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_cl_invocation_lolscript.yml @@ -0,0 +1,28 @@ + +title: Execution via CL_Invocation.ps1 +author: oscd.community, Natalia Shornikova +date: 2020/10/14 +description: Detects Execution via SyncInvoke in CL_Invocation.ps1 module +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*CL_Invocation.ps1*' + SELECTION_3: + CommandLine: '*SyncInvoke*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: a0459f02-ac51-4c09-b511-b8c9203fc429 +level: high +logsource: + category: process_creation + product: windows +modified: 2021/05/21 +references: +- https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSScripts/Cl_invocation.yml +- https://twitter.com/bohops/status/948061991012327424 +status: experimental +tags: +- attack.defense_evasion +- attack.t1216 diff --git a/rules/sigma/windows/process_creation/win_cl_mutexverifiers_lolscript.yml b/rules/sigma/windows/process_creation/win_cl_mutexverifiers_lolscript.yml new file mode 100644 index 00000000..60cb6a2e --- /dev/null +++ b/rules/sigma/windows/process_creation/win_cl_mutexverifiers_lolscript.yml @@ -0,0 +1,29 @@ + +title: Execution via CL_Mutexverifiers.ps1 +author: oscd.community, Natalia Shornikova +date: 2020/10/14 +description: Detects Execution via runAfterCancelProcess in CL_Mutexverifiers.ps1 + module +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*CL_Mutexverifiers.ps1*' + SELECTION_3: + CommandLine: '*runAfterCancelProcess*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 99465c8f-f102-4157-b11c-b0cddd53b79a +level: high +logsource: + category: process_creation + product: windows +modified: 2021/05/21 +references: +- https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSScripts/CL_mutexverifiers.yml +- https://twitter.com/pabraeken/status/995111125447577600 +status: experimental +tags: +- attack.defense_evasion +- attack.t1216 diff --git a/rules/sigma/windows/process_creation/win_class_exec_xwizard.yml b/rules/sigma/windows/process_creation/win_class_exec_xwizard.yml new file mode 100644 index 00000000..837d391b --- /dev/null +++ b/rules/sigma/windows/process_creation/win_class_exec_xwizard.yml @@ -0,0 +1,27 @@ + +title: Custom Class Execution via Xwizard +author: Ensar Şamil, @sblmsrsn, @oscd_initiative +date: 2020/10/07 +description: Detects the execution of Xwizard tool with specific arguments which utilized + to run custom class properties. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\xwizard.exe' + SELECTION_3: + CommandLine|re: \{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\} + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +id: 53d4bb30-3f36-4e8a-b078-69d36c4a79ff +level: medium +logsource: + category: process_creation + product: windows +references: +- https://lolbas-project.github.io/lolbas/Binaries/Xwizard/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1218 diff --git a/rules/sigma/windows/process_creation/win_cmdkey_recon.yml b/rules/sigma/windows/process_creation/win_cmdkey_recon.yml new file mode 100644 index 00000000..e84288c7 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_cmdkey_recon.yml @@ -0,0 +1,33 @@ + +title: Cmdkey Cached Credentials Recon +author: jmallette +date: 2019/01/16 +description: Detects usage of cmdkey to look for cached credentials +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\cmdkey.exe' + SELECTION_3: + CommandLine: '* /list*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Legitimate administrative tasks +fields: +- CommandLine +- ParentCommandLine +- User +id: 07f8bdc2-c9b3-472a-9817-5a670b872f53 +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/07/07 +references: +- https://www.peew.pw/blog/2017/11/26/exploring-cmdkey-an-edge-case-for-privilege-escalation +- https://technet.microsoft.com/en-us/library/cc754243(v=ws.11).aspx +status: experimental +tags: +- attack.credential_access +- attack.t1003.005 +- attack.t1003 diff --git a/rules/sigma/windows/process_creation/win_cmstp_com_object_access.yml b/rules/sigma/windows/process_creation/win_cmstp_com_object_access.yml new file mode 100644 index 00000000..68ed8434 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_cmstp_com_object_access.yml @@ -0,0 +1,51 @@ + +title: CMSTP UAC Bypass via COM Object Access +author: Nik Seetharaman, Christian Burkard +date: 2021/08/31 +description: Detects UAC Bypass Attempt Using Microsoft Connection Manager Profile + Installer Autoelevate-capable COM Objects (e.g. UACMe ID of 41, 43, 58 or 65) +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*\DllHost.exe' + SELECTION_3: + IntegrityLevel: + - High + - System + SELECTION_4: + ParentCommandLine: + - '* /Processid:{3E5FC7F9-9A51-4367-9063-A120244FBEC7}*' + - '* /Processid:{3E000D72-A845-4CD9-BD83-80C07C3B881F}*' + - '* /Processid:{BD54C901-076B-434E-B6C7-17C531F4AB41}*' + - '* /Processid:{D2E7041B-2927-42FB-8E9F-7CE93B6DC937}*' + - '* /Processid:{E9495B87-D950-4AB5-87A5-FF6D70BF3E90}*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- Legitimate CMSTP use (unlikely in modern enterprise environments) +fields: +- CommandLine +- ParentCommandLine +- Hashes +id: 4b60e6f2-bf39-47b4-b4ea-398e33cfe253 +level: high +logsource: + category: process_creation + product: windows +modified: 2019/07/31 +references: +- https://web.archive.org/web/20190720093911/http://www.endurant.io/cmstp/detecting-cmstp-enabled-code-execution-and-uac-bypass-with-sysmon/ +- https://twitter.com/hFireF0X/status/897640081053364225 +- https://medium.com/falconforce/falconfriday-detecting-uac-bypasses-0xff16-86c2a9107abf +- https://github.com/hfiref0x/UACME +status: stable +tags: +- attack.execution +- attack.defense_evasion +- attack.privilege_escalation +- attack.t1548.002 +- attack.t1088 +- attack.t1218.003 +- attack.t1191 +- attack.g0069 +- car.2019-04-001 diff --git a/rules/sigma/windows/process_creation/win_cobaltstrike_process_patterns.yml b/rules/sigma/windows/process_creation/win_cobaltstrike_process_patterns.yml new file mode 100644 index 00000000..eedf3d3f --- /dev/null +++ b/rules/sigma/windows/process_creation/win_cobaltstrike_process_patterns.yml @@ -0,0 +1,49 @@ + +title: CobaltStrike Process Patterns +author: Florian Roth +date: 2021/07/27 +description: Detects process patterns found in Cobalt Strike beacon activity (see + reference for more details) +detection: + SELECTION_1: + EventID: 1 + SELECTION_10: + ParentCommandLine: '*\runonce.exe' + SELECTION_2: + CommandLine: '*\cmd.exe /C whoami*' + SELECTION_3: + ParentImage: C:\Temp* + SELECTION_4: + CommandLine: '*conhost.exe 0xffffffff -ForceV1*' + SELECTION_5: + ParentCommandLine: + - '*/C whoami*' + - '*cmd.exe /C echo*' + - '* > \\.\pipe*' + SELECTION_6: + CommandLine: + - '*cmd.exe /c echo*' + - '*> \\.\pipe*' + - '*\whoami.exe*' + SELECTION_7: + ParentImage: '*\dllhost.exe' + SELECTION_8: + Image: '*\cmd.exe' + SELECTION_9: + ParentImage: '*\runonce.exe' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7) or (SELECTION_8 and SELECTION_9 and SELECTION_10))) +falsepositives: +- Other programs that cause these patterns (please report) +id: f35c5d71-b489-4e22-a115-f003df287317 +level: high +logsource: + category: process_creation + product: windows +modified: 2021/08/30 +references: +- https://hausec.com/2021/07/26/cobalt-strike-and-tradecraft/ +- https://thedfirreport.com/2021/08/29/cobalt-strike-a-defenders-guide/ +status: experimental +tags: +- attack.execution diff --git a/rules/sigma/windows/process_creation/win_commandline_path_traversal.yml b/rules/sigma/windows/process_creation/win_commandline_path_traversal.yml new file mode 100644 index 00000000..a0a99b38 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_commandline_path_traversal.yml @@ -0,0 +1,32 @@ + +title: Cmd.exe CommandLine Path Traversal +author: xknow @xknow_infosec +date: 2020/06/11 +description: detects the usage of path traversal in cmd.exe indicating possible command/argument + confusion/hijacking +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentCommandLine: '*cmd*' + SELECTION_3: + ParentCommandLine: '*/c*' + SELECTION_4: + CommandLine: '*/../../*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- (not much) some benign Java tools may product false-positive commandlines for loading + libraries +id: 087790e3-3287-436c-bccf-cbd0184a7db1 +level: high +logsource: + category: process_creation + product: windows +references: +- https://hackingiscool.pl/cmdhijack-command-argument-confusion-with-path-traversal-in-cmd-exe/ +- https://twitter.com/Oddvarmoe/status/1270633613449723905 +status: experimental +tags: +- attack.execution +- attack.t1059.003 +- attack.t1059 diff --git a/rules/sigma/windows/process_creation/win_control_panel_item.yml b/rules/sigma/windows/process_creation/win_control_panel_item.yml new file mode 100644 index 00000000..f1374c3c --- /dev/null +++ b/rules/sigma/windows/process_creation/win_control_panel_item.yml @@ -0,0 +1,42 @@ + +title: Control Panel Items +author: Kyaw Min Thein, Furkan Caliskan (@caliskanfurkan_) +date: 2020/06/22 +description: Detects the malicious use of a control panel item +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*.cpl' + SELECTION_3: + CommandLine: + - '*\System32\\*' + - '*%System%*' + SELECTION_4: + Image: '*\reg.exe' + SELECTION_5: + CommandLine: '*add*' + SELECTION_6: + CommandLine: + - '*CurrentVersion\\Control Panel\\CPLs*' + condition: (SELECTION_1 and ((SELECTION_2 and not (SELECTION_3)) or (SELECTION_4 + and SELECTION_5 and SELECTION_6))) +falsepositives: +- Unknown +id: 0ba863e6-def5-4e50-9cea-4dd8c7dc46a4 +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/11/28 +references: +- https://attack.mitre.org/techniques/T1196/ +- https://ired.team/offensive-security/code-execution/code-execution-through-control-panel-add-ins +status: experimental +tags: +- attack.execution +- attack.defense_evasion +- attack.t1218.002 +- attack.t1196 +- attack.persistence +- attack.t1546 diff --git a/rules/sigma/windows/process_creation/win_copying_sensitive_files_with_credential_data.yml b/rules/sigma/windows/process_creation/win_copying_sensitive_files_with_credential_data.yml new file mode 100644 index 00000000..5eb389c0 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_copying_sensitive_files_with_credential_data.yml @@ -0,0 +1,50 @@ + +title: Copying Sensitive Files with Credential Data +author: Teymur Kheirkhabarov, Daniil Yugoslavskiy, oscd.community +date: 2019/10/22 +description: Files with well-known filenames (sensitive files with credential data) + copying +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\esentutl.exe' + SELECTION_3: + CommandLine: + - '*vss*' + - '* /m *' + - '* /y *' + SELECTION_4: + CommandLine: + - '*\windows\ntds\ntds.dit*' + - '*\config\sam*' + - '*\config\security*' + - '*\config\system *' + - '*\repair\sam*' + - '*\repair\system*' + - '*\repair\security*' + - '*\config\RegBack\sam*' + - '*\config\RegBack\system*' + - '*\config\RegBack\security*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or SELECTION_4)) +falsepositives: +- Copying sensitive files for legitimate use (eg. backup) or forensic investigation + by legitimate incident responder or forensic invetigator +id: e7be6119-fc37-43f0-ad4f-1f3f99be2f9f +level: high +logsource: + category: process_creation + product: windows +modified: 2019/11/13 +references: +- https://room362.com/post/2013/2013-06-10-volume-shadow-copy-ntdsdit-domain-hashes-remotely-part-1/ +- https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment +- https://dfironthemountain.wordpress.com/2018/12/06/locked-file-access-using-esentutl-exe/ +status: experimental +tags: +- attack.credential_access +- attack.t1003.002 +- attack.t1003.003 +- attack.t1003 +- car.2013-07-001 +- attack.s0404 diff --git a/rules/sigma/windows/process_creation/win_credential_access_via_password_filter.yml b/rules/sigma/windows/process_creation/win_credential_access_via_password_filter.yml new file mode 100644 index 00000000..501a3d7b --- /dev/null +++ b/rules/sigma/windows/process_creation/win_credential_access_via_password_filter.yml @@ -0,0 +1,32 @@ + +title: Dropping Of Password Filter DLL +author: Sreeman +date: 2020/10/29 +description: Detects dropping of dll files in system32 that may be used to retrieve + user credentials from LSASS +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*HKLM\SYSTEM\CurrentControlSet\Control\Lsa*' + SELECTION_3: + CommandLine: '*scecli\0*' + SELECTION_4: + CommandLine: '*reg add*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) +falsepositives: +- unknown +id: b7966f4a-b333-455b-8370-8ca53c229762 +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/06/11 +references: +- https://pentestlab.blog/2020/02/10/credential-access-password-filter-dll/ +- https://github.com/3gstudent/PasswordFilter/tree/master/PasswordFilter +status: experimental +tags: +- attack.credential_access +- attack.t1174 +- attack.t1556.002 diff --git a/rules/sigma/windows/process_creation/win_crime_fireball.yml b/rules/sigma/windows/process_creation/win_crime_fireball.yml new file mode 100644 index 00000000..140d326c --- /dev/null +++ b/rules/sigma/windows/process_creation/win_crime_fireball.yml @@ -0,0 +1,33 @@ + +title: Fireball Archer Install +author: Florian Roth +date: 2017/06/03 +description: Detects Archer malware invocation via rundll32 +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*rundll32.exe*' + SELECTION_3: + CommandLine: '*InstallArcherSvc*' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Unknown +fields: +- CommandLine +- ParentCommandLine +id: 3d4aebe0-6d29-45b2-a8a4-3dfde586a26d +level: high +logsource: + category: process_creation + product: windows +modified: 2020/08/29 +references: +- https://www.virustotal.com/en/file/9b4971349ae85aa09c0a69852ed3e626c954954a3927b3d1b6646f139b930022/analysis/ +- https://www.hybrid-analysis.com/sample/9b4971349ae85aa09c0a69852ed3e626c954954a3927b3d1b6646f139b930022?environmentId=100 +status: experimental +tags: +- attack.execution +- attack.defense_evasion +- attack.t1218.011 +- attack.t1085 diff --git a/rules/sigma/windows/process_creation/win_crime_maze_ransomware.yml b/rules/sigma/windows/process_creation/win_crime_maze_ransomware.yml new file mode 100644 index 00000000..3634b66a --- /dev/null +++ b/rules/sigma/windows/process_creation/win_crime_maze_ransomware.yml @@ -0,0 +1,51 @@ + +title: Maze Ransomware +author: Florian Roth +date: 2020/05/08 +description: Detects specific process characteristics of Maze ransomware word document + droppers +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: + - '*\WINWORD.exe' + SELECTION_3: + Image: + - '*.tmp' + SELECTION_4: + Image: '*\wmic.exe' + SELECTION_5: + ParentImage: '*\Temp\\*' + SELECTION_6: + CommandLine: '*shadowcopy delete' + SELECTION_7: + CommandLine: '*shadowcopy delete' + SELECTION_8: + CommandLine: '*\..\..\system32*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and SELECTION_5 + and SELECTION_6) or (SELECTION_7 and SELECTION_8))) +falsepositives: +- Unlikely +fields: +- ComputerName +- User +- Image +id: 29fd07fc-9cfd-4331-b7fd-cc18dfa21052 +level: critical +logsource: + category: process_creation + product: windows +modified: 2021/06/27 +references: +- https://www.fireeye.com/blog/threat-research/2020/05/tactics-techniques-procedures-associated-with-maze-ransomware-incidents.html +- https://app.any.run/tasks/51e7185c-52d7-4efb-ac0d-e86340053473/ +- https://app.any.run/tasks/65a79440-373a-4725-8d74-77db9f2abda4/ +status: experimental +tags: +- attack.execution +- attack.t1204.002 +- attack.t1204 +- attack.t1047 +- attack.impact +- attack.t1490 diff --git a/rules/sigma/windows/process_creation/win_crime_snatch_ransomware.yml b/rules/sigma/windows/process_creation/win_crime_snatch_ransomware.yml new file mode 100644 index 00000000..304681cb --- /dev/null +++ b/rules/sigma/windows/process_creation/win_crime_snatch_ransomware.yml @@ -0,0 +1,31 @@ + +title: Snatch Ransomware +author: Florian Roth +date: 2020/08/26 +description: Detects specific process characteristics of Snatch ransomware word document + droppers +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*shutdown /r /f /t 00*' + - '*net stop SuperBackupMan*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- Scripts that shutdown the system immediately and reboot them in safe mode are unlikely +fields: +- ComputerName +- User +- Image +id: 5325945e-f1f0-406e-97b8-65104d393fff +level: critical +logsource: + category: process_creation + product: windows +references: +- https://news.sophos.com/en-us/2019/12/09/snatch-ransomware-reboots-pcs-into-safe-mode-to-bypass-protection/ +status: experimental +tags: +- attack.execution +- attack.t1204 diff --git a/rules/sigma/windows/process_creation/win_data_compressed_with_rar.yml b/rules/sigma/windows/process_creation/win_data_compressed_with_rar.yml new file mode 100644 index 00000000..dc31ae53 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_data_compressed_with_rar.yml @@ -0,0 +1,40 @@ + +title: Data Compressed - rar.exe +author: Timur Zinniatullin, E.M. Anhaus, oscd.community +date: 2019/10/21 +description: An adversary may compress data (e.g., sensitive documents) that is collected + prior to exfiltration in order to make it portable and minimize the amount of data + sent over the network. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\rar.exe' + SELECTION_3: + CommandLine: '* a *' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3) +falsepositives: +- Highly likely if rar is a default archiver in the monitored environment. +fields: +- Image +- CommandLine +- User +- LogonGuid +- Hashes +- ParentProcessGuid +- ParentCommandLine +id: 6f3e2987-db24-4c78-a860-b4f4095a7095 +level: low +logsource: + category: process_creation + product: windows +modified: 2020/08/29 +references: +- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1560.001/T1560.001.md +- https://eqllib.readthedocs.io/en/latest/analytics/1ec33c93-3d0b-4a28-8014-dbdaae5c60ae.html +status: experimental +tags: +- attack.exfiltration +- attack.t1002 +- attack.collection +- attack.t1560.001 diff --git a/rules/sigma/windows/process_creation/win_detecting_fake_instances_of_hxtsr.yml b/rules/sigma/windows/process_creation/win_detecting_fake_instances_of_hxtsr.yml new file mode 100644 index 00000000..81f72a7c --- /dev/null +++ b/rules/sigma/windows/process_creation/win_detecting_fake_instances_of_hxtsr.yml @@ -0,0 +1,30 @@ + +title: Detecting Fake Instances Of Hxtsr.exe +author: Sreeman +date: 2020/04/17 +description: HxTsr.exe is a Microsoft compressed executable file called Microsoft + Outlook Communications.HxTsr.exe is part of Outlook apps, because it resides in + a hidden "WindowsApps" subfolder of "C:\Program Files". Its path includes a version + number, e.g., "C:\Program Files\WindowsApps\microsoft.windowscommunicationsapps_17.7466.41167.0_x64__8wekyb3d8bbwe\HxTsr.exe". + Any instances of hxtsr.exe not in this folder may be malware camouflaging itself + as HxTsr.exe +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: hxtsr.exe + SELECTION_3: + CurrentDirectory|re: (?i)c:\\\\program files\\\\windowsapps\\\\microsoft\.windowscommunicationsapps_.*\\\\hxtsr\.exe + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- unknown +id: 4e762605-34a8-406d-b72e-c1a089313320 +level: medium +logsource: + category: process_creation + product: windows +modified: 2021/07/07 +status: experimental +tags: +- attack.defense_evasion +- attack.t1036 diff --git a/rules/sigma/windows/process_creation/win_dll_sideload_xwizard.yml b/rules/sigma/windows/process_creation/win_dll_sideload_xwizard.yml new file mode 100644 index 00000000..bca98893 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_dll_sideload_xwizard.yml @@ -0,0 +1,28 @@ + +title: Xwizard DLL Sideloading +author: Christian Burkard +date: 2021/09/20 +description: Detects the execution of Xwizard tool from the non-default directory + which can be used to sideload a custom xwizards.dll +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\xwizard.exe' + SELECTION_3: + Image: C:\Windows\System32\\* + condition: (SELECTION_1 and SELECTION_2 and not (SELECTION_3)) +falsepositives: +- Windows installed on non-C drive +id: 193d5ccd-6f59-40c6-b5b0-8e32d5ddd3d1 +level: high +logsource: + category: process_creation + product: windows +references: +- https://lolbas-project.github.io/lolbas/Binaries/Xwizard/ +- http://www.hexacorn.com/blog/2017/07/31/the-wizard-of-x-oppa-plugx-style/ +status: experimental +tags: +- attack.defense_evasion +- attack.t1574.002 diff --git a/rules/sigma/windows/process_creation/win_dns_exfiltration_tools_execution.yml b/rules/sigma/windows/process_creation/win_dns_exfiltration_tools_execution.yml new file mode 100644 index 00000000..a1443e87 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_dns_exfiltration_tools_execution.yml @@ -0,0 +1,31 @@ + +title: DNS Exfiltration and Tunneling Tools Execution +author: Daniil Yugoslavskiy, oscd.community +date: 2019/10/24 +description: Well-known DNS Exfiltration tools execution +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + Image: '*\iodine.exe' + SELECTION_3: + Image: '*\dnscat2*' + condition: (SELECTION_1 and (SELECTION_2 or SELECTION_3)) +falsepositives: +- Legitimate usage of iodine or dnscat2 — DNS Exfiltration tools (unlikely) +id: 98a96a5a-64a0-4c42-92c5-489da3866cb0 +level: high +logsource: + category: process_creation + product: windows +modified: 2020/08/29 +status: experimental +tags: +- attack.exfiltration +- attack.t1048.001 +- attack.t1048 +- attack.command_and_control +- attack.t1071.004 +- attack.t1071 +- attack.t1132.001 +- attack.t1132 diff --git a/rules/sigma/windows/process_creation/win_dnscat2_powershell_implementation.yml b/rules/sigma/windows/process_creation/win_dnscat2_powershell_implementation.yml new file mode 100644 index 00000000..2bd254fd --- /dev/null +++ b/rules/sigma/windows/process_creation/win_dnscat2_powershell_implementation.yml @@ -0,0 +1,40 @@ + +title: DNSCat2 Powershell Implementation Detection Via Process Creation +author: Cian Heasley +date: 2020/08/08 +description: The PowerShell implementation of DNSCat2 calls nslookup to craft queries. + Counting nslookup processes spawned by PowerShell will show hundreds or thousands + of instances if PS DNSCat2 is active locally. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + ParentImage: '*\powershell.exe' + SELECTION_3: + Image: '*\nslookup.exe' + SELECTION_4: + CommandLine: '*\nslookup.exe' + condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and SELECTION_4) | count(Image) + by ParentImage > 100 +falsepositives: +- Other powershell scripts that call nslookup.exe +fields: +- Image +- CommandLine +- ParentImage +id: b11d75d6-d7c1-11ea-87d0-0242ac130003 +level: high +logsource: + category: process_creation + product: windows +references: +- https://github.com/lukebaggett/dnscat2-powershell +- https://blu3-team.blogspot.com/2019/08/powershell-dns-c2-notes.html +- https://ragged-lab.blogspot.com/2020/06/it-is-always-dns-powershell-edition.html +status: experimental +tags: +- attack.command_and_control +- attack.t1071 +- attack.t1071.004 +- attack.t1001.003 +- attack.t1041 diff --git a/rules/sigma/windows/process_creation/win_encoded_frombase64string.yml b/rules/sigma/windows/process_creation/win_encoded_frombase64string.yml new file mode 100644 index 00000000..65092fcd --- /dev/null +++ b/rules/sigma/windows/process_creation/win_encoded_frombase64string.yml @@ -0,0 +1,32 @@ + +title: Encoded FromBase64String +author: Florian Roth +date: 2019/08/24 +description: Detects a base64 encoded FromBase64String keyword in a process command + line +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*OjpGcm9tQmFzZTY0U3RyaW5n*' + - '*o6RnJvbUJhc2U2NFN0cmluZ*' + - '*6OkZyb21CYXNlNjRTdHJpbm*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +fields: +- CommandLine +- ParentCommandLine +id: fdb62a13-9a81-4e5c-a38f-ea93a16f6d7c +level: critical +logsource: + category: process_creation + product: windows +status: experimental +tags: +- attack.defense_evasion +- attack.t1140 +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/process_creation/win_encoded_iex.yml b/rules/sigma/windows/process_creation/win_encoded_iex.yml new file mode 100644 index 00000000..4443cc19 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_encoded_iex.yml @@ -0,0 +1,39 @@ + +title: Encoded IEX +author: Florian Roth +date: 2019/08/23 +description: Detects a base64 encoded IEX command string in a process command line +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: + - '*SUVYIChb*' + - '*lFWCAoW*' + - '*JRVggKF*' + - '*aWV4IChb*' + - '*lleCAoW*' + - '*pZXggKF*' + - '*aWV4IChOZX*' + - '*lleCAoTmV3*' + - '*pZXggKE5ld*' + - '*SUVYIChOZX*' + - '*lFWCAoTmV3*' + - '*JRVggKE5ld*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +fields: +- CommandLine +- ParentCommandLine +id: 88f680b8-070e-402c-ae11-d2914f2257f1 +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/08/29 +status: experimental +tags: +- attack.execution +- attack.t1059.001 +- attack.t1086 diff --git a/rules/sigma/windows/process_creation/win_etw_modification_cmdline.yml b/rules/sigma/windows/process_creation/win_etw_modification_cmdline.yml new file mode 100644 index 00000000..376f80c9 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_etw_modification_cmdline.yml @@ -0,0 +1,33 @@ + +title: COMPlus_ETWEnabled Command Line Arguments +author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research) +date: 2020/05/02 +description: Potential adversaries stopping ETW providers recording loaded .NET assemblies. +detection: + SELECTION_1: + EventID: 1 + SELECTION_2: + CommandLine: '*COMPlus_ETWEnabled=0*' + condition: (SELECTION_1 and SELECTION_2) +falsepositives: +- unknown +id: 41421f44-58f9-455d-838a-c398859841d4 +level: critical +logsource: + category: process_creation + product: windows +modified: 2020/08/29 +references: +- https://twitter.com/_xpn_/status/1268712093928378368 +- https://social.msdn.microsoft.com/Forums/vstudio/en-US/0878832e-39d7-4eaf-8e16-a729c4c40975/what-can-i-use-e13c0d23ccbc4e12931bd9cc2eee27e4-for?forum=clr +- https://github.com/dotnet/runtime/blob/ee2355c801d892f2894b0f7b14a20e6cc50e0e54/docs/design/coreclr/jit/viewing-jit-dumps.md#setting-configuration-variables +- https://github.com/dotnet/runtime/blob/f62e93416a1799aecc6b0947adad55a0d9870732/src/coreclr/src/inc/clrconfigvalues.h#L35-L38 +- https://github.com/dotnet/runtime/blob/7abe42dc1123722ed385218268bb9fe04556e3d3/src/coreclr/src/inc/clrconfig.h#L33-L39 +- https://github.com/dotnet/runtime/search?p=1&q=COMPlus_&unscoped_q=COMPlus_ +- https://bunnyinside.com/?term=f71e8cb9c76a +- http://managed670.rssing.com/chan-5590147/all_p1.html +- https://github.com/dotnet/runtime/blob/4f9ae42d861fcb4be2fcd5d3d55d5f227d30e723/docs/coding-guidelines/clr-jit-coding-conventions.md#1412-disabling-code +status: experimental +tags: +- attack.defense_evasion +- attack.t1562 diff --git a/rules/sigma/windows/process_creation/win_etw_trace_evasion.yml b/rules/sigma/windows/process_creation/win_etw_trace_evasion.yml new file mode 100644 index 00000000..b20be104 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_etw_trace_evasion.yml @@ -0,0 +1,71 @@ + +title: Disable of ETW Trace +author: '@neu5ron, Florian Roth, Jonhnathan Ribeiro, oscd.community' +date: 2019/03/22 +description: Detects a command that clears or disables any ETW trace log which could + indicate a logging evasion. +detection: + SELECTION_1: + EventID: 1 + SELECTION_10: + CommandLine: '*Remove-EtwTraceProvider*' + SELECTION_11: + CommandLine: '*EventLog-Microsoft-Windows-WMI-Activity-Trace*' + SELECTION_12: + CommandLine: '*{1418ef04-b0b4-4623-bf7e-d74ab47bbdaa}*' + SELECTION_13: + CommandLine: '*Set-EtwTraceProvider*' + SELECTION_14: + CommandLine: '*{1418ef04-b0b4-4623-bf7e-d74ab47bbdaa}*' + SELECTION_15: + CommandLine: '*EventLog-Microsoft-Windows-WMI-Activity-Trace*' + SELECTION_16: + CommandLine: '*0x11*' + SELECTION_17: + CommandLine: '*logman*' + SELECTION_18: + CommandLine: '*update*' + SELECTION_19: + CommandLine: '*trace*' + SELECTION_2: + CommandLine: '*cl*' + SELECTION_20: + CommandLine: '*--p*' + SELECTION_21: + CommandLine: '*-ets*' + SELECTION_3: + CommandLine: '*/Trace*' + SELECTION_4: + CommandLine: '*clear-log*' + SELECTION_5: + CommandLine: '*/Trace*' + SELECTION_6: + CommandLine: '*sl*' + SELECTION_7: + CommandLine: '*/e:false*' + SELECTION_8: + CommandLine: '*set-log*' + SELECTION_9: + CommandLine: '*/e:false*' + condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) or (SELECTION_4 and SELECTION_5) + or (SELECTION_6 and SELECTION_7) or (SELECTION_8 and SELECTION_9) or (SELECTION_10 + and SELECTION_11 and SELECTION_12) or (SELECTION_13 and SELECTION_14 and SELECTION_15 + and SELECTION_16) or (SELECTION_17 and SELECTION_18 and SELECTION_19 and SELECTION_20 + and SELECTION_21))) +falsepositives: +- Unknown +id: a238b5d0-ce2d-4414-a676-7a531b3d13d6 +level: high +logsource: + category: process_creation + product: windows +references: +- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/wevtutil +- https://abuse.io/lockergoga.txt +- https://medium.com/palantir/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63 +status: experimental +tags: +- attack.defense_evasion +- attack.t1070 +- attack.t1562.006 +- car.2016-04-002 diff --git a/rules/sigma/windows/process_creation/win_exchange_proxylogon_oabvirtualdir.yml b/rules/sigma/windows/process_creation/win_exchange_proxylogon_oabvirtualdir.yml new file mode 100644 index 00000000..431a2dd7 --- /dev/null +++ b/rules/sigma/windows/process_creation/win_exchange_proxylogon_oabvirtualdir.yml @@ -0,0 +1,30 @@ + +title: ProxyLogon MSExchange OabVirtualDirectory +author: Florian Roth +date: 2021/08/09 +description: Detects specific patterns found after a successful ProxyLogon exploitation + in relation to a Commandlet invocation of Set-OabVirtualDirectory +detection: + SELECTION_1: + - OabVirtualDirectory + SELECTION_2: + - ' -ExternalUrl ' + SELECTION_3: + - eval(request + - http://f/