hplaksh687/forensiguard

GitHub: hplaksh687/forensiguard

ForensiGuard 是一款AI驱动的多媒体取证分析系统,用于检测CCTV录像和音频证据的篡改、深度伪造及元数据操纵,并自动生成专业取证报告。

Stars: 0 | Forks: 0

# 🛡️ ForensiGuard ### 语音与 CCTV 取证认证系统 ![Python](https://img.shields.io/badge/Python-3.10+-blue?style=flat-square) ![Streamlit](https://img.shields.io/badge/Streamlit-1.x-red?style=flat-square) ![License](https://img.shields.io/badge/License-MIT-green?style=flat-square) ## 🔍 什么是 ForensiGuard? 刑事调查越来越依赖 CCTV 录像和语音录音作为证据 —— 但这些文件可能被篡改、深度伪造(Deepfake)或编辑过。ForensiGuard 是一款自动化取证分析工具,利用多种检测技术验证多媒体证据的真实性,并生成专业的取证报告。 ## ✨ 功能特性 | 功能 | 描述 | |---|---| | 🎵 **音频拼接检测** | 检测指示剪切和拼接编辑的频谱不连续性 | | 🗑️ **音频删除检测** | 识别因内容删除而产生的可疑静音区域 | | 🎤 **合成语音检测** | 利用音高和频谱分析检测 AI 克隆或 TTS 生成的语音 | | 🖼️ **Deepfake 检测** | 基于在 FaceForensics++ 上微调的模型进行 ML 人脸分析 | | 📊 **ELA 分析** | 误差等级分析检测以不同压缩级别保存的帧 | | 🔄 **帧复制检测** | 检测指示视频操纵的循环或冻结帧 | | 🗂️ **元数据取证** | 通过 ffprobe 检测 FPS 伪造、编解码器异常和编辑工具痕迹 | | 🗜️ **重压缩分析** | 利用帧间方差模式识别重新编码的视频 | | 🔐 **SHA-256 完整性哈希** | 证据文件的防篡改加密指纹 | | 📋 **证据保管链日志** | 仅追加的审计跟踪,记录所有分析及其时间戳和案件 ID | | 📄 **AI 取证报告** | LLM 生成的专业 forensic 调查报告(PDF 导出) | | 📈 **真实性评分** | 加权的 0–100 分,附带各模块扣分明细 | ## 🚀 设置与安装 ### 前置条件 - Python 3.10+ - ffprobe(通过 `brew install ffmpeg` 或 `apt install ffmpeg` 安装) - Ollama(可选 — 用于 AI 报告生成):https://ollama.ai ### 安装依赖 ``` git clone https://github.com/hplaksh687/Forensiguard.git cd Forensiguard pip install -r requirements.txt ``` ### 运行应用 ``` streamlit run app.py ``` 在浏览器中打开 `http://localhost:8501` ## 📁 项目结构 ``` Forensiguard/ ├── app.py # Main Streamlit application ├── requirements.txt ├── backend/ │ ├── audio_analysis.py # Audio splicing, insertion, deletion, synthetic voice │ ├── deepfake_detection.py # ML deepfake face detection │ ├── ela_analysis.py # Error Level Analysis on video frames │ ├── frame_analysis.py # Frame duplication detection │ ├── fingerprint.py # Video metadata fingerprinting │ ├── metadata_analysis.py # ffprobe metadata forensics │ ├── recompression_analysis.py # Recompression detection │ ├── hash_analysis.py # SHA-256 evidence hash │ ├── file_screening.py # MIME type & multi-extension detection │ ├── auth_score.py # Authenticity scoring engine │ ├── custody_log.py # Chain of custody logger │ └── forensic_llm.py # AI report generation + PDF export ``` ## 🧠 工作原理 1. **上传** 一个视频(MP4, AVI, MOV)或音频文件(WAV, MP3, M4A) 2. **ForensiGuard 运行** 8 个以上的取证分析模块(并行) 3. **结果聚合** 为加权的真实性评分(0–100) 4. **发布裁定** — AUTHENTIC(真实) / INCONCLUSIVE(不确定) / TAMPERED(被篡改) 5. **导出** PDF 取证报告和证据保管链日志 ## 📊 评分系统 | 评分 | 裁定 | 含义 | |---|---|---| | 80–100 | ✅ AUTHENTIC | 无显著异常 | | 50–79 | ⚠️ INCONCLUSIVE | 检测到异常,建议人工复核 | | 0–49 | ❌ TAMPERED | 存在强烈的操纵迹象 | ## 🛠️ 技术栈 - **前端**: Streamlit + 自定义 CSS(暗色取证主题) - **音频分析**: librosa, numpy - **视频分析**: OpenCV, PIL - **Deepfake 检测**: HuggingFace Transformers (`dima806/deepfake_vs_real_image_detection`) - **元数据提取**: ffprobe (subprocess) - **报告生成**: Ollama (llama3) 配合 ReportLab PDF - **可视化**: Plotly(波形图、频谱图、评分图表) ## 在线演示 在此试用已部署的应用程序: https://forensiguard.streamlit.app ## 👥 团队 为 **CyberThon 26** 构建 — 网络安全 Hackathon 问题陈述 14:语音与 CCTV 取证认证系统 团队名称 - Three Musketeers 团队成员 - Laksh H P, Rehan Riyaz 和 Shanaya Ray
标签:AI安全, AI风险缓解, Apex, CCTV监控, Chat Copilot, Deepfake, DNS 解析, ELA, FPS欺骗检测, Kubernetes, Python, SHA-256, Streamlit, 人工智能, 元数据分析, 刑事侦查技术, 反诈骗, 司法鉴定, 合成语音检测, 图像取证, 多媒体取证, 多媒体安全, 完整性校验, 帧复制检测, 数字取证, 数字水印, 无后门, 机器学习, 深度伪造检测, 用户模式Hook绕过, 监管链, 编解码器分析, 网络安全, 自动化脚本, 自动报告生成, 视频篡改检测, 视频编辑痕迹, 访问控制, 证据保全, 语音合成检测, 逆向工具, 错误等级分析, 隐私保护, 音频剪辑检测, 音频取证