344 Commits

Author SHA1 Message Date
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
Mark Mossberg
87971cca1a Add arm LDCL (#172) 2017-04-21 20:08:30 -04:00
Mark Mossberg
04aa03c85e Update README.md (#165) 2017-04-21 15:18:56 -04:00
Mark Mossberg
f552383e16 Add example taint usage (#161)
* Add example taint usage

- use new_symbolic_value API instead, because it's making an int symbolic
- add every instruction hook that checks for tainted data in operands

* update readme with taint example
2017-04-21 14:59:06 -04:00
JP Smith
130b4dc739 allow multiple --env arguments (#158) 2017-04-21 12:21:05 -05:00
Mark Mossberg
8c5cc6d4b0 Add links to eric's writeup in readme (#157)
* Update README.md

* Update README.md
2017-04-21 13:00:41 -04:00
JP Smith
54bfdf163b remove procs limit (#155) 2017-04-20 21:29:28 -05:00
Mark Mossberg
a52be7459d Arm add vldmia (#154)
* Add VLDMIA

* Add vldmia tests
2017-04-20 15:30:50 -04:00
Mark Mossberg
5ae5daa5c4 Fix arm offset calculation (#152)
* Fix offset calculation

.subtracted is unreliable, and .disp has the sign anyway

* Use .subtracted for reg offsets
2017-04-20 15:05:08 -04:00
Mark Mossberg
4ad028b0df Fix arm/x86(32) linux stat (#153)
* Fix sys_fstat

i'm pretty sure it was totally wrong before, in terms of how it laid
out the struct

I'm based this on using arm-linux-gnueabi-gcc -E
which shows me this struct:

struct stat
  {
    __dev_t st_dev;
    unsigned short int __pad1;

    __ino_t st_ino;

    __mode_t st_mode;
    __nlink_t st_nlink;
    __uid_t st_uid;
    __gid_t st_gid;
    __dev_t st_rdev;
    unsigned short int __pad2;

    __off_t st_size;

    __blksize_t st_blksize;

    __blkcnt_t st_blocks;
# 72 "/usr/arm-linux-gnueabi/include/bits/stat.h" 3
    struct timespec st_atim;
    struct timespec st_mtim;
    struct timespec st_ctim;
# 87 "/usr/arm-linux-gnueabi/include/bits/stat.h" 3
    unsigned long int __glibc_reserved4;
    unsigned long int __glibc_reserved5;

  };

* Add stat32

* Minor
2017-04-20 14:03:35 -04:00
Mark Mossberg
87073d9985 rm files (#151)
* rm

* bye
2017-04-19 15:06:31 -04:00
Yan
9ca1f4a43a Clean up output (#150)
* Quiet down some error messages
* Address comments
2017-04-19 14:28:46 -04:00
Mark Mossberg
1171b3a37f Update README.md: restructure, z3 install (#149)
* Update README.md

* Remove FAQ -> plan to move to wiki

* Rough cut

* Moved quickstart a little lower, but still above the fold
* Added more complete list of requirements
* Added full instructions to quickstart
* Clarified Installation instruction options
* Moved extra details about why requirements are what they are to FAQ

* less is more

* Minor updates
2017-04-19 14:23:36 -04:00
Yan
daab8a5824 Add examples (#145)
* intermediate example commit
* Added more state_explore examples (w/ new_symbolic_buffer)
* Actually comment out verbosity
* rename
* Add comment mentioning symbolicate_buffer
* Update comments
* Fix issue with limited exploration
* Clear up wording
* Update descriptions
* Remove reference to symbolicate_buffer
* Clean up state_explore.c header
* move .c to src/
2017-04-19 14:12:58 -04:00
feliam
648ddf10ab Capstone operand type cornered to one function (#107)
* begin refactoring logging to use manticore object

* fix verbosity things

* fix logging when in scripts

* remove m.log_file now that it's no longer used

* remove unnecessary init_logging usage and unused log_debug variable

* accidentally deleted the wrong line

* re-hide init_logging

* remove old log_debug

* remove unnecessary API stuff and refactor around that

* Capstone operand type cornered to one function

* Un-inline type_map

* Immediate fix to lacking immediate

* Add FAQ about relationship to CRS

* add link to Grr

* reorder instructions

* passive voice

* add slack badge

* begin refactoring logging to use manticore object

* fix verbosity things

* fix logging when in scripts

* remove m.log_file now that it's no longer used

* remove unnecessary init_logging usage and unused log_debug variable

* accidentally deleted the wrong line

* re-hide init_logging

* remove old log_debug

* remove unnecessary API stuff and refactor around that

* Capstone operand type cornered to one function

* Un-inline type_map

* Immediate fix to lacking immediate

* Add FAQ about relationship to CRS

* add link to Grr

* reorder instructions

* passive voice

* add slack badge

* Rebasing noise

* rebase noise

* Operand.reg moved up to Operand
2017-04-19 14:19:15 -03:00
Yan
b612332132 Spelling fixes (#148)
* Spelling fixes
2017-04-19 11:50:17 -04:00
Mark Mossberg
3e81cba8fb Fix linter issues on cpu (#144)
* quick linter stuff

* Fix cpu init in tests

* update cpu name
2017-04-19 10:29:05 -04:00
JP Smith
e32701f978 Refactor logging (#140)
* begin refactoring logging to use manticore object

* fix verbosity things

* fix logging when in scripts

* remove m.log_file now that it's no longer used

* remove unnecessary init_logging usage and unused log_debug variable

* accidentally deleted the wrong line

* re-hide init_logging

* remove old log_debug

* remove unnecessary API stuff and refactor around that

* re-introduce logging PR

* fix Popen

* lost a line in merge

* fix test_binaries

* Log to stdout instead of stderr

* implement mark's changes
2017-04-19 01:21:14 -05:00
Mark Mossberg
65df1cbe35 Fix bad reference to args (#146) 2017-04-18 18:56:58 -04:00
feliam
a9711cf119 Graceful fallback if Z3 doesn't support optimization queries (#135)
* Configure Z3 depending on installed version

* Mocking for subprocess.check_output

* change get_value_fmt to private attribute _get_value_fmt

* Move memoized to utils

* Remove minimal version and simplify

* Re-add invalid versions/sanity checks

* Z3 version format checked on github

* New tests. Version is future proof

* Better logging
2017-04-18 18:40:06 -03:00