/Qakbot-string-decryptor

String Decryptor and API hash resolver for Qakbot

Primary LanguagePython

Qakbot Dumpulate Script

A dumpulator script to extract encrypted strings from recent Qakbot malware.

This is primarily a POC and example of a working script.

You will likely need to modify it slightly (updating exact register values etc) to suit your sample.

Notes:

  • A valid minidump file is required, you can obtain this using Process Hacker or x32Dbg with MiniDump plugin.
  • Addresses and registers may change between samples, so you might need to modify these.
  • If you need to update registers, run your sample until the decryption function and note the registers in a debugger.

Samples:

Qakbot.dmp

Original Packed Qakbot DLL:

Unpacked Qakbot DLL:

Steps to Recreate

  • Obtain a qakbot Sample
  • Unpack it, obtaining the second DLL
  • Using Ghidra/IDA, identify the string decryption function
  • Load the unpacked DLL into x32/x64dbg, and break on the decryption function.
  • Take note of the registers and arguments (ecx/edx etc)
  • Use the MiniDump plugin to create a minidump file.
  • Point this script to your minidump file.
  • Run the script, updating any register values to those observed in x32/64dbg.

Example of string decryption Function. image

Example of another function within that function. I found it easier to point my script here. image

Example of x32dbg at point of MiniDump. image

Example of Script with some extra notes. image