1084 Commits

Author SHA1 Message Date
Eric Kilmer 26368053f7 README: Update LLVM versions mcsema supports 2022-04-26 09:43:28 -04:00
Eric Kilmer 7f3eb7bb90 Update to latest commit of cmake-git-version-tracking
https://github.com/andrew-hardin/cmake-git-version-tracking

commit 0ef58f1ef2ee02371d3e5be43e6cc6bf4004d8a5 Mar 7, 2022
2022-04-26 09:30:54 -04:00
Eric Kilmer 9062d708a5 CI: Fix git permissions 2022-04-26 09:30:47 -04:00
Stephen-lei 82c310697f a simple scripts to show the details in a cfg file (#780)
to use this ,you have to put the CFG_pb2.py file,which from the  mcsema/tools/mcsema_disass/ida7/ ,into the same dir with this script
 type  python show_cfg.py "xxx.cfg" "xxx.txt" 
 the first arg is the location of the cfg file you want to see, like "./maze.cfg"
 the second arg is the location of the generated cfg details if the cfg file, like "./cfgdetails.txt"
2022-02-22 22:41:48 -05:00
dependabot[bot] 577130de8a Bump protobuf from 3.2.0 to 3.15.0 in /tools (#778)
Bumps [protobuf](https://github.com/protocolbuffers/protobuf) from 3.2.0 to 3.15.0.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/master/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.2.0...v3.15.0)

---
updated-dependencies:
- dependency-name: protobuf
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-10 23:51:05 -05:00
Eric Kilmer 35ac50552a Fix Dockerfile and add to CI (#777) 2022-02-05 12:30:23 -05:00
Michael D Brown b7492e2ffb Update README.md (#772)
Recent commit to lifting-bits/remill requires pinning a specific version of remill for LLVM versions >=12.
2022-01-04 10:25:39 -05:00
burntfalafel 79e3f9180a Fixed "could not connect to display" error (#771)
This is a pertaining issue in Linux systems where the DISPLAY variable isn't forwarded.

The error which is fixed is; "QXcbConnection: Could not connect to display". Users before have raised issues on this [here](https://github.com/lifting-bits/mcsema/issues?q=QXcbConnection%3A+Could+not+connect+to+display)
2021-12-15 11:00:41 -05:00
burntfalafel 08fa6936d4 Updated README.md to build with LLVM versions (#770)
* Updated README.md to build with LLVM versions  

Updated instructions for building with LLVM versions 9, 10, 11 and 12

* Updated README.md ro remove commit history limit

As commits in `remill` increase, no point in keeping a hard limit of 100.
2021-12-14 15:10:05 -05:00
fkil 87239ee287 fix weak linking (#767)
* Quick fix for weak linking problem
ExportFunctions would override the weak linkage set before

Signed-off-by: Fabian Kilger <kilger@sec.in.tum.de>

* Fix formatting.

Co-authored-by: Peter Goodman <peter.goodman@gmail.com>
2021-10-25 17:42:44 -04:00
Farzon Lotfi dfd4019945 Fix mcsema_disass docs link for get_cfg.py (#762) 2021-10-21 12:37:07 -04:00
Eric Kilmer d630fc254f Pin remill in CI (#766)
* Update README
2021-10-10 12:17:57 -04:00
Henry Eklind 8a5120a783 Fix bash variable typo in README.md (#765) 2021-09-28 22:22:42 -04:00
Eric Kilmer d538ca4acc Update build instruction in README (#759)
Use a valid LLVM version in Docker instructions
2021-08-16 12:42:27 -04:00
Eric Kilmer b8621d9a0a Fix errors with protobuf on newer CMake (#756) 2021-08-06 18:07:05 -04:00
Eric Kilmer 6e9e9f1bcb Move cxx-common to lifting-bits. Remove old cxx-common workflow (#752) 2021-05-26 13:54:51 -04:00
Alessandro Gario 0a541eafaf libs: Build against the correct anvill version (#745) v3.0.26 2021-04-01 21:38:55 +02:00
Eric Kilmer 339800eda3 Rework Docker Image build (#741)
* Try reworking Docker image

* Fix some old behavior for building abi libraries

I don't think the result is actually usable...

* Remove most Python2 references

Still left some references to python2 for helper scripts since they
aren't tested (afaik) in CI

* Fix CI

* Remove old CMakeLists.txt and remove support for old TRAILOFBITS_LIBRARIES method of building

* Update README
v3.0.25
2021-03-05 16:43:20 -05:00
Eric Kilmer e42f45ffff Remove most Python2 references (#742)
* Remove most Python2 references

Still left some references to python2 for helper scripts since they
aren't tested (afaik) in CI

* Fix CI
v3.0.24
2021-03-05 16:11:23 -05:00
Eric Kilmer 2ed00dc29e Fix bad LoadInst compat for LLVM 11 (#739)
* Fix bad LoadInst compat for LLVM 11

* Add lifter smoketest. Just check for 0 return

* Use macos 10.15 CI runner
v3.0.23
2021-03-02 16:05:45 -05:00
Eric Kilmer 62293ae926 Fix anvill install target usage (#736)
Anvill now installs unversioned target
v3.0.22
2021-02-22 12:05:48 -05:00
Eric Kilmer 6dfbaf983d Add rpm dependency needed by downstream (#734) v3.0.21 2021-02-20 13:45:53 -05:00
Artem Dinaburg f127149c89 Limit MacOS CI Runners (#733)
Limit MacOS CI runners due to organizational limits
v3.0.20
2021-02-17 16:27:29 -05:00
Eric Kilmer c54f84a44b Remove Python2 from pushed Docker images (#731)
Had to rename the directory where the Python 3 module is installed so
that we could hard-code the PYTHONPATH to it, e.g. `lib/python3.6` ->
`lib/python3` on Ubuntu 18.04 with default Python version installed by
`apt install python3` or `lib/python3.8` -> `lib/python3` for Ubuntu
20.04.
v3.0.19
2021-02-15 14:08:52 -05:00
Eric Kilmer aa49fcc4fb Support LLVM 11 (#729)
* Add guards based on LLVM version for 11 compatibility

* Use remill LLVM 11 compat headers

* CI support for LLVM 11
v3.0.18
2021-02-13 11:22:32 -05:00
Eric Kilmer 36f2660c8f vcpkg: Support Windows and arm64 (#726)
* Fixes and updates for McSema to build on Windows

* Enable C CXX ASM languages from beginning

Workaround for issue after finding Clang using Clang's own CMake
find-scripts

* Support aarch64 and Windows release triplets

* Conditional link to remill_settings for new vcpkg build
v3.0.17
2021-02-02 15:49:39 -05:00
Artem Dinaburg bc4d47fe94 Fix python2.7 paths due to Py2.7 EOL (#723)
* Fix python2.7 paths due to Py2.7 EOL
v3.0.16
2021-01-26 12:40:56 -05:00
Kuan-Yen Chou 372a3fcea4 Fix the maze example with KLEE (#719)
The x86 and x86_64 binaries are re-compiled with clang-10 from the
vcpkg, cxx-common libraries, because KLEE would fail with segfault if
the LLVM bitcode is lifted from binaries compiled with GCC (10.2.0). It
may be worth looking into why KLEE fails with the bitcodes lifted from
GCC compiled binaries in this case.

The AArch64 binary is re-compiled with aarch64-linux-gnu-gcc (10.2.0),
but mcsema-lift-10.0 fails with the following message.

```
F1228 23:41:38.079257 120074 Analyze.cpp:491] Check failed: dest_size < 64u (64 vs. 64)
*** Check failure stack trace: ***
    @          0x11601cc  google::LogMessageFatal::~LogMessageFatal()
    @           0x785c3c  anvill::XrefExprFolder::VisitTrunc()
    @           0x786108  anvill::XrefExprFolder::VisitICmp()
    @           0x660113  mcsema::(anonymous namespace)::LowerXrefs()::$_1::operator()()
    @           0x65b388  mcsema::(anonymous namespace)::LowerXrefs()
    @           0x65a458  mcsema::OptimizeModule()
    @           0x657bdc  mcsema::LiftCodeIntoModule()
    @           0x66e9ee  main
    @     0x7ffb0e016152  __libc_start_main
    @           0x61bafe  _start
    @              (nil)  (unknown)
```

I have not tried compiling the AArch64 binary with clang
(`-target aarch64-linux-gnu`). It may be worth trying and see if the
resulting bitcode works with KLEE.
v3.0.15
2021-01-19 20:01:40 -05:00
Eric Kilmer 40d5cc7b27 MacOS CI: Fix Python tool test with PYTHONPATH (#718) v3.0.14 2020-12-16 11:29:43 -05:00
Eric Kilmer 24db01c1ba Support vcpkg build system (#717)
First step towards transitioning away from cxx-common's `pkgman.py` dependency management system towards compatibility with and use of vcpkg (https://github.com/microsoft/vcpkg) to manage dependencies.

This commit attempts to support both the new and old build systems until we can phase out the old completely.

Please see the updated remill, anvill, and trailofbits/cxx-common repositories to learn how to fetch the required dependencies.
v3.0.13
2020-12-10 19:51:04 -05:00
Peter Goodman 5dec010a1d Disable building any 32-bit runtimes. (#712) v3.0.12 2020-11-12 15:35:14 -05:00
Peter Goodman 21970a5cfd Fixes one egregious bug in how we alias registers. What would happen is that AL/AH, DL/DH, etc. would all map to the same alias because their containing register and types would be the same. Modified register aliases to have the form <name>_<offset>_<type>. Also fixed an issue in mcsema-disass where the main function wouldn't be recognized as a function, and thus not lifted. (#710) v3.0.11 2020-11-11 18:07:48 -05:00
Peter Goodman e90cc183a7 Update .remill_commit_id v3.0.10 2020-11-05 14:06:59 -05:00
Peter Goodman b0f7790f43 Sparc support (#709)
* Adds sparc support; formats files

* Update the readme and walkthrough

* Minor tweaks to readme/walkthrough

* Update ci.yml
2020-11-05 12:59:20 -05:00
Peter Goodman c96402c313 Fixes issue identified by BoLei related to a function that has no associated basic blocks in the CFG (#707) v3.0.9 2020-10-25 22:32:37 -04:00
Peter Goodman ecc8ba9289 Fixes Issue #704 (#705) v3.0.8 2020-10-19 14:35:51 -04:00
Aiethel fa2d4b39a9 Update dyninst frontend (#701)
* cmake: Set c++ standard to c++17.

* dyninst: Properly set is_referenced_by_data if bb is target of data reference.

* dyninst: Always set some value to is_reference_by_data field.

Co-authored-by: Peter Goodman <peter@trailofbits.com>
v3.0.7
2020-10-16 15:00:09 -04:00
Peter Goodman d9bbd1ea7c Python 3 support for mcsema-disass. (#699)
* Python 3 support for mcsema-disass.

* Conditional Python3 installation libraries

* Add conditional check for Python2 also

* Update CMakeLists.txt

Make the install options for py2/3 always available.

* Fix CI tool name

* Update flow.py

Co-authored-by: Eric Kilmer <eric.d.kilmer@gmail.com>
v3.0.6
2020-10-06 16:19:52 -04:00
Peter Goodman 3436537fee Update README.md v3.0.5 2020-09-28 00:13:52 -04:00
Peter Goodman 31f267bd5f Cmake refactor (#693)
* Update to latest remill APIs and way of using CMake.

* Minor fixes

* Bug fixes for AArch64

* Tweaks

* Adds some nifty functionality useful for debugging some aarch64 bugs

* Fixes a subtle bug

* Bug fixes

* Make the test suite use explicit args

* Bug fix in xrefs

* Disable tests for now
v3.0.4
2020-09-22 23:22:56 -04:00
Eric Kilmer 6b27218433 Update docs and fix docker mcsema-disass (#690)
* Fix mcsema-disass tool in final Docker image

* Update some README instructions

* Update more documentation

* Test that the disassembler has at least runtime dependencies to show help message
v3.0.3
2020-08-14 20:10:26 -04:00
Artem Dinaburg 8a041d23d0 Append project name to the check_git target to fix compound builds (#688) v3.0.2 2020-08-12 14:58:26 -04:00
Eric Kilmer 338023c33f Adjust paths to find anvill after upstream update (#687) v3.0.1 2020-08-11 15:48:45 -04:00
Artem Dinaburg 8af327d12a Rolling Releases on Master CI Pass (#685)
Create a new release every time master branch passes CI.
2020-08-11 15:25:33 -04:00
Artem Dinaburg f5aa430e3a Detailed Version Information (#684)
Emit version information with git commit hash, commit date, message, and author.
v3.0.0
2020-08-11 02:03:37 -04:00
Eric Kilmer c170c28de2 Remill binary docker (#657)
* Install remill from published Docker images instead of from source
* Use anvill docker image for anvill parts
2020-08-10 15:18:09 -04:00
Peter Goodman c002b8505c Formats the code with clang-format and my additional stylistic mojojojo (#682) 2020-08-05 16:14:01 -04:00
Artem Dinaburg 3d9c121a12 Fix docker file to install remill (#681)
* Install remill in final docker image

* also bump latest remill
2020-08-05 15:45:30 -04:00
Peter Goodman 2d55d02cc3 API improvements. Must be used with the api_improvements branches of Remill and Anvill (#666)
* API improvements. Must be used with the api_improvements branch of both Remill and McSema

fixes for x86 and running the lifted code with klee

* Update dockerfile to clone anvill

* update remill commit id

* Add python3 to dockerfile

* update python3

* disable abi script

* Updated cmake to find anvill

* Update main.cpp

* update find_package for anvill

* WIP:updated prebuild cfg

* update prebuild cfg files

* enable abi build for testsuite

* Fix memory leak

* install missing package for testcases

* frontend: Reflect cfg file changes in dyninst frontend.

* frontend: Update local files copyrights to reflect overall change to agplv3.

* fix failing testcases

* update test cfgs

* Fix test failure with local state pointer

* set the flag to use local state_ptr in default mode

Co-authored-by: kumarak <iit.akshay@gmail.com>
Co-authored-by: Lukas Korencik <xkorenc1@fi.muni.cz>
2020-07-23 02:14:56 -04:00
Peter Goodman 0380de977f Update README.md 2020-07-05 00:30:25 -04:00