Hunting for Data Staging Before Exfiltration
Overview
Before exfiltrating data, adversaries typically stage collected files in a central location (MITRE ATT&CK T1074). This involves creating archives with tools like 7-Zip, RAR, or tar, consolidating files from multiple directories, and using temporary or hidden staging directories. This skill detects staging behavior by analyzing process creation logs for archiver activity, monitoring file system events in common staging paths, and identifying anomalous file consolidation patterns.
When to Use
- When investigating security incidents that require hunting for data staging before exfiltration
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- EDR or Sysmon telemetry with process creation and file system events
- Windows Event Logs (Event ID 4688) or Sysmon Event ID 1, 11
- Python 3.8+ with standard library
- Access to process creation logs in JSON/CSV format
Steps
- Detect Archive Tool Execution — Monitor for 7z.exe, rar.exe, tar, zip, and WinRAR process creation with compression arguments
- Identify Staging Directories — Flag file writes to common staging locations (Recycle Bin, %TEMP%, ProgramData, hidden directories)
- Detect Large File Consolidation — Identify patterns of multiple file reads followed by writes to a single directory
- Monitor Sensitive Path Access — Track bulk reads from document directories, database paths, and network shares
- Analyze Archive Metadata — Extract and analyze archive file sizes, creation times, and source paths
- Score Staging Risk — Apply heuristic scoring based on archive size, source diversity, staging path suspicion, and timing
- Generate Hunt Report — Produce a structured report with staging event timeline and MITRE ATT&CK mapping
Expected Output
- JSON report of detected staging events with risk scores
- Archive creation timeline with source file analysis
- MITRE ATT&CK mapping (T1074.001, T1074.002, T1560)
- Staging directory heat map showing suspicious write activity
1---
2name: hunting-for-data-staging-before-exfiltration
3description: Detect data staging activity before exfiltration by monitoring for archive
4 creation with 7-Zip/RAR, unusual temp folder access, large file consolidation, and
5 staging directory patterns via EDR and process telemetry
6domain: cybersecurity
7subdomain: threat-hunting
8tags:
9- data-staging
10- exfiltration
11- t1074
12- archive-detection
13- edr
14- threat-hunting
15- dlp
16version: '1.0'
17author: mahipal
18license: Apache-2.0
19d3fend_techniques:
20- File Metadata Consistency Validation
21- Content Format Conversion
22- File Content Analysis
23- Platform Hardening
24- File Format Verification
25nist_csf:
26- DE.CM-01
27- DE.AE-02
28- DE.AE-07
29- ID.RA-05
30mitre_attack:
31- T1046
32- T1057
33- T1082
34- T1083
35- T1048
36source: https://github.com/mukul975/Anthropic-Cybersecurity-Skills
37source_commit: 04450304b12645cb2b974ab96d28c0664758a88d
38metadata:
39 source: https://skillmd.com/skills/yanacuti1121/hunting-for-data-staging-before-exfiltration
40---
41
42# Hunting for Data Staging Before Exfiltration
43
44## Overview
45
46Before exfiltrating data, adversaries typically stage collected files in a central location (MITRE ATT&CK T1074). This involves creating archives with tools like 7-Zip, RAR, or tar, consolidating files from multiple directories, and using temporary or hidden staging directories. This skill detects staging behavior by analyzing process creation logs for archiver activity, monitoring file system events in common staging paths, and identifying anomalous file consolidation patterns.
47
48
49## When to Use
50
51- When investigating security incidents that require hunting for data staging before exfiltration
52- When building detection rules or threat hunting queries for this domain
53- When SOC analysts need structured procedures for this analysis type
54- When validating security monitoring coverage for related attack techniques
55
56## Prerequisites
57
58- EDR or Sysmon telemetry with process creation and file system events
59- Windows Event Logs (Event ID 4688) or Sysmon Event ID 1, 11
60- Python 3.8+ with standard library
61- Access to process creation logs in JSON/CSV format
62
63## Steps
64
651. **Detect Archive Tool Execution** — Monitor for 7z.exe, rar.exe, tar, zip, and WinRAR process creation with compression arguments
662. **Identify Staging Directories** — Flag file writes to common staging locations (Recycle Bin, %TEMP%, ProgramData, hidden directories)
673. **Detect Large File Consolidation** — Identify patterns of multiple file reads followed by writes to a single directory
684. **Monitor Sensitive Path Access** — Track bulk reads from document directories, database paths, and network shares
695. **Analyze Archive Metadata** — Extract and analyze archive file sizes, creation times, and source paths
706. **Score Staging Risk** — Apply heuristic scoring based on archive size, source diversity, staging path suspicion, and timing
717. **Generate Hunt Report** — Produce a structured report with staging event timeline and MITRE ATT&CK mapping
72
73## Expected Output
74
75- JSON report of detected staging events with risk scores
76- Archive creation timeline with source file analysis
77- MITRE ATT&CK mapping (T1074.001, T1074.002, T1560)
78- Staging directory heat map showing suspicious write activity