Comments (8)
Look at https://github.com/andreafioraldi/angrdbg
Specifically at https://github.com/andreafioraldi/angrdbg/blob/master/angrdbg/core.py#L109
Or just use StateShot instead of StateManager to get an angr state and use plain angr API.
More info (a description of a subset of the current API) at chapter 3 of https://github.com/andreafioraldi/bsc-thesis/blob/master/thesis.pdf
from angrgdb.
core.py seems to specify that the expression passed to sim() has to be a register name or memory address. Then I could not actually pass a expression of type rax-0x30. Do I see that right?
A workaround would be to read the current register state and construct the address manually, but
basePointer = gdb.execute("info registers rbp")
does not actually return the result of the gdb.execute command - it just gets printed to screen.
I tried the alternative solution - using the plain angr api - which I would actually like better
project = angr.Project()
initialState = StateShot()
sm = project.factory.simulation_manager(initial_state)
this does not work because it does not know about angr, and importing it does also not work.
A quick example would be appreciated.
from angrgdb.
sm.sim(sm["rax"]-0x30, 100)
from angrgdb.
with angr,
state = StateShot()
sym = claripy.BVS("symbol", 100*8)
state.memory.store(state.regs.rax -0x30, sym)
from angrgdb.
Thanks!
from angrgdb.
Actually, in your second example, where do I get the simulation manager from?
from angrgdb.
load_project().factory.simulation_manager
from angrgdb.
Ok, that works. But without the StateManager() object
how do I do
sm.to_dbg(m.found[0])
from angrgdb.
Related Issues (7)
- ModuleNotFoundError: No module named 'angr.storage.memory'
- angrgdb remote debugging HOT 6
- Cannot see sym variables from angrgdb shell HOT 2
- StateShot() and StateManager() cause sigfault with pie executables
- No way of accessing angr core module to add constraints or define files. HOT 4
- angrdbg run: valid state not found after exploration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angrgdb.