Reducing operational toil when responding to your next critical CVE
Ben Robertson (Senior Professional Service Engineer · Puppet)
BSides Canberra VII (2024) · Day 2 · Main Track
Overview
In the fast-paced world of cybersecurity, the emergence of a critical Common Vulnerabilities and Exposures (CVE) event can quickly turn into a significant operational challenge, consuming vast amounts of time and resources. Ben Robertson, a Senior Professional Service Engineer at Puppet, presented a compelling case at BSides Canberra for leveraging automation to drastically reduce the "operational toil" associated with responding to such incidents. His talk, "Reducing operational toil when responding to your next critical CVE," highlighted the systemic inefficiencies of manual vulnerability management and offered a practical, scalable solution using Puppet Bolt.

Key moments
- 0:00 Introduction to CVEs and operational toil
- 4:10 Heartbleed: OpenSSL vulnerability and its impact
- 6:50 Log4Shell: The most critical vulnerability ever
- 9:50 The problem: Manual scanning is costly and inefficient
- 10:55 Solution: Automating vulnerability scanning with Puppet Bolt
- 12:30 Code walkthrough: The Puppet Bolt log4j scanning plan
- 15:00 Live demo: Scanning 150 Linux servers for Log4j
- 18:00 Conclusion: Automate scanning for future critical CVEs
Reducing operational toil when responding to your next critical CVE
Speakers: Ben Robertson, Senior Professional Service Engineer, Puppet
Conference: BSides Canberra
YouTube: https://www.youtube.com/watch?v=JiKrUpNOcLE
Overview
In the fast-paced world of cybersecurity, the emergence of a critical Common Vulnerabilities and Exposures (CVE) event can quickly turn into a significant operational challenge, consuming vast amounts of time and resources. Ben Robertson, a Senior Professional Service Engineer at Puppet, presented a compelling case at BSides Canberra for leveraging automation to drastically reduce the "operational toil" associated with responding to such incidents. His talk, "Reducing operational toil when responding to your next critical CVE," highlighted the systemic inefficiencies of manual vulnerability management and offered a practical, scalable solution using Puppet Bolt.
Robertson's presentation underscored that while the immediate focus during a critical CVE is often on rapid remediation, the underlying problem lies in the manual, repetitive tasks that hinder effective response. By examining historical vulnerabilities like Shellshock, Heartbleed, and the more recent Log4Shell, he illustrated how organizations struggle to identify and patch vulnerable systems at scale. The core message is clear: proactive implementation of automation tools is not merely a convenience but a strategic imperative to protect against significant financial losses, data breaches, and reputational damage.
The article delves into how Puppet Bolt, an open-source orchestration tool, can be used to automate the deployment and execution of vulnerability scanners across thousands of heterogeneous systems. Robertson demonstrated a Bolt plan designed to detect the Log4Shell vulnerability, showcasing how this approach can transform a weeks-long manual effort into a minutes-long automated process. This shift not only accelerates incident response but also frees up highly skilled security and operations teams to focus on more complex, strategic challenges.
Background
▶ Watch: Introduction to CVEs and operational toil (0:00)
A CVE (Common Vulnerabilities and Exposures) serves as a standardized identifier for publicly disclosed cybersecurity vulnerabilities. Managed by the MITRE Corporation, each CVE is assigned a unique number consisting of "CVE," the year of disclosure, and arbitrary digits. These vulnerabilities are also given a severity rating, typically on a scale of 0 to 10, indicating the ease of exploitation, whether it's remote or local, authenticated or unauthenticated, and its potential impact. The higher the rating, the more critical the vulnerability.
Robertson contextualized the challenge of CVE response by revisiting several high-profile vulnerabilities:
- Shellshock (2014): This critical vulnerability, introduced into Bash in 1989, remained undiscovered for 25 years. It comprised six CVEs in total, with the initial discovery rated 10 for criticality. Primarily affecting web servers using CGI Bash handlers, Shellshock allowed attackers to execute arbitrary commands by crafting malicious input as environment variables. Cloudflare reported seeing 10 to 15 attacks per second, with 8% of attacks successfully gaining control of web servers. A notable real-world impact was the compromise of a server used for elections in Georgia, US, in December 2014, which wasn't discovered until 2017.
- Heartbleed (2014): An infamous vulnerability in OpenSSL, a widely used cryptographic library found in countless products from Cisco to AWS, Android, and Wi-Fi routers. Heartbleed exploited a flaw in the TLS protocol's heartbeat request, allowing an attacker to request 64KB of data from a server's memory while only sending 1KB, effectively tricking the server into disclosing sensitive information. This improper input validation could reveal private key material, usernames, and passwords. The vulnerability was accidentally introduced in February 2012 and remained undetected until April 2014. The project's severe underfunding, with only one full-time developer and three part-time developers managing it on approximately $2,000 per year, contributed to the oversight. Remediation required not just patching OpenSSL but also rolling passwords and private key material, as they could have been stolen. Yahoo advised users not to log in for hours, and the Canadian Revenue Agency lost 900 social insurance numbers.
- Log4Shell (2021): Rated 10 for criticality, Log4Shell (CVE-2021-44228) was a severe vulnerability in the Log4j Java logging library. If an application logged user-provided input using Log4j, an attacker could load and execute malicious Java code or exfiltrate environment variables. This was easily achieved by injecting a malicious string into an HTTP request. The Tenable CEO labeled Log4Shell as "the single biggest, most critical vulnerability ever." It impacted numerous vendors, both cloud and on-premise, with Ernst & Young estimating 93% of cloud environments were vulnerable. Despite the severity, only 45% of vulnerable systems were patched after 10 days of the patch release. Iranian government-sponsored actors reportedly compromised a US government department via an unpatched V Horizon server.
Log4Shell proved to be particularly challenging for several reasons:
- Difficulty in Scanning: Unlike vulnerabilities in system packages, Log4j runs within Java applications and is not managed by standard system package managers (e.g.,
yum,apt). This made traditional patching tools ineffective for identification. - Vendor Dependency: Java libraries are maintained by application vendors, meaning a new version of the application itself was often required to get the patched Log4j.
- Complex Identification: Organizations needed to know which specific Java applications used Log4j, which versions were vulnerable, and how they were configured, making identification a complex and arduous task.
Fortunately, a workaround existed: disabling JNDI lookups or removing the vulnerable class from the Log4j JAR file. Recognizing the difficulty in identifying vulnerable systems, Google released an open-source Log4j scanner compiled for Windows and Linux. This scanner was straightforward to use, requiring only execution with a specified path argument (e.g., / or C:\). It also included a powerful -rewrite option to directly remove the vulnerable class file, offering an immediate mitigation.
However, the Google scanner, while effective, still presented a massive operational challenge: it required manual execution via SSH or RDP on every single system. For organizations with thousands or tens of thousands of servers, this meant "multiple weeks" of work just for identification, let alone remediation, if done by a single technician. Such manual processes cost organizations millions of dollars annually, lead to missed patches, and leave systems vulnerable to old CVEs that should have been addressed. The clear implication is that a better, automated solution is essential to overcome this "operational toil."
Key Findings
▶ Watch: Log4Shell: The most critical vulnerability ever (6:50)
The central finding of Ben Robertson's talk is that the traditional, manual approach to responding to critical CVEs is fundamentally broken, leading to significant operational toil, excessive costs, and prolonged exposure to cyber threats. Organizations are consistently failing to patch systems effectively and efficiently, as evidenced by the slow uptake of Log4Shell patches despite the vulnerability's extreme criticality.
The core contribution and proposed solution is that automation is the only viable path to reducing this toil and achieving scalable, timely, and effective CVE response. Robertson emphasizes that leveraging existing tools and avoiding the "not invented here" syndrome (what he playfully terms "plagiarism is good at work") is key. Specifically, he identified Puppet Bolt as an ideal open-source orchestration tool to automate the deployment and execution of vulnerability scanners, such as Google's Log4j scanner, across diverse and large-scale server environments.
This approach offers several key advantages:
- Scalability: Automating tasks allows operations to scale from tens to thousands of servers without a linear increase in human effort.
- Efficiency: Tasks that would take weeks manually can be completed in minutes or hours.
- Accuracy: Reduces human error inherent in repetitive manual processes.
- Cost Reduction: Minimizes the financial impact associated with prolonged incidents and manual labor.
- Improved Security Posture: Ensures more systems are identified and remediated faster, reducing the attack surface.
Ultimately, the talk demonstrates that by embracing automation with tools like Puppet Bolt, security and operations teams can transcend the reactive firefighting of manual CVE response and adopt a proactive, efficient, and resilient security posture.
Technical Deep Dive
▶ Watch: Solution: Automating vulnerability scanning with Puppet Bolt (10:55)
Ben Robertson's solution centers on using Puppet Bolt to automate the discovery and potential remediation of the Log4Shell vulnerability. Puppet Bolt is a free, open-source orchestration tool designed to automate tasks across a wide range of systems, primarily Windows and Linux. A key feature of Bolt is its agentless nature; unlike traditional Puppet deployments that rely on agents installed on target nodes, Bolt pushes configuration changes and runs commands via standard protocols like SSH for Linux and WinRM for Windows. This makes it ideal for ad-hoc tasks, environments without existing Puppet infrastructure, or rapid response scenarios where agent deployment might be impractical.
Puppet, as a broader platform, offers two main operational models:
- Declarative Puppet: This model specifies the desired state of a system. Puppet then figures out the steps to achieve that state. It is idempotent, meaning it will only perform an action if the desired state is not already met (e.g., it won't reinstall a package if it's already present).
- On-demand Puppet (Bolt): This model, used by Bolt, specifies the exact steps to perform, similar to a script (e.g., "add user Ben," "install this package," "change permissions on this file"). Bolt can execute any script (Python, Bash, PowerShell) or custom Puppet plans.
For the Log4Shell scanning task, Robertson developed a concise Bolt plan written in the Puppet language, though he noted it could have been implemented in any scripting language. The plan, approximately 100 lines long, is designed for flexibility and efficiency.
Key Parameters of the Bolt Plan:
targets: A list of target servers to scan.install_path: The directory where the Log4j scanner binary will be deployed on the target systems (e.g.,C:\on Windows,/tmpon Linux).scan_path: The root path on the target system to begin the vulnerability scan (e.g.,C:\for Windows,/for Linux).
Execution Flow of the Bolt Plan:
- Collect Facts: The plan begins by collecting facts (metadata) about the target devices. This allows Bolt to differentiate between Linux and Windows systems, which is crucial for platform-specific operations (e.g., different archive formats, executable permissions).
- Deploy Scanner:
- For Linux Systems: The plan transfers the Google Log4j scanner (
log4j-scanner.tar.gz) to the target. It then extracts thetar.gzfile and ensures thelog4j-scannerexecutable has the correct permissions (mode755) to run. - For Windows Systems: The plan transfers the
log4j-scanner.zipfile. It then extracts the contents of the zip file; no explicit permission changes are needed as.exefiles are inherently executable.
- Run Vulnerability Scanner: The plan executes the
log4j-scannercommand on each target system, passing thescan_pathparameter. - Process and Report Results: The Log4j scanner outputs findings to standard output only if vulnerable files are detected. The Bolt plan captures this standard output. If any output is received (indicating a vulnerable system), the plan records the target and the scanner's output (which typically includes the paths to the vulnerable JAR files).
- Present Results: Finally, the plan aggregates and presents the list of vulnerable systems and their respective scanner outputs to the user, providing immediate visibility into the affected assets.
An important optional capability mentioned is the -rewrite flag for the Log4j scanner. If used, the scanner can directly remove the vulnerable class file from the JAR, effectively mitigating the vulnerability. This demonstrates how the Bolt plan could be extended beyond mere identification to include automated remediation steps, provided the operator is confident in its application. This entire process, from deployment to scanning and reporting, is orchestrated from a central Bolt controller, typically a Linux VM, connecting to all specified targets simultaneously.
Demo / Proof of Concept
▶ Watch: Code walkthrough: The Puppet Bolt log4j scanning plan (12:30)
Ben Robertson's presentation included a live demonstration (pre-recorded for the talk) of the Puppet Bolt plan in action, showcasing its effectiveness in scanning for Log4Shell across both Linux and Windows environments at scale.
The demo environment consisted of:
- 150 Linux servers: Running on AWS, with a subset deliberately configured to be vulnerable to Log4Shell.
- 40 Windows systems: Also with a subset exhibiting the Log4Shell vulnerability.
The demonstration began on a Linux system acting as the Bolt controller. After installing Bolt and the necessary components, Robertson showed how to inspect the Bolt plan to understand its parameters. An inventory file was used to specify the target servers, listing the IP addresses of the 150 Linux systems under a group named ubuntu. For authentication, SSH keys were used.
The command executed was bolt plan run log4j_scanner::scan -t ubuntu. The video, edited for brevity, showed Bolt stepping through its stages: collecting facts, extracting the scanner archive, and running the scanner on all target systems concurrently. What would typically take "multiple weeks" for manual identification on 1,000 servers (at 10 minutes per server), Bolt completed on 150 servers in approximately 5 minutes. The results were then displayed, clearly indicating that 79 out of the 150 Linux systems were vulnerable. The output also included the standard output from the Log4j scanner, detailing the specific vulnerable JAR files and their paths, which could help identify the affected applications.
A second demonstration focused on the Windows environment. This involved scanning the 40 Windows systems, with the primary difference being the use of WinRM for connectivity, which necessitated a longer connection timeout (45 seconds, compared to the default 15 seconds) to prevent timeouts. The Bolt plan executed similarly, deploying the Windows version of the Log4j scanner and running it across the targets. This scan identified 22 vulnerable hosts among the 40 Windows systems, again providing specific paths to the compromised JAR files.
Robertson highlighted that the same plan could be run with the -rewrite flag, which would not only identify but also attempt to remove the vulnerable class file from the Log4j JAR, effectively remediating the issue directly from the Bolt controller. The demonstrations powerfully illustrated how Puppet Bolt can transform a daunting, time-consuming manual task into a rapid, automated, and scalable operation, providing immediate visibility and the potential for swift remediation during critical CVE events.
Defensive Implications
▶ Watch: Conclusion: Automate scanning for future critical CVEs (18:00)
The insights from Ben Robertson's talk provide crucial defensive implications for organizations grappling with the ongoing challenge of critical CVEs. The central takeaway is the urgent need to shift from reactive, manual processes to proactive, automated security operations.
- Prioritize Automation for CVE Response: Organizations must recognize that manual vulnerability scanning and remediation are unsustainable and inadequate for modern threat landscapes. Implementing automation tools like Puppet Bolt is no longer a luxury but a fundamental requirement for efficient and scalable CVE response. This means investing in automation platforms and developing repeatable processes for common security tasks.
- Leverage Open-Source Tools and Community Efforts: The success of the Log4Shell scanning plan hinges on integrating Google's open-source Log4j scanner. Defenders should actively seek out and integrate effective open-source security tools into their automation frameworks. This avoids reinventing the wheel and capitalizes on collective community intelligence and development.
- Embrace Agentless Orchestration: For environments where traditional agents are not deployed, or for rapid, ad-hoc responses, agentless orchestration tools like Puppet Bolt (using SSH and WinRM) offer immense flexibility. This allows security teams to gain immediate visibility and execute commands across diverse infrastructure without prior agent installation, which is critical during zero-day events.
- Develop Reusable Automation Plans: The Bolt plan for Log4Shell serves as a blueprint. Security and operations teams should proactively develop and maintain similar automation plans for other common security tasks, such as patching, configuration compliance checks, emergency software deployments, and even basic system hardening. This "playbook" approach ensures readiness for future critical vulnerabilities.
- Achieve Comprehensive Visibility: Automation helps overcome the blind spots created by manual processes or limitations of traditional package managers. By centrally orchestrating scans, organizations can gain a more complete and accurate picture of their vulnerable assets, including those where vulnerabilities might reside within application-specific libraries rather than system packages.
- Enable Rapid Remediation: Beyond identification, automation can facilitate swift remediation. Integrating options like the Log4j scanner's
-rewriteflag into orchestration plans allows for immediate mitigation of vulnerabilities, drastically reducing the window of exposure. This requires careful testing and confidence in the automated changes but offers a powerful defensive capability. - Reduce Operational Toil and Improve Team Focus: By automating repetitive and time-consuming tasks, security and operations teams are freed from "operational toil." This allows highly skilled personnel to focus on more strategic initiatives, threat hunting, complex incident analysis, and improving overall security architecture, leading to a more resilient security posture.
- Proactive Readiness: The talk implicitly advocates for a "prepare now, not later" mentality. Waiting for the next critical CVE to implement automation will be too late. Organizations should assess their current CVE response capabilities and proactively integrate automation into their security workflows to be better prepared for future threats.
Key Takeaways
- Manual CVE Response is Unsustainable: Critical vulnerabilities like Shellshock, Heartbleed, and Log4Shell highlight the immense operational toil, cost, and risk associated with manual vulnerability identification and remediation, often leaving systems unpatched for prolonged periods.
- Automation is Essential for Scale and Speed: Leveraging orchestration tools like Puppet Bolt is crucial for efficiently scanning and responding to CVEs across thousands of diverse systems (Linux via SSH, Windows via WinRM) in minutes or hours, rather than weeks.
- Integrate Open-Source Scanners: Effective automation can be achieved by integrating powerful, free, and open-source vulnerability scanners, such as Google's Log4j scanner, into orchestration frameworks, avoiding the need to build tools from scratch.
- Agentless Capabilities Offer Flexibility: Puppet Bolt's agentless approach provides a highly flexible and rapid deployment mechanism for emergency response and ad-hoc tasks, even in environments without existing configuration management agents.
- Reduce Toil and Improve Security Posture: Automating CVE response reduces human error, frees up skilled personnel from repetitive tasks, lowers operational costs, and significantly improves an organization's overall security posture by accelerating time-to-detection and remediation.
- Proactive Planning is Key: Organizations should proactively develop and maintain reusable automation plans for common security tasks, ensuring readiness for future critical vulnerabilities and transforming reactive firefighting into a more strategic and resilient security operation.
About the Speaker(s)
Ben Robertson is a Senior Professional Service Engineer at Puppet. In this role, he advises customers on various DevOps practices, with a particular focus on OS hardening and process automation in a post-sales capacity. Prior to his work at Puppet, Ben gained extensive experience in both commercial and government gateways. His background includes significant exposure to Blue Team activities, encompassing areas such as operating system hardening, perimeter defense, setting up logging aggregation, implementing Intrusion Prevention Systems (IPS), and critically, responding to and fixing CVEs when they emerge.