训练 Debian 系统的 exploit(漏洞利用)防御能力,通常分为 系统加固、检测能力训练、攻防演练(红蓝对抗) 几个层面。下面我按“从基础到进阶”给你一套可落地的路线。
apt update && apt upgrade -y
apt install unattended-upgrades
dpkg-reconfigure unattended-upgrades
systemctl disable <service>
Debian 默认已启用很多,但建议确认:
cat /proc/sys/kernel/randomize_va_space # 应为 2
export CFLAGS="-fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2"
示例:
[Service]
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
RestrictSUIDSGID=true
apt install auditd
auditctl -w /etc/passwd -p wa -k passwd_change
apt install aide
aideinit
apt install fail2ban
推荐:
git clone https://github.com/offensive-security/exploitdb
练习:
⚠️ 所有 exploit 训练 只能在你拥有完全控制权的机器或授权环境中进行
非法测试他人系统属于犯罪行为
如果你愿意,我可以:
你想从哪一步开始?