# DLL\_Version\_Enumeration\_BOF

## What is this?

* This is a `Cobalt Strike` `BOF` file (a mildly massaged port of [@N4k3dTurtl3's](https://twitter.com/N4k3dTurtl3) existing PoC , meant to use ascertain information regarded imported `DLLs` (via the `ENTRY_RESOURCE`) within current process that your beacon associated with.

## What problem are you trying to solve?

1. Given my current projects regarding `DLLs`, this is yet another blindspot I wanted to address after seeing [@N4k3dTurtl3's](https://twitter.com/N4k3dTurtl3) work.
2. I wanted to support both `32-bit` AND `64-bit` `Beacon` sessions.
3. I wanted to have verbose or minified output, given an operator's desire
4. I wanted to keep the original design of [@N4k3dTurtl3's](https://twitter.com/N4k3dTurtl3) intact; minimal API calls.
   1. This is solved this by rolling our own from `grok`ed or `cribbed` implementations elsewhere.

## How do I build this?

1. In this case, you have two options:
   1. Use the existing, compiled object file, located in the `dist` directory (AKA proceed to major step two)
   2. Compile from source via the `Makefile`
      1. `cd src`
      2. `make clean`
      3. `make`
2. Load the `Aggressor` file, in the `Script Manager`, located in the `dist` directory

## How do I use this?

* From a given `Beacon`:&#x20;

![](https://i.ibb.co/NmbygW4/Help-Text.png)

## Any known downsides?

* We're still using the `Win32` API and `Dynamic Function Resolution`. This is for you to determine as far as "risk", though this is limited to a single comparison function (`stricmp`).
* You may attempt to incur a privileged action without sufficient requisite permissions. I can't keep you from burning your hand.

## What does the output look like?

#### All known `DLL`s associated with the process

![](https://i.ibb.co/2MJWkx2/base-non-verbose.png)

#### Verbose output of the aforementioned

![](https://i.ibb.co/jRg2FKR/verbose-all.png)

#### Verbose output of the aforementioned with `needle`

![](https://i.ibb.co/bKqMrTN/Verbose-Needle.png)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notes.brinkles.wiki/c2-and-payloads/cobalt-strike/bofs-and-aggressor-scripts/dll_version_enumeration_bof.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
