Interface ITaintPropagationWrapper

All Known Subinterfaces:
ICollectionsSupport, IReversibleTaintWrapper
All Known Implementing Classes:
AbstractTaintWrapper, EasyTaintWrapper, IdentityTaintWrapper, RecordingTaintWrapper, TaintWrapperSet

public interface ITaintPropagationWrapper
This interface declares methods to define classes and methods which should not be analyzed directly. Analysis results are instead taken from an external model containing method summaries (which improves performance and helps if the sources are not available). Unless stated otherwise, all methods in this interface must be implemented thread safe.
Author:
Christian Fritz, Steven Arzt
  • Method Summary

    Modifier and Type
    Method
    Description
    getAliasesForMethod(soot.jimple.Stmt stmt, Abstraction d1, Abstraction taintedPath)
    Gets the aliases that a summarized method generates for the given abstraction.
    This 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.
    int
    Gets the number of times in which the taint wrapper was able to exclusively model a method call.
    int
    Gets the number of times in which the taint wrapper was NOT able to exclusively model a method call.
    void
    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.
    boolean
    isExclusive(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.
    boolean
    supportsCallee(soot.jimple.Stmt callSite)
    Checks whether this taint wrapper can in general produce artificial taints for the given call site.
    boolean
    supportsCallee(soot.SootMethod method)
    Checks whether this taint wrapper can in general produce artificial taints for the given callee.
  • Method Details

    • initialize

      void initialize(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. Note that this method is guaranteed to be called only once and only by a single thread.
      Parameters:
      manager - The manager object providing access to the data flow solver processing the IFDS edges and the interprocedural control flow graph
    • getPreAnalysisHandlers

      Collection<PreAnalysisHandler> getPreAnalysisHandlers()
      This method returns a PreAnalysisHandler that runs before the InfoflowManager creation. Use this method, for example, to inject hierarchy information.
      Returns:
      a collection of PreAnalysisHandlers. Assumed to be non-null.
    • getTaintsForMethod

      Set<Abstraction> getTaintsForMethod(soot.jimple.Stmt stmt, Abstraction d1, Abstraction 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 propagation
      d1 - The abstraction at the beginning of the method that calls the wrapped method
      taintedPath - The tainted field or value to propagate
      Returns:
      The list of tainted values after the invocation statement referenced in Stmt has been executed
    • isExclusive

      boolean isExclusive(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. In effect, this tells the analysis not to propagate inside the callee.
      Parameters:
      stmt - The call statement to check
      taintedPath - The tainted field or value to propagate
      Returns:
      True if this taint wrapper is exclusive, otherwise false.
    • getAliasesForMethod

      Set<Abstraction> getAliasesForMethod(soot.jimple.Stmt stmt, Abstraction d1, Abstraction taintedPath)
      Gets the aliases that a summarized method generates for the given abstraction. Note that this is a may-alias problem.
      Parameters:
      stmt - The statement that calls the summarized method
      d1 - The abstraction at the entry point of the method that calls the wrapped method
      taintedPath - The abstraction for which the aliases shall be computed
      Returns:
      The set of aliases for the given abstraction or null if no such aliases exist
    • supportsCallee

      boolean supportsCallee(soot.SootMethod method)
      Checks whether this taint wrapper can in general produce artificial taints for the given callee. If an implementation returns "false" for a callee, all call sites for this callee might be removed if not needed elsewhere.
      Parameters:
      method - The method to check
      Returns:
      True if this taint wrapper can in general produce taints for the given method.
    • supportsCallee

      boolean supportsCallee(soot.jimple.Stmt callSite)
      Checks whether this taint wrapper can in general produce artificial taints for the given call site. If an implementation returns "false" for a call site, this call sites might be removed if not needed elsewhere.
      Parameters:
      callSite - The call site to check
      Returns:
      True if this taint wrapper can in general produce taints for the given call site.
    • getWrapperHits

      int getWrapperHits()
      Gets 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.
      Returns:
      The number of method model requests that succeeded
    • getWrapperMisses

      int getWrapperMisses()
      Gets 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.
      Returns:
      The number of method model requests that failed