HackTheBox-Linux-Valentine

admin 2021年12月22日02:03:58评论100 views字数 1447阅读4分49秒阅读模式

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



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


HackTheBox-Linux-Valentine
HackTheBox-Linux-Valentine

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

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

靶机发布日期:2018年7月28日

靶机描述:

Valentine is a very unique medium difficulty machine which focuses on the Heartbleed vulnerability, which had devastating impact on systems across the globe.


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



一、信息收集

HackTheBox-Linux-Valentine


HackTheBox-Linux-Valentine

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

HackTheBox-Linux-Valentine

Nmap发现了靶机同时运行着HTTP和HTTPS的OpenSSH和Apache....还有ssh...

HackTheBox-Linux-Valentine

该图提示了heartbleed vulnerability.....

HackTheBox-Linux-Valentine

再次使用kali自带的heartbleed枚举脚本运行nmap,确认服务器确实容易受到heartbleed的攻击....cve-2014-0160

HackTheBox-Linux-Valentine

[cve-2014-0160](https://github.com/sensepost/heartbleed-poc)

直接利用POC...

HackTheBox-Linux-Valentine

获取到了base64值密码信息...按照ssh,应该ssh+rsa+密码登录....还缺乏rsa....

HackTheBox-Linux-Valentine

利用Dirbuster爆破发现了dev和encode两个有用的目录信息...

HackTheBox-Linux-Valentine

在dev目录下发现了两个文件....key应该就是我想要找的rsa吧....

HackTheBox-Linux-Valentine

该文件是一堆十六进制字节....

HackTheBox-Linux-Valentine

这里也阐述了decode是编译器....

HackTheBox-Linux-Valentine

cat hype_key | xxd -r -p

直接利用xxd做一个十六进制转储....获得了rsa登录密匙凭证....

HackTheBox-Linux-Valentine

通过ssh成功登录获得了user_flag信息....


方法1:

HackTheBox-Linux-Valentine
HackTheBox-Linux-Valentine


直接运行ps aux发现正在以root用户身份运行着tmux会话...

HackTheBox-Linux-Valentine

直接利用该tmux跳转到该会话即可获得root权限...

HackTheBox-Linux-Valentine

HackTheBox-Linux-Valentine

通过tmux直接跳转到了root会话中获得了root权限,并获得了root_flag信息....



方法2:

HackTheBox-Linux-Valentine
HackTheBox-Linux-Valentine


利用内核漏洞提权

HackTheBox-Linux-Valentine

查看版本版本,发现容易受到脏牛攻击...这方法试过很多次了...开始

HackTheBox-Linux-Valentine

这是容易受到脏牛的内核版本...

HackTheBox-Linux-Valentine

直接利用脏牛提权即可....成功获得root_flag.....


HackTheBox-Linux-Valentine
HackTheBox-Linux-Valentine

这里我不多说了,希望大家能跟着我的节奏学习,如果突然看到这篇文章的,可以自行google搜索脏牛提权的方式方法,很简单....

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


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


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

HackTheBox-Linux-Valentine
HackTheBox-Linux-Valentine


HackTheBox-Linux-Valentine


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


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

HackTheBox-Linux-Valentine

大余安全

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

HackTheBox-Linux-Valentine

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

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

发表评论

匿名网友 填写信息