Efficient Bug Bounty Automation Techniques

Gunnar Andrews

DEF CON 32 Creator Stage · Day 1 · Creator Stage

Overview

Gunnar Andrews' DEF CON 32 talk, "Efficient Bug Bounty Automation Techniques," delves into sophisticated methodologies for maximizing bug bounty hunter effectiveness by optimizing resource utilization and data collection. The core thesis revolves around a strategic shift from brute-force approaches to intelligence-driven reconnaissance. Andrews champions the idea of moving beyond simply accumulating vast amounts of data (resources) to generating actionable insights and validated findings, which directly translate to bug reports and financial rewards. This talk is particularly relevant for bug bounty hunters, security researchers, and even enterprise security teams looking to improve their external attack surface management through more intelligent and efficient automation.

Watch on YouTube

Visual summary for Efficient Bug Bounty Automation Techniques by Gunnar Andrews
Visual summary for Efficient Bug Bounty Automation Techniques by Gunnar Andrews

Key moments

  1. 0:00 Speaker intro and three main talk goals
  2. 1:00 Why brute forcing should be a last resort
  3. 2:00 Apex domains: sources, importance, and scope warning
  4. 3:45 Caduceus tool: scanning IP space for certificate domains
  5. 4:30 Efficient subdomain collection using passive DNS

Efficient Bug Bounty Automation Techniques

Speakers: Gunnar Andrews, AppSec Engineer, Bug Bounty Hunter, Content Creator

Conference: DEF CON 32

YouTube: https://www.youtube.com/watch?v=120iDYzscD4

Overview

Gunnar Andrews' DEF CON 32 talk, "Efficient Bug Bounty Automation Techniques," delves into sophisticated methodologies for maximizing bug bounty hunter effectiveness by optimizing resource utilization and data collection. The core thesis revolves around a strategic shift from brute-force approaches to intelligence-driven reconnaissance. Andrews champions the idea of moving beyond simply accumulating vast amounts of data (resources) to generating actionable insights and validated findings, which directly translate to bug reports and financial rewards. This talk is particularly relevant for bug bounty hunters, security researchers, and even enterprise security teams looking to improve their external attack surface management through more intelligent and efficient automation.

Andrews outlines three primary objectives for his presentation: first, illustrating how to achieve high-impact results ("zero to 100") with minimal operational cost; second, detailing his personal efficient data collection strategies; and third, advocating for advanced data engineering practices over traditional flat-file storage in bug bounty workflows. He challenges the common misconception that extensive brute-forcing is a prerequisite for comprehensive asset discovery, arguing that more refined techniques exist to gather intelligence before resorting to guesswork. This approach emphasizes quality over quantity, aiming to reduce noise and increase the signal-to-noise ratio in reconnaissance efforts.

The talk provides a pragmatic framework for automation, highlighting the critical importance of understanding and auditing the tools and data sources used. By sharing insights from his experience, including specific tool critiques and custom development strategies, Andrews empowers the audience to build more robust, cost-effective, and ultimately more successful bug bounty automation pipelines. The focus is on leveraging publicly available and passively collected information to uncover assets and potential vulnerabilities that might be missed by less discerning, brute-force-heavy methodologies.

Background

▶ Watch: Speaker intro and three main talk goals (0:00)

The landscape of bug bounty hunting has evolved significantly, with automation becoming an indispensable component for competitive researchers. However, this reliance on automation often leads to common pitfalls. Many hunters fall into the trap of indiscriminately employing brute-forcing techniques for subdomain enumeration or directory discovery, operating under the assumption that sheer volume of requests will eventually yield results. While brute-forcing can uncover hidden assets, it is inherently a "guessing" game, often resource-intensive, time-consuming, and prone to generating massive amounts of irrelevant data. This "resources versus findings" dilemma is central to Andrews' critique.

Traditional bug bounty reconnaissance often begins with identifying an organization's Apex domains (root domains) and then attempting to enumerate all associated subdomains. Common methods include querying various passive DNS sources, utilizing publicly available wordlists for brute-force subdomain enumeration, and scanning IP ranges. While tools for these tasks are abundant, their indiscriminate use can lead to inefficiencies, wasted computational resources, and a deluge of data that is difficult to process and prioritize. Furthermore, a significant challenge arises in accurately determining if discovered assets are truly "in scope" for a bug bounty program, especially when relying on broad, automated sweeps that might pick up shared infrastructure or third-party assets.

Andrews' talk positions itself as a counter-narrative to these often inefficient practices. He argues that before engaging in resource-intensive guessing, there are numerous, more intelligent data collection techniques available. These techniques leverage existing public information and passive monitoring to build a comprehensive understanding of an organization's digital footprint. The problem Andrews addresses is not a lack of data, but rather the inefficient and often uncritical collection and processing of that data, leading to a high cost-to-finding ratio. His approach advocates for a more surgical and informed reconnaissance strategy, prioritizing verified information over speculative enumeration.

Key Findings

▶ Watch: Why brute forcing should be a last resort (1:00)

Gunnar Andrews' presentation unveils several critical findings and principles for efficient bug bounty automation, challenging conventional wisdom and offering practical, impactful alternatives:

  1. The Inefficiency of Initial Brute-Forcing: A central tenet of Andrews' philosophy is to avoid brute-forcing until absolutely necessary. He emphasizes that in modern threat landscapes, vast amounts of information can be gathered through passive and intelligent scanning techniques without resorting to guesswork. Brute-forcing is presented as a last resort, to be employed only when other, more efficient methods have been exhausted. This paradigm shift saves significant resources, time, and reduces the volume of irrelevant data.
  1. Leveraging TLS Certificates for Asset Discovery: Andrews demonstrates that scanning the entire IPv4 address space to extract domain names from TLS certificates (specifically the Common Name (CN) and Subject Alternative Name (SAN) fields) is a highly effective and often overlooked method for discovering both Apex and subdomains. This technique, embodied in his tool Caduceus, provides verified, legitimate domain names directly associated with IP addresses, offering a more reliable starting point than many other discovery methods. He notes the surprising ease with which the entire IPv4 space can be scanned, even without an ASN.
  1. Critical Auditing of Automated Reconnaissance Tools: A significant finding is the often-hidden inefficiencies within popular bug bounty tools. Andrews illustrates this with a detailed example using subfinder, a widely used subdomain enumeration tool. His analysis showed that during a scan of tesla.com with the --all flag, Common Crawl took 43.5 seconds and returned a statistically impossible "negative 70,782" results, effectively an error. Similarly, Wayback Machine contributed nothing over 30 seconds. By simply excluding these non-performing sources, the scan time could be reduced by approximately 75% (from 43.5 seconds to ~10 seconds) without losing any valid results. This highlights a crucial insight: blindly trusting tools without understanding their underlying logic, API interactions, and error handling can lead to substantial resource waste and suboptimal performance.
  1. The Power and Pitfalls of Passive DNS: Andrews confirms the immense value of passive DNS sources for subdomain enumeration, attributing their richness to the widespread practice of major DNS providers and ISPs selling their collected DNS data. He advocates for using these sources, even if it involves paying for access, due to their superior coverage. However, he couples this with a warning: users must thoroughly understand the API documentation, rate limiting, and pagination of each source to avoid silent failures or inefficient data retrieval when integrating them into custom automation.
  1. Importance of Data Engineering Beyond Flat Files: While briefly mentioned, a key finding is the encouragement to move beyond simple flat text files for storing reconnaissance data. This implicitly suggests the need for structured data storage (e.g., databases) to enable more complex querying, analysis, and correlation of assets, vulnerabilities, and historical data, ultimately leading to more efficient bug hunting.

These findings collectively advocate for a more thoughtful, analytical, and performance-conscious approach to bug bounty automation, shifting the focus from simply running tools to strategically designing and managing an effective reconnaissance pipeline.

Technical Deep Dive

▶ Watch: Apex domains: sources, importance, and scope warning (2:00)

Andrews' methodology is characterized by a deliberate departure from brute-force tactics, favoring instead intelligent and passive data collection. This approach underpins his technical strategies for both Apex and subdomain discovery, as well as his critical assessment of existing automation tools.

The Anti-Brute-Force Philosophy

The foundational principle of Andrews' automation technique is to defer brute-forcing until all other, more information-rich avenues have been exhausted. He likens brute-forcing to "guessing" on a test – a last resort when all other knowledge fails. Instead, his strategy focuses on leveraging publicly available, passively collected, and verifiable data sources. This not only conserves computational resources but also significantly reduces the noise in reconnaissance data, allowing hunters to focus on potentially fruitful targets. The argument is that in the current internet landscape, there's so much exposed information that guessing is often redundant and inefficient for initial discovery phases.

Apex Domain and IP Space Discovery via TLS Certificates

One of the most innovative and efficient techniques presented is the discovery of Apex domains and associated IP space by scanning the entire IPv4 address range for TLS certificates. Andrews' custom tool, Caduceus (named after a mythological weapon), performs a half TLS handshake on common HTTPS ports (primarily port 443, but also other ports where certificates might be served).

During this partial handshake, Caduceus extracts domain names from the Common Name (CN) and Subject Alternative Name (SAN) fields within the presented TLS certificate. These fields explicitly declare the domain(s) for which the certificate is valid. By systematically scanning the entire IPv4 space, researchers can compile a comprehensive list of domain names directly linked to their hosting IP addresses. This method is highly effective because it relies on actively served, cryptographically verifiable information, making it a robust source for discovering legitimate assets.

Andrews highlights the surprising ease and speed with which the entire IPv4 space can be scanned, even without owning an Autonomous System Number (ASN). He also offers a crucial optimization tip: scanning a cloud provider's IP range (e.g., AWS US East 1) from within the same cloud provider's infrastructure (e.g., an EC2 instance in US East 1) can drastically reduce scan times, potentially completing a region scan in minutes. However, he cautions that cloud providers might not approve of such extensive internal scanning. A critical caveat for Apex domain discovery, regardless of the source, is the need for manual verification to confirm that a discovered domain is genuinely in scope for a bug bounty program. Shared registrars or infrastructure can lead to out-of-scope assets appearing in initial automated sweeps.

Efficient Subdomain Enumeration with Passive DNS

For subdomain enumeration, Andrews fully endorses the use of passive DNS sources. He explains that the richness and accuracy of these sources stem from major DNS providers and ISPs regularly collecting and selling their DNS query data to various security intelligence companies (e.g., VirusTotal, SecurityTrails). These companies, in turn, aggregate this data, often supplementing it with their own internet scanning operations, to offer comprehensive subdomain databases.

While many free passive DNS sources exist, Andrews acknowledges that he pays for some premium services due to their superior coverage and freshness, finding the investment worthwhile. However, his advocacy for passive DNS comes with a strong warning against the uncritical use of generic tools that integrate multiple passive DNS APIs.

He stresses the importance of reading API documentation, understanding rate limiting, and managing pagination for each source. His rationale is that generic tools, designed to satisfy a broad user base, often make compromises that lead to inefficiencies or silent failures.

Auditing Automated Tools: The Subfinder Example

Andrews provides a compelling demonstration of tool inefficiency using subfinder, a popular open-source subdomain enumeration tool by Project Discovery. When running subfinder against tesla.com with the --all flag (to use all available sources) and the --stats flag (to show performance statistics), he observed significant issues:

  • Common Crawl: This source took 43.5 seconds out of a total run time of 43.5 seconds and reported "negative 70,782" results, clearly an erroneous output indicating a failure or misinterpretation of data.
  • Wayback Machine: This source took 30 seconds and yielded zero results.

By simply identifying and removing these two underperforming or erroneous sources, the overall scan time could be reduced to approximately 10 seconds (the time taken by the next slowest effective source, SecurityTrails), representing a 75% reduction in execution time without any loss of valid subdomain findings. This example powerfully illustrates the necessity of auditing and understanding the performance characteristics of each integrated source within an automated tool, or, as Andrews suggests, writing custom logic to ensure optimal efficiency and accurate data retrieval. Custom logic allows for precise control over API calls, error handling, and resource allocation, tailored to specific needs.

Data Engineering for Bug Bounty Automation

Finally, Andrews briefly touches upon the future of bug bounty automation, advocating for a move away from flat text files for storing reconnaissance data. While not deeply detailed in the transcript, this suggestion implies adopting more structured data storage solutions, such as databases (SQL, NoSQL). The benefits of such an approach are numerous:

  • Enhanced Querying and Analysis: Structured data allows for complex queries, filtering, and correlation across different data points (e.g., linking subdomains to IPs, open ports, identified technologies, historical changes).
  • Improved Data Management: Databases facilitate better organization, deduplication, and versioning of reconnaissance data.
  • Scalability: As the volume of collected data grows (monitoring millions of domains, as Andrews does), flat files become unwieldy. Databases are designed to handle large datasets efficiently.
  • Integration with Other Tools: Structured data is easier to integrate into dashboards, custom analysis scripts, and vulnerability assessment tools.
  • Historical Tracking: Databases can store historical snapshots of an organization's attack surface, allowing hunters to identify newly deployed assets or changes that might introduce vulnerabilities.

This shift towards data engineering transforms raw reconnaissance data into a powerful, queryable knowledge base, enabling more sophisticated and targeted bug hunting strategies.

Demo / Proof of Concept

▶ Watch: Caduceus tool: scanning IP space for certificate domains (3:45)

While the talk does not describe a live, real-time demonstration of a full automation pipeline, Gunnar Andrews effectively uses concrete examples and references to his own tooling and experiences as proof of concept.

The primary "proof of concept" for his IPv4 scanning and certificate extraction method is his tool Caduceus, which he mentions is available on his GitHub. He describes its functionality in detail: performing a half TLS handshake to extract domain names from Common Name (CN) and Subject Alternative Name (SAN) fields. The effectiveness of this approach is demonstrated by his claim of finding "a lot of Apex domains just looking around the internet" this way, including previously unseen Yahoo-owned assets.

For the critical analysis of existing tools, Andrews presents a direct output example from subfinder when run against tesla.com with the --stats flag. This visual evidence clearly shows the performance metrics, including the 43.5-second execution time for Common Crawl yielding negative results and the 30-second execution for Wayback Machine yielding zero results. This served as a powerful, data-driven proof of concept for his argument regarding the inefficiency of un-audited automation tools.

These examples, drawn from real-world application and tool outputs, serve to validate his core arguments about efficient data collection and the necessity of scrutinizing automated processes.

Defensive Implications

▶ Watch: Efficient subdomain collection using passive DNS (4:30)

Gunnar Andrews' insights into efficient bug bounty automation offer significant defensive implications for organizations looking to strengthen their security posture and manage their external attack surface. Understanding how sophisticated bug bounty hunters and malicious actors discover assets can directly inform and enhance an organization's own defensive strategies.

  1. Comprehensive Asset Discovery and Inventory: Andrews' emphasis on scanning the entire IPv4 space and extracting domains from TLS certificates (using tools like Caduceus) highlights a critical external reconnaissance vector. Organizations should proactively perform similar scans of their own public IP ranges and monitor certificate transparency logs. This ensures they have a complete and up-to-date inventory of all public-facing assets, including those that might be forgotten, misconfigured, or inadvertently exposed. Many organizations struggle with shadow IT or unknown assets; adopting a hacker's perspective on discovery can close these gaps.
  1. Monitoring Certificate Transparency Logs: The reliance on Common Name (CN) and Subject Alternative Name (SAN) fields in TLS certificates for domain discovery underscores the importance of Certificate Transparency (CT) logs. Organizations should actively monitor CT logs for certificates issued for their domains, looking for unauthorized certificates or certificates issued for unexpected subdomains. This can be an early warning system for phishing attempts, domain squatting, or unauthorized deployments.
  1. Scoping and Program Definition: Andrews' personal experience of being "burned multiple times" by reporting bugs on out-of-scope domains (due to shared registrars or infrastructure) provides a crucial lesson for bug bounty program managers. Programs must have extremely clear and precise definitions of what is in scope. Furthermore, organizations should conduct thorough internal audits to understand their shared infrastructure, third-party services, and registrar relationships to anticipate potential confusion for hunters and prevent out-of-scope reports. Explicitly listing all owned IP ranges and ASNs can also aid hunters.
  1. Auditing Third-Party Tool Usage: The critique of subfinder and its inefficient handling of certain passive DNS sources is a wake-up call for security teams. Organizations that rely on automated tools for their own external attack surface management or vulnerability scanning must not blindly trust default configurations. They should audit the performance, accuracy, and resource consumption of each integrated data source within their tools. Understanding the underlying APIs, rate limits, and potential for silent failures is critical to ensure that their defensive reconnaissance is truly comprehensive and efficient.
  1. Data Engineering for Security Operations: The call to move beyond flat text files for reconnaissance data storage is directly applicable to Security Operations Centers (SOCs) and threat intelligence teams. Implementing structured databases for asset inventory, vulnerability data, and historical reconnaissance allows for more sophisticated querying, correlation, and analysis. This enables faster incident response, better tracking of asset changes, and more proactive identification of potential security weaknesses across the entire digital estate.

By adopting these defensive strategies, organizations can not only identify and remediate vulnerabilities more effectively but also anticipate and counter the reconnaissance techniques employed by external attackers, thereby building a more resilient security posture.

Key Takeaways

  • Prioritize Intelligence Over Brute-Force: Efficient bug bounty automation emphasizes leveraging passive and intelligent data collection methods before resorting to resource-intensive brute-forcing. Brute-forcing should be a last resort.
  • Harness TLS Certificates for Asset Discovery: Scanning the entire IPv4 space to extract domain names from TLS certificate fields (CN, SAN) is a highly effective method for discovering both Apex and subdomains. Tools like Caduceus facilitate this process.
  • Audit Your Automation Tools: Do not blindly trust automated reconnaissance tools. Critically audit their performance, understand their API integrations, and identify inefficient or erroneous data sources (e.g., Common Crawl's negative results in subfinder). Custom logic often outperforms generic tools.
  • Leverage Passive DNS Strategically: Passive DNS sources are invaluable for subdomain enumeration due to ISPs selling DNS data. Be prepared to pay for quality sources, but always understand their API documentation, rate limiting, and pagination to optimize data collection.
  • Embrace Data Engineering: Move beyond flat text files for storing reconnaissance data. Utilize structured databases for better querying, analysis, scalability, and historical tracking of assets and vulnerabilities, transforming raw data into actionable intelligence.
  • Validate Scope Manually: Even with advanced automation, manual verification remains crucial for Apex domains to confirm they are truly in scope for a bug bounty program, preventing wasted effort on out-of-scope assets due to shared infrastructure.

About the Speaker(s)

Gunnar Andrews is an experienced professional operating at the intersection of application security and offensive security research. By day, he works as an AppSec Engineer, applying his expertise to defend and secure applications. By night, he transforms into a dedicated bug bounty hunter, actively seeking out vulnerabilities in real-world systems. Beyond his professional and hunting endeavors, Gunnar is also a content creator, sharing his knowledge and techniques on platforms like YouTube and Twitch. His content primarily focuses on bug bounty hunting methodologies, advanced reconnaissance techniques, and the development of custom security tools, such as his mythological weapon-themed creation, Caduceus. His dual role as a defender and an attacker provides him with a unique and pragmatic perspective on security automation.

All talks from DEF CON 32 Creator Stage