Class SecondaryFlowGenerator

java.lang.Object
soot.jimple.infoflow.river.SecondaryFlowGenerator
All Implemented Interfaces:
TaintPropagationHandler

public class SecondaryFlowGenerator extends Object implements TaintPropagationHandler
TaintPropagationHandler querying the backward analysis when reaching an additional sink. Attach to the forward analysis.
Author:
Tim Lange
  • Constructor Details

    • SecondaryFlowGenerator

      public SecondaryFlowGenerator()
  • Method Details

    • notifyFlowIn

      public void notifyFlowIn(soot.Unit stmt, Abstraction taint, InfoflowManager manager, TaintPropagationHandler.FlowFunctionType type)
      Description copied from interface: TaintPropagationHandler
      Handler function that is invoked when a taint is proagated in the data flow engine
      Specified by:
      notifyFlowIn in interface TaintPropagationHandler
      Parameters:
      stmt - The statement over which the taint is propagated
      taint - The taint being propagated
      manager - The manager object that gives access to the data flow engine
      type - The type of data flow edge being processed
    • notifyFlowOut

      public Set<Abstraction> notifyFlowOut(soot.Unit unit, Abstraction d1, Abstraction incoming, Set<Abstraction> outgoing, InfoflowManager manager, TaintPropagationHandler.FlowFunctionType type)
      Description copied from interface: TaintPropagationHandler
      Handler function that is invoked when a new taint is generated in the data flow engine
      Specified by:
      notifyFlowOut in interface TaintPropagationHandler
      Parameters:
      unit - The statement over which the taint is propagated
      d1 - The abstraction at the beginning of the current method
      incoming - The original abstraction from which the outgoing ones were computed
      outgoing - The set of taints being propagated
      manager - The manager object that gives access to the data flow engine
      type - The type of data flow edge being processed
      Returns:
      The new abstractions to be propagated on. If you do not want to change the normal propagation behavior, just return the value of the "taints" parameter as-is.
    • createAdditionalFlowAbstraction

      protected Abstraction createAdditionalFlowAbstraction(Abstraction baseTaint, soot.jimple.Stmt stmt)
      Creates a new abstraction that is injected into the backward direction.
      Parameters:
      baseTaint - Taint of the base local
      stmt - Current statement
      Returns:
      New abstraction
    • createAdditionalFlowAbstraction

      protected Abstraction createAdditionalFlowAbstraction(AdditionalFlowInfoSpecification spec, soot.jimple.Stmt stmt, InfoflowManager manager)
      Creates a new abstraction that is injected into the backward direction.
      Parameters:
      spec - Flow Specification
      stmt - Current statement
      manager - Infoflow Manager
      Returns:
      New abstraction
    • getTaintFromLocal

      protected Abstraction getTaintFromLocal(Set<Abstraction> outgoing, soot.Value baseLocal)
      Check whether baseLocal is tainted in the outgoing set. Assumes baseLocal is an object and the check happens at a call site.
      Parameters:
      outgoing - outgoing taint set
      baseLocal - base local
      Returns:
      corresponding abstraction if baseLocal is tainted else null
    • isReadAt

      protected boolean isReadAt(soot.Unit unit, AccessPath ap)
      Check whether the access path is read at unit.
      Parameters:
      unit - unit
      ap - access path
      Returns:
      true if ap is read at unit