Package ghidra.pcode.emu.taint
Class TaintPcodeThreadExecutor
java.lang.Object
ghidra.pcode.exec.PcodeExecutor<org.apache.commons.lang3.tuple.Pair<byte[],TaintVec>>
ghidra.pcode.emu.DefaultPcodeThread.PcodeThreadExecutor<org.apache.commons.lang3.tuple.Pair<byte[],TaintVec>>
ghidra.pcode.emu.taint.TaintPcodeThreadExecutor
public class TaintPcodeThreadExecutor
extends DefaultPcodeThread.PcodeThreadExecutor<org.apache.commons.lang3.tuple.Pair<byte[],TaintVec>>
An instrumented executor for the Taint Analyzer
This part is responsible for executing all the actual p-code operations generated by each decoded
instruction. Each thread in the emulator gets a distinct executor. So far, we haven't actually
added any instrumentation, but the conditions of PcodeOp.CBRANCH operations will likely
be examined by the user, so we set up the skeleton here.
-
Field Summary
Fields inherited from class ghidra.pcode.emu.DefaultPcodeThread.PcodeThreadExecutor
threadFields inherited from class ghidra.pcode.exec.PcodeExecutor
arithmetic, language, pc, pcSize, reason, state -
Constructor Summary
ConstructorsConstructorDescriptionTaintPcodeThreadExecutor(DefaultPcodeThread<org.apache.commons.lang3.tuple.Pair<byte[], TaintVec>> thread) Create the executor -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteConditionalBranch(PcodeOp op, PcodeFrame frame) Execute a conditional branchMethods inherited from class ghidra.pcode.emu.DefaultPcodeThread.PcodeThreadExecutor
afterLoad, afterStore, beforeLoad, beforeStore, branchToAddress, executeSleigh, getThread, onMissingUseropDef, stepOpMethods inherited from class ghidra.pcode.exec.PcodeExecutor
badOp, begin, begin, branchInternal, branchToOffset, branchToOffset, checkInjectedTarget, doExecuteBranch, doExecuteIndirectBranch, execute, execute, executeBinaryOp, executeBranch, executeCall, executeCallother, executeIndirectBranch, executeIndirectCall, executeLoad, executeReturn, executeStore, executeUnaryOp, finish, getArithmetic, getBranchTarget, getCallotherOpNumber, getConditionalBranchPredicate, getIndirectBranchTarget, getIntConst, getLanguage, getLoadStoreOffset, getLoadStoreSpace, getReason, getState, getStoreValue, getUseropName, skip, step
-
Constructor Details
-
TaintPcodeThreadExecutor
public TaintPcodeThreadExecutor(DefaultPcodeThread<org.apache.commons.lang3.tuple.Pair<byte[], TaintVec>> thread) Create the executor- Parameters:
thread- the thread being created
-
-
Method Details
-
executeConditionalBranch
Execute a conditional branchThis is invoked on every
PcodeOp.CBRANCH, allowing us a decent place to instrument the emulator and add some diagnostics. Refer toPcodeExecutor.executeConditionalBranch(PcodeOp, PcodeFrame)to see the operations inputs. Alternatively, we could overridePcodeArithmetic.isTrue(Object, Purpose); however, we'd have access to less contextual information at that position.- Overrides:
executeConditionalBranchin classPcodeExecutor<org.apache.commons.lang3.tuple.Pair<byte[],TaintVec>> - Parameters:
op- the opframe- the frame
-