2017-10-11 10:35:17 -07:00
|
|
|
|
## System Owner/User Discovery
|
|
|
|
|
|
|
2018-01-09 14:53:47 -07:00
|
|
|
|
MITRE ATT&CK Technique: [T1033](https://attack.mitre.org/wiki/Technique/T1033)
|
2017-10-11 10:35:17 -07:00
|
|
|
|
|
|
|
|
|
|
### cmd.exe
|
|
|
|
|
|
|
|
|
|
|
|
"cmd.exe" /C whoami
|
|
|
|
|
|
|
|
|
|
|
|
### wmic.exe
|
|
|
|
|
|
|
|
|
|
|
|
wmic useraccount get /ALL
|
|
|
|
|
|
|
|
|
|
|
|
### quser
|
|
|
|
|
|
|
2017-10-12 10:35:44 -07:00
|
|
|
|
Remote:
|
|
|
|
|
|
|
2017-10-11 10:35:17 -07:00
|
|
|
|
quser /SERVER:"<computername>"
|
|
|
|
|
|
|
2017-10-12 10:35:44 -07:00
|
|
|
|
Local:
|
|
|
|
|
|
|
|
|
|
|
|
quser
|
|
|
|
|
|
|
2017-10-11 10:35:17 -07:00
|
|
|
|
### qwinsta
|
|
|
|
|
|
|
2017-10-12 10:35:44 -07:00
|
|
|
|
Remote:
|
|
|
|
|
|
|
2017-10-11 10:35:17 -07:00
|
|
|
|
qwinsta.exe" /server:<computername>
|
2017-10-12 10:35:44 -07:00
|
|
|
|
|
|
|
|
|
|
Local:
|
|
|
|
|
|
|
|
|
|
|
|
qwinsta.exe
|
2018-01-16 08:59:22 -07:00
|
|
|
|
|
|
|
|
|
|
Single Endpoint
|
|
|
|
|
|
|
|
|
|
|
|
for /F “tokens=1,2” %i in (‘qwinsta /server:<COMPUTERNAME> ^| findstr “Active Disc”‘) do @echo %i | find /v “#” | find /v “console” || echo %j > usernames.txt
|
|
|
|
|
|
|
|
|
|
|
|
Multiple Endpoints
|
|
|
|
|
|
|
|
|
|
|
|
@FOR /F %n in (computers.txt) DO @FOR /F “tokens=1,2” %i in (‘qwinsta /server:%n ^| findstr “Active Disc”’) do @echo %i | find /v “#” | find /v “console” || echo %j > usernames.txt
|