mirror of
https://github.com/mukul975/Anthropic-Cybersecurity-Skills.git
synced 2026-07-24 13:40:57 +03:00
- Add validated mitre_attack frontmatter to all 754 skills (286 distinct techniques), verified against MITRE ATT&CK v19.1 via the official mitreattack-python library: 0 revoked, deprecated, or invalid IDs - Curate precise per-skill technique IDs for forensics, malware-analysis, threat-intel, and red-team skills (e.g. DCSync -> T1003.006, Kerberoasting -> T1558.003, Pass-the-Ticket -> T1550.003) - Reconcile v19.1 tactic restructuring: Defense Evasion split into Stealth (TA0005) and Defense Impairment (TA0112); revoked T1562.* family and T1070.001/.002 remapped to active equivalents (T1685.*) - Normalize word-split tags across 35 skills (remove filename-derived stopword tags, add semantic cybersecurity tags) - Add api-reference.md for 3 skills that were missing it - Update README ATT&CK section with accurate v19.1 tactic distribution
90 lines
2.6 KiB
Markdown
90 lines
2.6 KiB
Markdown
---
|
|
name: detecting-beaconing-patterns-with-zeek
|
|
description: 'Performs statistical analysis of Zeek conn.log connection intervals
|
|
to detect C2 beaconing patterns. Uses the ZAT library to load Zeek logs into Pandas
|
|
DataFrames, calculates inter-arrival time standard deviation, and flags periodic
|
|
connections with low jitter. Use when hunting for command-and-control callbacks
|
|
in network data.
|
|
|
|
'
|
|
domain: cybersecurity
|
|
subdomain: security-operations
|
|
tags:
|
|
- network-security
|
|
- zeek
|
|
- c2-beaconing
|
|
- conn-log-analysis
|
|
- zat
|
|
- threat-hunting
|
|
- statistical-analysis
|
|
version: '1.0'
|
|
author: mahipal
|
|
license: Apache-2.0
|
|
nist_csf:
|
|
- DE.CM-01
|
|
- RS.MA-01
|
|
- GV.OV-01
|
|
- DE.AE-02
|
|
mitre_attack:
|
|
- T1071.001
|
|
- T1071.004
|
|
- T1573
|
|
- T1008
|
|
- T1095
|
|
---
|
|
|
|
# Detecting Beaconing Patterns with Zeek
|
|
|
|
|
|
## When to Use
|
|
|
|
- When investigating security incidents that require detecting beaconing patterns with zeek
|
|
- 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
|
|
|
|
- Familiarity with security operations concepts and tools
|
|
- Access to a test or lab environment for safe execution
|
|
- Python 3.8+ with required dependencies installed
|
|
- Appropriate authorization for any testing activities
|
|
|
|
## Instructions
|
|
|
|
Load Zeek conn.log data using ZAT (Zeek Analysis Tools), group connections by
|
|
source/destination pairs, and compute timing statistics to identify beaconing.
|
|
|
|
```python
|
|
from zat.log_to_dataframe import LogToDataFrame
|
|
import numpy as np
|
|
|
|
log_to_df = LogToDataFrame()
|
|
conn_df = log_to_df.create_dataframe('/path/to/conn.log')
|
|
|
|
# Group by src/dst pair and calculate inter-arrival time
|
|
for (src, dst), group in conn_df.groupby(['id.orig_h', 'id.resp_h']):
|
|
times = group['ts'].sort_values()
|
|
intervals = times.diff().dt.total_seconds().dropna()
|
|
if len(intervals) > 10:
|
|
std_dev = np.std(intervals)
|
|
mean_interval = np.mean(intervals)
|
|
# Low std_dev relative to mean = likely beaconing
|
|
```
|
|
|
|
Key analysis steps:
|
|
1. Parse Zeek conn.log into DataFrame with ZAT LogToDataFrame
|
|
2. Group connections by source IP and destination IP pairs
|
|
3. Calculate inter-arrival time intervals between consecutive connections
|
|
4. Compute standard deviation and coefficient of variation
|
|
5. Flag pairs with low coefficient of variation as potential beacons
|
|
|
|
## Examples
|
|
|
|
```python
|
|
from zat.log_to_dataframe import LogToDataFrame
|
|
log_to_df = LogToDataFrame()
|
|
df = log_to_df.create_dataframe('conn.log')
|
|
print(df[['id.orig_h', 'id.resp_h', 'ts', 'duration']].head())
|
|
```
|