https://github.com/trailofbits/manticore

sort by:
Revision Author Date Message Commit Date
dd5c220 WIP Move merging to a plugin 17 January 2019, 22:43:24 UTC
10e1f6e load/save/replace as needed by state merging 17 January 2019, 19:46:44 UTC
a1b48c4 Setting the merged constraint in the merged state The merged constraint is simply a logical OR of the constraints in the states being merged. 17 January 2019, 18:26:17 UTC
5de9436 Finishing off a basic implementation of opportunistic state merging by implementing the `merge` method that merges the CPU canonical registers between states 17 January 2019, 05:16:32 UTC
9dbdca1 Finishing the `is_merge_possible` predicate's implementation by finishing comparison of memory in the two states 16 January 2019, 18:58:41 UTC
ee29abf Fixing a few issues to address comments from Yan and Dominik 15 January 2019, 21:25:52 UTC
1f24e9c Merge remote-tracking branch 'origin/master' into dev-state-merging 15 January 2019, 18:42:38 UTC
317042d Adding initial implementation of memory comparison for state merging **caution: I am in the process of finishing the memory maps comparison 15 January 2019, 17:03:16 UTC
81d42d0 Config with context (#1345) * config: try instead of asking * config.Group: `with statement` usage This changes introduces possibility to make temporary changes to config groups. * Review changes 15 January 2019, 15:53:48 UTC
3a01591 Update Capstone to 4.0.1 (#1312) * Update Capstone to 4.0 * Update Capstone to 4.0.1 As it is there! https://pypi.org/project/capstone/#history It has a minor bug with getting the extra version number but it doesn't hit us at all (see https://github.com/aquynh/capstone/issues/1315#issuecomment-454386418). 15 January 2019, 14:38:11 UTC
848fb7e evm: fix _check_jumpdest when run with detectors (#1347) * evm: fix _check_jumpdest when run with detectors When ManticoreEVM is run with detectors, the self.pc in EVM is a Constant (as we need to taint it). Because of that, the check: ``` if pc not in self._valid_jumpdests: raise InvalidOpcode() ``` failed - i.e. we raised an InvalidOpcode because we checked if the list contains the `Constant` object and not its value. This commit fixes this issue. * Fix the test 15 January 2019, 12:27:11 UTC
6804661 Move tx default gas value to config (#1346) 14 January 2019, 21:37:20 UTC
c705e85 Refactor config (#1335) * Optimize config.py imports * Use dict literal instead of dict() * config.py: process_config_values: add type adnotations * Annotation and docstring 14 January 2019, 17:30:50 UTC
cb078ff Fix writing pc address finding (#1344) * Print as hex values * Fix wrong attribute * Fix test 14 January 2019, 17:28:08 UTC
35be876 Fix unexisting attribute (#1341) 14 January 2019, 13:37:11 UTC
ea01069 Add info about ulimit 14 January 2019, 12:05:22 UTC
3abe783 Setting the random seed from the Python script instead of hard-coding it to 2 in Random policy object 12 January 2019, 16:54:34 UTC
f21a8d4 Implementing input, output sockets comparison for states + adding an example to test state merging 1. Building the constraint that can be used to check if the solver thinks that the buffers in input and output sockets are equal when comparing states for merging 2. Puttng the state merging example in that runs into 3 opportunities for state merging when the Random policy is seeded with the seed = 2 (not sure how to set it up from the Python script) 12 January 2019, 04:40:11 UTC
fe233dd Skeleton implementation for state merging in Manticore This commit introduces a new attribute -- cpu_stateid_dict -- in Executor that keeps track of the Program Counter register of each state and maps PC values to a list of state ids. States that are at the same PC are checked for mergeability. ** Warning: The is_merge_possible and merge methods in state_merging.py have not been implemented. However, this commit should not affect current exploration of Manticore 11 January 2019, 02:56:35 UTC
e1c519a Manticore 0.2.4 (#1338) * Manticore 0.2.4 * Move terminated state ressurecting bug to ethereum in changelog * Changelog improvements * Linkify * Add missing PR id 10 January 2019, 22:37:28 UTC
97cfde0 Fix tests that used --timeout 10 January 2019, 17:21:12 UTC
324504e Revert back the test file name 10 January 2019, 16:40:43 UTC
a812635 Fix missing consts in CLI args (#1337) * Fix constants missing from manticore --help * Use has_native for native constants * Remove duplicated args from consts: stdin_size and timeout * Move timeout back to shutdown_timeout * Update manticore/core/manticore.py 10 January 2019, 15:47:22 UTC
6f7f200 Fix verbose_trace test Fixes test regression introduced in 0e90ca3: the gas default value has changed from 90k to 3kk. 10 January 2019, 02:13:28 UTC
8b9632e Refactor solver (#1334) * Refactor docstrings and add type adnotations * Rename _check to _is_sat and return bool So we won't have to do `== 'sat'` comparison in tons of places. * Compile regular expressions just once! * Refactor imports * Refactor docstrings and recv method * Fix imports in ethereum.detectors 10 January 2019, 02:09:05 UTC
0e90ca3 Evm: change default gas to 3000000 when creating contract (#1332) 09 January 2019, 23:31:47 UTC
0814222 Explicitly require Python>=3.6 when using CLI (#1331) * Require Python>=3.6 We have this in setup.py python_requires but it doesn't work with old pip versions and we get reports that Manticore throws a SyntaxError (on a f-string literal :/). * Move check to __init__ 09 January 2019, 22:19:35 UTC
be81fb5 Speed up the EMVWorld.__str__ a bit ...so we can debug a bit faster. * moved `FILTER` outside of `hexdump` so it is created once, also renamed to `_FILTER` * moved `hexdump` func outside of `__str__` (so it doesn't recreate it each time) * changed list comprehensions to generator expressions (so we don't create unnecessary lists) This still isn't perfect and there are rooms for improvements. It's probably good to drop from using lists at all and use some efficient string concatenation method (see also https://waymoot.org/home/python_string/). 09 January 2019, 13:42:19 UTC
e83fae8 Add VerboseTraceStdout plugin (#1330) 09 January 2019, 13:21:53 UTC
28f6a46 Minor evm refactor (#1329) 09 January 2019, 11:37:31 UTC
d6aa04d Hotfix regressions (#1328) * Fix ConcretizeStack -> ConcretizeArgument rename * Fix: remove redundant calc in CALLDATACOPY_gas Note that it could crash the execution when the argument was symbolic (tested on contract from issue 1295) * Fix: not declared _value * Fix ConcretizeFee: set concretize value 08 January 2019, 20:28:24 UTC
c9eb624 Make gas calculation faithfulness configurable (#1279) * split extra gas calculation to it's own method * Fix MSTORE8 * Fix some legacy tests * Remove fork selection * Fix legacy tests. Iff Stack Underflow then gas is consumed in full * memfee is zero when size is zero * CC * 1st version of configurable gas faitfulness * Try fix concolic * Fix typo * Fix logic bug * If everything is concrete lets just check at every instruction * Fix bad import at test * CC * CC * CC * Update manticore/platforms/evm.py Co-Authored-By: feliam <felipe.andres.manzano@gmail.com> * Update manticore/platforms/evm.py Co-Authored-By: feliam <felipe.andres.manzano@gmail.com> * Update manticore/platforms/evm.py Co-Authored-By: feliam <felipe.andres.manzano@gmail.com> * Update manticore/platforms/evm.py Co-Authored-By: feliam <felipe.andres.manzano@gmail.com> * Update manticore/platforms/evm.py Co-Authored-By: feliam <felipe.andres.manzano@gmail.com> * Update manticore/platforms/evm.py Co-Authored-By: feliam <felipe.andres.manzano@gmail.com> * Update manticore/platforms/evm.py Co-Authored-By: feliam <felipe.andres.manzano@gmail.com> * Fix tab * Documment check_jmpdest * Remove unnecesary local var * Fix get_memfee arguments * Change docstrings comments * Fix concrete gas consumption for accesses with size 0 (Frontier). Fix auto tests maker. * Add comment of deleted constant * CC * fix merged test and add gas to vm.__str__ * Update evm.__str__ related tests * Try to fix/update output checking test * docstring OCD * Update manticore/platforms/evm.py Co-Authored-By: feliam <felipe.andres.manzano@gmail.com> * docstring SOCD and fix oog config var * Fix oog config variable * Fix CC * Typo: ammmmount 07 January 2019, 23:44:36 UTC
e83a608 Fix terminated states resurrection (#1326) * Add testcase for 1325 * Fixes 1325 07 January 2019, 19:37:56 UTC
f349adb Make is_human a property (#1323) * Make is_human a property * Update manticore/platforms/evm.py * Better docstring 07 January 2019, 16:52:17 UTC
b7f9a46 added warning and error to sys_arch_prctl (#1319) * added warning and error to sys_arch_prctl * Changed error message and list to set literals * Removed trailing whitespace 06 January 2019, 21:49:36 UTC
64c75fb Fix evm's make_symbolic_address (#1318) * Fix evm's make_symbolic_address The code that created a constrain for created symbolic address was unreachable. * Add testcase for make_symbolic_address 03 January 2019, 11:25:31 UTC
23199f2 Minor state/platform refactor (#1320) The `StateBase` class had two properties that are only used in native engines: `cpu` and `mem`. Those two used `self._platform.current` and that `current` is a property in linux and decree platforms that returns current process platfrom (?). 02 January 2019, 15:44:06 UTC
b7626fc Add symbol resolution feature for binary analysis (#1302) * Remove obsolete symbol resolver helper * Add resolve helper for function sym resolving * Add test case for symbol resolution * Add binary path property, fix decree, fix m.resolve Refactor out resolver helper Decree missing self.program attribute Fix use of exceptions in m.resolve Make m.resolve raise exception instead of returning None Add another test case 01 January 2019, 15:46:59 UTC
4cb7e3b Refactor events and test_events (#1314) 20 December 2018, 23:21:05 UTC
c0b6ce1 Speed up ArmV7Operand.type assertions (#1313) * Speed up ArmV7Operand.type assertions So .type will now just return the value instead of building a mapping and returning a result. * Update manticore/native/cpu/arm.py * Revert debug changes 20 December 2018, 22:49:49 UTC
94991c8 Fix eth private func calls (#1306) * Add test for calling contract._func * Fix contract._func calls * EVMContract: make attributes protected * Move EVMContract __hashes={} to __init__ * Fix attribute error * Review fix 18 December 2018, 00:49:36 UTC
e3f8801 __main__.py: fetch manticore version from installed module (#1310) 18 December 2018, 00:40:13 UTC
6b80359 Migrate hook callback methods to native.Manticore (#1309) * Migrate hook callback methods to native.Manticore * Fix indentations 17 December 2018, 22:44:47 UTC
f1fa154 test_manticore: remove redundant imports (#1308) 17 December 2018, 19:24:45 UTC
b399080 Remove Py3 redundant object inheritance (#1307) 17 December 2018, 19:15:06 UTC
580b358 Refactor generate_testcase events and fix eth verbose trace plugin (#1305) * WIP * Add test * Add missing test data file * Fix missing testcase msg and assert it in test * Remove Executor.generate_testcase - just publish event * Remove redundant import * Add ManticoreBase._last_run_stats * Review fixes * Remove redundant assertions in test_basic_arm * Elapsed time calc fix 17 December 2018, 14:04:00 UTC
463a394 Fix logging regressions (#1304) * Fix logging Creates custom loggers so that we no longer need to call init_logging. Verbosity is automatically set upon logger creation, and updated in the event of manticore_verbosity being set after the fact. * Strip the stateid from the loggers It literally only ever gets set to None. * Fix deleted line That's what source control is for * Appease CodeClimate Trouble me no more, damnable machine 14 December 2018, 18:05:23 UTC
54bf795 Display registered eth detectors (#1301) * Display registered eth detectors ``` root@52356aa06255:/# manticore test.sol 2018-12-12 13:53:58,615: [1496] m.c.manticore:INFO: Verbosity set to 1. 2018-12-12 13:53:58,798: [1496] m.main:INFO: Registered plugins/detectors: DetectInvalid, DetectExternalCallAndLeak, DetectEnvInstruction, DetectReentrancySimple, DetectUninitializedMemory, DetectDelegatecall, DetectUninitializedStorage, DetectReentrancyAdvanced, DetectUnusedRetVal, DetectSuicidal, DetectIntegerOverflow 2018-12-12 13:53:58,799: [1496] m.main:INFO: Beginning analysis 2018-12-12 13:53:58,800: [1496] m.e.manticore:INFO: Starting symbolic create contract Mnemonic return Mnemonic return hooman 2018-12-12 13:53:58,933: [1496] m.e.manticore:INFO: Starting symbolic transaction: 0 2018-12-12 13:53:59,072: [1496] m.e.manticore:INFO: 0 alive states, 2 terminated states 2018-12-12 13:53:59,117: [1496] m.e.manticore:INFO: Starting symbolic transaction: 1 2018-12-12 13:53:59,133: [1558] m.e.manticore:INFO: Generated testcase No. 0 - REVERT 2018-12-12 13:53:59,462: [1558] m.e.manticore:INFO: Generated testcase No. 1 - RETURN 2018-12-12 13:53:59,590: [1496] m.c.manticore:INFO: Results in /mcore_f7hsxcpn 2018-12-12 13:53:59,591: [1496] m.c.manticore:INFO: Total time: 0.6525142192840576 ``` * Update manticore/ethereum/cli.py * Update tests/test_binaries.py 12 December 2018, 21:07:09 UTC
787237f Don't clone Manticore in Docker image (#1300) * Don't clone Manticore in Docker image So people can build image from given Manticore version, if they want. * Remove editable pip install mode * Fix typo * Dockerfile: Use LABEL instead of deprecated MAINTAINER * Download binary solc 0.4.25 * Revert debug changes from different branch 12 December 2018, 19:41:59 UTC
9412296 fix changelog bug 12 December 2018, 00:47:34 UTC
578fdc6 Manticore 0.2.3 (#1298) * bump vers * Add instructions for native install * add changelog * update * Update desc * Add contributors * fmt * correct * Update CHANGELOG.md * fix eth cli usage * update linux script * docker use native install * use native in quickstart 12 December 2018, 00:21:26 UTC
e8170ba Disable RaceCondition detector (#1299) 12 December 2018, 00:10:48 UTC
e21cdea Refactor detectors cli (#1286) * Use triple quotes for docstrings * Refactor detectors CLI * Add prettyable dependency to setup.py * Fix typo in prettytable dependency name * Fix test * Unregister detectors and plugins after finalize * Add docstrings to unregister plugin/detector * Changes: leave just --exclude-all and --exclude flags * Fix eth test * Fix setup 11 December 2018, 22:27:18 UTC
e8a6321 Add new auto CONCRETE test generator for eth vmTests (#1160) * New auto evm test generator [WIP] * New auto test generator for EVM * New VMTest mcore translator * Allow to auto-make single tests * New concrete auto test for vmTests snad tests * MAke bytecode bytes or array in tests too * Make bytecode bytes or array in tests too more * initial timestamp fix * Fix jmpdest gas test and evm * New tests style and some fixes * __init__ in test folders * Fix VMTest to unitests. Fix Array/ArraySlice default values * Added rlp to setup.py * Remove old deprecated tests * Debugging storage/memory default values * avoid gas consumption of empty reads * CC * Fix .written list for sliced arrays * Move blocknumber/timestamp out of evmworld * CC * Several gas related fix. Frontier concrete pass * Fix ArrayProxy tests * Debug travis * Split the regresion test so it prints . (dots) * If value is in the cache then it is a known index. optimization * add main to some unittest * FIx test maker * CC and skip slow test * Skipp other slow test for now * initial_timestamp -> timestamp * more skipping * Fix/mitigate expression copying issue * Try fix concolic * Fix simplification so it does not loose taint * Fix no-testcases and verbosity in tests * Extra visitor tests * Extra visitor tests * Better array slicing test. Code review. Basic fork support. VMTest concrete added * bump pyevmasm version * Remove pyevmasm version pinning * Pyevmasm from github for now * Setup.py crazyness * Pyevmasm version bump - again * Update manticore/platforms/evm.py Co-Authored-By: feliam <felipe.andres.manzano@gmail.com> * Update manticore/platforms/evm.py Co-Authored-By: feliam <felipe.andres.manzano@gmail.com> * Update manticore/platforms/evm.py Co-Authored-By: feliam <felipe.andres.manzano@gmail.com> * Update manticore/platforms/evm.py Co-Authored-By: feliam <felipe.andres.manzano@gmail.com> * Update manticore/platforms/evm.py Co-Authored-By: feliam <felipe.andres.manzano@gmail.com> * Remove cache oddity and fix auto tests * Add some type checks * A fix 11 December 2018, 18:58:33 UTC
b11697b Fix multiple symbolic args solidity_create_contract (#1294) * Fix multiple symbolic args solidity_create_contract The `test_create_contract_two_instances` test was crashing before this PR, due to calling `make_symbolic_buffer` twice with the same buffer name (`'INITARGS'`) in `make_symbolic_arguments`. Here's an example of such crash (from a bit different test code/when I was developing it, but the idea/error is the same): ``` Error Traceback (most recent call last): File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor yield File "/usr/lib/python3.6/unittest/case.py", line 605, in run testMethod() File "/home/dc/manticore_project/tests/eth_general.py", line 432, in test_create_two_instances_of_contract_no_args contract2 = self.mevm.solidity_create_contract(source_code, owner=owner, args=None) File "/home/dc/manticore_project/manticore/ethereum/manticore.py", line 587, in solidity_create_contract args = self.make_symbolic_arguments(constructor_types) File "/home/dc/manticore_project/manticore/ethereum/manticore.py", line 542, in make_symbolic_arguments return ABI.deserialize(types, self.make_symbolic_buffer(32, name="INITARGS")) File "/home/dc/manticore_project/manticore/ethereum/manticore.py", line 113, in make_symbolic_buffer return self.constraints.new_array(index_bits=256, name=name, index_max=size, value_bits=8, taint=frozenset(), avoid_collisions=avoid_collisions) File "/home/dc/manticore_project/manticore/core/smtlib/constraints.py", line 348, in new_array raise ValueError(f'Name {name} already used') ValueError: Name INITARGS already used ``` * Add avoid_collision arg to make_symbolic_buffer 10 December 2018, 19:59:45 UTC
f12d97e Fix command.sh not saved in ethereum (#1289) * Fix command.sh not saved in ethereum For native binaries Manticore saves `command.sh` and `manticore.yml` in a `_did_finish_run_callback`. For ethereum binaries this callback is called two times (not sure why), so we supress it instead: https://github.com/trailofbits/manticore/blob/c29f7cf8672014cf02cfc1271ec1d0a3cb3983af/manticore/ethereum/manticore.py#L1523-L1526 This PR moves this logic to a `ManticoreBase._save_run_data` method, so it can be used in both native and ethereum Manticore engines. As a result: * native engine works as it worked * ethereum engine will now save `command.sh` file * ethereum engine will now print the elapsed time Additionally, a bug with `command.sh` output has been fixed: when one passed argument that had spaces, e.g.: ``` manticore "path to contract/with_spaces.sol" ``` Resulted in a `command.sh`: `manticore path to contract/with_spaces.sol` which is wrong. This has been fixed by processing all arguments with `shlex.quote`, so they are quoted properly. * Update solidity timeout test 10 December 2018, 19:59:07 UTC
b1fa6b2 More explicit smt errors (#1293) 10 December 2018, 17:56:15 UTC
8f520bd Add a command line option for preconstraining symbolic human transactions (#1220) Fixes issue #731. 10 December 2018, 10:45:34 UTC
567fec2 Add combo1 to txaccount cli description (#1292) 10 December 2018, 10:44:38 UTC
a2243f6 Move benchmark->prof script and fix it (#1285) * Move benchmark->prof script and fix it * Better scripts/prof.py help 09 December 2018, 22:42:40 UTC
0f0579e Rename SolverException to SolverError (#1288) 07 December 2018, 14:13:44 UTC
c4a81ac Remove unecessary unicorn hack (#1290) 06 December 2018, 20:08:28 UTC
c29f7cf silence ply (#1284) 04 December 2018, 23:29:28 UTC
eb1de77 Detectors fixes (#1283) * Fix name shadowing in detector tests * Fixes #1102 * Fix isinstance with None 04 December 2018, 22:27:50 UTC
8d108d8 Add not implemented stub for execute() in state parent (#1282) 04 December 2018, 22:11:03 UTC
6850fe2 Hotfix: solidity timeout test 04 December 2018, 20:08:02 UTC
cae2fa9 Hotfix ethereum's Manticore logging 04 December 2018, 18:24:40 UTC
b1e6795 Hotfix: bring back detectors logging When Manticore is run with detectors, their logging is missing the stateid: ``` --- Logging error --- Traceback (most recent call last): File "/usr/lib/python3.6/logging/__init__.py", line 993, in emit msg = self.format(record) File "/usr/lib/python3.6/logging/__init__.py", line 839, in format return fmt.format(record) File "/usr/lib/python3.6/logging/__init__.py", line 579, in format s = self.formatMessage(record) File "/usr/lib/python3.6/logging/__init__.py", line 548, in formatMessage return self._style.format(record) File "/usr/lib/python3.6/logging/__init__.py", line 391, in format return self._fmt % record.__dict__ KeyError: 'stateid' ``` 04 December 2018, 18:13:07 UTC
c6e1c42 Rebased: add test for "arguments_linux_armv7" binary (#1216) * add test for "arguments_linux_armv7" binary * Refactor/clean the code * More tests asserts * Fix/remove resource warnings in tests * Binary tests: add --no-color, use proper python path * Fix test_basic_arm assert * Fix arm test * Debug on travis :_: * more debug * Travis debug prints * debug * Fix merge conflict * Fix visited assert? * Fix test binaries * Remove debugs and change regex assertions * Use sys.executable instead of /proc/self/exe to retrieve Python interperter path in tests (see comment). * Fix timeout solidity test and wrong type published It turned out that when we executed Manticore with `--timeout`, it ended up with an exception: ``` 2018-12-04 05:13:27,780: [7836] m.c.manticore:INFO: Verbosity set to 1. 2018-12-04 05:13:31,136: [7892] m.c.executor:ERROR: Exception: 'str' object has no attribute 'testcase' Traceback (most recent call last): File "/home/dc/manticore_project/manticore/core/executor.py", line 471, in run self._publish('will_terminate_state', current_state, current_state_id, 'Shutdown')# TerminateState('Shutdown')) File "/home/dc/manticore_project/manticore/utils/event.py", line 122, in _publish self._publish_impl(_name, *args, **kwargs) File "/home/dc/manticore_project/manticore/utils/event.py", line 130, in _publish_impl callback(robj(), *args, **kwargs) File "/home/dc/manticore_project/manticore/ethereum/manticore.py", line 1100, in _terminate_state_callback e.testcase = False # Do not generate a testcase file AttributeError: 'str' object has no attribute 'testcase' ``` Which occured because we published a string instead of exception instance in `executor.py:471`: ``` self._publish('will_terminate_state', current_state, current_state_id, 'Shutdown') ``` This has been fixed by changing the `'Shutdown'` to `TerminateState('Shutdown')`. * Fix amd/arm visited assertions * Fix binary tests * Fix binary tests 04 December 2018, 17:42:48 UTC
702f414 Fix native.cpu logging 04 December 2018, 11:42:01 UTC
c72c8cc Rewrite tests to be more compact (#1146) * Reorder all memory writes in test_x86 * More compact tests with mem.write * Reorder all memory checks in test_x86 * More compact tests with asserts memory * Reorder memory writes in test_dyn * Compact tests memory writes in test_dyn * Reorder memory writes * Compact memory writes * reorder meomry checks * compact memory checks * reorder memory checks * compact memory checks * reorder memory writes * compact memory writes * reorder memory checks * compact memory checks * Updates make_tests for tests to be more compact 03 December 2018, 21:55:00 UTC
74d620f Implement FPSE-like memory model (#1127) Implements am fpse-like memory model. 03 December 2018, 21:38:44 UTC
1699045 Make Manticore installable for separate targets (#1257) * WIP * WIP * WIP * Optimize imports * WIP * WIP * WIP * Fix setup.py comment * Move abitypes to ethereum * WIP: sth works lol * Set verbosity from args * WIP * Fix evm logging + minor refactor * Move ply dependency to evm setup * NOTE: Removed Manticore.evm * Check deps on setup, other improvements * Proper ethereum/__init__ external imports * Fix logging * Fix imports in tests * Fix scripts imports * Fix imports in example scripts * Fix tests? * Remove debug print * Fix circular import * Fix imports in tests * Fix verbosity test * Fix typo * Fix typo in test * Fix measure cov * Small review fixes * Reviewfix: move STDIN_INPUT~ to consts.stdin_size * Reviewfix: dont alias evm/native main funcs * Fix missing consts.stdin_size * Remove redundant list() call * Fix types in docstrings * Use relative imports * Fix types in docstring * Move invoke_model back to native State * Split only to manticore, manticore[native] * Fix dev and dev-noks setup extras * Review fixes * Move core/cpu -> native/cpu * Update Changelog * Import fixes * Fix test imports * Fix cpu automatic tests imports * Fix imports in tests * Fix imports & deprecated warning * Fix imports * Fix imports * Fix imports * Fix travis measure_cov path * Add comment about native deps * Use ManticoreBase.verbosity as static method * Fix docs build * Fix loger test * Move imports: from manticore import issymbolic, istainted * Docs fixes * Fix issymbolic import in test 03 December 2018, 20:20:55 UTC
f9506c8 Add missing `f`-string (#1281) 27 November 2018, 17:45:24 UTC
2d3de3e Incorrect branching based on instance type (#1280) The else condition can never be fulfilled as it is the same as the one inside the if statement. 27 November 2018, 12:10:17 UTC
b2374c3 BitvecConcat simplification fix (#1275) * BitvecConcat needs size not end * Add regression test for concat simplification 21 November 2018, 13:47:43 UTC
0e082d2 Add MJ10 (#1273) 19 November 2018, 17:48:57 UTC
3c6df93 Remove kwargs from ManticoreEVM (#1271) * Remove kwargs from ManticoreEVM Removing `kwargs` from `ManticoreEVM` as it is not needed here. It is because it is passed to `Manticore` which uses `kwargs` only in the case when the `path_or_state` is a path. The `ManticoreEVM` passes this argument as already created `State` so the `kwargs` are never used for `ManticoreEVM`. This will also prevent users from using old API that has been removed e.g. `ManticoreEVM(verbosity=5)`. * Fix init 17 November 2018, 18:27:42 UTC
48304e7 Fixed setstate reference before assignment (#1270) 16 November 2018, 22:30:59 UTC
9a0c7c9 Fixes #1067 (#1254) * moved repeated code into functions in separate file * changed repeated code to function calls * fix trailing whitespace in docstring detected by pep8 check * line 1525 of manticore/ethereum/__init__.py was missing leading white space * pep8 expects 2 blank lines between function definitions. Rookie move, rookie. * Update string_formatting.py * changing format strings to f strings * Update string_formatting.py change format strings to f strings * small change because CI failed, need to push again * change F format strings to f format strings, moved external functions into __init__ file where they are used. * Combined contract_addr and evm_program_counter in to one function, write_findings 14 November 2018, 10:28:05 UTC
8ea1944 Update README.md (#1269) * Update README.md * Update README.md 13 November 2018, 16:06:16 UTC
60abe81 Fix Docker instructions (#1266) Previously, we suggested to mount `-v $PWD/examples:/home/manticore/examples` which overwritten the `/home/manticore` that stored also a virtualenv containing the installed Manticore. This resulted in Manticore not working. 13 November 2018, 10:20:39 UTC
4d6c00d Change generate_testcase name to have a default val (#1267) * Change generate_testcase name to have a default val * Update manticore/ethereum/__init__.py * Update manticore/ethereum/__init__.py * Fix tests and better assertions * Fix test * Fix tests: use set instead of list * Fix test 09 November 2018, 01:46:18 UTC
4f1a0de Fix solidity relative path issue (#1263) * use os.path.dirname * Use os cwd to get working dir of relative path, rather than parsing the parsing breaks if you have ../ stuff going on in the relative path 07 November 2018, 21:12:55 UTC
0c00826 Fix. (#1265) * Fix. Invalidate ArrayProxy concrete cache on symbolic writes * typo 07 November 2018, 17:41:25 UTC
8086cb0 New simplification with tests and new state.solve_minmax aux fuc (#1261) * New simplification with tests and new state.solve_minmax aux fuc * CC * CC * Oops, fix concat endianess * Forgot to initialize begining * tests solve_minmax * Absurd mappings test 06 November 2018, 16:45:30 UTC
8032a06 Copy event system state during state fork (#1215) * full copy the _forwards * Forward events when we load * Add more documentation on the Eventful API * move into Eventful * copy signals too * rename * rm * use proper type hint 05 November 2018, 22:52:17 UTC
e4e0829 Fix exception handling in EVM.transact._pre_func (#1246) * Fix exception handling in EVM.transact._pre_func Fixes issue 1237. * Fix duplicate pre-instruction events for EVM instructions with args that need to be concretized * Add a test for a CALL with concretized args to eth_general.py 05 November 2018, 17:38:23 UTC
c59c7dc Fix event forwarding after state fork in EVM message call (#1256) Fixes issue #1255. Also adds type hints to some private attributes of the EVMWorld class. 05 November 2018, 13:00:31 UTC
7bbec7b Added STMDA and STMDB instructions semantics (#1245) * Added STMDA and STMDB instructions semantics STM and STMIB are already implemented. STMDA and STMDB simply call the helper function _STM(). This function is modified to support decrementing the address. See also ARM Architecture Reference Manual. * Refactored LDM/STM-related code, added docstrings and unit tests * checked if the S bit is set (usermode), which is unsupported * refactored the _LDM() and _STM() functions to be easier to understand * if PC is specified in the registers of LDM, change mode if necessary * added the missing LDM* and STM* instructions semantics * added docstring to _LDM() and _STM() * added unit tests for all the instructions (+ check writeback) 05 November 2018, 12:35:51 UTC
07841ae Added CBZ, TBB and TBH instructions semantics (#1243) * Added CBZ, TBB and TBH instructions semantics CBZ was not implemented while CBNZ was. As far as Manticore is concerned, CBZ is the same as CBNZ, but with two possible destination addresses exchanged. TBB and TBH instructions are often used for switches. According to the ARM documentation, the base register contains the address of a table of bytes/half-words, and the index register contains an index into this table. The selected value is then shifted left by one and zero-extended to 32-bits before being added to the current PC. If the PC register is used as the base, the table is then located immediately after the instruction. See also ARM Architecture Reference Manual Thumb-2 Supplement. * Added docstring and comments to instructions * Added unit tests for the cbz/cbnz/tbb/tbh instructions * Taking into account the review 04 November 2018, 19:12:31 UTC
240f9d5 Added ADR, ADDW and SUBW instructions semantics (#1244) * Added ADR, ADDW and SUBW instructions semantics These 3 instructions can be used to load PC-relative addresses. The ADDW and SUBW instructions can also be used with other source registers. When the PC register is used as the source, the ARM documentation specifies that the offset is added or subtracted from ALIGN(pc, 4). See also the ARM Architecture Reference Manual Thumb-2 Supplement. * Added docstring to instructions * Added unit tests for the adr/addw/subw instructions * Taking into account the review 04 November 2018, 19:11:06 UTC
9c9fb92 Fix wrong mode being pickled for the initial state only (#1241) * Fix wrong mode being pickled for the initial state only If the entrypoint of an program is located on a Thumb mode instruction (if the least significant bit of the entrypoint is set), the wrong mode will be saved in the pickled initial state because the mode switching is only happening later. This commit fixes this issue by switching mode before the pickling, and unsetting the LSbit of the PC to avoid reading the wrong instruction bytes. * Added unit test for thumb mode entrypoint * Refactored the unit test to remove nested code * Inverted success's default value 03 November 2018, 12:42:52 UTC
e0f5f67 Use the address of symbolic conditional instructions (#1239) * Use the address of symbolic conditional instructions When two symbolic conditional instructions follow sequentially, the two paths of the first instruction will be explored. But when the exploration reaches the second instruction, because the at_symbolic_conditional flag has already been set by the first one, only one of the two possible paths will be explored. This commit fixes this issue by replacing the boolean flag by the address of the instruction, which ensure the flag has been set for the current instruction. * Added unit test for chained symbolic conditionals * Add a comment about code assembled to 0x1004 * Added more comments to the unit test 03 November 2018, 11:48:50 UTC
84c6abb Fix type check for caller arg in ManticoreEVM._transaction (#1238) The error was introduced in commit e18016a. 03 November 2018, 00:37:10 UTC
bea8617 added timeout support for ManticoreEVM (#1186) * added timeout for solidity manticore runner * added tests for solidity timeout * Update test_binaries.py * added timeout to config 03 November 2018, 00:33:43 UTC
b0715ff Fix TypeError when rendering a symbolic register value (#1250) 02 November 2018, 23:16:09 UTC
fb5b100 Add support for cross directory imports (#1233) * Add support for cross directory imports * Fix travis build * Fix tests * WIP * Fix tests * Add to multi_tx_analysis * Fix codeclimate * Use fstring formatting 02 November 2018, 23:15:22 UTC
594f5f7 Fix emulation being performed in the wrong mode (#1240) * Fix emulation being performed in the wrong mode After the merge of the PR referenced at the end of this message into the master branch of Unicorn in July 2016, the emulation mode is set according to the least significant of bit of the program counter when it is updated. When an instruction is not implemented at Manticore's level and emulation is used, the PC value passed to the emu_start() function will trigger a switch of the current mode, setting it back to ARM mode instead of Thumb mode. This commit fixes this issue by ensuring that the least significant bit of the PC is set when Thumb mode emulation is performed. See https://github.com/unicorn-engine/unicorn/pull/592 * Don't check mode if arch isn't ARM * Log instruction during emulation * Added unit test for thumb mode emulation * Reuse code from test_armv7cpu.py * Add assertion for cpu mode * Check if Unicorn stayed in Thumb mode 02 November 2018, 11:04:34 UTC
152401c Allow file offsets not aligned on page size (#1242) * Allow file offsets not aligned on page size When mapping into memory uncommon ELF executables having their segments file offsets not aligned on the system page size, the call to mmap_function() will fail silently. It will actually return 0xffffffff, which isn't checked anywhere and will only be detected when trying to read/write/free the memory area. Because this ELF files triggering this issue are programmatically crafted from binaries into a proprietary format, it won't be happening for all other executables. But Manticore should support binaries as generic as possible. This commit allows mapping into memory files having offsets not aligned on the system page size by simply aligning the file offset when mmap'ing, and returning a pointer shifted from the necessary correction. When munmap'ing the memory, the address is aligned again to recovery the initial one given when mmap'ing. * Fixed the size passed to mmap and added comments * Fixed the size passed to unmap * Added unit test for unaligned mappings * Update comment * Added new asserts, reformatted comments * Checking if the CI fails because of the removed cast 01 November 2018, 22:19:15 UTC
back to top