illera88 / Ponce
- воскресенье, 25 сентября 2016 г. в 03:17:59
C++
Symbolic Execution just one-click away!
Ponce (pronounced [ 'poN θe ] pon-they ) is an IDA Pro plugin that provides users the ability to perform taint analysis and symbolic execution over binaries in an easy and intuitive fashion. With Ponce you are one click away from getting all the power from cutting edge symbolic execution. Entirely written in C/C++.
Symbolic execution is not a new concept in the security community. It has been around for years but it is not until the last couple of years that open source projects like Triton and Angr have been created to address this need. Despite the availability of these projects, end users are often left to implement specific use cases themselves.
We addressed these needs by creating Ponce, an IDA plugin that implements symbolic execution and taint analysis within the most used disassembler/debugger for reverse engineers.
Ponce works with both x86 and x64 binaries. Installing the plugin is as simple as copying Ponce.plw and Ponce.p64 to the plugins\
folder in your IDA installation directory.
Ponce currently works with IDA Pro on Windows for x86 and x64 binaries.
You can still debug Linux and Mac OS X binaries with Ponce using IDA's built-in remote debugger.
Ponce v0.2 will build native plugins for IDA Linux and IDA Mac OS X. Actually the code we wrote already takes these architectures into consideration using macros for the different operating systems.
The plugin will automatically run, guiding you through the initial configuration the first time it is run. The configuration will be saved to a configuration file so you won't have to worry about the config window again.
Here we can see the use of the symbolic engine and how we can solve constrains:
aaaaa
as argument.The crackme source code can be found here
In the next gif we can see the use of automatic tainting and how we can negate a condition and inject it in memory while debugging:
argv
.elite
that has been injected in memory and therefore reach the Win
code.The crackme source code can be found here
In this example we can see the use of the tainting engine with cmake. We are:
fread()
` reads from the file.In the next example we are using the snapshot engine:
fread()
` reads from the file.The example source code can be found here
In this section we will list the different Ponce options as well as keyboard shortcuts:
Ponce relies on the Triton framework to provide semantics, taint analysis and symbolic execution. Triton is an awesome Open Source project sponsored by Quarkslab and maintained mainly by Jonathan Salwan with a rich library. We would like to thank and endorse Jonathan's work with Triton. You rock! :)
We provide compiled binaries for Ponce, but if you want to build your own plugin you can do so using Visual Studio 2013. We tried to make the building process as easy as possible:
git clone --recursive https://github.com/illera88/PonceProject.git
Build\PonceBuild\Ponce.sln
: The project configuration is ready to use the includes and libraries shipped with the project that reside in external-libs\
.Post-Build Event
that will move the created binary plugin to the IDA plugin folder for you. copy /Y $(TargetPath) "C:\Program Files (x86)\IDA 6.9\plugins"
. NOTE: use your IDA installation path.The project has 4 build configurations:
The static version of z3.lib
is ~ 1.1Gb and the linking time is considerable. That's the main reason why we have a building version that uses z3 dynamically (as a dll). If you are using z3 dynamically don't forget to copy the libz3.dll file into the IDA's directory.
Juan Ponce de León (1474 – July 1521) was a Spanish explorer and conquistador. He discovered Florida in the United States. The IDA plugin will help you discover, explore and hopefully conquer the different paths in a binary.
Yes, you can natively use Ponce in IDA for Windows or remotely attach to a Linux or OS X box and use it. In the next Ponce version we will natively support Ponce for Linux and OS X IDA versions.
In our tests we reach to process 3000 instructions per second. We plan to use the PIN tracer IDA offers to increase the speed.
Open an issue, we will solve it ASAP ;)
Sure! Please do pull requests and work in the opened issues. We will pay you in beers for help ;)
Symbolic execution has some inherent problems:
x = aray[symbolic_index]
some problems arise that could lead on the loose of track of the tainted/symbolized user controled input.