← 返回 Day 158 正文

Day 158 · 练习与清单

Day 158 — 练习与验收(实战版)

全部练习在授权环境(自己的服务器/靶场/离线副本)进行。 只用占位载荷,不制作可部署的后门,不做规避检测的对抗研究。

已验证的教学程序

读者练习(需自行完成,不能把生成教材当作学会)

验收命令

在仓库根目录执行:

bash
python3 days/day-158-webshell-检测/code/static_scan.py        --self-test
python3 days/day-158-webshell-检测/code/01-static-scanner.py  --self-test
python3 days/day-158-webshell-检测/code/02-behavior-hunter.py --self-test
python3 days/day-158-webshell-检测/code/03-webshell-scanner.py --self-test
python3 days/day-158-webshell-检测/code/03-webshell-scanner.py --rules

全部应输出 SELF-TEST OK(--rules 输出 20 条规则表)。

思考题:被悄悄跳过(too_large / not_utf8 / symlink)的文件,比一个误报更危险吗? truncated 或 walk_errors 非空时,扫描结果还能当作"无告警"吗? 本扫描器未在真实生产样本集评测,不能替代生产检测产品。