Skip to content
Skillpedia
Analysis & spreadsheets35k · #7957

hunting-for-dns-based-persistence

What it does

This tool searches for ways hackers use to stay hidden in systems by altering DNS records. It checks for traffic diversions, hijacked subdomains, or incorrect DNS configurations.

When to use it

  • ✓When you suspect a hacker is using DNS to maintain access to a system.
  • ✓When building security checks to find this type of attack.
  • ✓When security analysts need a step-by-step guide for investigation.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-dns-based-persistence/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-dns-based-persistence/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Look for suspicious activity in our DNS records that might indicate a hacker is trying to maintain access.”

5 new skills a week. 1 minute to read.

How it works

The tool compares the history of DNS records with current records, using data from services like SecurityTrails and DNS provider logs. It looks for unauthorized changes or unusual patterns.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Hunting for DNS-based Persistence

Overview

Attackers establish DNS-based persistence by hijacking DNS records, creating unauthorized subdomains, abusing wildcard DNS entries, or modifying NS delegations to redirect traffic through attacker-controlled infrastructure. These techniques survive credential rotations, endpoint reimaging, and traditional remediation because DNS changes persist independently of compromised hosts. Detection requires passive DNS historical analysis, zone file auditing, and monitoring for unauthorized record modifications. This skill covers hunting methodologies using SecurityTrails passive DNS API, DNS audit logs from Route53/Azure DNS/Cloudflare, and zone transfer analysis.

When to Use

  • When investigating security incidents that require hunting for dns based persistence
  • 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

  • SecurityTrails API key (free tier provides 50 queries/month)
  • Access to DNS provider audit logs (Route53, Azure DNS, Cloudflare, or on-premises DNS)
  • Python 3.9+ with requests library
  • DNS zone file access or AXFR capability for internal zones
  • Historical DNS baseline for comparison

Steps

Step 1: Baseline DNS Records

Export current DNS zone records and establish baseline for all authorized A, AAAA, CNAME, MX, NS, and TXT records.

Step 2: Query Passive DNS History

Use SecurityTrails API to retrieve historical DNS records and identify unauthorized changes, new subdomains, and CNAME records pointing to decommissioned services (dangling CNAMEs).

Step 3: Detect Anomalies

Compare current records against baseline to identify unauthorized modifications, wildcard records that resolve all subdomains, NS delegation changes, and MX record hijacking.

Step 4: Investigate Findings

Correlate DNS anomalies with threat intelligence feeds, check resolution targets against known malicious infrastructure, and validate record ownership.

Expected Output

JSON report listing DNS anomalies with record type, historical changes, risk severity, and remediation recommendations for each finding.

FAQ

What is DNS?

DNS is like the internet's phonebook. It translates website names (like google.com) into numbers (IP addresses) that computers understand.

What is 'DNS-based persistence'?

It's when a hacker changes DNS settings to ensure they can keep accessing a system, even if you change passwords or reformat computers.

Do I need to pay to use SecurityTrails?

There is a free tier that allows a limited number of queries per month, which may be sufficient for occasional investigations.

Details

Original description by the author

Hunts for DNS-based persistence mechanisms such as DNS hijacking, dangling CNAME records enabling subdomain takeover, wildcard DNS abuse, and unauthorized zone or NS delegation changes, using passive DNS history (SecurityTrails API), Route53/Azure DNS/Cloudflare audit logs, and zone transfer analysis. Use when investigating suspected DNS hijacking or subdomain takeover, or when threat hunting for

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#7957
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills