跳到正文
cccskills
免费在 GitHub 公开

deepfake-detection-and-analysis

Analyze and detect synthetic media, including deepfake videos, AI-generated images, and cloned voice audio. Use this skill when investigating potential disinformation campaigns, verifying the authenticity of digital evidence, or assessing social engineering attacks leveraging synthetic media (e.g., vishing with voice clones, spear-phishing with deepfake video calls). Covers artifact analysis, frequency detection, metadata tracing, and automated detection tools.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(3)

  • SKILL.md8.2 KB
  • evals/evals.json548 B
  • scripts/process.py7.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Deepfake Detection & Analysis

When to Use

  • When verifying the authenticity of sensitive media (executives, political figures)
  • During incident response for CEO impersonation / BEC scams using voice cloning
  • When investigating disinformation or influence operations
  • When training corporate teams on deepfake recognition
  • When building defensive pipelines for media upload portals

Prerequisites

  • Access to target AI/ML system or local model deployment for testing
  • Python 3.9+ with relevant ML libraries (transformers, torch, openai)
  • Understanding of LLM architecture and prompt processing pipelines
  • Authorized scope and rules of engagement for AI red team testing

Workflow

Phase 1: Visual Artifact Inspection (Manual)

# Extract frames from video for detailed analysis
ffmpeg -i suspicious_video.mp4 -vf fps=1/1 out%04d.png

# Look for these common visual artifacts:
# 1. Blinking anomalies (too much, too little, unnatural eyelids)
# 2. Lighting/Shadow inconsistencies (face lighting differs from background)
# 3. Blurring or edge artifacts around the face perimeter (the "mask" line)
# 4. Unnatural teeth rendering (AI struggles with individual teeth)
# 5. Mismatched skin tones or unnatural smoothness
# 6. Glitches during rapid movement or hand occlusion (hands passing in front of face)
# 7. Asymmetrical reflections in the eyes

Phase 2: Metadata & Provenance Analysis

# Check EXIF and metadata for manipulation traces
exiftool suspicious_media.jpg
exiftool suspicious_video.mp4

# Look for:
# - Missing standard camera metadata (Make, Model)
# - Software signatures (e.g., Photoshop, AfterEffects, Stable Diffusion)
# - Mismatched timestamps (creation vs. modification)
# - Missing or altered GPS data

# Check for C2PA (Coalition for Content Provenance and Authenticity) manifests
# Many legitimate AI tools now embed watermarks or provenance data

# Search for the source media (Reverse Image Search)
# Provide the isolated face or background to Yandex/Google images
# to find the original unaltered source material

Phase 3: Automated Image/Video Detection

# Use Python and OpenCV/Dlib/PyTorch for automated detection

import cv2
import dlib
import numpy as np
# from deepfake_models import load_detector (example API)

def extract_face_landmarks(image_path):
    """Analyze facial landmarks for unnatural positioning or jitter over time."""
    detector = dlib.get_frontal_face_detector()
    predictor = dlib.shape_predictor('shape_predictor_68_face_landmarks.dat')
    
    img = cv2.imread(image_path)
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    faces = detector(gray)
    
    for face in faces:
        landmarks = predictor(gray, face)
        # Analyze symmetry and proportions
        # Deepfakes often disrupt natural biometric ratios

# Frequency domain analysis
# Deepfakes often lack high-frequency details present in real images
def frequency_analysis(image_path):
    img = cv2.imread(image_path, 0)
    f = np.fft.fft2(img)
    fshift = np.fft.fftshift(f)
    magnitude_spectrum = 20*np.log(np.abs(fshift))
    # Analyze magnitude spectrum for distinct GAN/diffusion artifacts

Phase 4: Voice Clone (Audio) Analysis

# Audio analysis is critical for modern vishing attacks

import librosa
import numpy as np

def analyze_audio_artifacts(audio_path):
    # Load audio
    y, sr = librosa.load(audio_path)
    
    # 1. Check for unnatural breathing patterns
    # AI voices often lack breaths, or place them unnaturally
    
    # 2. Spectrogram analysis
    # Look for frequency cutoffs (synthetic voices often drop frequencies above 10kHz)
    S = librosa.feature.melspectrogram(y=y, sr=sr)
    
    # 3. Analyze pacing and emotion
    # Does the emotion match the semantic content?
    
    # 4. Check for robotic metallic ringing (vocoder artifacts)
    # Common in older or fast-generated voice clones

# Use commercial/open-source detection APIs
# e.g., Resemble AI Detect, AI Voice Detector

Phase 5: Assessing the Delivery Mechanism

# Deepfakes are rarely delivered in a vacuum. Analyze the attack vector:
# 1. Did it come via an urgent WhatsApp/Signal message?
# 2. Is the caller ID spoofed? (Check telecom routing logs if available)
# 3. Did the deepfake video call happen over Zoom/Teams with a "broken camera" excuse?
# 4. Analyze email headers if sent via email

🔵 Blue Team Detection & Defense

  • Liveness Checks: Require users to turn their head side-to-side or pass hands over their face during live video verification (breaks facial tracking).
  • Challenge-Response: During suspected voice clones, ask a question only the real person would know (that isn't public on social media).
  • Watermarking: Implement invisible watermarking for internal corporate media to establish baseline provenance.
  • Verification Protocols: Implement strict callbacks for any financial requests, regardless of who appears to be calling.

Key Concepts

ConceptDescription
DeepfakeSynthetic media where a person in existing image/video is replaced by someone else
Voice CloningSynthesizing a person's voice from a short audio sample
C2PAOpen technical standard providing publishers/creators a way to opt-in to tracing origin
Spectral AnalysisAnalyzing the frequencies of an image/audio to find synthetic generation artifacts
VishingVoice phishing, increasingly augmented with real-time AI voice changers

Output Format

Synthetic Media Analysis Report
===============================
Subject: Urgent Wire Transfer Voicemail (CEO Impersonation)
Date of Analysis: 2024-X-X
Conclusion: HIGH PROBABILITY SYNTHETIC AUDIO (Voice Clone)

Artifacts Detected:
1. Spectrogram Analysis: Hard frequency cutoff at 11kHz, typical of ElevenLabs generation.
2. Acoustic Anomalies: Complete absence of inhalation/breathing sounds over a 45-second clip.
3. Metadata: Audio file stripped of all recording device metadata, encoded via standard FFmpeg without hardware signatures.
4. Delivery Vector: Received via VoIP number matching known spoofing patterns, not the CEO's registered mobile device.

Recommendation: DO NOT process the wire transfer. Initiate internal incident response for targeted social engineering.

🛡️ Remediation & Mitigation Strategy

  • Input Validation: Sanitize and strictly type-check all inputs.
  • Least Privilege: Constrain component execution bounds.

📚 Shared Resources

For cross-cutting methodology applicable to all vulnerability classes, see:

References

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Exploit pervasive logical flaws in Multi-Factor Authentication (MFA/2FA) implementations to bypass the secondary authentication challenge entirely. Techniques include response manipulation, referal spoofing, token reuse, and predictable backup codes.

中文简介正在准备中。当前显示原文说明。

ShulkwiSEC/bb-huge232026年7月11日 更新

401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP method tampering, header injection, protocol downgrade, and automated bypass tools.

中文简介正在准备中。当前显示原文说明。

ShulkwiSEC/bb-huge232026年7月11日 更新

Complete PortSwigger deep-dive with exact payloads for every lab variant including zero-day techniques

中文简介正在准备中。当前显示原文说明。

ShulkwiSEC/bb-huge232026年7月11日 更新

Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS reading, GPO abuse, and BloodHound-guided attack paths.

中文简介正在准备中。当前显示原文说明。

ShulkwiSEC/bb-huge232026年7月11日 更新

Execute AS-REP Roasting to extract and crack the NTLM hashes of Active Directory user accounts that have the "Do not require Kerberos preauthentication" flag explicitly enabled. This attack generates a recoverable Ticket Granting Ticket (TGT) without requiring the attacker to authenticate first.

中文简介正在准备中。当前显示原文说明。

ShulkwiSEC/bb-huge232026年7月11日 更新

AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to enrollment, CA officer abuse, and certificate-based persistence.

中文简介正在准备中。当前显示原文说明。

ShulkwiSEC/bb-huge232026年7月11日 更新

查看 ShulkwiSEC 的全部技能

报告此技能的问题