313 Commits

Author SHA1 Message Date
JP Smith
0029c8fdc5 refactor the verbosity interface to look cleaner (#265) 2017-05-22 14:14:03 -05:00
Sascha Schirra
b381c4e04d VORPD and VORPS instructions added (#258) 2017-05-19 14:49:22 -05:00
Mark Mossberg
8840e31fc2 Add strlen model (#260)
* add models

* wip strcmp tests

* t

* Add some tests

* Better asserts

* More pythonic

* Add effectivene null test

* init strlen

* pythonic range

* clean

* docstring

* tmp

* stuff

* stuff

* Complete test

* Add another test

* Doc

* clean

* Add symbolic arg check

* Fix tests

* Make arch generic

* Clean comment

* Add basic unconstrained test
2017-05-18 16:59:44 -04:00
JP Smith
10f7531cae Use newer, less broken capstone version (#262)
* use newer, less broken capstone version

* fix documentation
2017-05-18 11:19:14 -05:00
Mark Mossberg
92eaf76236 Add strcmp model (#251)
* add models

* wip strcmp tests

* t

* Add some tests

* Better asserts

* More pythonic

* Add effectivene null test

* Handle symbolic pointer arguments
2017-05-17 11:44:10 -04:00
Mark Mossberg
e5aca50e1f Don't use string=True for symbolic arg/env (#256)
This very strictly constrains the arg/env to the length of the symbolic
string which is too strict for many use cases.

For example:

manticore ./bin +++++

that symbolic string would only be allowed to be strings of length 5,
and no shorter.
2017-05-15 17:38:22 -04:00
Yan
42c28e0256 Handle missing syscalls with correct exception (#255) 2017-05-15 16:07:01 -04:00
Yan
2202b0a27d Generate NRs for ARM-specific syscalls (#254) 2017-05-15 15:11:54 -04:00
Mark Mossberg
42955387a5 Don't make concrete bytes symbolic, only wildcard bytes (#252) 2017-05-12 17:31:59 -04:00
Mark Mossberg
7700112d9e Rm unused Slinux ctor params (#250)
* Rm unused Slinux ctor params

Fixes #109

* Add back constraitns

* Make argv and envp default params

* Use ternary

* nit

* Clean test_unicorn

* Correct envp and docstring
2017-05-12 11:35:59 -04:00
Mark Mossberg
1e76998eb7 Add infrastructure for core models (#244)
* Rename libc.py to models.py

* Clean old unused libc.py code

* Make models top level importable

* Add State level model invocation function

So user is not required to pass in state at to a platform level func

* Explicitly mark what is in the public API

Protects against accidentally making something a public API just because
it has a docstring

* clean

* Move models.py to top level

* Rm models

* Fix docstring typo

* Add default param name, move comment

* Update docstring
2017-05-11 13:25:43 -04:00
Yan
a0717aa661 Syscall table rework (#245)
* Script for generating syscall tables from Linux src (pulled from kernel.org)

* Add generated syscall table

* Update syscall names to match extracted entries

* Move to new syscall dispatcher

* Add machine def to x86 cpus
2017-05-11 12:20:00 -04:00
Mark Mossberg
a10b7bae29 Update parallel processing api (#246)
* Remove m.workers, add run(procs=), update docs

* Update docs
2017-05-10 19:44:55 -04:00
Mark Mossberg
e4a4916597 Rename os model terminology from "models" to "platforms" (#243)
* Rename

* rename in manticore.py

* rename in executor.py

* big rename

* big rename

* update changelog
2017-05-09 19:25:32 -04:00
Cory Duplantis
b8991e0c64 Add Google2016 unbreakable challenge to examples repo (#194)
* Add Google2016 unbreakable challenge to examples repo

* Add Google2016 unbreakable challenge to examples repo

state.add instead of state.constraints.add

* Update constraints API
2017-05-09 18:35:38 -04:00
Yan
3c9653d1d7 Update syscall/funcall implementation (#213)
* Wrap ABI semantics in its own class hierarchy

* Define a model invocation for syscalls and function calls

* Add unit tests for ABI

* Add a common base class for Platform models
2017-05-09 16:13:08 -04:00
Mark Mossberg
3873c3eb5d Document m.context API (#238) 2017-05-08 15:39:18 -04:00
Mark Mossberg
fca086ea45 Add hack for Unicorn YMM registers (#239) 2017-05-08 15:14:37 -04:00
Yan
395a40a646 Add memory tracing (#203)
* implement memory write tracing

* Comment updates

* Add memory trace tests

* make sure we ignore erroring writes

* Address comments

* remove superfluous return annotation
2017-05-08 14:32:54 -04:00
Mark Mossberg
868bdd80ce Manticore 0.1.1 (#234) 2017-05-05 15:21:52 -04:00
Mark Mossberg
44d365ff4c Formalize API for constraining a State (#232)
* Rename state.add to state.constrain

* Update all uses of state.constrain

* Rm check param

* Added changelog

* Update changelog

* Update

* Minor clean
2017-05-05 13:31:43 -04:00
Yan
50fd50ee12 Simplify linux model interfaces (#233) 2017-05-05 13:11:59 -04:00
Tim Deeb-Swihart
aafc0e7284 Fix handling of Z3 result in optimize due to nondeterministic output ordering (#226) (#227) 2017-05-05 13:43:22 -03:00
Samuel Groß
d9baedeeac sys_sigprocmask: the second method parameter has to be the cpu instance (#229) 2017-05-05 13:33:42 -03:00
Yan
64d1ed51f2 Decode instruction early (#205)
* Move PC verification to decode_instruction

* Decode instruction in executor

* Fix unicorn tests

* remove decoded_pc

* use issymbolic()
2017-05-04 17:36:39 -04:00
JP Smith
93f9d77f40 Switch to ssh-style verbosity CLI flags (#222)
* switch to ssh-style verbosity CLI flags

* add register logging to level 4
2017-05-04 14:40:22 -05:00
Tim Deeb-Swihart
538dfea8fe Fix incorrect syscall arg regs for X86 (#224) (#228)
i386 and amd64 had their register sets reversed. This fixes that.
2017-05-03 14:05:03 -04:00
Samuel Groß
af2676402c Implemented sys_readv system call (#217)
* Implemented sys_readv system call

* sys_readv and sys_writev are now independent of the system bitness
2017-05-02 17:33:29 -04:00
feliam
b19a158b6f Clean and document some example/linux (#176)
* Clean arguments.c

* Increase query timeout from 30 to 120 seconds

* Example documentation updated

* Add ibranch comments

* crackme.py, ibranch, sindex and typos

* indexhell

* visitad typo

* typo

* strncmp example

* Typos
2017-05-02 17:04:07 -04:00
Manas George
f4e5bcf53e refactored will_execute_pc hooks (#214)
* Refactored will_execute_pc hooks

* Fixed typos

* Figured out why the simple_parse test was failing

* Figured out why the simple_parse test was failing

* Figured out why the simple_parse test was failing

* Figured out why the simple_parse test was failing

Cleanup

* Cleanup

* removed TODO from executor.py

* refactored line in forking handling in executor.py

* removed extraneous space in manticore.py

* removed --exe flag from nosetests command
2017-05-02 14:55:02 -04:00
Simon Bourne
0061ee5c48 CPUID now reports that extended features are unsupported (as unicorn doesn't support them). (#211) 2017-05-02 09:49:49 -04:00
Feist Josselin
0583162133 Fix wrong variable name in SymbolicFile (#220) 2017-05-01 21:07:45 -04:00
Samuel Groß
9e87d1dfa6 Added sys_ioctl to 64-bit syscall table (#218) 2017-05-01 20:54:27 -04:00
Samuel Groß
aabf5777ee Use correct value for AT_PHENT (#216) 2017-05-01 19:03:52 -04:00
Samuel Groß
94e6e76919 Fixed wrong syscall number for sys_faccessat (#215) 2017-05-01 18:23:00 -04:00
JP Smith
f7598e53c0 Only make registers appear on verbosity level 5 (#198)
* make --verbose output more useful

* refactor and rename rendering functions

* refactor to use join

* make sure str returns a value
2017-04-28 12:17:17 -05:00
Yan
8d6bcadb37 Fix RSB, VLDMIA; Add RSC (#197)
* Fix RSB; Add RSC
* Fix vldmia semantics
* To trigger build
2017-04-27 16:36:23 -04:00
Dan Guido
7e46db5216 oops 2017-04-27 15:48:28 -04:00
Dan Guido
1836c2d266 no more sudo 2017-04-27 15:37:38 -04:00
Dan Guido
d1b0abba6c try removing sudo 2017-04-27 15:37:20 -04:00
Dan Guido
788a5de23c .com -> .org 2017-04-27 15:37:15 -04:00
Mark Mossberg
c78ea5c910 Use lowercase name in setup.py (#192) 2017-04-26 15:24:27 -04:00
Mark Mossberg
e4506dc029 Add more fields for pypi (#191)
* Add more fields for pypi

* Add author
2017-04-26 14:57:24 -04:00
Dan Guido
44dff1745d Add readthedocs (#179)
* Add readthedocs badge

* Add rtd intro

* Add API reference link

* change the order

wiki first, because that’s where the majority of the docs live
2017-04-24 17:24:29 -04:00
Mark Mossberg
8b973064d1 Add read the docs mock (#180)
* Add read the docs mock

* Only mock if 'z3 in first arg to check_output
2017-04-24 17:06:47 -04:00
Mark Mossberg
c2fb359b82 Fix LDR/STR writeback (#175)
if a ldr used the same reg for dest and writeback offset, we'd
compute writeback wrong because we'd run the insn and then use the new
value in computing writeback
2017-04-24 15:09:15 -04:00
Mark Mossberg
fbe3a197ba Install instructions updates (#171)
* Install instructions updates

* Update README.md

* also need pip

* need to update, plus compact a few things

* add -y

* grammar?

* typos

* Add bountysource link

* consistency

* Point users to the examples dir and wiki

I thought these links were cluttering things a bit, and 2 out of 3 of
them aren’t official documentation yet we’re linking to them in the
first line of the README. I updated the wiki to address these directly
in a way I think is more clear.

* link to Z3 releases

* oops, don't know where that came from

* ensure people run the latest pip

* be more explicit

* Add an Issue Template

* be more explicit

* no longer appropriate here

* unnecessary

* add note about 16.04

* move issue template to hidden folder

* Spelling

* be explicit, makes copy/paste easier
2017-04-24 12:19:10 -04:00
Mark Mossberg
fd3873f0a8 Fix ARM bitwise (LSL/LSR) (#174)
* Rm bogus asserts

* correct lsl_c

* Add test for lsl carry
2017-04-24 11:31:11 -04:00
Dan Guido
fe9d4f0f6b Remove notifications to Slack (#167) 2017-04-22 19:30:00 -04:00
Mark Mossberg
edf0ee299b Remove arch specific auxv (#173) 2017-04-21 21:31:12 -04:00