Package soot.jimple.infoflow
Interface IInfoflow
- All Superinterfaces:
ITaintWrapperDataFlowAnalysis
- All Known Implementing Classes:
AbstractInfoflow,BackwardsInfoflow,Infoflow
interface for the main infoflow class
-
Method Summary
Modifier and TypeMethodDescriptionvoidAborts the data flow analysis.voidaddPostProcessor(PostAnalysisHandler postprocessor) Adds a post-processor that shall be executed after the data flow analysis has finishedvoidaddPreprocessor(PreAnalysisHandler preprocessor) Add a preprocessor that need to be executed in order before the information flow.voidAdds a handler that is called when information flow results are availablevoidcomputeInfoflow(String appPath, String libPath, String entryPoint, Collection<String> sources, Collection<String> sinks) Computes the information flow on a single method.voidcomputeInfoflow(String appPath, String libPath, String entryPoint, ISourceSinkManager sourcesSinks) Computes the information flow on a single method.voidcomputeInfoflow(String appPath, String libPath, Collection<String> entryPoints, Collection<String> sources, Collection<String> sinks) Computes the information flow on a list of entry point methods.voidcomputeInfoflow(String appPath, String libPath, IEntryPointCreator entryPointCreator, List<String> sources, List<String> sinks) Computes the information flow on a list of entry point methods.voidcomputeInfoflow(String appPath, String libPath, IEntryPointCreator entryPointCreator, ISourceSinkManager sourcesSinks) Computes the information flow on a list of entry point methods.Set<soot.jimple.Stmt>Gets the concrete set of sinks that have been collected in preparation for the taint analysis.Set<soot.jimple.Stmt>Gets the concrete set of sources that have been collected in preparation for the taint analysis.Gets the configuration to be used for the data flow analysisgetResults returns the results found by the analysisbooleanA 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)voidRemoves a handler that is called when information flow results are availablevoidSets a handler which is invoked whenever an alias is propagatedvoidsetConfig(InfoflowConfiguration config) Sets the configuration to be used for the data flow analysisvoidsetExecutorFactory(IExecutorFactory executorFactory) Sets the factory to be used for creating thread pool executorsvoidsetIPCManager(IIPCManager ipcManager) voidSets the factory to be used for creating memory managersvoidsetNativeCallHandler(INativeCallHandler handler) Sets the handler class to be used for modeling the effects of native methods on the taint statevoidsetPathBuilderFactory(IPathBuilderFactory factory) Sets the path builder factory to be used in subsequent data flow analysesvoidsetPropagationRuleManagerFactory(IPropagationRuleManagerFactory ruleManagerFactory) Sets the factory to be used for creating the propagation rule manager, which can then add features to the core data flow enginevoidsetSootConfig(IInfoflowConfig config) Sets the Soot configuration callback to be used for this analysisvoidSets a handler which is invoked whenever a taint is propagatedvoidsetUsageContextProvider(IUsageContextProvider usageContextProvider) Sets the usage context providerMethods inherited from interface soot.jimple.infoflow.taintWrappers.ITaintWrapperDataFlowAnalysis
getTaintWrapper, setTaintWrapper
-
Method Details
-
getConfig
InfoflowConfiguration getConfig()Gets the configuration to be used for the data flow analysis- Returns:
- The configuration to be used for the data flow analysis
-
setConfig
Sets the configuration to be used for the data flow analysis- Parameters:
config- The configuration to be used for the data flow analysis
-
setNativeCallHandler
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
Add a preprocessor that need to be executed in order before the information flow.- Parameters:
preprocessor- the pre-processor
-
addPostProcessor
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 fileslibPath- The path to the main folder of the (unpacked) library class filesentryPointCreator- the entry point creator to use for generating the dummy main methodsources- 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 fileslibPath- the path to the main folder of the (unpacked) library class filesentryPoints- 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 fileslibPath- the path to the main folder of the (unpacked) library class filesentryPoint- the main method to analyzesources- 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 fileslibPath- the path to the main folder of the (unpacked) library class filesentryPointCreator- the entry point creator to use for generating the dummy main methodsourcesSinks- 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 fileslibPath- the path to the main folder of the (unpacked) library class filesentryPoint- the main method to analyzesourcesSinks- 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
-
setSootConfig
Sets the Soot configuration callback to be used for this analysis- Parameters:
config- The configuration callback to be used for the analysis
-
setPathBuilderFactory
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
Adds a handler that is called when information flow results are available- Parameters:
handler- The handler to add
-
removeResultsAvailableHandler
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
Sets a handler which is invoked whenever a taint is propagated- Parameters:
handler- The handler to be invoked when propagating taints
-
setAliasPropagationHandler
Sets a handler which is invoked whenever an alias is propagated- Parameters:
handler- The handler to be invoked when propagating aliases
-
setMemoryManagerFactory
Sets the factory to be used for creating memory managers- Parameters:
factory- The memory manager factory to use
-
setExecutorFactory
Sets the factory to be used for creating thread pool executors- Parameters:
executorFactory- The executor factory to use
-
setPropagationRuleManagerFactory
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
Sets the usage context provider- Parameters:
usageContextProvider- The usage context provider object
-