Class BackwardsSourcePropagationRule
java.lang.Object
soot.jimple.infoflow.problems.rules.AbstractTaintPropagationRule
soot.jimple.infoflow.problems.rules.backward.BackwardsSourcePropagationRule
- All Implemented Interfaces:
ITaintPropagationRule,IAdditionalFlowSinkPropagationRule
public class BackwardsSourcePropagationRule
extends AbstractTaintPropagationRule
implements IAdditionalFlowSinkPropagationRule
Rule for recording abstractions that arrive at sources The sources are
swapped for the sinks, thats why all the other methods call for sink even
though they work on the sources
- Author:
- Steven Arzt, Tim Lange
-
Field Summary
Fields inherited from class soot.jimple.infoflow.problems.rules.AbstractTaintPropagationRule
manager, results, zeroValue -
Constructor Summary
ConstructorsConstructorDescriptionBackwardsSourcePropagationRule(InfoflowManager manager, Abstraction zeroValue, TaintPropagationResults results) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisTaintVisibleInCallee(soot.jimple.Stmt stmt, Abstraction source) Checks whether the given taint is visible inside the method called at the given call sitevoidprocessSecondaryFlowSink(Abstraction d1, Abstraction source, soot.jimple.Stmt stmt) Records a secondary flow taint reaching a statement.propagateCallFlow(Abstraction d1, Abstraction source, soot.jimple.Stmt stmt, soot.SootMethod dest, ByReferenceBoolean killAll) Propagates a flow across a call sitepropagateCallToReturnFlow(Abstraction d1, Abstraction source, soot.jimple.Stmt stmt, ByReferenceBoolean killSource, ByReferenceBoolean killAll) Propagates a flow along a the call-to-return edge at a call sitepropagateNormalFlow(Abstraction d1, Abstraction source, soot.jimple.Stmt stmt, soot.jimple.Stmt destStmt, ByReferenceBoolean killSource, ByReferenceBoolean killAll) Propagates a flow along a normal statement this is not a call or return sitepropagateReturnFlow(Collection<Abstraction> callerD1s, Abstraction calleeD1, Abstraction source, soot.jimple.Stmt stmt, soot.jimple.Stmt retSite, soot.jimple.Stmt callSite, ByReferenceBoolean killAll) Propagates a flow along a the return edgeMethods inherited from class soot.jimple.infoflow.problems.rules.AbstractTaintPropagationRule
getAliasing, getManager, getResults, getZeroValue
-
Constructor Details
-
BackwardsSourcePropagationRule
public BackwardsSourcePropagationRule(InfoflowManager manager, Abstraction zeroValue, TaintPropagationResults results)
-
-
Method Details
-
propagateNormalFlow
public Collection<Abstraction> propagateNormalFlow(Abstraction d1, Abstraction source, soot.jimple.Stmt stmt, soot.jimple.Stmt destStmt, ByReferenceBoolean killSource, ByReferenceBoolean killAll) Description copied from interface:ITaintPropagationRulePropagates a flow along a normal statement this is not a call or return site- Specified by:
propagateNormalFlowin interfaceITaintPropagationRule- Parameters:
d1- The context abstractionsource- The abstraction to propagate over the statementstmt- The statement at which to propagate the abstractiondestStmt- The next statement to which control flow will continue after processing stmtkillSource- Outgoing value for the rule to specify whether the incoming taint shall be killedkillAll- Outgoing value that receives whether all taints shall be killed and nothing shall be propagated onwards- Returns:
- The new abstractions to be propagated to the next statement
-
propagateCallFlow
public Collection<Abstraction> propagateCallFlow(Abstraction d1, Abstraction source, soot.jimple.Stmt stmt, soot.SootMethod dest, ByReferenceBoolean killAll) Description copied from interface:ITaintPropagationRulePropagates a flow across a call site- Specified by:
propagateCallFlowin interfaceITaintPropagationRule- Parameters:
d1- The context abstractionsource- The abstraction to propagate over the statementstmt- The statement at which to propagate the abstractiondest- The destination method into which to propagate the abstractionkillAll- Outgoing value for the rule to specify whether all taints shall be killed, i.e., nothing shall be propagated- Returns:
- The new abstractions to be propagated to the next statement
-
isTaintVisibleInCallee
Checks whether the given taint is visible inside the method called at the given call site- Parameters:
stmt- A call site where a sink method is calledsource- The taint that has arrived at the given statement- Returns:
- True if the callee has access to the tainted value, false otherwise
-
propagateCallToReturnFlow
public Collection<Abstraction> propagateCallToReturnFlow(Abstraction d1, Abstraction source, soot.jimple.Stmt stmt, ByReferenceBoolean killSource, ByReferenceBoolean killAll) Description copied from interface:ITaintPropagationRulePropagates a flow along a the call-to-return edge at a call site- Specified by:
propagateCallToReturnFlowin interfaceITaintPropagationRule- Parameters:
d1- The context abstractionsource- The abstraction to propagate over the statementstmt- The statement at which to propagate the abstractionkillSource- Outgoing value for the rule to specify whether the incoming taint shall be killedkillAll- Outgoing value for the rule to specify whether all taints shall be killed, i.e., nothing shall be propagated- Returns:
- The new abstractions to be propagated to the next statement
-
propagateReturnFlow
public Collection<Abstraction> propagateReturnFlow(Collection<Abstraction> callerD1s, Abstraction calleeD1, Abstraction source, soot.jimple.Stmt stmt, soot.jimple.Stmt retSite, soot.jimple.Stmt callSite, ByReferenceBoolean killAll) Description copied from interface:ITaintPropagationRulePropagates a flow along a the return edge- Specified by:
propagateReturnFlowin interfaceITaintPropagationRule- Parameters:
callerD1s- The context abstraction at the caller sidecalleeD1- The context abstraction at the callee sidesource- The abstraction to propagate over the statementstmt- The statement at which to propagate the abstractionretSite- The return site to which the execution returns after leaving the current methodcallSite- The call site of the call from which we returnkillAll- Outgoing value for the rule to specify whether all taints shall be killed, i.e., nothing shall be propagated- Returns:
- The new abstractions to be propagated to the next statement
-
processSecondaryFlowSink
Description copied from interface:IAdditionalFlowSinkPropagationRuleRecords a secondary flow taint reaching a statement. Important: This method does not check whether the secondary flow should be recorded.- Specified by:
processSecondaryFlowSinkin interfaceIAdditionalFlowSinkPropagationRule- Parameters:
d1- The calling contextsource- The current taint abstractionstmt- The current statement, which is assumed to be a sink
-