- title: Possible Impacket SecretDump remote activity
id: 252902e3-5830-4cf6-bf21-c22083dfd5cf
description: Detect AD credential dumping using impacket secretdump HKTL
author: Samir Bousseaden
references:
- https://blog.menasec.net/2019/02/threat-huting-10-impacketsecretdump.html
tags:
- attack.credential_access
- attack.t1003
logsource:
product: windows
service: security
description: The advanced audit policy setting "Object Access > Audit Detailed
File Share" must be configured for Success/Failure
category: null
detection:
selection:
EventID: 5145
ShareName: \\*\ADMIN$
RelativeTargetName: SYSTEM32\\*.tmp
condition: selection
falsepositives:
- pentesting
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-endpoint-winevent-security-*', doc_type='doc')
In [ ]:
s = searchContext.query('query_string', query='(event_id:"5145" AND share_name.keyword:\\*\\ADMIN$ AND share_relative_target_name.keyword:SYSTEM32\\*.tmp)')
response = s.execute()
if response.success():
df = pd.DataFrame((d.to_dict() for d in s.scan()))
In [ ]:
df.head()