HackTheBox-Linux-Postman

admin 2022年3月26日08:13:04评论53 views字数 1670阅读5分34秒阅读模式

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



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




HackTheBox-Linux-Postman

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

靶机难度:初级(4.0/10)

靶机发布日期:2020年3月12日

靶机描述:

Postman is an easy difficulty Linux machine, which features a Redis server running without authentication. This service can be leveraged to write an SSH public key to the user's folder. An encrypted SSH private key is found, which can be cracked to gain user access. The user is found to have a login for an older version of Webmin. This is exploited through command injection to gain root privileges.


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

HackTheBox-Linux-Postman




HackTheBox-Linux-Postman

一、信息收集


HackTheBox-Linux-Postman

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

HackTheBox-Linux-Postman

我这里利用Masscan快速的扫描出了22,80,6379,10000端口,在利用nmap详细的扫描了这些端口情况...

可看到6379端口Redis 4.0.9,端口10000托管在MiniServ 1.910上运行着Webmin...

HackTheBox-Linux-Postman

(echo -e "nn"; cat /root/.ssh/id_rsa.pub; echo -e "nn") > id_rsa-key.txtcat id_rsa-key.txt | redis-cli -h 10.10.10.160 -x set dayuget dayuconfig set dir /var/lib/redis/.sshconfig set dbfilename authorized_keys
https://github.com/psmiraglia/ctf/blob/master/kevgir/000-redis.md

google很多redis的文章...

这里利用redis将ssh-key密匙复制到靶机中...

HackTheBox-Linux-Postman

获得的redis用户权限...存在Matt用户,无法获得flag信息..

HackTheBox-Linux-Postman

通过枚举脚本,还存在id_rsa密匙...

HackTheBox-Linux-Postman

到本地爆破看看...

HackTheBox-Linux-Postman

john获得了密码...

HackTheBox-Linux-Postman

在redis用户下su获得了Matt用户信息...获得了user_flag信息...

HackTheBox-Linux-Postman

将Postman添加到hosts中...

HackTheBox-Linux-Postman

这是Webmin框架页面....

HackTheBox-Linux-Postman

利用matt用户名密码登录...看到了1.910版本...存在漏洞...有POC...我这里直接利用MSF提权了...

HackTheBox-Linux-Postman

MSF搜多webmin利用exploit/linux/http/webmin_packageup_rce即可...

HackTheBox-Linux-Postman

添加相关信息...记得SSL-true...

HackTheBox-Linux-Postman

这里很简单,利用MSF最简单提权了...


HackTheBox-Linux-Postman

获得了root_flag信息...

redis利用和Webmin内核漏洞提权...


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


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


HackTheBox-Linux-Postman


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

HackTheBox-Linux-Postman
HackTheBox-Linux-Postman


HackTheBox-Linux-Postman


随缘收徒中~~随缘收徒中~~随缘收徒中~~


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

HackTheBox-Linux-Postman

大余安全

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

HackTheBox-Linux-Postman

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

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年3月26日08:13:04
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   HackTheBox-Linux-Postmanhttps://cn-sec.com/archives/561872.html

发表评论

匿名网友 填写信息