420 Commits

Author SHA1 Message Date
Mark Mossberg
1047fa42e3 Document state, cpu, issymbolic (#101)
* Add unstable warning

* verbosity docs

* Add State and Cpu to docs

* Add State docs

* Add cpu docs

* Add select cpu docs

* Add issymbolic helper doc

* Rm double docstring

* Update write_bytes docstring

* Update Cpu docstr

* Document cpu reg interfaces

* Fix rebase mistakes
2017-03-27 15:03:42 -04:00
feliam
6b1c69cb28 Dev fix decree (#98)
* Re enable skipped test

* Re enable skipped test

* Hack so we can use upstream Elftool

* pr comments

* pr comments - staticmethod

* pr comments - implicit > explicit
2017-03-24 19:10:33 -03:00
Yan
f0a6f66d77 Update MOV implementation (carry) (#105)
* Update MOV implementation wrt carry
* Remove intermediate flags dict
* Fix register reference
* Document MOV to conform with current standard
2017-03-24 17:55:24 -04:00
feliam
7dd0879918 Dev arm regfile refactor (#57)
* RegisterFile refactor everywhere

* Update arm_rf tests

* Refactor Operand in both x86 and arm

* Add APSR support (#53)

* Add APSR support

* #issuecomment-284826572

* APSR tests

* cspr to aspr

* RegisterFile refactor everywhere

* Update arm_rf tests

* Refactor Operand in both x86 and arm

* Rebased and NotImplementedError fix

* ARM register initialization compressed

* Fix merging bugs

* Assimilate PR comments

* Assimilate PR comments2

* The new style. future is now

* WIP

* Improve quick start ,add asciinema (#58)

* Towards a helloworld world

* Rm requirements.txt (#56)

* Print workspace dir by default (#55)

* Print workspace dir by default

* Change initial cli output

* refactor or or or

* WIP

* Add arm rf testcase

* ARM aliases fix

* debug print removed

* fix tests

* Remove unicorn script from travis build (#64)

* remove unicorn script from travis build

* remove unicorn script entirely

* Rename test -> tests (#66)

* rename test -> tests

* re-add ignored tests

* Switch instructions to prefer virtualenv (#65)

* switch instructions to prefer virtualenv

* document use of virtualenvwrapper

* Make cpuid more forgiving (#67)

* Make cpuid more forgiving

* error() to warning()

* Add CPUID EAX=0xd ECX=0,1

* Let logger handle the format string iff needed

* to hex

* Rm unused files (#76)

* Move state into own file (#75)

* Move State from executor.py

* Fix import

* relative import

* Rm unnecessary code (#80)

* Add example crackme (#77)

* add example crackme

* make filename and directory structure more accurate

* Fix state.branches (#74)

* init

* rm old code

pretty sure it's wrong

* Clean

* rm

* Rename record_fork, move to ConcretizeRegister exception handler

It doesn't need to be in fork() because it's only relevant for when
we fork due to PC.

* Add test for record_branches

* Add back record_branches which got removed in rebase

Rebase went oddly because State got moved to a new file

* unnecesary tuple()

* necesary tuple

* remove unnecessary keys()

* Use OrderedDict (#84)

It can be useful to know elements in `branches` towards the end are
more recently discovered branches

* arm: Fix broken dynamic APSR (#78)

* Refactor Register (#82)

* Fix register read bug

If we store a BitVec, we do NOT want to return bool() of it, which
returns True, which is totally incorrect. We do however, want to return
a symbolic Bool of it, if it is a 1 bit register (flag).

* Improve

* Raise error

* Fix register tests

Changed the interfaces:
- removed nbits param (never used)
- no longer raise AssertionError when overflowing a flag reg, just
  truncate
- rename test funcs to be more descriptive

* rm unused import

* Add symbolic tests

* Rm no longer applicable test

* Add docs (#61)

* Add sphinx-quickstart generated docs

* Add api.rst

* Edit index.rst

* Add autodocumenting Manticore class

* Update Manticore docstring

* Doc verbosity

* Doc hook and add_hook

* More docs

* Add Sphinx dev dep

For building docs

* RegisterFile refactor everywhere

* Update arm_rf tests

* Refactor Operand in both x86 and arm

* RegisterFile refactor everywhere

* Refactor Operand in both x86 and arm

* Rebased and NotImplementedError fix

* ARM register initialization compressed

* Fix merging bugs

* Assimilate PR comments

* Assimilate PR comments2

* The new style. future is now

* WIP

* Towards a helloworld world

* refactor or or or

* WIP

* Add arm rf testcase

* ARM aliases fix

* debug print removed

* fix tests

* unnecesary tuple()

* necesary tuple

* remove unnecessary keys()

* rebased

* Remove test

* https://github.com/trailofbits/manticore/pull/57#pullrequestreview-27971778

* https://github.com/trailofbits/manticore/pull/57#discussion_r107820815, https://github.com/trailofbits/manticore/pull/57#discussion_r107820331

* https://github.com/trailofbits/manticore/pull/57#discussion_r107821090

* https://github.com/trailofbits/manticore/pull/57#discussion_r107821066

* https://github.com/trailofbits/manticore/pull/57#discussion_r107821919

* OOps search and replace

* (invalid) -> None

* The (invalid) -> None

* None vs. invalid

* In armpy we know that STACK is SP so lets try to eliminate cpu.STACK in favor of x.SP

* remove ugly hex

* Removed redundant import and comment
2017-03-24 14:44:24 -03:00
Mark Mossberg
a12aae80d1 Move stats.py to scripts/ (#100) 2017-03-23 14:25:46 -04:00
JP Smith
053cc5ff8d Fix run_simple.py (#102)
`Manticore(None, path)` throws an error
2017-03-23 09:52:39 -05:00
feliam
f016b7635a Heads removed (#99) 2017-03-22 20:45:14 -03:00
Mark Mossberg
ebe7f8268b Add docs (#61)
* Add sphinx-quickstart generated docs

* Add api.rst

* Edit index.rst

* Add autodocumenting Manticore class

* Update Manticore docstring

* Doc verbosity

* Doc hook and add_hook

* More docs

* Add Sphinx dev dep

For building docs
2017-03-22 15:44:03 -04:00
Mark Mossberg
d0f2c0116e Refactor Register (#82)
* Fix register read bug

If we store a BitVec, we do NOT want to return bool() of it, which
returns True, which is totally incorrect. We do however, want to return
a symbolic Bool of it, if it is a 1 bit register (flag).

* Improve

* Raise error

* Fix register tests

Changed the interfaces:
- removed nbits param (never used)
- no longer raise AssertionError when overflowing a flag reg, just
  truncate
- rename test funcs to be more descriptive

* rm unused import

* Add symbolic tests

* Rm no longer applicable test
2017-03-21 16:50:39 -04:00
Mark Mossberg
d50b3da9a8 arm: Fix broken dynamic APSR (#78) 2017-03-21 16:47:52 -04:00
Mark Mossberg
ca396d8d13 Use OrderedDict (#84)
It can be useful to know elements in `branches` towards the end are
more recently discovered branches
2017-03-21 16:47:40 -04:00
Mark Mossberg
5368716e42 Fix state.branches (#74)
* init

* rm old code

pretty sure it's wrong

* Clean

* rm

* Rename record_fork, move to ConcretizeRegister exception handler

It doesn't need to be in fork() because it's only relevant for when
we fork due to PC.

* Add test for record_branches

* Add back record_branches which got removed in rebase

Rebase went oddly because State got moved to a new file
2017-03-20 17:56:25 -04:00
JP Smith
e77628bfe7 Add example crackme (#77)
* add example crackme

* make filename and directory structure more accurate
2017-03-17 14:43:06 -05:00
Mark Mossberg
7742df6b67 Rm unnecessary code (#80) 2017-03-17 14:10:48 -04:00
Mark Mossberg
e920b73e14 Move state into own file (#75)
* Move State from executor.py

* Fix import

* relative import
2017-03-16 14:43:17 -04:00
Mark Mossberg
4464b2e842 Rm unused files (#76) 2017-03-16 12:02:29 -04:00
feliam
963669f3f2 Make cpuid more forgiving (#67)
* Make cpuid more forgiving

* error() to warning()

* Add CPUID EAX=0xd ECX=0,1

* Let logger handle the format string iff needed

* to hex
2017-03-14 13:39:06 -03:00
JP Smith
5d2ca04957 Switch instructions to prefer virtualenv (#65)
* switch instructions to prefer virtualenv

* document use of virtualenvwrapper
2017-03-13 16:14:18 -05:00
JP Smith
ca0bee2377 Rename test -> tests (#66)
* rename test -> tests

* re-add ignored tests
2017-03-13 14:06:36 -05:00
JP Smith
dd24878724 Remove unicorn script from travis build (#64)
* remove unicorn script from travis build

* remove unicorn script entirely
2017-03-13 10:51:49 -05:00
Mark Mossberg
296f4abb34 Print workspace dir by default (#55)
* Print workspace dir by default

* Change initial cli output
2017-03-10 10:49:31 -05:00
Mark Mossberg
88456a4ef8 Rm requirements.txt (#56) 2017-03-09 13:01:26 -05:00
Mark Mossberg
d527d9239b Improve quick start ,add asciinema (#58) 2017-03-08 17:51:07 -05:00
feliam
1cc66f16ca Add APSR support (#53)
* Add APSR support

* #issuecomment-284826572

* APSR tests

* cspr to aspr
2017-03-08 17:17:05 -03:00
Mark Mossberg
ef6e21b865 Fix stdin/stdout linux file generation, add test (#50)
* Support linux read/write in stdout/stdin files

* Add basic binary

* Add basic integration test

* Skip

* Update skip message

* Add github issue
2017-03-06 18:39:31 -05:00
Mark Mossberg
be59812a89 Support linux read/write in stdout/stdin files (#51) 2017-03-06 16:08:49 -05:00
feliam
1f838736a5 Add capstone ASR special case (#42)
* Add capstone ASR special case

* Fix capstone install (#43)

* Add arm asr, abstract SR type insns (#44)

* tmp

* Fix bug

* test m.hook typerror (#41)

* Use setuptool extras for dev deps (#40)

* Add extra deps to setup.py

* Fix nose dep

* lol wrong keystone

* Fix readme

* Update travis

* Workaround capstone install bug

* Use --no-binary in only pip install line

* Fix another readme regression

* Not again

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update travis token, reformat (#46)

the travis cli tool auto reformatted the yaml

* Remove embedded ply (#47)

* rm ply

* add ply dep

* Refactor `new_symbolic_value` (#48)

* Use default params instead of dict, add taint

* Update docstring

* Add capstone ASR special case
2017-03-06 15:31:24 -03:00
Mark Mossberg
ab0abf7f72 Refactor new_symbolic_value (#48)
* Use default params instead of dict, add taint

* Update docstring
2017-03-03 18:22:04 -05:00
Mark Mossberg
e49341c506 Remove embedded ply (#47)
* rm ply

* add ply dep
2017-03-03 17:21:33 -05:00
Mark Mossberg
ad3a438e05 Update travis token, reformat (#46)
the travis cli tool auto reformatted the yaml
2017-03-03 15:39:28 -05:00
Dan Guido
bff9376308 Update README.md 2017-03-02 17:53:18 -05:00
Dan Guido
2cbac6b424 Update README.md 2017-03-02 17:50:20 -05:00
Dan Guido
8e2bab90ff Update README.md 2017-03-02 17:48:19 -05:00
Dan Guido
96d08cef2d Update README.md 2017-03-02 17:33:35 -05:00
Mark Mossberg
d2a0165958 Use setuptool extras for dev deps (#40)
* Add extra deps to setup.py

* Fix nose dep

* lol wrong keystone

* Fix readme

* Update travis

* Workaround capstone install bug

* Use --no-binary in only pip install line

* Fix another readme regression

* Not again
2017-03-02 17:31:06 -05:00
Mark Mossberg
7412b2a374 test m.hook typerror (#41) 2017-03-02 17:19:36 -05:00
Mark Mossberg
fed00af160 Add arm asr, abstract SR type insns (#44)
* tmp

* Fix bug
2017-03-02 16:33:04 -05:00
Mark Mossberg
259eab71e0 Fix capstone install (#43) 2017-03-02 15:35:45 -05:00
feliam
61ccfc1b14 OOps 2017-03-02 16:37:25 -03:00
feliam
f5515df4ff Add capstone ASR special case 2017-03-02 16:33:58 -03:00
Mark Mossberg
04d95735ac Fix empty trace file (#39)
* Improve .trace generation

* Rm unused self.trace stuff
2017-03-01 13:47:55 -05:00
Mark Mossberg
f0069792c3 Misc cleanup: Rm old script, unused executor hooking functions (#38)
* Rm old irrelevant example script

* Make this easier to copy and paste

* Rm old unused executor hooking
2017-03-01 13:47:46 -05:00
Mark Mossberg
275a85e08e Clean CGC artifacts from linux model (#36)
* Use errno instead of CGC constants for linux

* Rm linux.sys_allocate

* Rm linux.sys_deallocate

* Rm linux.sys_fdwait

* Rm comments

* Clean sys_read

* Clean sys_write

* Fix syscall trace spots

* Clean exit_group
2017-03-01 13:47:35 -05:00
Mark Mossberg
16f9bba9b5 Add readme for devs 2017-03-01 13:44:50 -05:00
Mark Mossberg
a6b81c0464 Update README.md (#33)
* Update README.md

* Add quick start

* Update README.md

* Update README.md

* Update README.md
2017-03-01 13:30:37 -05:00
JP Smith
ca158dd5b4 remove alternate solver support (#35) 2017-03-01 11:06:32 -06:00
JP Smith
a4576009de switch pse_ prefix to mcore_ (#34) 2017-03-01 11:06:25 -06:00
Mark Mossberg
b591f2a83a Add unicorn to required deps (#31)
* Add unicorn to python deps

* Update readme

* Add deps to setup.py

* test letting pip install install deps in travis
2017-03-01 11:22:04 -05:00
JP Smith
d052d3b2d7 Fix the --stats flag (#26)
* start re-integrating profiling functionality

* profiling works

* rename X class

* make profile a private attribute

* nomenclature fixes

* profiling -> profile

* remove _dump stats

* always initialize self._profile

* remove extra setting of profiling
2017-02-27 14:45:12 -06:00
Mark Mossberg
d6393cc8a6 Add hook decorator (#28)
* Add m.add_hook test

* Add @m.hook test

* Add `hook` decorator for convenience

* Update readme and examples

* Update run_callback

* Improve `add_hook` docstring

expound on callback structure

* Rm debug print

* Improve docstring
2017-02-27 15:44:33 -05:00