常规定位域内管理员方法
一是日志,
二是会话
日志指的的本地机器的管理员日志,可以使用脚本或wevtutil导出查看。
会话是域内每个机器的登陆会话,可以匿名查询,无需权限,
可以使用netsess.exe或powerview等工具查询。
定位管理员
1.定位管理员工具
psloggedon.exe
https://docs.microsoft.com/en-us/sysinternals/downloads/psloggedon
PVEFindADUser.exe
netview.exe
netsess.exe
Nmap的NSE脚本
PowerView脚本-Invoke-UserHunter
Empire 下user_hunter模块
参考 :https://www.cnblogs.com/lcxblogs/p/13992793.html
⒉查找域管理进程
A.本机检查
收集域控制器的列表
net group “Domain Controllers” /domain
获取域管理员列表
net group “domain admins” /domain
查看本机所有进程
tasklist /v
使用Netsess.exe查询每个域控制器,收集所有活动域会话的列表
Netsess.exe -h
交叉
B.查询域控制器的域用户会话
FOR /F %i in (dcs.txt) do @echo [+] Querying DC %i && @netsess -h %i 2>nul > sessions.txt && FOR /F %a in (admins.txt) DO @type sessions.txt | @findstr /I %a
c.扫描远程系统上运行的任务
FOR /F %i in (ips.txt) DO @echo [+] %i && @tasklist /V /S %i /U user /P password 2>NUL > output.txt && FOR /F %n in (names.txt) DO @type output.txt | findstr %n > NUL && echo [!] %n was found running a process on %i && pause #ips.txt 填入目标域系统的列表,在names.txt 填入收集来的域管理员的列表
D.扫描远程系统上NetBIOS信息
for /F %i in (ips.txt) do @echo [+] Checking %i && nbtstat -A %i2>NUL >nbsessions.txt && FOR /F %n in (admins.txt) DO @type nbsessions.txt | findstr /I %n > NUL && echo [!] %n was found logged into %ifor /F %i in (ips.txt) do @echo [+] Checking %i && nbtscan -f %i 2>NUL >nbsessions.txt && FOR /F %n in (admins.txt) DO @type nbsessions.txt | findstr /I %n > NUL && echo [!] %n was found logged into %i