Class AbstractTaintWrapper
java.lang.Object
soot.jimple.infoflow.taintWrappers.AbstractTaintWrapper
- All Implemented Interfaces:
ITaintPropagationWrapper
- Direct Known Subclasses:
EasyTaintWrapper,IdentityTaintWrapper,RecordingTaintWrapper
Abstract base class for all taint propagation wrappers
- Author:
- Steven Arzt
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InfoflowManagerData flow manager that gives access to internal solver objects -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method returns a PreAnalysisHandler that runs before the InfoflowManager creation.getTaintsForMethod(soot.jimple.Stmt stmt, Abstraction d1, Abstraction taintedPath) Checks an invocation statement for black-box taint propagation.abstract Set<AccessPath>getTaintsForMethodInternal(soot.jimple.Stmt stmt, AccessPath taintedPath) Checks an invocation statement for black-box taint propagation.intGets the number of times in which the taint wrapper was able to exclusively model a method call.intGets the number of times in which the taint wrapper was NOT able to exclusively model a method call.voidinitialize(InfoflowManager manager) This method is called before the taint propagation is started to give the taint wrapper the chance to initialize required components once Soot is running, but before it is queried for the first time.booleanisExclusive(soot.jimple.Stmt stmt, Abstraction taintedPath) Gets whether the taints produced by this taint wrapper are exclusive, i.e. there are no other taints than those produced by the wrapper.protected abstract booleanisExclusiveInternal(soot.jimple.Stmt stmt, AccessPath taintedPath) Gets whether the taints produced by this taint wrapper are exclusive, i.e.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface soot.jimple.infoflow.taintWrappers.ITaintPropagationWrapper
getAliasesForMethod, supportsCallee, supportsCallee
-
Field Details
-
manager
Data flow manager that gives access to internal solver objects
-
-
Constructor Details
-
AbstractTaintWrapper
public AbstractTaintWrapper()
-
-
Method Details
-
initialize
Description copied from interface:ITaintPropagationWrapperThis method is called before the taint propagation is started to give the taint wrapper the chance to initialize required components once Soot is running, but before it is queried for the first time. Note that this method is guaranteed to be called only once and only by a single thread.- Specified by:
initializein interfaceITaintPropagationWrapper- Parameters:
manager- The manager object providing access to the data flow solver processing the IFDS edges and the interprocedural control flow graph
-
getPreAnalysisHandlers
Description copied from interface:ITaintPropagationWrapperThis method returns a PreAnalysisHandler that runs before the InfoflowManager creation. Use this method, for example, to inject hierarchy information.- Specified by:
getPreAnalysisHandlersin interfaceITaintPropagationWrapper- Returns:
- a collection of PreAnalysisHandlers. Assumed to be non-null.
-
isExclusiveInternal
Gets whether the taints produced by this taint wrapper are exclusive, i.e. there are no other taints than those produced by the wrapper. In effect, this tells the analysis not to propagate inside the callee.- Parameters:
stmt- The call statement to checktaintedPath- The tainted field or value to propagate- Returns:
- True if this taint wrapper is exclusive, otherwise false.
-
getTaintsForMethodInternal
public abstract Set<AccessPath> getTaintsForMethodInternal(soot.jimple.Stmt stmt, AccessPath taintedPath) Checks an invocation statement for black-box taint propagation. This allows the wrapper to artificially propagate taints over method invocations without requiring the analysis to look inside the method.- Parameters:
stmt- The invocation statement which to check for black-box taint propagationtaintedPath- The tainted field or value to propagate- Returns:
- The list of tainted values after the invocation statement referenced
in
Stmthas been executed
-
isExclusive
Description copied from interface:ITaintPropagationWrapperGets whether the taints produced by this taint wrapper are exclusive, i.e. there are no other taints than those produced by the wrapper. In effect, this tells the analysis not to propagate inside the callee.- Specified by:
isExclusivein interfaceITaintPropagationWrapper- Parameters:
stmt- The call statement to checktaintedPath- The tainted field or value to propagate- Returns:
- True if this taint wrapper is exclusive, otherwise false.
-
getTaintsForMethod
public Set<Abstraction> getTaintsForMethod(soot.jimple.Stmt stmt, Abstraction d1, Abstraction taintedPath) Description copied from interface:ITaintPropagationWrapperChecks an invocation statement for black-box taint propagation. This allows the wrapper to artificially propagate taints over method invocations without requiring the analysis to look inside the method.- Specified by:
getTaintsForMethodin interfaceITaintPropagationWrapper- Parameters:
stmt- The invocation statement which to check for black-box taint propagationd1- The abstraction at the beginning of the method that calls the wrapped methodtaintedPath- The tainted field or value to propagate- Returns:
- The list of tainted values after the invocation statement referenced in
Stmthas been executed
-
getWrapperHits
public int getWrapperHits()Description copied from interface:ITaintPropagationWrapperGets the number of times in which the taint wrapper was able to exclusively model a method call. This is equal to the number of times isExclusive() returned true.- Specified by:
getWrapperHitsin interfaceITaintPropagationWrapper- Returns:
- The number of method model requests that succeeded
-
getWrapperMisses
public int getWrapperMisses()Description copied from interface:ITaintPropagationWrapperGets the number of times in which the taint wrapper was NOT able to exclusively model a method call. This is equal to the number of times isExclusive() returned false.- Specified by:
getWrapperMissesin interfaceITaintPropagationWrapper- Returns:
- The number of method model requests that failed
-