Flare-qdb is a command-line and scriptable Python-based tool for evaluating and manipulating native program state. It uses Vivisect to set a breakpoint on each queried instruction and executes Python code when hit.
flare-qdb frees the analyst to take a nonlinear approach to dynamic analysis that accommodates the questions that arise in the course of normal debugging and static analysis. flare-qdb answers these questions without requiring the analyst to manually set up an interactive debugger session and navigate the program counter to that code location.
Here are some examples of spot questions flare-qdb can answer:
argv[1]
?flare-qdb can also be used to facilitate automated, repeatable manipulation of program execution. Here are some examples of useful applications:
Sleep()
to permit rapid iterative testing of a custom command and control (C2) server.MANDATORY_LOW_RID
) in order to induce it to execute its exploit code.flare-qdb accepts multiple queries that take the form of a program counter or Vivisect expression paired with some Python text to evaluate in the flare-qdb scripting environment. Vivisect expressions can be used to specify simple constant program counter values like "0x401000"
, symbolic expressions like "kernel32.Sleep"
, and more. Vivisect expressions can also incorporate register and memory state to articulate sophisticated conditions, such as "not eax or (( edx > 3) and (poi(ebp-8) < 5))"
.
The command line argument format for this is:
-at <vexpr-pc> <pythontext>
flare-qdb also supports conditional evaluation based on the truth value of a Vivisect expression:
-at-if <vexpr-pc> <vexpr-conds> <pythontext>
lare-qdb provides several builtins for convenient debugging, which are available both from the command line and as methods of its Qdb
class.
flare-qdb has been tested primarily on Windows, but works on Linux. Unfortunately, the Darwin port of Vivisect’s vtrace.Trace
class is incomplete, so flare-qdb does not support OSX.
flare-qdb comes with De-DOSfuscator, which is a tool for decoding obfuscated batch files by running them. Details can be found in the De-DOSfuscator Guide or by reading the blog Cmd and Conquer: De-DOSfuscation with flare-qdb.
Prompt injection is a type of security vulnerability that can be exploited to control the…
Firefly is an advanced black-box fuzzer and not just a standard asset discovery tool. Firefly…
Winit is a robust, cross-platform library designed for creating and managing windows in Rust applications.…
In today’s digital age, convenience often comes at the cost of security. One such overlooked…
Terminal GPT (tgpt) offers a seamless way to bring the power of ChatGPT 3.5 directly…
garak checks if an LLM can be made to fail in a way we don't…