getshell
1.ip扫描
nmap 192.168.1.0/24 -sn | grep -B 2 '08:00:27:BF:52:95'
![](https://img-blog.csdnimg.cn/img_convert/47fe72aea6db3749f29f00f1c74661c8.png)
![](https://img-blog.csdnimg.cn/img_convert/bbf41336b515eecaef943cd45b06de6d.png)
2.端口扫描,发现一个flag
nmap -A 192.168.1.31 -p-
FLAG:{TheyFoundMyBackDoorMorty}-10Points\n");
![](https://img-blog.csdnimg.cn/img_convert/c1bae744ba53bfb2abd9ed2c72164d42.png)
![](https://img-blog.csdnimg.cn/img_convert/7edf41f49f0a46be5dd16abfd1a91467.png)
3.目录扫描
dirsearch -u http://192.168.1.31
![](https://img-blog.csdnimg.cn/img_convert/effb1489f0c997afa19f839d6bc11478.png)
![](https://img-blog.csdnimg.cn/img_convert/91501baa8a2eaebc574ee65a785ec919.png)
4.发现页面没有可点击的地方,记得在扫描的时候发现有个9090端口,也是http,进行拼接查看,发现第二个flag
FLAG {There is no Zeus, in your face!}
![](https://img-blog.csdnimg.cn/img_convert/303a0006adcae2d6a2457fef8dab0570.png)
5.继续拼接刚才扫描出来的目录,拼接/passwords/,发现第三个flag
FLAG{Yeah d- just don't do it.}
![](https://img-blog.csdnimg.cn/img_convert/c07d94db2864ae92b42254e4cb2b4cdc.png)
![](https://img-blog.csdnimg.cn/img_convert/47c891278790774b28e34a45e67ada2b.png)
6.点击password.html,发现好像隐藏了什么东西,我们查看一下源码,果然发现了一个密码winter,先留着
![](https://img-blog.csdnimg.cn/img_convert/fcb6e9b7b598f64c35e11dde4900e8d9.png)
![](https://img-blog.csdnimg.cn/img_convert/9194b42ab71cc169a96ff4b2bc117ade.png)
![](https://img-blog.csdnimg.cn/img_convert/ab955fb8be4b443caba76f14e264288c.png)
7.拼接/robots.txt发现三个目录,依次拼接访问
![](https://img-blog.csdnimg.cn/img_convert/8b6407a1e2b786189f867c536fa49fe9.png)
8.拼接到/cgi-bin/tracertool.cgi,发现了一个命令执行框
![](https://img-blog.csdnimg.cn/img_convert/ed086156cb6feb6cb082ae4ce19cd951.png)
9.输入127.0.0.1;ls / 发现确实存在命令执行漏洞
![](https://img-blog.csdnimg.cn/img_convert/6be911021dc9bcbcdde226f49f4ba1ca.png)
10.尝试查看/etc/passwd账户文件,使用cat /etc/passwd,发现不太行,换成more /etc/passwd就可以了
127.0.0.1;more /etc/passwd
![](https://img-blog.csdnimg.cn/img_convert/328681dc5c3746763bc5bcc8a92f0315.png)
![](https://img-blog.csdnimg.cn/img_convert/9a190532c52052686617a154ec77929e.png)
11.发现三个用户RickSanchez、Morty、Summer
![](https://img-blog.csdnimg.cn/img_convert/d4cca0500878bd6dfb449fa25a42ae2c.png)
12.根据刚才收集到的密码尝试ssh连接,发现22端口关闭了,无法连接
ssh RickSanchez@192.168.1.31
![](https://img-blog.csdnimg.cn/img_convert/a06f0c6bf02c2cd42e7a576d5667a337.png)
13.回去看看刚才扫描的端口,发现22222才是真正的ssh端口
![](https://img-blog.csdnimg.cn/img_convert/35de8bba2aa6187f0da26722962b0c42.png)
14.接着ssh连接,经过尝试,发现Summer可以登录上,成功getshell
ssh Summer@192.168.1.31 -p 22222
winter
![](https://img-blog.csdnimg.cn/img_convert/49458170ef9f50a4c716983da401baad.png)
提权:
1.sudo -l 发现没权限
![](https://img-blog.csdnimg.cn/img_convert/b099de1cdb7128ba456b421efef226b9.png)
2.发现第四个flag
ls
more FLAG.txt
FLAG{Get off the high road Summer!}
![](https://img-blog.csdnimg.cn/img_convert/477f9355162e2726300237c48cd7ac5d.png)
4.尝试提权都失败,尝试查看是否有其他用户的文件,到home下发现三个用户的信息,先查看Morty的,发现里面有文件,但是下载不了,开启远程服务,在本机进行下载
cd /home
cd Morty
ls
python -m SimpleHTTPServer
![](https://img-blog.csdnimg.cn/img_convert/2b544abad63137b2cc190f025af72a97.png)
![](https://img-blog.csdnimg.cn/img_convert/8dfc3ee31e10ed7729a1adfab1209266.png)
4.浏览器直接访问
![](https://img-blog.csdnimg.cn/img_convert/87d178797b4adaae7f4388cd3c1807f5.png)
5.访问journal.txt.zip时,发现下载下一个压缩包,尝试解压时,发现需要密码,试了试winter但是不对
![](https://img-blog.csdnimg.cn/img_convert/cafa21f4700dd04472dc16bf27e0f8d0.png)
6.访问Safe_Password.jpg,发现一张图片,但是图片名字有password,尝试使用010 Editor查看,发现了密码Meeseek
![](https://img-blog.csdnimg.cn/img_convert/cb4aaff0424a60152109794fcfd1a3db.png)
![](https://img-blog.csdnimg.cn/img_convert/a65e3f166074bba0519e0a43b5db56f1.png)
7.用密码解压刚才的zip包,解压成功了,发现了第五个flag
FLAG: {131333}
![](https://img-blog.csdnimg.cn/img_convert/0ce6b70838ac45d4424d3aeedc6edcc6.png)
8.在nmap扫描的时候发现ftp服务开启,尝试进行匿名登录,账户为anonymous,密码为空,直接回车
![](https://img-blog.csdnimg.cn/img_convert/d2072ae1163cc0c0ae01ab5c393e7492.png)
9.查看文件,发现第六个flag
more FLAG.txt
![](https://img-blog.csdnimg.cn/img_convert/7f82429371301b6d833e28d8e307c423.png)
10.现在只剩下60000端口了,扫描的时候发现写着reverse shell,说明存在反弹shell
![](https://img-blog.csdnimg.cn/img_convert/4b321eead4023750b61eedef0c82348a.png)
11.提权成功,发现第七个flag
nc 192.168.1.31 60000
FLAG{Flip the pickle Morty!}
![](https://img-blog.csdnimg.cn/img_convert/4967f2c0a2f5e99a8a5fd505ada456d3.png)