- title: Suspicious Debugger Registration Cmdline
id: ae215552-081e-44c7-805f-be16f975c8a2
status: experimental
description: Detects the registration of a debugger for a program that is available
in the logon screen (sticky key backdoor).
references:
- https://blogs.technet.microsoft.com/jonathantrull/2016/10/03/detecting-sticky-key-backdoors/
tags:
- attack.persistence
- attack.privilege_escalation
- attack.t1015
author: Florian Roth
date: 2019/09/06
logsource:
category: process_creation
product: windows
service: null
detection:
selection:
CommandLine:
- '*\CurrentVersion\Image File Execution Options\sethc.exe*'
- '*\CurrentVersion\Image File Execution Options\utilman.exe*'
- '*\CurrentVersion\Image File Execution Options\osk.exe*'
- '*\CurrentVersion\Image File Execution Options\magnify.exe*'
- '*\CurrentVersion\Image File Execution Options\narrator.exe*'
- '*\CurrentVersion\Image File Execution Options\displayswitch.exe*'
- '*\CurrentVersion\Image File Execution Options\atbroker.exe*'
condition: selection
falsepositives:
- Penetration Tests
level: high
In [ ]:
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search
import pandas as pd
In [ ]:
es = Elasticsearch(['http://helk-elasticsearch:9200'])
searchContext = Search(using=es, index='logs-*', doc_type='doc')
In [ ]:
s = searchContext.query('query_string', query='process_command_line.keyword:(*\\CurrentVersion\\Image\ File\ Execution\ Options\\sethc.exe* OR *\\CurrentVersion\\Image\ File\ Execution\ Options\\utilman.exe* OR *\\CurrentVersion\\Image\ File\ Execution\ Options\\osk.exe* OR *\\CurrentVersion\\Image\ File\ Execution\ Options\\magnify.exe* OR *\\CurrentVersion\\Image\ File\ Execution\ Options\\narrator.exe* OR *\\CurrentVersion\\Image\ File\ Execution\ Options\\displayswitch.exe* OR *\\CurrentVersion\\Image\ File\ Execution\ Options\\atbroker.exe*)')
response = s.execute()
if response.success():
df = pd.DataFrame((d.to_dict() for d in s.scan()))
In [ ]:
df.head()