-
Notifications
You must be signed in to change notification settings - Fork 587
[New Rules] Potential PowerShell Pass-the-Hash/Relay Script #3543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
event.category:process and host.os.type:windows and | ||
powershell.file.script_block_text : ( | ||
("NTLMSSPNegotiate" and ("NegotiateSMB" or "NegotiateSMB2")) or | ||
"4E544C4D53535000" or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NTLMSSP in hex
powershell.file.script_block_text : ( | ||
("NTLMSSPNegotiate" and ("NegotiateSMB" or "NegotiateSMB2")) or | ||
"4E544C4D53535000" or | ||
"0x4e,0x54,0x4c,0x4d,0x53,0x53,0x50" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NTLMSSP in hex
("NTLMSSPNegotiate" and ("NegotiateSMB" or "NegotiateSMB2")) or | ||
"4E544C4D53535000" or | ||
"0x4e,0x54,0x4c,0x4d,0x53,0x53,0x50" | ||
"0x4e,0x54,0x20,0x4c,0x4d" or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NT LM 0.12 in hex
"4E544C4D53535000" or | ||
"0x4e,0x54,0x4c,0x4d,0x53,0x53,0x50" | ||
"0x4e,0x54,0x20,0x4c,0x4d" or | ||
"0x53,0x4d,0x42,0x20,0x32" or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SMB 2.002 in hex
"0x4e,0x54,0x4c,0x4d,0x53,0x53,0x50" | ||
"0x4e,0x54,0x20,0x4c,0x4d" or | ||
"0x53,0x4d,0x42,0x20,0x32" or | ||
"0x81,0xbb,0x7a,0x36,0x44,0x98,0xf1,0x35,0xad,0x32,0x98,0xf0,0x38" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SMB named pipe UUID
type = "query" | ||
|
||
query = ''' | ||
event.category:process and host.os.type:windows and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no event.type == "start"
or something in these events?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm there is event.type == "info"
, maybe makes sense to push this in a separated PR, as none of the other PowerShell rules include it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think that would be good; especially giving the broad search of powershell text fields. For now - feel free to merge!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think we may not need to do that, as we specifically use the logs-windows.powershell*
index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff!
* [New Rules] Potential PowerShell Pass-the-Hash/Relay Script * Update credential_access_posh_relay_tools.toml * Update execution_posh_hacktool_functions.toml * Update credential_access_posh_relay_tools.toml * Update credential_access_posh_relay_tools.toml --------- Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com> (cherry picked from commit 218c3be)
* [New Rules] Potential PowerShell Pass-the-Hash/Relay Script * Update credential_access_posh_relay_tools.toml * Update execution_posh_hacktool_functions.toml * Update credential_access_posh_relay_tools.toml * Update credential_access_posh_relay_tools.toml --------- Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com> (cherry picked from commit 218c3be)
* [New Rules] Potential PowerShell Pass-the-Hash/Relay Script * Update credential_access_posh_relay_tools.toml * Update execution_posh_hacktool_functions.toml * Update credential_access_posh_relay_tools.toml * Update credential_access_posh_relay_tools.toml --------- Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com> (cherry picked from commit 218c3be)
* [New Rules] Potential PowerShell Pass-the-Hash/Relay Script * Update credential_access_posh_relay_tools.toml * Update execution_posh_hacktool_functions.toml * Update credential_access_posh_relay_tools.toml * Update credential_access_posh_relay_tools.toml --------- Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com> (cherry picked from commit 218c3be)
* [New Rules] Potential PowerShell Pass-the-Hash/Relay Script * Update credential_access_posh_relay_tools.toml * Update execution_posh_hacktool_functions.toml * Update credential_access_posh_relay_tools.toml * Update credential_access_posh_relay_tools.toml --------- Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com> (cherry picked from commit 218c3be)
* [New Rules] Potential PowerShell Pass-the-Hash/Relay Script * Update credential_access_posh_relay_tools.toml * Update execution_posh_hacktool_functions.toml * Update credential_access_posh_relay_tools.toml * Update credential_access_posh_relay_tools.toml --------- Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com> (cherry picked from commit 218c3be)
* [New Rules] Potential PowerShell Pass-the-Hash/Relay Script * Update credential_access_posh_relay_tools.toml * Update execution_posh_hacktool_functions.toml * Update credential_access_posh_relay_tools.toml * Update credential_access_posh_relay_tools.toml --------- Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com> (cherry picked from commit 218c3be)
* [New Rules] Potential PowerShell Pass-the-Hash/Relay Script * Update credential_access_posh_relay_tools.toml * Update execution_posh_hacktool_functions.toml * Update credential_access_posh_relay_tools.toml * Update credential_access_posh_relay_tools.toml --------- Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com> (cherry picked from commit 218c3be)
* [New Rules] Potential PowerShell Pass-the-Hash/Relay Script * Update credential_access_posh_relay_tools.toml * Update execution_posh_hacktool_functions.toml * Update credential_access_posh_relay_tools.toml * Update credential_access_posh_relay_tools.toml --------- Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com> (cherry picked from commit 218c3be)
* [New Rules] Potential PowerShell Pass-the-Hash/Relay Script * Update credential_access_posh_relay_tools.toml * Update execution_posh_hacktool_functions.toml * Update credential_access_posh_relay_tools.toml * Update credential_access_posh_relay_tools.toml --------- Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com> (cherry picked from commit 218c3be)
* [New Rules] Potential PowerShell Pass-the-Hash/Relay Script * Update credential_access_posh_relay_tools.toml * Update execution_posh_hacktool_functions.toml * Update credential_access_posh_relay_tools.toml * Update credential_access_posh_relay_tools.toml --------- Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com> (cherry picked from commit 218c3be)
Summary
Detects PowerShell scripts that can execute pass-the-hash (PtH) attacks, intercept and relay NTLM challenges, and carry out other man-in-the-middle (MitM) attacks.
Some related tooling: