惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
G
Google Developers Blog
人人都是产品经理
人人都是产品经理
U
Unit 42
爱范儿
爱范儿
Hugging Face - Blog
Hugging Face - Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
WordPress大学
WordPress大学
B
Blog RSS Feed
The Cloudflare Blog
D
Docker
A
About on SuperTechFans
IT之家
IT之家
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Y
Y Combinator Blog
月光博客
月光博客
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MongoDB | Blog
MongoDB | Blog
Google DeepMind News
Google DeepMind News
The GitHub Blog
The GitHub Blog
博客园_首页
Stack Overflow Blog
Stack Overflow Blog

Black Hills Information Security, Inc.

Bad Habits: An ANTISOC Operation Same Problem, Different Angles: When Red Team and Blue Team Actually Talk to Each Other How to Identify and Exploit New Vulnerabilities Swapper – A Pure Regex Match/Replace Burp Extension A Practical Guide to BloodHound Data Collection Network Engineering Basics Signed, Trusted, and Abused: Proxy Execution via WebView2 Getting Started In Pentesting – Advice From The BHIS Pentest Lead Cloud Security: Tips and Resources for Securing the Cloud Lessons From A Chatbot Incident How to Lead Effective Tabletops Understanding GRC: How to Navigate Risks and Compliance Standards The “P” in PAM is for Persistence: Linux Persistence Technique Malware Analysis: How to Analyze and Understand Malware OSINT: How to Find, Use, and Control Open-Source Intelligence What to Do with Your First Home Lab When the SOC Goes to Deadwood: A Night to Remember Social Engineering and Microsoft SSPR: The Road to Pwnage is Paved with Good Intentions Common Cyber Threats Finding the Right Penetration Testing Company Deceptive-Auditing: An Active Directory Honeypots Tool The Curious Case of the Comburglar How to Set Smart Goals (That Actually Work For You) Inside the BHIS SOC: A Conversation with Hayden Covington Abusing Delegation with Impacket (Part 3): Resource-Based Constrained Delegation Why You Got Hacked – 2025 Super Edition Abusing Delegation with Impacket (Part 2): Constrained Delegation Abusing Delegation with Impacket (Part 1): Unconstrained Delegation GoSpoof – Turning Attacks into Intel Model Context Protocol (MCP)
Why Use a Macro Pad?
BHIS · 2025-06-04 · via Black Hills Information Security, Inc.

Mitchell is a penetration tester with BHIS who loves to find ways to optimize his workflow and grow his skills as a tester. They can be found outside of work improving their skills in photography or archery.

Compression is everywhere—in files, videos, storage, and networks—so it’s only natural it should also be in your workflow too. You can “compress” a series of tedious, repetitive tasks requiring multiple steps and several configurations into a single button press with a macro pad such as the Stream Deck or a fully software-customizable mechanical keyboard. 

Please take note: this blog does not require the physical Stream Deck hardware as the mobile Stream Deck app from Elgato also includes the same macro pad functionality. 

Why Use a Macro Pad? 

Sometimes, it feels like half the job of penetration testing is copy-and-pasting from notes or re-typing your go-to commands. Whether it’s firing off an Nmap scan, running your favorite Nuclei templates, or formatting a finding in Word, there’s a surprising amount of repetitive work involved in penetration testing unique and individualized environments, especially in the beginning days of a test. 

The Basic Functions 

Before diving into the creation of these macros, some introduction to the basic built-in features of the Stream Deck is required. After all, every expert was once a beginner. Below are the bread-and-butter features I use every day: 

  • Multi-Action: 
    • Stack multiple commands in sequence. You can connect to a VPN, launch your terminal, and change your workspace layout all in one press. 
  • Hotkey: 
    • Key bind combinations such as “ctrl+c” are put here. 
  • Folders: 
    • Organizational feature that can hold a number of different macros inside of it. For example, this can be used to hold all items relating to reporting blurbs without cluttering your main page. 
  • Add-ons :
    • The Stream Deck also has robust third-party support for applications such as Microsoft Teams or Discord, giving you call options at the tip of your fingers. 
  • Profiles:  
    • Separate Stream Deck layouts between applications such as Word, terminal, and browsers. 

Automation Examples for Penetration Testing 

However, making the macros takes some time. In my experience, you have to determine what actions you do frequently and progressively add them to the Stream Deck—such as setting up your testing environment or basic recon/testing tasks, for instance. 

Every time I load up a new testing VM, I always run the standard “apt” commands: update, upgrade, install. All of these actions can be added to a single Multi-Action macro. For example: “apt update; apt upgrade -y; apt dist-upgrade -y; apt install nuclei” can be placed on a single macro. Even setting up your favorite Screen sessions or TMUX layout can be automated using the same keyboard shortcuts you already use. 

I also use a multi-hundred line setup script to configure my virtual machine to be ready for testing. Given this file is hundreds of lines long, the Text action would take too long to complete. In situations such as these, I use the MacOS Terminal and “pbcopy” command to quickly copy the script using a Multi-Action. 

This whole action takes less than a second to complete, and you have a fresh copy of your install script to paste into your remote virtual machine in a time faster than it takes to navigate and copy manually. You can even add an extra Hotkey action to alt-tab back to your active window before opening the terminal. 

As an example, when testing a network, I know I will use Nmap, Nuclei, and FFuF. All of these commands can be added to the macro pad leaving placeholder text for file input or output such as “Nmap -sC -sV -p 443,80,8443,8080 -iL ” for an Nmap scan targeting web hosts and ports.  

If you are consistent and always use the text file “scope.txt” for your beginning scope file and select “Press Enter after message” to kickstart the command immediately after typing it. You can even chain the output of other commands into each other. Using parsing and format scripts such as “grep” and “sed” outputting to another file, you can automatically separate web hosts for other commands and use those within nuclei, for example. 

When testing is done, macros can even help with reporting. Whether it’s documenting findings, formatting screenshots, or citing tool usage in footnotes, reporting is where automation and time-saving shines for my personal workflow. For example, I use a dedicated profile that activates when Microsoft Word is opened that includes macros for: 

  • Inserting commonly used blurbs 
  • Formatting text such as changing style to “Code” or “Heading 2” 
  • Automatically adding footnotes for tools like Nmap or Burp Suite 
  • Pasting a screenshot and immediately formatting it and the caption 

This is made possible with Word’s customizable key bind options within the Tools > Customize Keyboard option and the Hotkey and Multi-Action features of the Stream Deck. This allows me to stay focused on what I’m writing instead of breaking up my flow to manually select styles and formats. 

Similarly, inserting a footnote can be done using a Multi-Action which begins with a Hotkey for Word’s “Insert Footnote” keybind and then a Text action to insert the URL for specific tools. 

Using this methodology, my main reporting layout is shown below. 

You can further supercharge Word by using Word’s own built-in Visual Basic macro system. For example, running a script that turns Markdown code snip/block format into the proper style in Word. 

Pro Tips 

While the Text action is useful for short blurbs for reporting or commands, large commands are still best to be copied and pasted into a terminal. The Text action types a character with a delay of 1-10ms on average, making large blurbs slow over the course of a full paragraph. 

Also, don’t forget to also check out the Stream Deck’s plugin store (https://marketplace.elgato.com/stream-deck/plugins). There are so many productivity-based functions you can use—such as controlling Microsoft Teams, a Pomodoro Timer, Home Assistant control, or IP address listing—so you always know where you’re testing from. 



Ready to learn more?

Level up your skills with affordable classes from Antisyphon!

Pay-What-You-Can Training

Available live/virtual and on-demand