-
Notifications
You must be signed in to change notification settings - Fork 73
Home
John Holowczak edited this page Aug 12, 2019
·
7 revisions
Binee is a complete binary emulation environment that focuses on introspection of all IO operations. Primary goals for this project are to provide a flexible environment for determining a binaries side effects on the system.
The features Binee adds to previous emulation environments are:
- Realistic loading of a PE file and its required dependencies. The users land memory should look as close to a real execution as possible.
- Easy to use hooking framework. We want to create a flexible hooking framework that allows the analyst to rapidly implement new hooks and capture data.
- Mock out as much of the OS internals as reasonably possible. Currently, there are small mocks of the file system, registry, threading and TIB/PEB structures for Windows.
- The OS environment, as much as possible, should be defined in a configuration file. This enables rapid movement from environment to environment.
If you choose to use Binee to emulate portions of Microsoft Windows, you are solely responsible for obtaining any necessary rights and licenses from Microsoft.
Build with the following docker command docker build -t binee .
docker run -it -v $PWD:/bineedev/go/src/binee binee bash
root@2b0fee41629f:~/go/src/binee# go get
root@2b0fee41629f:~/go/src/binee# go build
root@2b0fee41629f:~/go/src/binee# ./binee -v
usage ./binee [-aAhvveis] [FILE] [ARGS]
-a <apiset dll name> Returns the real dll name given an apiset dll
-A List all apisets and their mappings
-c FILE Path to a configuration file
-e FILE List file exports
-h Show this usage menu
-i FILE List file imports
-j Output as JSON
-v[v] Verbosity level, two v's for more verbose
root@2b0fee41629f:~/go/src/binee# ./binee tests/ConsoleApplication1_x86.exe
0x20735900: GetSystemTimeAsFileTime(lpSystemTimeAsFileTime = 0xb000ffe0) = 0xb000ffe0
0x2072a310: GetCurrentThreadId() = 0x0
0x20734100: GetCurrentProcessId() = 0x2001
0x207340e0: QueryPerformanceCounter(lpPerformanceCount = 0xb000ffd8) = 0x1
0x20738860: IsProcessorFeaturePresent(ProcessorFeature = 0xa) = 0x1
0x212ae760: _initterm_e(PVFV = 0x4020d8, PVFV = 0x4020e4) = 0x0
0x212a7260: _initterm(PVPV = 0x4020cc, PVPV = 0x4020d4) = 0x0
0x212fd880: __p___argv() = 0x40338c
0x212fd870: __p___argc() = 0x21352104
0x21330940: _get_initial_narrow_environment() = 0x21352108
0x212ad780: __acrt_iob_func() = 0x403380
0x2130f510: __stdio_common_vfprintf(stream = 0x0, format = 'GENERIC_READ = 0x%llx\n') = 0x403380
0x212ad780: __acrt_iob_func() = 0x403380
0x2130f510: __stdio_common_vfprintf(stream = 0x0, format = 'GENERIC_WRITE = 0x%llx\n') = 0x403380
0x212ad780: __acrt_iob_func() = 0x403380
0x2130f510: __stdio_common_vfprintf(stream = 0x0, format = 'INVALID_HANDLE = 0x%llx\n') = 0x403380
0x212ad780: __acrt_iob_func() = 0x403380
0x2130f510: __stdio_common_vfprintf(stream = 0x0, format = 'CREATE_ALWAYS = 0x%x\n') = 0x403380
0x212ad780: __acrt_iob_func() = 0x403380
0x2130f510: __stdio_common_vfprintf(stream = 0x0, format = 'FILE_ATTRIBUTE_NORMAL = 0x%x\n') = 0x403380
0x212ad780: __acrt_iob_func() = 0x403380
0x2130f510: __stdio_common_vfprintf(stream = 0x0, format = 'ERROR_SUCCESS = 0x%x\n') = 0x403380
0x2073e500: CreateFileA(lpFileName = 'malfile.exe', dwDesiredAccess = 0xc0000000, dwShareMode = 0x0, lpSecurityAttributes = 0x0, dwCreationDisposition = 0x2, dwFlagsAndAttributes = 0x80, hTemplateFile = 0x0) = 0xa0001578
0x207920d3: VerSetConditionMask() = 0x403380
0x212ad780: __acrt_iob_func() = 0x403380
0x2130f510: __stdio_common_vfprintf(stream = 0x0, format = 'out = 0x%x\n') = 0x403380
0x207920d3: VerSetConditionMask() = 0x403380
0x212ad780: __acrt_iob_func() = 0x403380
0x2130f510: __stdio_common_vfprintf(stream = 0x0, format = 'out = 0x%x\n') = 0x403380
0x207920d3: VerSetConditionMask() = 0x403380
0x212ad780: __acrt_iob_func() = 0x403380
0x2130f510: __stdio_common_vfprintf(stream = 0x0, format = 'out = 0x%x\n') = 0x403380
0x216b5730: memset(dest = 0xb000ff1c, char = 0x0, count = 0x58) = 0xb000ff1c
0x2073e920: WriteFile(hFile = 0xa0001578, lpBuffer = 0xb000ff10, nNumberOfBytesToWrite = 0xb, lpNumberOfBytesWritten = 0xb000ff0c, lpOverlapped = 0x0) = 0xb
0x20738860: IsProcessorFeaturePresent(ProcessorFeature = 0x17) = 0x1
0x2073ab20: SetUnhandledExceptionFilter(lpTopLevelExceptionFilter = 0x0) = 0x4
0x2075c770: UnhandledExceptionFilter(ExceptionInfo = 0x402100) = 0x1
0x207361b0: GetCurrentProcess() = 0x1
0x2073bd30: TerminateProcess(hProcess = 0xffffffff, uExitCode = 0xc0000409) = 0xffffffff