渗透常用指令
渗透常用指令
内网扫描主机
nmap -sn 10.10.10.0/24
扫描主机端口
扫描所有端口
nmap --min-rate <number:10000> -p- <host>
-p-: 所有端口
扫描 TCP 端口,服务版本,系统版本
nmap -sT -sV -O -p<port ranges> <host>
-sT: TCP 端口 -sV: 服务版本 -O: 操作系统信息
扫描 UDP 端口
nmap -sU [--min-rate 10000] -p- <host>
-sU: UDP 端口
nmap 脚本扫描
namp --script=vuln -p<port range> <host>
漏洞搜索相关
搜索漏洞:
searchsploit <name>
下载破解文件:
searchsploit <name> -m <id>

反弹 shell
上传文件、corntab 定时任务……
提权相关
whoami, uname -a, ip a, sudo -l
SQLMap 相关
crackmap(SSH 密码喷射)
crackmapexec ssh <host> -p <password file> -u <user file> --continue-on-success
杂项
优化 shell
python -c 'import pty; pty.spawn("/bin/bash")'
hash-identifier
/etc/shadow hash 破解
john <hash file> --wordlist=<dict file: rockyou.txt>
文件组合
unshadow <passwd file> <shadow file> > unshadow
SSH 登录问题

伪随机数发生器 (pseudorandom number generator, PRNG)
searchsploit prng
LOLBAS
Living Off The Land Binaries, Scripts and Libraries