Categories: Kali Linux

BlobRunner – Quickly Debug Shellcode Extracted During Malware Analysis

BlobRunner is a simple tool to quickly debug shellcode extracted during malware analysis.
BlobRunner allocates memory for the target file and jumps to the base (or offset) of the allocated memory. This allows an analyst to quickly debug into extracted artifacts with minimal overhead and effort.

BlobRunner Building

Building the executable is straight forward and relatively painless.

Requirements
  1. Download and install Microsoft Visual C++ Build Tools or Visual Studio
Build Steps
  1. Open Visual Studio Command Prompt
  2. Navigate to the directory where BlobRunner is checked out
  3. Build the executable by running:
cl blobrunner.c

Building BlobRunner x64

Building the x64 version is virtually the same as above, but simply uses the x64 tooling.

  1. Open x64 Visual Studio Command Prompt
  2. Navigate to the directory where BlobRunner is checked out
  3. Build the executable by running:
 cl /Feblobrunner64.exe /Foblobrunner64.out blobrunner.c

Also ReadBFuzz – Fuzzing Chrome & Firefox Browsers

Usage

To debug:

  1. Open BlobRunner in your favorite debugger.
  2. Pass the shellcode file as the first parameter.
  3. Add a breakpoint before the jump into the shellcode
  4. Step into the shellcode
BlobRunner.exe shellcode.bin

Debug into file at a specific offset.

BlobRunner.exe shellcode.bin --offset 0x0100

Debug into file and don’t pause before the jump.

Warning: Ensure you have a breakpoint set before the jump.

BlobRunner.exe shellcode.bin --nopause
Debugging x64 Shellcode

Inline assembly isn’t supported by the x64 compiler, so to support debugging into x64 shellcode the loader creates a suspended thread which allows you to place a breakpoint at the thread entry, before the thread is resumed.

Remote Debugging Shell Blobs (IDAPro)

The process is virtually identical to debugging shellcode locally – with the exception that the you need to copy the shellcode file to the remote system. If the file is copied to the same path you are running win32_remote.exe from, you just need to use the file name for the parameter. Otherwise, you will need to specify the path to the shellcode file on the remote system.

Shellcode Samples

You can quickly generate shellcode samples using the Metasploit tool msfvenom.

Generating a simple Windows exec payload.

msfvenom -a x86 --platform windows -p windows/exec cmd=calc.exe -o test2.bin

Credit: @seanmw or @herrcore

R K

Recent Posts

Playwright-MCP : A Powerful Tool For Browser Automation

Playwright-MCP (Model Context Protocol) is a cutting-edge tool designed to bridge the gap between AI…

1 month ago

JBDev : A Tool For Jailbreak And TrollStore Development

JBDev is a specialized development tool designed to streamline the creation and debugging of jailbreak…

1 month ago

Kereva LLM Code Scanner : A Revolutionary Tool For Python Applications Using LLMs

The Kereva LLM Code Scanner is an innovative static analysis tool tailored for Python applications…

1 month ago

Nuclei-Templates-Labs : A Hands-On Security Testing Playground

Nuclei-Templates-Labs is a dynamic and comprehensive repository designed for security researchers, learners, and organizations to…

1 month ago

SSH-Stealer : The Stealthy Threat Of Advanced Credential Theft

SSH-Stealer and RunAs-Stealer are malicious tools designed to stealthily harvest SSH credentials, enabling attackers to…

1 month ago

ollvm-unflattener : A Tool For Reversing Control Flow Flattening In OLLVM

Control flow flattening is a common obfuscation technique used by OLLVM (Obfuscator-LLVM) to transform executable…

1 month ago