This commit is contained in:
tccontre
2022-03-22 17:29:42 +01:00
parent 316ece5e80
commit dec5103005
6 changed files with 28 additions and 23 deletions
@@ -1,7 +1,7 @@
name: Get ADDefaultDomainPasswordPolicy with Powershell Script Block
id: 1ff7ccc8-065a-11ec-91e4-acde48001122
version: 1
date: '2021-08-26'
version: 2
date: '2022-03-22'
author: Teoderick Contreras, Mauricio Velazco, Splunk
type: Hunting
datamodel: []
@@ -10,9 +10,10 @@ description: The following analytic utilizes PowerShell Script Block Logging (Ev
used to obtain the password policy in a Windows domain. Red Teams and adversaries
alike may use PowerShell to enumerate domain policies for situational awareness
and Active Directory Discovery.
search: '`powershell` EventCode=4104 Message ="*Get-ADDefaultDomainPasswordPolicy*"
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message
ComputerName User | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`
search: '`powershell` EventCode=4104 ScriptBlockText ="*Get-ADDefaultDomainPasswordPolicy*"
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode ScriptBlockText Computer user_id
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `get_addefaultdomainpasswordpolicy_with_powershell_script_block_filter`'
how_to_implement: The following Hunting analytic requires PowerShell operational logs
to be imported. Modify the powershell macro as needed to match the sourcetype or
@@ -30,7 +31,7 @@ tags:
- Source:Endpoint
- Stage:Discovery
dataset:
- https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1201/pwd_policy_discovery/windows-powershell.log
- https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1201/pwd_policy_discovery/windows-powershell-xml.log
impact: 30
kill_chain_phases:
- Reconnaissance
@@ -1,7 +1,7 @@
name: Get DomainUser with PowerShell Script Block
id: 61994268-04f4-11ec-865c-acde48001122
version: 1
date: '2021-08-24'
version: 2
date: '2022-03-22'
author: Teoderick Contreras, Mauricio Velazco, Splunk
type: TTP
datamodel: []
@@ -10,9 +10,11 @@ description: The following analytic utilizes PowerShell Script Block Logging (Ev
part of PowerView, a PowerShell tool used to perform enumeration on Windows domains.
Red Teams and adversaries alike may use PowerView to enumerate domain users for
situational awareness and Active Directory Discovery.
search: '`powershell` EventCode=4104 Message = "*Get-DomainUser*" | stats count min(_time)
as firstTime max(_time) as lastTime by EventCode Message ComputerName User | `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` | `get_domainuser_with_powershell_script_block_filter`'
search: '`powershell` EventCode=4104 ScriptBlockText = "*Get-DomainUser*"
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode ScriptBlockText Computer user_id
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `get_domainuser_with_powershell_script_block_filter`'
how_to_implement: The following Hunting analytic requires PowerShell operational logs
to be imported. Modify the powershell macro as needed to match the sourcetype or
add index. This analytic is specific to 4104, or PowerShell Script Block Logging.
@@ -27,7 +29,7 @@ tags:
- Source:Endpoint
- Stage:Discovery
dataset:
- https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-powershell.log
- https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-powershell-xml.log
impact: 50
kill_chain_phases:
- Reconnaissance
@@ -1,7 +1,7 @@
name: GetLocalUser with PowerShell Script Block
id: 2e891cbe-0426-11ec-9c9c-acde48001122
version: 1
date: '2021-08-23'
version: 2
date: '2022-03-22'
author: Mauricio Velazco, Splunk
type: Hunting
datamodel: []
@@ -10,8 +10,10 @@ description: The following analytic utilizes PowerShell Script Block Logging (Ev
commandlet is used to return a list of all local users. Red Teams and adversaries
may leverage this commandlet to enumerate users for situational awareness and Active
Directory Discovery.
search: '`powershell` EventCode=4104 (Message = "*Get-LocalUser*") | stats count min(_time)
as firstTime max(_time) as lastTime by EventCode Message ComputerName User | `security_content_ctime(firstTime)`
search: '`powershell` EventCode=4104 (ScriptBlockText = "*Get-LocalUser*")
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode ScriptBlockText Computer user_id
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `getlocaluser_with_powershell_script_block_filter`'
how_to_implement: To successfully implement this analytic, you will need to enable
PowerShell Script Block Logging on some or all endpoints. Additional setup here
@@ -28,7 +30,7 @@ tags:
- Source:Endpoint
- Stage:Discovery
dataset:
- https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.001/AD_discovery/windows-powershell.log
- https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.001/AD_discovery/windows-powershell-xml.log
impact: 30
kill_chain_phases:
- Reconnaissance
@@ -7,6 +7,6 @@ tests:
latest_time: now
attack_data:
- file_name: windows-powershell.log
data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1201/pwd_policy_discovery/windows-powershell.log
source: WinEventLog:Microsoft-Windows-PowerShell/Operational
data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1201/pwd_policy_discovery/windows-powershell-xml.log
source: XmlWinEventLog:Microsoft-Windows-PowerShell/Operational
sourcetype: WinEventLog
@@ -7,6 +7,6 @@ tests:
latest_time: now
attack_data:
- file_name: windows-powershell.log
data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-powershell.log
source: WinEventLog:Microsoft-Windows-PowerShell/Operational
data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-powershell-xml.log
source: XmlWinEventLog:Microsoft-Windows-PowerShell/Operational
sourcetype: WinEventLog
@@ -7,6 +7,6 @@ tests:
latest_time: now
attack_data:
- file_name: windows-powershell.log
data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.001/AD_discovery/windows-powershell.log
source: WinEventLog:Microsoft-Windows-PowerShell/Operational
data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.001/AD_discovery/windows-powershell-xml.log
source: XmlWinEventLog:Microsoft-Windows-PowerShell/Operational
sourcetype: wineventlog