Comments (2)
I can reproduce your problem.
Working on a fix, hoping it'll be quick since I think most of the internals should support 64-bit jump tables, just that the cfg recovery and some checks aren't updated to handle them.
I'm also using a build of thttpd -- but its probably too complex to re-emit and still function. If you have a smaller example that has the same behavior, I can add it to the mcsema tests.
from mcsema.
Fixed the initial issue, but can't confirm how well until we can get a smaller example. Its possible to get output bitcode now, though.
So the bitcode you get for thttpd wont be re-build into a working thttpd. To get runnable bitcode mcsema will need to get better ELF support, like processing .init and add support for callbacks of translated functions, as thttpd looks like it uses threading.
to get some bitcode:
source env.sh
# foo.txt will contain the cfg recovery log
IDALOG=`pwd`/foo.txt ${BIN_DESCEND_PATH}/bin_descend_wrapper.py -d -march=x86-64 -func-map=<path to mcsema>/mc-sema/std_defs/std_defs.txt -entry-symbol=main -i=thttpd > foo.txt
#currently you need -ignore-unsupported since there's a few missing instructions, but you'll get some output bitcode
${CFG_TO_BC_PATH}/cfg_to_bc -mtriple=x86_64-pc-linux-gnu --ignore-unsupported -i thttpd.cfg -driver=mcsema_main,main,raw,return,C -o thttpd.bc
The unsupported instructions are mostly 64-bit versions of things like XOR, CMP, etc. All thats really needed is just to add them to the translation mapping. I already did a few for SUB/SBB and CMOV, which came up a lot. The new instructions also need unit tests.
from mcsema.
Related Issues (20)
- Docker build error HOT 1
- dyninst frontend is not gettting built on Linux HOT 4
- Segfault while running lifted binary HOT 1
- How not to be explicit about "runtime's memory" HOT 4
- Decompiling Windows binaries (32bit and 64bit) does not work at all HOT 3
- Building mcsema with clang12 error HOT 10
- Official support for running mcsema with rizin/cutter HOT 2
- build error on ubuntu 20.04
- Dockerfile is not up-to-date with remill dependency HOT 2
- Feature request: Improve installation process with precompiled binaries HOT 1
- to see details in the generated 'xxx.cfg'
- fatal error: 'anvill/Program.h' file not found HOT 1
- Can you walk through the example on docs/McSemaWalkthrough.md and check if it still works?
- Unable to build the docker image
- error while translating function with function pointer as parameter HOT 5
- wsl-1.0 ubuntu20+win ida7.5 counter a error of
- Converting 64 bit program to 32 bit HOT 2
- Use mcsema with IDA Home
- Issue in disassembling binaries
- how to make llvm ir "store" volatile? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcsema.