Automating the Audit

Banner for Tools Posts

Stop Staring at DNS Records

If you are new to Information Security, you’ll quickly learn that visibility is your best friend. One of the first things I look at when assessing a domain’s posture is its DMARC (Domain-based Message Authentication, Reporting, and Conformance) record.  DMARC tells the world how to handle emails that claim to be from your domain but fail authentication. If a record is missing or set to p=none, an attacker can easily spoof your executive’s email address to launch a phishing campaign.

I wrote dmarc_check.sh to simplify this discovery phase. Instead of manually running dig commands for every sub-domain, this script automates the heavy lifting.

What this tool does for you:

  • Rapid Assessment: It queries DNS for the _dmarc record and immediately classifies the risk level.
  • Policy Logic: It distinguishes between “Secure” (reject), “Soft-Fail” (quarantine), and “Vulnerable” (none or missing).
  • Bulk Reporting: For junior analysts managing large environments, the script processes entire lists of domains and outputs a clean CSV report for leadership.

Security doesn’t always require expensive enterprise suites. Often, it just requires a reliable script that turns raw data into actionable intelligence. Whether you are performing a bug bounty or hardening your first corporate network, this tool ensures you never miss a “low-hanging fruit” vulnerability.

Further Learning & Citations

To dive deeper into how DMARC works and why these specific flags matter, check out these essential resources:

  • DMARC.org: Overview of DMARC Operations – The official definitive guide for the protocol.
  • Cloudflare Learning: What is a DMARC DNS Record? – A great breakdown of the individual tags (p, rua, ruf).
  • CISA (Cybersecurity & Infrastructure Security Agency): MS-ISAC Guide to DMARC – Government-level best practices for implementing email authentication.
  • RFC 7489: Domain-based Message Authentication, Reporting, and Conformance (DMARC) – For those who want to read the actual technical specifications.

Source