본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트35k · #7958

hunting-for-dns-tunneling-with-zeek

하는 일

이 도구는 DNS(도메인 이름 시스템)를 사용해 데이터를 숨기거나 몰래 통신하는 의심스러운 네트워크 트래픽을 찾는 데 도움을 줍니다. 컴퓨터가 DNS 서버에 정보를 요청하는 방식의 비정상적인 패턴을 찾습니다.

사용하는 경우

  • ✓민감한 데이터가 네트워크를 통해 도난당하고 있다고 의심될 때.
  • ✓악성 프로그램이 인터넷을 통해 몰래 통신하는 징후가 있을 때.
  • ✓특정 웹사이트에 대한 DNS 쿼리 양이 지나치게 많거나 이상해 보일 때.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-dns-tunneling-with-zeek/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-dns-tunneling-with-zeek/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“데이터를 숨기고 있을 수 있는 의심스러운 DNS 트래픽을 찾아 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 도구는 DNS 서버에 보내는 요청을 분석해, 너무 길거나, 많은 다른 이름(서브도메인)을 사용하거나, 특이한 레코드 유형을 사용하는지 확인합니다. 이를 통해 DNS가 악의적인 목적으로 쓰이는지 식별하는 데 도움을 줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Hunting for DNS Tunneling with Zeek

When to Use

  • When hunting for data exfiltration over DNS covert channels
  • After threat intelligence indicates DNS-based C2 frameworks targeting your industry
  • When dns.log shows unusually high query volumes to specific domains
  • During investigation of suspected data theft where no HTTP/S exfiltration is found
  • When monitoring for tools like iodine, dnscat2, DNSExfiltrator, or DNS-over-HTTPS tunneling

Prerequisites

  • Zeek deployed on network tap or SPAN port capturing DNS traffic
  • Zeek dns.log with full query and response fields
  • SIEM platform for dns.log analysis (Splunk, Elastic)
  • RITA (Real Intelligence Threat Analytics) for automated DNS analysis
  • Passive DNS data for historical domain resolution context

Workflow

  1. Analyze Query Length Distribution: DNS tunneling encodes data in subdomain labels, producing queries significantly longer than normal. Normal DNS queries average 20-30 characters; tunneling queries often exceed 50+ characters. Calculate mean and standard deviation of query lengths per domain.
  2. Calculate Subdomain Entropy: Tunneling encodes data using Base32/Base64, producing high-entropy subdomain strings. Calculate Shannon entropy of subdomain labels -- values above 3.5 bits/character strongly suggest encoded data.
  3. Count Unique Subdomains Per Domain: Legitimate domains have relatively few unique subdomains. DNS tunneling generates hundreds or thousands of unique subdomains under a single parent domain.
  4. Monitor DNS Record Type Distribution: TXT, NULL, CNAME, and MX records can carry more data than A records. Excessive TXT queries to a single domain indicate data transfer via DNS.
  5. Detect High Query Volume: Flag domains receiving more than 100 queries per hour from a single source, especially when combined with high subdomain uniqueness.
  6. Analyze Query Timing: DNS tunneling tools produce regular query patterns (beaconing) or burst patterns (data transfer). Apply frequency analysis to DNS query timestamps.
  7. Cross-Reference with conn.log: Correlate DNS queries with connection metadata to identify the process or endpoint generating suspicious queries.
  8. Validate with Domain Intelligence: Check suspicious domains against WHOIS data, certificate transparency, and threat intelligence feeds.

Key Concepts

Concept Description
T1071.004 Application Layer Protocol: DNS
T1048.003 Exfiltration Over Alternative Protocol: DNS
T1572 Protocol Tunneling
Shannon Entropy Measure of randomness in subdomain strings
Zeek dns.log DNS query/response metadata
RITA Automated DNS tunneling detection from Zeek logs
iodine IPv4-over-DNS tunneling tool
dnscat2 DNS-based command-and-control tool
DNSExfiltrator Data exfiltration tool using DNS requests

Detection Queries

Zeek Script -- DNS Tunnel Detection

@load base/protocols/dns
module DNSTunnel;

export {
    redef enum Notice::Type += { DNSTunnel::Long_DNS_Query };
    const query_length_threshold = 50 &redef;
    const query_count_threshold = 100 &redef;
}

event dns_request(c: connection, msg: dns_msg, query: string, qtype: count, qclass: count) {
    if ( |query| > query_length_threshold ) {
        NOTICE([$note=DNSTunnel::Long_DNS_Query,
                $msg=fmt("Long DNS query detected: %s (%d chars)", query, |query|),
                $conn=c]);
    }
}

Splunk -- DNS Tunneling Indicators from Zeek

index=zeek sourcetype=bro_dns
| rex field=query "(?<subdomain>[^.]+)\.(?<basedomain>[^.]+\.[^.]+)$"
| stats count dc(subdomain) as unique_subs avg(len(query)) as avg_len max(len(query)) as max_len by src basedomain
| where count > 100 AND (unique_subs > 50 OR avg_len > 40)
| sort -unique_subs

Splunk -- High Entropy Subdomain Detection

index=zeek sourcetype=bro_dns
| rex field=query "^(?<subdomain>[^.]+)"
| where len(subdomain) > 20
| eval char_count=len(subdomain)
| stats count dc(query) as unique_queries avg(char_count) as avg_sub_len by src query_type_name basedomain
| where unique_queries > 30 AND avg_sub_len > 25
| sort -unique_queries

RITA Analysis

rita import /path/to/zeek/logs dataset_name
rita show-dns-fqdn-ips-long dataset_name
rita show-exploded-dns dataset_name
rita show-dns-tunneling dataset_name --csv > dns_tunnel_results.csv

Common Scenarios

…

자주 묻는 질문

‘DNS 터널링’이란 무엇인가요?

공격자가 DNS를 사용해 데이터를 주고받거나 감염된 컴퓨터를 제어하는 기법입니다. 이 통신을 정상적인 DNS 쿼리처럼 위장합니다.

이 스킬은 어떤 악성 도구를 탐지할 수 있나요?

‘iodine’, ‘dnscat2’, ‘DNSExfiltrator’ 등 DNS를 사용해 은밀한 채널을 만들거나 데이터를 유출하는 도구를 식별하는 데 도움을 줄 수 있습니다.

이것을 쓰려면 DNS 전문가여야 하나요?

아니요. 이 도구는 의심스러운 패턴을 자동으로 찾도록 설계되었지만, 기본적인 DNS 개념을 이해하면 결과를 해석하는 데 도움이 됩니다.

상세 정보

작성자의 원본 설명

Detects DNS tunneling and covert-channel data exfiltration by analyzing Zeek dns.log for high-entropy subdomain queries, excessive query volume, abnormally long query lengths, and unusual DNS record types (TXT/NULL/CNAME). Use when hunting for DNS-based data exfiltration or C2 covert channels in network traffic, or when triaging suspicious DNS query volume/patterns surfaced by Zeek logs.

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#7958
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬