Zeek conn log analysis

From ShulkwiSEC/bb-huge · View interactive version

Zeek conn log analysis is an AI agent skill from the GitHub repository ShulkwiSEC/bb-huge. Analyze Zeek (formerly Bro) `conn.log` files to hunt for malicious network behaviors, including C2 beaconing, long-lived anomalous connections, and data exfiltration patterns.

How to use this skill

Skill file

Zeek conn.log Analysis

When to Use

Prerequisites

Workflow

Phase 1: Understanding conn.log Structure

# head conn.log | zeek-cut -c ts uid id.orig_h id.orig_p id.resp_h id.resp_p proto service duration orig_bytes resp_bytes conn_state

Phase 2: Hunting for C2 Beaconing (Frequency Analysis)

# cat conn.log | zeek-cut id.orig_h id.resp_h id.resp_p duration | \
awk '{print $1, $2, $3}' | sort | uniq -c | sort -nr | head -n 20

Phase 3: Identifying Long-Connections (Data Exfil / Interactive Shells)

# cat conn.log | zeek-cut id.orig_h id.resp_h id.resp_p duration orig_bytes resp_bytes | \
awk '$4 > 3600 {print $0}' | sort -nrk 4

Phase 4: Detecting Odd Port-Service Mismatches

# cat conn.log | zeek-cut id.resp_p service | grep -E '^443\s+http$' | less

# cat conn.log | zeek-cut id.resp_p service | grep -E '^80\s+ssl$' | less
Decision Point 🔀
flowchart TD
    A[Parse conn.log ] --> B{Anomalies Found ]}
    B -->|Yes| C[Correlate Logs ]
    B -->|No| D[Tune Heuristics ]
    C --> E[Isolate Host ]

🔵 Blue Team Detection & Defense

| Concept | Description |

|---------|-------------|

Output Format

Zeek Conn Log Analysis — Assessment Report
============================================================
Target: [Target identifier]
Assessor: [Operator name]
Date: [Assessment date]
Scope: [Authorized scope]
MITRE ATT&CK: [Relevant technique IDs]

Findings Summary:
  [Finding 1]: [Severity] — [Brief description]
  [Finding 2]: [Severity] — [Brief description]

Detailed Results:
  Phase 1: [Phase name]
    - Result: [Outcome]
    - Evidence: [Screenshot/log reference]
    - Impact: [Business impact assessment]

  Phase 2: [Phase name]
    - Result: [Outcome]
    - Evidence: [Screenshot/log reference]
    - Impact: [Business impact assessment]

Risk Rating: [Critical/High/Medium/Low/Informational]
Recommendations:
  1. [Immediate remediation step]
  2. [Long-term hardening measure]
  3. [Monitoring/detection improvement]

📚 Shared Resources

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

- CODE0 — Exploit chaining methodology and high-payout chain patterns

- CODE0 — HackerOne-optimized report writing, CWE quick reference

- CODE0 — Verified disclosed bounties by vulnerability class

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.