detecting-exfiltration-over-dns-with-zeek
Detect DNS-based data exfiltration by analyzing Zeek dns.log for high-entropy
v1.03 установки+3 за 7 дней36,3 тыс. ЗвездыApache-2.0синхронизировано 12 часов назад
Установка
Ещё нет NotHoly CLI? Сначала установите её.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install mukul975/detecting-exfiltration-over-dns-with-zeekПишет в ~/.notholy/skills после проверки подписи и SHA-256.
ПодписьПодписано, ed25519
Пакет6772ed9b…7074c525
6772ed9ba7f5…1f5e7074c5254 файла · 8.7 KBПроверкаСредний2 замечания
- Исполняемый скрипт в составе навыкаscripts/agent.py
- Ссылки на внешние домены
Источникgithub.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/detecting-exfiltration-over-dns-with-zeek@54a7988
Эта запись еще не переведена на русский, поэтому показан текст на другом языке: English.
На странице
Overview
DNS tunneling and exfiltration is a technique used by attackers to bypass firewalls and DLP controls by encoding stolen data into DNS query subdomains. Legitimate DNS queries have predictable entropy and length patterns, while exfiltration queries contain encoded data with high Shannon entropy, unusually long subdomain labels, and high volumes of unique subdomains per parent domain.
This skill analyzes Zeek dns.log files (TSV format) to detect exfiltration indicators. The agent computes Shannon entropy for each subdomain component, identifies queries exceeding the 63-character DNS label limit, counts unique subdomains per parent domain, and flags domains that exceed configurable thresholds. These techniques detect tools like dnscat2, iodine, dns2tcp, and custom DNS tunneling implementations.
When to Use
- When investigating security incidents that require detecting exfiltration over dns 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
- Python 3.9 or later with math and collections modules (stdlib)
- Zeek dns.log files in TSV format with standard field headers
- Network capture data processed by Zeek 5.0+ or later
- Understanding of DNS protocol structure and query types
Steps
Parse Zeek dns.log headers: Read the TSV file, extract the
#fieldsheader line to identify column positions forts,id.orig_h,query,qtype_name,rcode_name, andanswers.Extract and decompose queries: For each DNS query, split the FQDN into subdomain labels and parent domain. Skip queries to known safe domains and internal zones.
Compute Shannon entropy: Calculate the information entropy of each subdomain label. Legitimate subdomains typically have entropy below 3.5, while encoded/encrypted data produces entropy above 4.0.
Detect long labels: Flag DNS labels exceeding 52 characters (approaching the 63-character maximum). Long labels are a strong indicator of data tunneling.
Count unique subdomains per domain: Track how many distinct subdomains each parent domain receives. Domains with more than 50 unique subdomains within the log window are suspicious.
Identify query volume anomalies: Calculate queries-per-minute per source IP per domain. Exfiltration tools generate sustained high-volume query streams that differ from normal browsing.
Score and rank domains: Combine entropy, label length, uniqueness count, and query volume into a composite risk score. Rank domains by score and output the top suspicious domains.
Generate detection report: Produce a JSON report with flagged domains, their evidence indicators, originating source IPs, and recommended response actions.
Expected Output
{
"analysis_summary": {
"total_queries_analyzed": 145832,
"unique_domains": 3421,
"flagged_domains": 3,
"entropy_threshold": 3.5
},
"flagged_domains": [
{
"domain": "data.evil-c2.com",
"unique_subdomains": 892,
"avg_entropy": 4.72,
"max_label_length": 61,
"source_ips": ["10.0.1.45"],
"risk_score": 9.4,
"indicators": ["high_entropy", "long_labels", "high_subdomain_count"]
}
]
}Файлы этой версии
references/12.6 KB
- api-reference.md2.6 KB
scripts/17.3 KB
- agent.py7.3 KB
- LICENSE11.0 KB
- SKILL.md4.0 KB
Права
| Право | Заявлено | Найдено проверкой |
|---|---|---|
| Читает файлы | Да | Да |
| Пишет файлы | Да | Да |
| Выполняет команды shell | Да | Да |
| Ходит в сеть | Да | Да |
| Использует коннекторы | Нет | Нет |
| Управляет браузером | Нет | Нет |
Замечания проверки
Проверено 13 нояб. 2026 г.
- СредняяФайл · Исполняемый скрипт в составе навыкаscripts/agent.py
- ИнфоСсылка · Ссылки на внешние домены
Чистая проверка снижает риск, но не доказывает, что пакет безопасен. Читайте то, что ставите.
| Версия | Опубликована | Коммит | SHA-256 | Подпись | Изменение прав |
|---|---|---|---|---|---|
| v1.0 | 13 нояб. 2026 г. | 54a7988 | 6772ed9b | Подписана | – |
Ещё от mukul975
Всё от этого издателя- testing-for-xml-injection-vulnerabilitiesmukul975/testing-for-xml-injection-vulnerabilities5
- testing-for-sensitive-data-exposuremukul975/testing-for-sensitive-data-exposure5
- performing-jwt-none-algorithm-attackmukul975/performing-jwt-none-algorithm-attack5
- detecting-aws-credential-exposure-with-trufflehogmukul975/detecting-aws-credential-exposure-with-trufflehog5
Еще в категории «Сети, беспроводная связь и телеком»
Вся категория- performing-network-packet-capture-analysismukul975/performing-network-packet-capture-analysis4
- network-segmentation-reviewsecurityskills/network-segmentation-review3
- performing-ssl-stripping-attackmukul975/performing-ssl-stripping-attack3
- implementing-next-generation-firewall-with-palo-altomukul975/implementing-next-generation-firewall-with-palo-alto3
- configuring-zscaler-private-access-for-ztnamukul975/configuring-zscaler-private-access-for-ztna3
- implementing-canary-tokens-for-network-intrusionmukul975/implementing-canary-tokens-for-network-intrusion3
Спрашивайте обо всём, что позволяет ваш скоуп.
Создайте аккаунт, пополните баланс и задайте первый вопрос в чате или в терминале.
- 1/3
Создайте аккаунт
Личный или для компании. Позже можно перейти на аккаунт компании без потери баланса и ключей.
ЛичныйКомпания - 2/3
Пополните баланс
Картой. Оплата за токены, без подписки.
$5.00минимальное пополнение - 3/3
Спрашивайте
В чате, или установите CLI и выполните notholy login в терминале.
$ notholy login