Skip to content

Maat: Sleigh raised a bad data exception: r0x00000002: Unable to resolve constructor #165

@PatrickAlphaC

Description

@PatrickAlphaC

You can also see this question on stack exchange eth.

I'm running the maat symbolic executor on my Linux instance with the following code.

Command I ran to get my binary code:

gcc myFile.c -o myFile.out

myFile.c

#include <stdio.h>

int main(int argc, char** argv)
{
    printf("Argument starts with: '%c'\n", argv[1][0]);
    return 42;
}

Maat python code:

from maat import MaatEngine, ARCH, OS, BIN
m = MaatEngine(ARCH.X64, OS.LINUX)
m.load("./myFile.out", BIN.ELF64, args=[b"hello"], load_interp=False)
m.run()

However, running this is getting me the following error:

$ python3 symbolic.py 
[Warning] Couldn't find library 'libc.so.6': skipping import
[Warning] Missing imported function: __cxa_finalize
[Info] Adding object './myFile.out' to virtual fs at '/./myFile.out'
[Error] Sleigh failed to decode instructions in basic block starting at 0x2. Raised the following error: "Sleigh raised a bad data exception: r0x00000002: Unable to resolve constructor"
[Error] Lifter error: MaatEngine::get_asm_inst(): failed to lift instructions

Am I doing something wrong?

Versions:

Python 3.10.6
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Ubuntu 22.04.1 LTS
pymaat==0.6.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions