Registry-Recon – Cobalt Strike Aggressor Script That Performs System/AV/EDR Recon

Cobalt Strike Aggressor Script that Performs System/AV/EDR Recon.

Author: Jess Hires

Description

As a red-team practitioner, we are often using tools that attempt to fingerprint details about a compromised system, preferably in the most stealthy way possible. Some of our usual tooling for this started getting flagged by EDR products, due to the use of Windows CLI commands. This aggressor script aims to solve that problem by only probing the system using native registry queries, no CLI commands.

Setup

Simply load reg.cna into Cobalt Strike using the Script Manager. Then right-click on the beacon you want to run registry recon on, and choose Registry then Recon, or type regenum into the beacon console.

AVvXsEgqDoOiTPcP9uUiXUBuGEaZqxD34MBgzJI5HPvqdKnDgvHxPkVM9uk17P66jNHSkNBj3PVDpYTOfTXy843c4dB0U8xv9LWViWmEokR14aZkJI2G6F4lMfqIRDnutNDKOTwrOEfW0swukXfHf7pVXqpy0uZ9Vx6 Ha4us6ioLuCjUQhyO1MFiqHCF9dw6Q=w640 h144

AVvXsEhphyAgDgRxg2hhkkIPa2N52CVpLJjY3943dX8LUIPYzKr8umzHeNVy7aW9bBNEaAWH8 AeDOpwjjV8hvQib2 8MGhOQYeqKJENC8R5m frB oHQx0rgsNnThxK srOl66WxCpJ2GfhgHbGmxQcjRAKaiXUlwxd4NWfFGKCo0vP0gVVo1pyhDqQdj10Mw=w640 h510

AVvXsEjB8SWZd6W790GMYIPJo4TjjO05bNNUhg0UihvfOIKGe3Sg8bTTUlAxEiKLyL9HxuuxJcqviaED9JMes565UPeZaLrFEp0YwRuQHSfENax95ScBpy9CUTI9Ci0Du4byHFBpzVMrLiRpbod6pwLWY1m brg11vZO pspoJ2eYc rGmzVhBgtKV7IUzNA=w640 h466

How does this work?

Primarily, using Cobalt Strike’s breg_query and breg_queryv functions. Then, all beacon output is hijacked with beacon_output, looking for specific values. When a positive match is made, the output will be highlighted in the beacon output. Since there is no beacon_output_reg or something similar, like beacon_output_ls and beacon_output_ps, all output must be captured for parsing.

What if my AV/EDR product isn’t detected? / How can I help?

This is expected. We couldn’t test for every AV/EDR solution, and we knew that many would be missing. You can help us out by submitting a GitHub issue including the following info:

  • If this is a System/AV/EDR entry
  • The name of the product
  • Relevant registry entries that can be used to positively ID the product

click here to read full Article

Read More on Pentesting Tools

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: