-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aeb097e
commit 7310e50
Showing
127 changed files
with
2,257 additions
and
1,687 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
behavior/rules/collection_getasynckeystate_api_call_from_suspicious_process.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
[rule] | ||
description = """ | ||
Identifies attempts to enumerate the state of keyboard keys by an unusual process. Adversaries may log user keystrokes | ||
to intercept credentials or other information from the user as the user types them. | ||
""" | ||
id = "be7140ba-4633-46a7-ac59-91cc85e5e252" | ||
license = "Elastic License v2" | ||
name = "GetAsyncKeyState API Call from Suspicious Process" | ||
os_list = ["windows"] | ||
reference = [ | ||
"https://attack.mitre.org/techniques/T1056/001/", | ||
"https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getasynckeystate", | ||
] | ||
version = "1.0.6" | ||
|
||
query = ''' | ||
sequence by process.entity_id with maxspan=5m | ||
[process where event.action == "start" and | ||
( | ||
(process.Ext.device.product_id : ("Virtual DVD-ROM", "Virtual Disk") and not process.executable : "C:\\*") or | ||
(process.Ext.relative_file_creation_time <= 500 and (process.code_signature.trusted == false or process.code_signature.exists == false)) or | ||
process.name : ("rundll32.exe", "regsvr32.exe", "powershell.exe", "wscript.exe", "cscript.exe", "mshta.exe") or | ||
process.pe.original_file_name : ("python*.exe", "AutoIt*.exe") or | ||
(process.Ext.relative_file_creation_time <= 500 and | ||
process.executable : | ||
("?:\\Users\\Public\\*", | ||
"?:\\Users\\*\\Downloads\\*", | ||
"?:\\Windows\\Temp\\*", | ||
"?:\\Windows\\Tasks\\*", | ||
"?:\\ProgramData\\*", | ||
"?:\\Windows\\Microsoft.NET\\*")) or | ||
process.executable : ("?:\\Users\\*\\AppData\\Local\\Temp\\7z*\\", | ||
"?:\\Users\\*\\AppData\\Local\\Temp\\Rar$*\\*", | ||
"?:\\Users\\*\\AppData\\Local\\Temp\\Temp?_*\\*", | ||
"?:\\Users\\*\\AppData\\Local\\Temp\\BNZ.*") or | ||
(process.parent.name : "svchost.exe" and process.parent.args : "Schedule") | ||
) and | ||
not process.executable : | ||
("?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe", | ||
"?:\\Program Files (x86)\\*.exe", | ||
"?:\\Program Files\\*.exe") | ||
] | ||
[api where process.Ext.api.name == "GetAsyncKeyState" and | ||
process.Ext.api.parameters.background_callcount >= 400 and process.Ext.api.parameters.ms_since_last_keyevent >= 100] | ||
''' | ||
|
||
min_endpoint_version = "8.10.0" | ||
[[actions]] | ||
action = "kill_process" | ||
field = "process.entity_id" | ||
state = 0 | ||
|
||
[[optional_actions]] | ||
action = "rollback" | ||
field = "process.entity_id" | ||
state = 0 | ||
|
||
[[threat]] | ||
framework = "MITRE ATT&CK" | ||
[[threat.technique]] | ||
id = "T1056" | ||
name = "Input Capture" | ||
reference = "https://attack.mitre.org/techniques/T1056/" | ||
[[threat.technique.subtechnique]] | ||
id = "T1056.001" | ||
name = "Keylogging" | ||
reference = "https://attack.mitre.org/techniques/T1056/001/" | ||
|
||
|
||
|
||
[threat.tactic] | ||
id = "TA0009" | ||
name = "Collection" | ||
reference = "https://attack.mitre.org/tactics/TA0009/" | ||
|
||
[internal] | ||
min_endpoint_version = "8.10.0" |
51 changes: 51 additions & 0 deletions
51
behavior/rules/collection_suspicious_input_capture_via_getasynckeystate_api.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[rule] | ||
description = """ | ||
Identifies multiple attempts to enumerate the state of keyboard keys by the same process and in a short period of time. | ||
Adversaries may log user keystrokes to intercept credentials or other information from the user as the user types them. | ||
""" | ||
id = "2ed0570d-3fa4-45b1-b4f2-d7fcc827daf1" | ||
license = "Elastic License v2" | ||
name = "Suspicious Input Capture via GetAsyncKeyState API" | ||
os_list = ["windows"] | ||
reference = [ | ||
"https://attack.mitre.org/techniques/T1056/001/", | ||
"https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getasynckeystate", | ||
] | ||
version = "1.0.6" | ||
|
||
query = ''' | ||
sequence by process.entity_id with maxspan=3s | ||
[api where process.Ext.api.name == "GetAsyncKeyState"] | ||
[api where process.Ext.api.name == "GetAsyncKeyState"] | ||
[api where process.Ext.api.name == "GetAsyncKeyState"] | ||
[api where process.Ext.api.name == "GetAsyncKeyState"] | ||
[api where process.Ext.api.name == "GetAsyncKeyState"] | ||
''' | ||
|
||
min_endpoint_version = "8.10.0" | ||
optional_actions = [] | ||
[[actions]] | ||
action = "kill_process" | ||
field = "process.entity_id" | ||
state = 0 | ||
|
||
[[threat]] | ||
framework = "MITRE ATT&CK" | ||
[[threat.technique]] | ||
id = "T1056" | ||
name = "Input Capture" | ||
reference = "https://attack.mitre.org/techniques/T1056/" | ||
[[threat.technique.subtechnique]] | ||
id = "T1056.001" | ||
name = "Keylogging" | ||
reference = "https://attack.mitre.org/techniques/T1056/001/" | ||
|
||
|
||
|
||
[threat.tactic] | ||
id = "TA0009" | ||
name = "Collection" | ||
reference = "https://attack.mitre.org/tactics/TA0009/" | ||
|
||
[internal] | ||
min_endpoint_version = "8.10.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.