about summary refs log tree commit diff stats
path: root/tools/qemu_tool.py (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-08-28Move capture transforms tool to our current setupTheofilos Augoustis3-0/+6
2025-08-28Move log conversion tool to our current setupTheofilos Augoustis2-6/+11
2025-08-28Add support for the convert toolTheofilos Augoustis4-3/+8
2025-08-28Add helper app for synchronizing uvTheofilos Augoustis1-3/+15
2025-08-28Update glibc and musl devShells to fully support editable buildsTheofilos Augoustis1-12/+24
2025-08-28Migrate to LLDB from pylldbTheofilos Augoustis3-73/+96
2025-08-27Migrate to nix flakes, uv and pyproject toml for buildsTheofilos Augoustis30-19/+663
2024-10-14Implement online verification of symbolic backend ta/developTheofilos Augoustis7-106/+412
Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2024-10-13Read instructions directly from program memoryTheofilos Augoustis2-19/+32
Instead of loading an executable file and disassembling instructions from there, load instructions directly from the concrete execution's memory. This allows symbolic tracing to work for non-statically compiled executables as well as JIT-compiled code.
2024-07-28Enable Focaccia's logging in capture_transforms.pyTheofilos Augoustis2-11/+10
Disable Miasm's disassembly logger by default. Enable Focaccia's symbolic execution logger. Also refactor envp construction to use the `utils.get_envp` function.
2024-07-12Add support for aarch64Theofilos Augoustis10-88/+293
- Implement an architecture description for aarch64 - Add endianness information to the `Arch` class. - Move conversion from flags register to logical flag values from the calling code to the concrete targets (LLDB and GDB), which is the only point where we (have to) deal in flags registers. - Handle assembly/disassembly errors in serialization of SymbolicTransform - Move ProgramState's `arch` attribute into ReadableProgramState. Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2024-02-22Rework Focaccia's command line interfaceTheofilos Augoustis2-64/+132
2024-02-19Make symbolic equations more symbolicTheofilos Augoustis10-198/+413
Reduce the impact of concrete guidance on the process of calculating an instruction's symbolic equation. The resulting equations will contain less assumptions about the concrete state and thus be more generic.
2024-02-15Add hostname argument to `verify_qemu.py`Theofilos Augoustis1-6/+6
2024-02-14Rewrite symbolic tracing algorithmTheofilos Augoustis3-191/+139
Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2024-02-08Store instructions in SymbolicTransformationTheofilos Augoustis6-59/+151
2024-02-02Basic reproducer generator setupTheofilos Augoustis9-21/+257
Co-authored-by: Alp Berkman <alp.berkman@no-reply.com> Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com>
2024-02-07Extract matching algorithms into a moduleTheofilos Augoustis3-39/+108
We have: - Trace folding: Resolve mismatches in snapshot granularity - Trace matching: Resolve mismatches in program flow
2024-01-30Verify QEMU by abstracting over inconsistencies in trace logs via matching ↵Theofilos Augoustis3-135/+288
algorithm Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2024-02-02Add ReadableProgramState interfaceTheofilos Augoustis4-71/+97
It often occurs that a function only wants to read values from a ProgramState, but not write them. The new interface ReadableProgramState captures this need.
2024-01-24Refactor comparison and user-facing logicTheofilos Augoustis5-102/+55
Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2024-01-22Use symbolic execution to speed up QEMU testingTheofilos Augoustis5-169/+231
We don't need QEMU's log anymore, so we connect to a GDB server instance that the user has to start with `$ qemu -g <port> ...`. Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2024-01-17Refactor symbolic transformation handlingTheofilos Augoustis9-209/+464
2023-12-31Refactor project structureTheofilos Augoustis17-121/+102
Read concrete state on demand during concolic exec During concolic tracing, don't record full program snapshots at each basic block, but instead read concrete values directly from the concrete target when they are needed.
2023-12-26Verify QEMU by converting logs to internal data formatTheofilos Augoustis4-1/+274
Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2023-12-27Extend error reporting systemTheofilos Augoustis4-92/+169
Add error severities and the ability to filter for them. Include more information in comparison error messages.
2023-12-26Refactor parser.py (for gdb integration)Theofilos Augoustis1-25/+56
Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2023-12-26Improve SparseMemory.write_memory performanceTheofilos Augoustis2-8/+13
Reduce overhead of handling sparse memory
2023-12-14Implement symbolic comparison and match traces via MiasmTheofilos Augoustis10-293/+511
Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2023-12-08Adapt symbolic compare to new transform interfaceTheofilos Augoustis18-614/+278
Also implement a `MiasmSymbolicTransform.concat` function that concatenates two transformations. Some minor adaptions to the eval_expr code was necessary to remove some assumptions that don't work if the resolver state returns symbols instead of concrete values. Remove obsolete utilities that were used for angr. Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2023-12-07Replace symbolic execution tools with MiasmTheofilos Augoustis4-400/+317
Refactor SymbolicTransform interface a bit to include transformations of memory content. Implement it for Miasm as a backend. Move all symbolic execution things out of the test script (`miasm_test.py`) and move them to `symbolic.py` to replace the angr-based algorithms.
2023-11-28Record symbolic transform for single instructionsTheofilos Augoustis4-78/+178
Step manually through single instructions instead of full basic blocks. Record the transformation performed by each instruction as symbolic equations. Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2023-11-27Add memory storage capabilities to `ProgramState`Theofilos Augoustis4-156/+229
The `SparseMemory` class represents a program's memory. While the user can read from and write to arbitrary memory addresses, it manages its memory in pages/chunks internally. This is a tradeoff between space consumption (this solution might have a memory overhead) and lookup speed of individual memory addresses. Add two small unit tests for `SparseMemory`.
2023-11-27Implement symbolic state comparison algorithmTheofilos Augoustis8-191/+210
This is the first draft of a `compare` algorithm that uses recorded symbolic transformations. Is currently based on angr, so it's probably going to be reworked to work with states generated by Miasm. Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2023-11-26Standardize X86 register namesTheofilos Augoustis6-122/+142
Add some infrastructure for flexible register name matching (i.e. using 'PC' to look up RIP): - `Arch.to_regname` tries to look up a register's standard name from an arbitrary string. - `ArchX86` overrides `to_regname` to resolve alias names for registers. Currently just 'PC' for 'RIP'. - `ProgramState.read` and `ProgramState.write` use `to_regname` to make register access more convenient. Add all flags with their standard abbreviations to `x86.regnames`. Implement a full RFLAGS decomposition into its individual flags in `x86`. Replace the hacks in `run.py` and `miasm_test.py` with this more complete solution. Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2023-11-25Migrate to Miasm for concolic execution from AngrTheofilos Augoustis3-0/+363
Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2023-11-10Implement interpreter for symbolic expressionsTheofilos Augoustis6-71/+427
2023-11-07Implement symbolic tracing in trace_symbols.py using AngrTheofilos Augoustis3-180/+158
2023-10-21Support for testing concrete and emulated execution with angrTheofilos Augoustis9-92/+421
2023-10-15Implement simple comparison algorithmTheofilos Augoustis2-3/+119
Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2023-10-11Refactor file structureTheofilos Augoustis9-306/+326
- main.py: focaccia user-interface - snapshot.py: state trace snapshots handling - compare.py: snapshot comparison algorithms - run.py: native execution tracer - arancini.py: Arancini log handling - arch/: per-architecture abstractions Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2023-10-09Simplify log file parsingTheofilos Augoustis1-92/+94
Employ some refactorings to make the parsing code simpler and faster. Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
2025-02-25Print statistics for unmatched reference basic blocksTheofilos Augou