erkinkasim/owasp-xss-detection-lab
GitHub: erkinkasim/owasp-xss-detection-lab
一个通过分析Apache访问日志检测XSS攻击的Python安全实验项目,用于演示基于日志的Web攻击检测原理。
Stars: 0 | Forks: 0
# OWASP XSS 检测实验室
本项目是一个基于 Python 的安全实验室,通过分析 Apache access logs 来检测在 DVWA (Damn Vulnerable Web Application) 环境中发生的 **XSS (Cross Site Scripting) 攻击**。
其目的是展示如何通过**日志分析**来检测针对 Web 应用程序的攻击。
## 功能特性
- 实时分析 Apache access logs
- 检测 XSS payload 模式
- 生成 JSON 格式的攻击警报
- 保存到 alerts.json 文件
- 程序结束时提供攻击摘要
## 使用技术
- Python
- Docker
- DVWA
- Apache Log 分析
## 运行方式
您可以将 Apache logs 通过管道传递给 Python script 运行。
```
docker exec -i dvwa tail -f /var/log/apache2/access.log | python3 detector.py
---
## 测试 Payload
DVWA XSS (Reflected) modülünde şu payload kullanılabilir:
---
## Örnek Alert
```json
{
"timestamp": "2026-03-08T12:23:42",
"attack_type": "XSS",
"severity": "high"
}
---
Amaç
Bu proje aşağıdaki konuları göstermek amacıyla hazırlanmıştır:
Web saldırılarının log analizi ile tespiti
Basit bir detection engine geliştirmek
Python ile güvenlik monitoring scripti yazmak
```
标签:Apache日志监控, AppImage, BurpSuite集成, CISA项目, Docker安全实验室, DVWA, JSON告警, OWASP Top 10, PB级数据处理, PFX证书, Python安全工具, Web应用防火墙, WSL, XSS检测, 反射型XSS, 安全编码, 安全运维, 攻击检测, 网络安全, 请求拦截, 逆向工具, 隐私保护