Interface IInfoflow

All Superinterfaces:
ITaintWrapperDataFlowAnalysis
All Known Implementing Classes:
AbstractInfoflow, BackwardsInfoflow, Infoflow

public interface IInfoflow extends ITaintWrapperDataFlowAnalysis
interface for the main infoflow class
  • Method Details

    • getConfig

      Gets the configuration to be used for the data flow analysis
      Returns:
      The configuration to be used for the data flow analysis
    • setConfig

      void setConfig(InfoflowConfiguration config)
      Sets the configuration to be used for the data flow analysis
      Parameters:
      config - The configuration to be used for the data flow analysis
    • setNativeCallHandler

      void setNativeCallHandler(INativeCallHandler handler)
      Sets the handler class to be used for modeling the effects of native methods on the taint state
      Parameters:
      handler - The native call handler to use
    • addPreprocessor

      void addPreprocessor(PreAnalysisHandler preprocessor)
      Add a preprocessor that need to be executed in order before the information flow.
      Parameters:
      preprocessor - the pre-processor
    • addPostProcessor

      void addPostProcessor(PostAnalysisHandler postprocessor)
      Adds a post-processor that shall be executed after the data flow analysis has finished
      Parameters:
      postprocessor - The post-processor to execute on the results
    • computeInfoflow

      void computeInfoflow(String appPath, String libPath, IEntryPointCreator entryPointCreator, List<String> sources, List<String> sinks)
      Computes the information flow on a list of entry point methods. This list is used to construct an artificial main method following the Android life cycle for all methods that are detected to be part of Android's application infrastructure (e.g. android.app.Activity.onCreate)
      Parameters:
      appPath - The path containing the client program's files
      libPath - The path to the main folder of the (unpacked) library class files
      entryPointCreator - the entry point creator to use for generating the dummy main method
      sources - list of source class+method (as string conforms to SootMethod representation)
      sinks - list of sink class+method (as string conforms to SootMethod representation)
    • computeInfoflow

      void computeInfoflow(String appPath, String libPath, Collection<String> entryPoints, Collection<String> sources, Collection<String> sinks)
      Computes the information flow on a list of entry point methods. This list is used to construct an artificial main method following the Android life cycle for all methods that are detected to be part of Android's application infrastructure (e.g. android.app.Activity.onCreate)
      Parameters:
      appPath - The path containing the client program's files
      libPath - the path to the main folder of the (unpacked) library class files
      entryPoints - the entryPoints (string conforms to SootMethod representation)
      sources - list of source class+method (as string conforms to SootMethod representation)
      sinks - list of sink class+method (as string conforms to SootMethod representation)
    • computeInfoflow

      void computeInfoflow(String appPath, String libPath, String entryPoint, Collection<String> sources, Collection<String> sinks)
      Computes the information flow on a single method. This method is directly taken as the entry point into the program, even if it is an instance method.
      Parameters:
      appPath - The path containing the client program's files
      libPath - the path to the main folder of the (unpacked) library class files
      entryPoint - the main method to analyze
      sources - list of source class+method (as string conforms to SootMethod representation)
      sinks - list of sink class+method (as string conforms to SootMethod representation)
    • computeInfoflow

      void computeInfoflow(String appPath, String libPath, IEntryPointCreator entryPointCreator, ISourceSinkManager sourcesSinks)
      Computes the information flow on a list of entry point methods. This list is used to construct an artificial main method following the Android life cycle for all methods that are detected to be part of Android's application infrastructure (e.g. android.app.Activity.onCreate)
      Parameters:
      appPath - The path containing the client program's files
      libPath - the path to the main folder of the (unpacked) library class files
      entryPointCreator - the entry point creator to use for generating the dummy main method
      sourcesSinks - manager class for identifying sources and sinks in the source code
    • computeInfoflow

      void computeInfoflow(String appPath, String libPath, String entryPoint, ISourceSinkManager sourcesSinks)
      Computes the information flow on a single method. This method is directly taken as the entry point into the program, even if it is an instance method.
      Parameters:
      appPath - The path containing the client program's files
      libPath - the path to the main folder of the (unpacked) library class files
      entryPoint - the main method to analyze
      sourcesSinks - manager class for identifying sources and sinks in the source code
    • getResults

      InfoflowResults getResults()
      getResults returns the results found by the analysis
      Returns:
      the results
    • isResultAvailable

      boolean isResultAvailable()
      A result is available if the analysis has finished - so if this method returns false the analysis has not finished yet or was not started (e.g. no sources or sinks found)
      Returns:
      boolean that states if a result is available
    • setIPCManager

      void setIPCManager(IIPCManager ipcManager)
    • setSootConfig

      void setSootConfig(IInfoflowConfig config)
      Sets the Soot configuration callback to be used for this analysis
      Parameters:
      config - The configuration callback to be used for the analysis
    • setPathBuilderFactory

      void setPathBuilderFactory(IPathBuilderFactory factory)
      Sets the path builder factory to be used in subsequent data flow analyses
      Parameters:
      factory - The path bilder factory to use for constructing path reconstruction algorithms
    • getCollectedSources

      Set<soot.jimple.Stmt> getCollectedSources()
      Gets the concrete set of sources that have been collected in preparation for the taint analysis. This method will return null if source and sink logging has not been enabled (see InfoflowConfiguration. setLogSourcesAndSinks()),
      Returns:
      The set of sources collected for taint analysis
    • getCollectedSinks

      Set<soot.jimple.Stmt> getCollectedSinks()
      Gets the concrete set of sinks that have been collected in preparation for the taint analysis. This method will return null if source and sink logging has not been enabled (see InfoflowConfiguration. setLogSourcesAndSinks()),
      Returns:
      The set of sinks collected for taint analysis
    • addResultsAvailableHandler

      void addResultsAvailableHandler(ResultsAvailableHandler handler)
      Adds a handler that is called when information flow results are available
      Parameters:
      handler - The handler to add
    • removeResultsAvailableHandler

      void removeResultsAvailableHandler(ResultsAvailableHandler handler)
      Removes a handler that is called when information flow results are available
      Parameters:
      handler - The handler to remove
    • abortAnalysis

      void abortAnalysis()
      Aborts the data flow analysis. This is useful when the analysis controller is running in a different thread and the main thread (e.g., a GUI) wants to abort the analysis
    • setTaintPropagationHandler

      void setTaintPropagationHandler(TaintPropagationHandler handler)
      Sets a handler which is invoked whenever a taint is propagated
      Parameters:
      handler - The handler to be invoked when propagating taints
    • setAliasPropagationHandler

      void setAliasPropagationHandler(TaintPropagationHandler handler)
      Sets a handler which is invoked whenever an alias is propagated
      Parameters:
      handler - The handler to be invoked when propagating aliases
    • setMemoryManagerFactory

      void setMemoryManagerFactory(IMemoryManagerFactory factory)
      Sets the factory to be used for creating memory managers
      Parameters:
      factory - The memory manager factory to use
    • setExecutorFactory

      void setExecutorFactory(IExecutorFactory executorFactory)
      Sets the factory to be used for creating thread pool executors
      Parameters:
      executorFactory - The executor factory to use
    • setPropagationRuleManagerFactory

      void setPropagationRuleManagerFactory(IPropagationRuleManagerFactory ruleManagerFactory)
      Sets the factory to be used for creating the propagation rule manager, which can then add features to the core data flow engine
      Parameters:
      ruleManagerFactory - The factory class for the propagation rule manager
    • setUsageContextProvider

      void setUsageContextProvider(IUsageContextProvider usageContextProvider)
      Sets the usage context provider
      Parameters:
      usageContextProvider - The usage context provider object