Class WrapperPropagationRule

java.lang.Object
soot.jimple.infoflow.problems.rules.AbstractTaintPropagationRule
soot.jimple.infoflow.problems.rules.forward.WrapperPropagationRule
All Implemented Interfaces:
ITaintPropagationRule
Direct Known Subclasses:
CollectionWrapperPropagationRule

public class WrapperPropagationRule extends AbstractTaintPropagationRule
Rule for using external taint wrappers
Author:
Steven Arzt
  • Constructor Details

  • 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: ITaintPropagationRule
      Propagates a flow along a normal statement this is not a call or return site
      Parameters:
      d1 - The context abstraction
      source - The abstraction to propagate over the statement
      stmt - The statement at which to propagate the abstraction
      destStmt - The next statement to which control flow will continue after processing stmt
      killSource - Outgoing value for the rule to specify whether the incoming taint shall be killed
      killAll - 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
    • computeWrapperTaints

      protected Set<Abstraction> computeWrapperTaints(Abstraction d1, soot.jimple.Stmt iStmt, Abstraction source, ByReferenceBoolean killSource)
      Computes the taints produced by a taint wrapper object
      Parameters:
      d1 - The context (abstraction at the method's start node)
      iStmt - The call statement the taint wrapper shall check for well- known methods that introduce black-box taint propagation
      source - The taint source
      Returns:
      The taints computed by the wrapper
    • checkAndPropagateAlias

      protected void checkAndPropagateAlias(Abstraction d1, soot.jimple.Stmt iStmt, Set<Abstraction> resWithAliases, Abstraction abs)
      Starts alias tracking for the results of a taint wrapper if necessary
      Parameters:
      d1 - The context in which the wrapped method was called
      iStmt - The call site
      resWithAliases - The resulting taint abstractions generated by the wrapper
      abs - The original incoming taint abstraction
    • propagateCallToReturnFlow

      public Collection<Abstraction> propagateCallToReturnFlow(Abstraction d1, Abstraction source, soot.jimple.Stmt stmt, ByReferenceBoolean killSource, ByReferenceBoolean killAll)
      Description copied from interface: ITaintPropagationRule
      Propagates a flow along a the call-to-return edge at a call site
      Parameters:
      d1 - The context abstraction
      source - The abstraction to propagate over the statement
      stmt - The statement at which to propagate the abstraction
      killSource - Outgoing value for the rule to specify whether the incoming taint shall be killed
      killAll - 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: ITaintPropagationRule
      Propagates a flow along a the return edge
      Parameters:
      callerD1s - The context abstraction at the caller side
      calleeD1 - The context abstraction at the callee side
      source - The abstraction to propagate over the statement
      stmt - The statement at which to propagate the abstraction
      retSite - The return site to which the execution returns after leaving the current method
      callSite - The call site of the call from which we return
      killAll - 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
    • propagateCallFlow

      public Collection<Abstraction> propagateCallFlow(Abstraction d1, Abstraction source, soot.jimple.Stmt stmt, soot.SootMethod dest, ByReferenceBoolean killAll)
      Description copied from interface: ITaintPropagationRule
      Propagates a flow across a call site
      Parameters:
      d1 - The context abstraction
      source - The abstraction to propagate over the statement
      stmt - The statement at which to propagate the abstraction
      dest - The destination method into which to propagate the abstraction
      killAll - 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