class TaintState(object):
A taint state lists all data that is currently tainted at a given Context
.
A taint state is composed of:
reven2.trace.Context
associated to the stateTaintedRegisterSlice
or TaintedMemories
to MarkerIterator
indicating what is currently taintedThis object is not meant to be constructed directly. It is created by TaintStateView
>>> states = taint.states() >>> for state in states.all(): >>> # state is an instance of TaintState >>> print(state) Taint state at Context before #10 Tainted registers: rax : [tag0,] Tainted memories: [phy:0x46b5ff0; 8] : [tag0,] [phy:0x1bdb4040; 1] : [tag1,]
Taint state at Context before #11 Tainted registers: rax : [tag0,] Tainted memories: [phy:0x46b5ff0; 8] : [tag0,] [phy:0x1bdb4040; 1] : [tag1,]
Method | __init__ |
Undocumented |
Property | context |
Property: the context associated to the state |
Method | tainted_registers |
Iterates over each TaintedRegisterSlice in this state and yields a pair of TaintedRegisterSlice and MarkerIterator |
Method | tainted_memories |
Iterates over each TaintedMemories in this state and yields a pair of TaintedMemories and MarkerIterator |
Method | __str__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | format_as_html |
This method gets an html formatting string representation for this class instance. |
Instance Variable | _trace |
Undocumented |
Instance Variable | _taint_data |
Undocumented |
Instance Variable | _taint_state |
Undocumented |
Method | _tainted_data_str |
Undocumented |
Method | _repr_html_ |
Undocumented |
Property: the context associated to the state
>>> states = taint.states() >>> for state in states.all(): >>> # state is an instance of TaintState >>> print(state.context) Context before #10 Context before #11
Returns | A reven2.trace.Context . |
Iterates over each TaintedRegisterSlice
in this state and yields a pair of TaintedRegisterSlice
and MarkerIterator
>>> states = taint.states() >>> for state in states.all(): >>> # state is an instance of TaintState >>> for reg, markers in state.tainted_registers(): >>> print(reg) >>> for handle, name in markers: >>> print(name) rax tag0 rax tag0
Returns | A generator of (TaintedRegisterSlice , MarkerIterator ). |
Iterates over each TaintedMemories
in this state and yields a pair of TaintedMemories
and MarkerIterator
>>> states = taint.states() >>> for state in states.all(): >>> # state is an instance of TaintState >>> for mem, markers in state.tainted_memories(): >>> print(mem) >>> for handle, name in markers: >>> print(name) [phy:0x46b5ff0; 8] tag0 [phy:0x1bdb4040; 1] tag1 [phy:0x46b5ff0; 8] tag0 [phy:0x1bdb4040; 1] tag1
Returns | A generator of (TaintedMemories , MarkerIterator ). |