mistdumper
a configurable pattern finder for static analysis written in dart.
it is meant to retrieve offsets from file on disk without running them.
this project has been inspired by hazedumper which is a runtime signature finder.
usage
mistdumper.exe [options] <executablepath>
options :
-c, --config=<path> (mandatory) path of the config file
-f, --format=<format> (mandatory) the output format
--[no-]versioned should the version be appended to file name
executablepath path of the executable to parse
formatters
mistdumper can format to multiple output formats.
currently implemented output formats are :
- dart
- c++
- csharp
json configuration
full structure :
{
"name": "exampleapp signature list",
"appname": "exampleapp",
"version": "0.0.0.1",
"author": "midi12",
"signatures" : [
{
"name": "s_globalptr",
"relative": true,
"dereference": false,
"dereference_size": 0,
"offset": 3,
"extra": 12,
"pattern": "de ad be ?? ?? ?? ?? ef de ad c0 de ?? ?? ?? ??",
"namespace": "statics"
}
]
}
- name : mandatory
- pattern : mandatory
- namespace : mandatory
- dereference : optional (default value :
false
) - dereference_size : optional (default value :
4
) - relative : optional (default value :
false
) - offset : optional (default value :
0
) - extra : optional (default value :
0
)
full example of json configuration:
{
"name": "exampleapp signature list",
"appname": "exampleapp",
"version": "0.0.0.1",
"author": "midi12",
"signatures" : [
{
"name": "s_globalptr",
"relative": true,
"offset": 3,
"pattern": "de ad be ?? ?? ?? ?? ef de ad c0 de ?? ?? ?? ??",
"namespace": "statics"
},
{
"name": "s_globalptr__poffset",
"dereference": true,
"dereference_size": 4,
"offset": 8,
"pattern": "de ad be ?? ?? ?? ?? ef de ad c0 de ?? ?? ?? ??",
"namespace": "offsets"
},
{
"name": "examplefunction",
"extra": 12,
"pattern": "de ad be ?? ?? ?? ?? ef de ad c0 de ?? ?? ?? ??",
"namespace": "functions"
}
]
}
example outputs
dart :
library mistdumper;
class functions {
static const int examplefunction = 0xdeadc0de;
}
class offsets {
static const int s_globalptr__poffset = 0xc0ffee;
}
class statics {
static const int s_globalptr = 0xdeadbeef;
}
c++ :
#pragma once
#include <cstdint>
namespace mistdumper {
namespace functions {
constexpr ptrdiff_t examplefunction = 0xdeadc0de;
}
namespace offsets {
constexpr ptrdiff_t s_globalptr__poffset = 0xc0ffee;
}
namespace statics {
constexpr ptrdiff_t s_globalptr = 0xdeadbeef;
}
}
csharp :
using system;
namespace mistdumper
{
public static class functions {
public static readonly uintptr examplefunction = 0xdeadc0de;
}
public static class offsets {
public static readonly uintptr s_globalptr__poffset = 0xc0ffee;
}
public static class statics {
public static readonly uintptr s_globalptr = 0xdeadbeef;
}
}
building from the source
you need dart sdk 2.12.0
at least (https://dart.dev/get-dart).
in case you modified the json class you need to run dart run build_runner build
.
run dart compile exe .binmistdumper.dart -o .buildmistdumper.exe
.
Comments are closed.