Detection rules › Elastic
Browser Debugging from Unusual Parent
Identifies the execution of a Chromium-based browser with the debugging process argument, which may indicate an attempt to steal authentication cookies. An adversary may steal web application or service session cookies and use them to access web applications or Internet services as an authenticated user without credentials.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Rule body
[rule]
description = """
Identifies the execution of a Chromium-based browser with the debugging process argument, which may indicate an attempt
to steal authentication cookies. An adversary may steal web application or service session cookies and use them to
access web applications or Internet services as an authenticated user without credentials.
"""
id = "09931e34-fe6b-4155-91ec-490d64fb72a2"
license = "Elastic License v2"
name = "Browser Debugging from Unusual Parent"
os_list = ["windows"]
reference = [
"https://github.com/defaultnamehere/cookie_crimes",
"https://embracethered.com/blog/posts/2020/cookie-crimes-on-mirosoft-edge/",
"https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/post/multi/gather/chrome_cookies.md",
"https://posts.specterops.io/hands-in-the-cookie-jar-dumping-cookies-with-chromiums-remote-debugger-port-34c4f468844e",
"https://github.com/BishopFox/sliver/wiki/Cursed",
]
version = "1.0.24"
query = '''
process where event.type == "start" and
process.name : ("chrome.exe", "msedge.exe") and not user.id : "S-1-5-18" and
process.code_signature.trusted == true and
process.parent.executable != null and
process.args : ("--remote-debugging-port=*",
"--remote-debugging-targets=*",
"--remote-debugging-pipe=*") and
process.args : "--user-data-dir=*" and not process.args:"--remote-debugging-port=0" and
not (process.parent.name == "chrome.exe" and process.parent.args == "--remote-debugging-host=127.0.0.1") and
not process.parent.executable : ("?:\\Program Files\\Microsoft VS Code\\Code.exe",
"?:\\Program Files (x86)\\PRTG Network Monitor\\Sensor System\\reporter.exe",
"?:\\Program Files\\nodejs\\node.exe",
"?:\\Windows\\System32\\inetsrv\\w3wp.exe",
"?:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
"?:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
"?:\\Program Files (x86)\\Brackets\\Brackets.exe",
"?:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe",
"?:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe",
"?:\\Program Files\\OutSystems\\Development Environment*\\Service Studio\\ServiceStudio.exe",
"?:\\Program Files (x86)\\CyberArk\\PSM\\Components\\chromedriver.exe",
"?:\\Program Files\\Microsoft Visual Studio\\*\\node.exe",
"?:\\Program Files (x86)\\Microsoft Visual Studio\\*\\node.exe",
"?:\\Program Files (x86)\\Price Pro\\PricePro.exe",
"?:\\Users\\*\\Versioning_SPCRepository\\SPCProcessor\\SPCEngine\\app.exe",
"E:\\PRTG\\Sensor System\\reporter.exe" ,
"E:\\eclipse\\chromedriver.exe",
"c:\\ibi\\AppStudio82\\bin\\chromedriver.exe",
"C:\\Windows\\chromedriver.exe",
"?:\\Program Files\\Google\\Chrome Dev\\Application\\chrome.exe",
"?:\\ibi\\AppStudio90\\bin\\chromedriver.exe",
"?:\\Users\\*\\AppData\\Roaming\\nvm\\v*\\node.exe",
"?:\\*\\bin\\cache\\dart-sdk\\bin\\dart.exe",
"C:\\Users\\*\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",
"C:\\Program Files\\Python3??\\python.exe") and
not (process.parent.executable : "?:\\Windows\\explorer.exe" and process.command_line : "*VisualStudio*") and
not (process.parent.name : "chromedriver.exe" and process.parent.command_line : "*chromedriver.exe --port=*") and
not (process.parent.executable : "?:\\Users\\*\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe" and
process.parent.command_line : "*--ms-enable-electron-run-as-node*") and
not (process.parent.name : "node.exe" and process.parent.args : "--code-coverage") and
not process.args :
("--user-data-dir=?:\\Users\\*\\AppData\\Local\\JetBrains\\WebStorm*\\chrome-user-data-*",
"--user-data-dir=?:\\Users\\*\\AppData\\Local\\Temp\\1\\flutter_tools.*\\flutter_tools_chrome_device.*") and
not process.parent.args : "?:\\Program Files\\nodejs\\node.exe" and
not (process.parent.code_signature.subject_name == "Google LLC" and process.parent.code_signature.trusted == true)
'''
min_endpoint_version = "8.14.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1539"
name = "Steal Web Session Cookie"
reference = "https://attack.mitre.org/techniques/T1539/"
[threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[internal]
min_endpoint_version = "8.14.0"
Stages and Predicates
Stage 1: process
process where event.type == "start" and
process.name : ("chrome.exe", "msedge.exe") and not user.id : "S-1-5-18" and
process.code_signature.trusted == true and
process.parent.executable != null and
process.args : ("--remote-debugging-port=*",
"--remote-debugging-targets=*",
"--remote-debugging-pipe=*") and
process.args : "--user-data-dir=*" and not process.args:"--remote-debugging-port=0" and
not (process.parent.name == "chrome.exe" and process.parent.args == "--remote-debugging-host=127.0.0.1") and
not process.parent.executable : ("?:\\Program Files\\Microsoft VS Code\\Code.exe",
"?:\\Program Files (x86)\\PRTG Network Monitor\\Sensor System\\reporter.exe",
"?:\\Program Files\\nodejs\\node.exe",
"?:\\Windows\\System32\\inetsrv\\w3wp.exe",
"?:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
"?:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
"?:\\Program Files (x86)\\Brackets\\Brackets.exe",
"?:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe",
"?:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe",
"?:\\Program Files\\OutSystems\\Development Environment*\\Service Studio\\ServiceStudio.exe",
"?:\\Program Files (x86)\\CyberArk\\PSM\\Components\\chromedriver.exe",
"?:\\Program Files\\Microsoft Visual Studio\\*\\node.exe",
"?:\\Program Files (x86)\\Microsoft Visual Studio\\*\\node.exe",
"?:\\Program Files (x86)\\Price Pro\\PricePro.exe",
"?:\\Users\\*\\Versioning_SPCRepository\\SPCProcessor\\SPCEngine\\app.exe",
"E:\\PRTG\\Sensor System\\reporter.exe" ,
"E:\\eclipse\\chromedriver.exe",
"c:\\ibi\\AppStudio82\\bin\\chromedriver.exe",
"C:\\Windows\\chromedriver.exe",
"?:\\Program Files\\Google\\Chrome Dev\\Application\\chrome.exe",
"?:\\ibi\\AppStudio90\\bin\\chromedriver.exe",
"?:\\Users\\*\\AppData\\Roaming\\nvm\\v*\\node.exe",
"?:\\*\\bin\\cache\\dart-sdk\\bin\\dart.exe",
"C:\\Users\\*\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",
"C:\\Program Files\\Python3??\\python.exe") and
not (process.parent.executable : "?:\\Windows\\explorer.exe" and process.command_line : "*VisualStudio*") and
not (process.parent.name : "chromedriver.exe" and process.parent.command_line : "*chromedriver.exe --port=*") and
not (process.parent.executable : "?:\\Users\\*\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe" and
process.parent.command_line : "*--ms-enable-electron-run-as-node*") and
not (process.parent.name : "node.exe" and process.parent.args : "--code-coverage") and
not process.args :
("--user-data-dir=?:\\Users\\*\\AppData\\Local\\JetBrains\\WebStorm*\\chrome-user-data-*",
"--user-data-dir=?:\\Users\\*\\AppData\\Local\\Temp\\1\\flutter_tools.*\\flutter_tools_chrome_device.*") and
not process.parent.args : "?:\\Program Files\\nodejs\\node.exe" and
not (process.parent.code_signature.subject_name == "Google LLC" and process.parent.code_signature.trusted == true)
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.command_line | match | VisualStudio | excludes:process.command_line field:"process.command_line" value:"VisualStudio" |
process.parent.executable | eq | ?:\Windows\explorer.exe | excludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\explorer.exe" |
process.parent.args | eq | --code-coverage | excludes:process.parent.args field:"process.parent.args" value:"--code-coverage" |
process.parent.name | eq | node.exe | excludes:process.parent.name field:"process.parent.name" value:"node.exe" |
process.parent.args | eq | --remote-debugging-host=127.0.0.1 | excludes:process.parent.args field:"process.parent.args" value:"--remote-debugging-host=127.0.0.1" |
process.parent.name | eq | chrome.exe | excludes:process.parent.name field:"process.parent.name" value:"chrome.exe" |
process.parent.code_signature.subject_name | eq | Google LLC | excludes:process.parent.code_signature.subject_name field:"process.parent.code_signature.subject_name" value:"Google LLC" |
process.parent.code_signature.trusted | eq | true | excludes:process.parent.code_signature.trusted field:"process.parent.code_signature.trusted" value:"true" |
process.parent.command_line | match | --ms-enable-electron-run-as-node | excludes:process.parent.command_line field:"process.parent.command_line" value:"--ms-enable-electron-run-as-node" |
process.parent.executable | wildcard | ?:\Users\*\AppData\Local\Programs\Microsoft VS Code\Code.exe | excludes:process.parent.executable field:"process.parent.executable" value:"?:\Users\*\AppData\Local\Programs\Microsoft VS Code\Code.exe" |
process.parent.command_line | match | chromedriver.exe --port= | excludes:process.parent.command_line field:"process.parent.command_line" value:"chromedriver.exe --port=" |
process.parent.name | eq | chromedriver.exe | excludes:process.parent.name field:"process.parent.name" value:"chromedriver.exe" |
process.args | eq | --remote-debugging-port=0 | excludes:process.args field:"process.args" value:"--remote-debugging-port=0" |
process.args | wildcard | --user-data-dir=?:\Users\*\AppData\Local\JetBrains\WebStorm*\chrome-user-data-*, --user-data-dir=?:\Users\*\AppData\Local\Temp\1\flutter_tools.*\flutter_tools_chrome_device.* | excludes:process.args field:"process.args" value:"--user-data-dir=?:\Users\*\AppData\Local\JetBrains\WebStorm*\chrome-user-data-*" field:"process.args" value:"--user-data-dir=?:\Users\*\AppData\Local\Temp\1\flutter_tools.*\flutter_tools_chrome_device.*" |
process.parent.args | eq | ?:\Program Files\nodejs\node.exe | excludes:process.parent.args field:"process.parent.args" value:"?:\Program Files\nodejs\node.exe" |
process.parent.executable | wildcard | ?:\Program Files\Microsoft VS Code\Code.exe, ?:\Program Files (x86)\PRTG Network Monitor\Sensor System\reporter.exe, ?:\Program Files\nodejs\node.exe, ?:\Windows\System32\inetsrv\w3wp.exe, ?:\Program Files\Google\Chrome\Application\chrome.exe, ?:\Program Files (x86)\Google\Chrome\Application\chrome.exe, ?:\Program Files (x86)\Brackets\Brackets.exe, ?:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe, ?:\Program Files\Microsoft\Edge\Application\msedge.exe, ?:\Program Files\OutSystems\Development Environment*\Service Studio\ServiceStudio.exe, ?:\Program Files (x86)\CyberArk\PSM\Components\chromedriver.exe, ?:\Program Files\Microsoft Visual Studio\*\node.exe, ?:\Program Files (x86)\Microsoft Visual Studio\*\node.exe, ?:\Program Files (x86)\Price Pro\PricePro.exe, ?:\Users\*\Versioning_SPCRepository\SPCProcessor\SPCEngine\app.exe, E:\PRTG\Sensor System\reporter.exe, E:\eclipse\chromedriver.exe, c:\ibi\AppStudio82\bin\chromedriver.exe, C:\Windows\chromedriver.exe, ?:\Program Files\Google\Chrome Dev\Application\chrome.exe, ?:\ibi\AppStudio90\bin\chromedriver.exe, ?:\Users\*\AppData\Roaming\nvm\v*\node.exe, ?:\*\bin\cache\dart-sdk\bin\dart.exe, C:\Users\*\AppData\Local\Programs\Microsoft VS Code\Code.exe, C:\Program Files\Python3??\python.exe | excludes:process.parent.executable |
user.id | eq | S-1-5-18 | excludes:user.id field:"user.id" value:"S-1-5-18" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | wildcard |
| field:"process.args" kind:wildcard |
process.code_signature.trusted | eq |
| field:"process.code_signature.trusted" kind:eq value:"true" |
process.name | wildcard |
| field:"process_name" kind:wildcard |
process.parent.executable | is_not_null | field:"ParentImage" kind:is_not_null |