Package soot.jimple.infoflow
Class AbstractInfoflow
java.lang.Object
soot.jimple.infoflow.AbstractInfoflow
- All Implemented Interfaces:
IInfoflow,ITaintWrapperDataFlowAnalysis
- Direct Known Subclasses:
BackwardsInfoflow,Infoflow
Abstract base class for all data/information flow analyses in FlowDroid
- Author:
- Steven Arzt
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Collection<soot.SootMethod>protected TaintPropagationHandlerprotected final Fileprotected Set<soot.jimple.Stmt>protected Set<soot.jimple.Stmt>protected InfoflowConfigurationprotected soot.SootMethodprotected IExecutorFactoryprotected final booleanprotected soot.FastHierarchyprotected final BiDirICFGFactoryprotected IIPCManagerprotected final org.slf4j.Loggerprotected InfoflowManagerprotected IMemoryManagerFactoryprotected FlowDroidMemoryWatcherprotected INativeCallHandlerprotected Set<ResultsAvailableHandler>protected IPathBuilderFactoryprotected Collection<PostAnalysisHandler>protected Collection<PreAnalysisHandler>protected InfoflowResultsprotected TaintPropagationHandlerprotected IPropagationRuleManagerFactoryprotected TaintPropagationHandlerprotected IPropagationRuleManagerFactoryprotected ISolverPeerGroupprotected IInfoflowConfigprotected TaintPropagationHandlerprotected ITaintPropagationWrapperprotected booleanprotected IUsageContextProvider -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of the abstract info flow problemAbstractInfoflow(BiDirICFGFactory icfgFactory, File androidPath, boolean forceAndroidJar) Creates a new instance of the abstract info flow problem -
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 libPath, String appPath, 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.protected voidConstructs the callgraphprotected abstract IAliasingStrategycreateAliasAnalysis(ISourceSinkManager sourcesSinks, IInfoflowCFG iCfg, InterruptableExecutor executor, IMemoryManager<Abstraction, soot.Unit> memoryManager) Initializes the alias analysisprotected AliasingcreateAliasController(IAliasingStrategy aliasingStrategy) Creates the controller object that handles aliasing operations.protected IAliasingStrategycreateBackwardAliasAnalysis(InfoflowManager manager, ISourceSinkManager sourcesSinks, IInfoflowCFG iCfg, InterruptableExecutor executor, IMemoryManager<Abstraction, soot.Unit> memoryManager) Initializes the alias analysis for the backward directionprotected IInfoflowSolvercreateDataFlowSolver(InterruptableExecutor executor, AbstractInfoflowProblem problem) Creates the IFDS solver for the forward data flow problemprotected IInfoflowSolvercreateDataFlowSolver(InterruptableExecutor executor, AbstractInfoflowProblem problem, InfoflowConfiguration.SolverConfiguration solverConfig) Creates the instance of the data flow solverprotected abstract AbstractInfoflowProblemcreateInfoflowProblem(Abstraction zeroValue) Creates the problem for the IFDS taint propagation problemprotected IMemoryManager<Abstraction,soot.Unit> Creates the memory manager that helps reduce the memory consumption of the data flow analysisprotected Threadprotected IAbstractionPathBuildercreatePathBuilder(InterruptableExecutor executor) Creates the path builder that shall be used for path reconstructionprotected InfoflowPerformanceDataFactory method for creating the data object that will receive the data flow solver's performance dataprotected abstract InfoflowResultsCreates a new instance of the result class appropriate for the current data flow analysisprotected AbstractInfoflowProblemcreateReverseInfoflowProblem(InfoflowManager manager, Abstraction zeroValue) Creates the reverse problem for the IFDS taint propagation problemprotected voideliminateDeadCode(ISourceSinkManager sourcesSinks) Runs all code optimizersSet<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 analysisprotected LibraryClassPatcherprotected Collection<soot.SootMethod>Given a callgraph, obtains all methods that may contain sources, i.e., statements that can serve as seeds for the taint propagation.getResults returns the results found by the analysisGets the taint wrapper to be used for propagating taints over unknown (library) callees.protected abstract InfoflowManagerinitializeInfoflowManager(ISourceSinkManager sourcesSinks, IInfoflowCFG iCfg, GlobalTaintManager globalTaintManager) Initializes the data flow manager with which propagation rules can interact with the data flow engineprotected InfoflowManagerinitializeReverseInfoflowManager(IInfoflowCFG iCfg, GlobalTaintManager globalTaintManager) protected IPropagationRuleManagerFactoryInitializes an appropriate instance of the rule manager factoryprotected abstract IPropagationRuleManagerFactoryInitializes an appropriate instance of the rule manager factoryprotected voidinitializeSoot(String appPath, String libPath, Collection<String> classes) Initializes Soot.protected voidinitializeSoot(String appPath, String libPath, Collection<String> classes, String extraSeed) Initializes Soot.booleanA 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)protected booleanisUserCodeClass(String className) Checks whether the given class is user code and should not be filtered out.protected booleanisValidSeedMethod(soot.SootMethod sm) Gets whether the given method is a valid seen when scanning for sources and sinks.protected voidonBeforeTaintPropagation(IInfoflowSolver forwardSolver, IInfoflowSolver backwardSolver) Callback that is invoked when the main taint propagation is about to startprotected voidonTaintPropagationCompleted(IInfoflowSolver forwardSolver, IInfoflowSolver aliasSolver, IInfoflowSolver backwardSolver, IInfoflowSolver backwardAliasSolver) Callback that is invoked when the main taint propagation has completed.protected static voidpatchDynamicInvokeInstructions(soot.Body body) Patches the dynamic invocation instructions in the given method bodyprotected PredecessorShorteningModepathConfigToShorteningMode(InfoflowConfiguration.PathConfiguration pathConfiguration) Gets the path shortening mode that shall be applied given a certain path reconstruction configuration.protected voidperformCodeInstrumentationAfterDCE(InfoflowManager dceManager, Set<soot.SootMethod> excludedMethods) Allows subclasses to perform additional code instrumentation tasksprotected voidperformCodeInstrumentationBeforeDCE(InfoflowManager dceManager, Set<soot.SootMethod> excludedMethods) Allows subclasses to perform additional code instrumentation tasksprotected voidReleases the callgraph and all intermediate objects associated with itvoidRemoves a handler that is called when information flow results are availableprotected voidrunAnalysis(ISourceSinkManager sourcesSinks) Conducts a taint analysis on an already initialized callgraphprotected voidrunAnalysis(ISourceSinkManager sourcesSinks, Set<String> additionalSeeds) Conducts a taint analysis on an already initialized callgraphprotected abstract AbstractInfoflow.SourceOrSinkscanStmtForSourcesSinks(ISourceSinkManager sourcesSinks, soot.jimple.Stmt s) Checks whether the given statement is a source or a sinkvoidSets 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 executorsstatic voidvoidsetIPCManager(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 analysisprotected voidvoidSets a handler which is invoked whenever a taint is propagatedvoidsetTaintWrapper(ITaintPropagationWrapper wrapper) Sets the taint wrapper to be used for propagating taints over unknown (library) callees.voidsetThrowExceptions(boolean b) voidsetUsageContextProvider(IUsageContextProvider usageContextProvider) Sets the usage context provider
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
results
-
manager
-
solverPeerGroup
-
pathBuilderFactory
-
config
-
taintWrapper
-
nativeCallHandler
-
ipcManager
-
icfgFactory
-
preProcessors
-
postProcessors
-
androidPath
-
forceAndroidJar
protected final boolean forceAndroidJar -
sootConfig
-
hierarchy
protected soot.FastHierarchy hierarchy -
memoryManagerFactory
-
executorFactory
-
ruleManagerFactory
-
reverseRuleManagerFactory
-
collectedSources
-
collectedSinks
-
dummyMainMethod
protected soot.SootMethod dummyMainMethod -
additionalEntryPointMethods
-
throwExceptions
protected boolean throwExceptions -
onResultsAvailable
-
taintPropagationHandler
-
aliasPropagationHandler
-
reverseTaintPropagationHandler
-
reverseAliasPropagationHandler
-
usageContextProvider
-
memoryWatcher
-
-
Constructor Details
-
AbstractInfoflow
public AbstractInfoflow()Creates a new instance of the abstract info flow problem -
AbstractInfoflow
Creates a new instance of the abstract info flow problem- Parameters:
icfgFactory- The interprocedural CFG to be used by the InfoFlowProblemandroidPath- If forceAndroidJar is false, this is the base directory of the platform files in the Android SDK. If forceAndroidJar is true, this is the full path of a single android.jar file.forceAndroidJar- True if a single platform JAR file shall be forced, false if Soot shall pick the appropriate platform version
-
-
Method Details
-
getConfig
Description copied from interface:IInfoflowGets the configuration to be used for the data flow analysis -
setConfig
Description copied from interface:IInfoflowSets the configuration to be used for the data flow analysis -
setTaintWrapper
Description copied from interface:ITaintWrapperDataFlowAnalysisSets the taint wrapper to be used for propagating taints over unknown (library) callees. If this value is null, no taint wrapping is used.- Specified by:
setTaintWrapperin interfaceITaintWrapperDataFlowAnalysis- Parameters:
wrapper- The taint wrapper to use or null to disable taint wrapping
-
setNativeCallHandler
Description copied from interface:IInfoflowSets the handler class to be used for modeling the effects of native methods on the taint state- Specified by:
setNativeCallHandlerin interfaceIInfoflow- Parameters:
handler- The native call handler to use
-
getTaintWrapper
Description copied from interface:ITaintWrapperDataFlowAnalysisGets the taint wrapper to be used for propagating taints over unknown (library) callees. If this value is null, no taint wrapping is used.- Specified by:
getTaintWrapperin interfaceITaintWrapperDataFlowAnalysis- Returns:
- The taint wrapper to use or null if taint wrapping is disabled
-
addPreprocessor
Description copied from interface:IInfoflowAdd a preprocessor that need to be executed in order before the information flow.- Specified by:
addPreprocessorin interfaceIInfoflow- Parameters:
preprocessor- the pre-processor
-
addPostProcessor
Description copied from interface:IInfoflowAdds a post-processor that shall be executed after the data flow analysis has finished- Specified by:
addPostProcessorin interfaceIInfoflow- Parameters:
postprocessor- The post-processor to execute on the results
-
computeInfoflow
public void computeInfoflow(String appPath, String libPath, IEntryPointCreator entryPointCreator, List<String> sources, List<String> sinks) Description copied from interface:IInfoflowComputes 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)- Specified by:
computeInfoflowin interfaceIInfoflow- 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
public void computeInfoflow(String appPath, String libPath, Collection<String> entryPoints, Collection<String> sources, Collection<String> sinks) Description copied from interface:IInfoflowComputes 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)- Specified by:
computeInfoflowin interfaceIInfoflow- 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
public void computeInfoflow(String libPath, String appPath, String entryPoint, Collection<String> sources, Collection<String> sinks) Description copied from interface:IInfoflowComputes 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.- Specified by:
computeInfoflowin interfaceIInfoflow- Parameters:
libPath- The path containing the client program's filesappPath- 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)
-
initializeSoot
Initializes Soot.- Parameters:
appPath- The application path containing the analysis clientlibPath- The Soot classpath containing the librariesclasses- The set of classes that shall be checked for data flow analysis seeds. All sources in these classes are used as seeds.
-
initializeSoot
protected void initializeSoot(String appPath, String libPath, Collection<String> classes, String extraSeed) Initializes Soot.- Parameters:
appPath- The application path containing the analysis clientlibPath- The Soot classpath containing the librariesclasses- The set of classes that shall be checked for data flow analysis seeds. All sources in these classes are used as seeds. If a non-empty extra seed is given, this one is used too.
-
setSourcePrec
protected void setSourcePrec() -
setGeomPtaSpecificOptions
public static void setGeomPtaSpecificOptions() -
setSootConfig
Description copied from interface:IInfoflowSets the Soot configuration callback to be used for this analysis- Specified by:
setSootConfigin interfaceIInfoflow- Parameters:
config- The configuration callback to be used for the analysis
-
setIPCManager
- Specified by:
setIPCManagerin interfaceIInfoflow
-
setPathBuilderFactory
Description copied from interface:IInfoflowSets the path builder factory to be used in subsequent data flow analyses- Specified by:
setPathBuilderFactoryin interfaceIInfoflow- Parameters:
factory- The path bilder factory to use for constructing path reconstruction algorithms
-
constructCallgraph
protected void constructCallgraph()Constructs the callgraph -
patchDynamicInvokeInstructions
protected static void patchDynamicInvokeInstructions(soot.Body body) Patches the dynamic invocation instructions in the given method body- Parameters:
body- The method body in which to patch the dynamic invocation instructions
-
getLibraryClassPatcher
-
setMemoryManagerFactory
Description copied from interface:IInfoflowSets the factory to be used for creating memory managers- Specified by:
setMemoryManagerFactoryin interfaceIInfoflow- Parameters:
factory- The memory manager factory to use
-
computeInfoflow
public void computeInfoflow(String appPath, String libPath, IEntryPointCreator entryPointCreator, ISourceSinkManager sourcesSinks) Description copied from interface:IInfoflowComputes 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)- Specified by:
computeInfoflowin interfaceIInfoflow- 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
public void computeInfoflow(String appPath, String libPath, String entryPoint, ISourceSinkManager sourcesSinks) Description copied from interface:IInfoflowComputes 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.- Specified by:
computeInfoflowin interfaceIInfoflow- 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
-
runAnalysis
Conducts a taint analysis on an already initialized callgraph- Parameters:
sourcesSinks- The sources and sinks to be used
-
runAnalysis
Conducts a taint analysis on an already initialized callgraph- Parameters:
sourcesSinks- The sources and sinks to be usedadditionalSeeds- Additional seeds at which to create A ZERO fact even if they are not sources
-
createNewThread
-
createInfoflowProblem
Creates the problem for the IFDS taint propagation problem- Parameters:
zeroValue- The taint abstraction for the tautology- Returns:
- The IDFS problem
-
createReverseInfoflowProblem
protected AbstractInfoflowProblem createReverseInfoflowProblem(InfoflowManager manager, Abstraction zeroValue) Creates the reverse problem for the IFDS taint propagation problem- Parameters:
zeroValue- The taint abstraction for the tautology- Returns:
- The IDFS problem
-
createDataFlowSolver
protected IInfoflowSolver createDataFlowSolver(InterruptableExecutor executor, AbstractInfoflowProblem problem, InfoflowConfiguration.SolverConfiguration solverConfig) Creates the instance of the data flow solver- Parameters:
executor- The executor on which the solver shall run its tasksproblem- The problem to be solved by the new solversolverConfig- The solver configuration- Returns:
- The new data flow solver
-
scanStmtForSourcesSinks
protected abstract AbstractInfoflow.SourceOrSink scanStmtForSourcesSinks(ISourceSinkManager sourcesSinks, soot.jimple.Stmt s) Checks whether the given statement is a source or a sink- Parameters:
sourcesSinks- The source/sink managers- The statement to check- Returns:
- An enumeration value that defines whether the given statement is a source, a sink, or neither
-
getMethodsForSeeds
Given a callgraph, obtains all methods that may contain sources, i.e., statements that can serve as seeds for the taint propagation.- Parameters:
icfg- The interprocedural control flow graph- Returns:
- The methods that may contain seeds
-
isValidSeedMethod
protected boolean isValidSeedMethod(soot.SootMethod sm) Gets whether the given method is a valid seen when scanning for sources and sinks. A method is a valid seed it it (or one of its transitive callees) can contain calls to source or sink methods.- Parameters:
sm- The method to check- Returns:
- True if this method or one of its transitive callees can contain sources or sinks, otherwise false
-
isUserCodeClass
Checks whether the given class is user code and should not be filtered out. By default, this method assumes that all code is potentially user code.- Parameters:
className- The name of the class to check- Returns:
- True if the given class is user code, false otherwise
-
eliminateDeadCode
Runs all code optimizers- Parameters:
sourcesSinks- The SourceSinkManager
-
performCodeInstrumentationBeforeDCE
protected void performCodeInstrumentationBeforeDCE(InfoflowManager dceManager, Set<soot.SootMethod> excludedMethods) Allows subclasses to perform additional code instrumentation tasks- Parameters:
dceManager- The manager class for dead code elimination and instrumentationexcludedMethods- The methods that shall not be modified
-
performCodeInstrumentationAfterDCE
protected void performCodeInstrumentationAfterDCE(InfoflowManager dceManager, Set<soot.SootMethod> excludedMethods) Allows subclasses to perform additional code instrumentation tasks- Parameters:
dceManager- The manager class for dead code elimination and instrumentationexcludedMethods- The methods that shall not be modified
-
createDataFlowSolver
protected IInfoflowSolver createDataFlowSolver(InterruptableExecutor executor, AbstractInfoflowProblem problem) Creates the IFDS solver for the forward data flow problem- Parameters:
executor- The executor in which to run the tasks or propagating IFDS edgesproblem- The implementation of the forward problem- Returns:
- The solver that solves the forward taint analysis problem
-
pathConfigToShorteningMode
protected PredecessorShorteningMode pathConfigToShorteningMode(InfoflowConfiguration.PathConfiguration pathConfiguration) Gets the path shortening mode that shall be applied given a certain path reconstruction configuration. This method computes the most aggressive path shortening that is possible without eliminating data that is necessary for the requested path reconstruction.- Parameters:
pathConfiguration- The path reconstruction configuration- Returns:
- The computed path shortening mode
-
createMemoryManager
Creates the memory manager that helps reduce the memory consumption of the data flow analysis- Returns:
- The memory manager object
-
releaseCallgraph
protected void releaseCallgraph()Releases the callgraph and all intermediate objects associated with it -
createPerformanceDataClass
Factory method for creating the data object that will receive the data flow solver's performance data- Returns:
- The data object for the performance data
-
setExecutorFactory
Description copied from interface:IInfoflowSets the factory to be used for creating thread pool executors- Specified by:
setExecutorFactoryin interfaceIInfoflow- Parameters:
executorFactory- The executor factory to use
-
setPropagationRuleManagerFactory
Description copied from interface:IInfoflowSets the factory to be used for creating the propagation rule manager, which can then add features to the core data flow engine- Specified by:
setPropagationRuleManagerFactoryin interfaceIInfoflow- Parameters:
ruleManagerFactory- The factory class for the propagation rule manager
-
getCollectedSources
Description copied from interface:IInfoflowGets 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()),- Specified by:
getCollectedSourcesin interfaceIInfoflow- Returns:
- The set of sources collected for taint analysis
-
getCollectedSinks
Description copied from interface:IInfoflowGets 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()),- Specified by:
getCollectedSinksin interfaceIInfoflow- Returns:
- The set of sinks collected for taint analysis
-
createResultsObject
Creates a new instance of the result class appropriate for the current data flow analysis- Returns:
- The new result object
-
createAliasAnalysis
protected abstract IAliasingStrategy createAliasAnalysis(ISourceSinkManager sourcesSinks, IInfoflowCFG iCfg, InterruptableExecutor executor, IMemoryManager<Abstraction, soot.Unit> memoryManager) Initializes the alias analysis- Parameters:
sourcesSinks- The set of sources and sinksiCfg- The interprocedural control flow graphexecutor- The executor in which to run concurrent tasksmemoryManager- The memory manager for rducing the memory load during IFDS propagation- Returns:
- The alias analysis implementation to use for the data flow analysis
-
createBackwardAliasAnalysis
protected IAliasingStrategy createBackwardAliasAnalysis(InfoflowManager manager, ISourceSinkManager sourcesSinks, IInfoflowCFG iCfg, InterruptableExecutor executor, IMemoryManager<Abstraction, soot.Unit> memoryManager) Initializes the alias analysis for the backward direction- Parameters:
manager- The infoflow managersourcesSinks- The set of sources and sinksiCfg- The interprocedural control flow graphexecutor- The executor in which to run concurrent tasksmemoryManager- The memory manager for reducing the memory load during IFDS propagation- Returns:
- The backward alias analysis implementation
-
createAliasController
Creates the controller object that handles aliasing operations. Derived classes can override this method to supply custom aliasing implementations.- Parameters:
aliasingStrategy- The aliasing strategy to use- Returns:
- The new alias controller object
-
addResultsAvailableHandler
Description copied from interface:IInfoflowAdds a handler that is called when information flow results are available- Specified by:
addResultsAvailableHandlerin interfaceIInfoflow- Parameters:
handler- The handler to add
-
setTaintPropagationHandler
Description copied from interface:IInfoflowSets a handler which is invoked whenever a taint is propagated- Specified by:
setTaintPropagationHandlerin interfaceIInfoflow- Parameters:
handler- The handler to be invoked when propagating taints
-
setAliasPropagationHandler
Description copied from interface:IInfoflowSets a handler which is invoked whenever an alias is propagated- Specified by:
setAliasPropagationHandlerin interfaceIInfoflow- Parameters:
handler- The handler to be invoked when propagating aliases
-
removeResultsAvailableHandler
Description copied from interface:IInfoflowRemoves a handler that is called when information flow results are available- Specified by:
removeResultsAvailableHandlerin interfaceIInfoflow- Parameters:
handler- The handler to remove
-
getResults
Description copied from interface:IInfoflowgetResults returns the results found by the analysis- Specified by:
getResultsin interfaceIInfoflow- Returns:
- the results
-
isResultAvailable
public boolean isResultAvailable()Description copied from interface:IInfoflowA 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)- Specified by:
isResultAvailablein interfaceIInfoflow- Returns:
- boolean that states if a result is available
-
abortAnalysis
public void abortAnalysis()Description copied from interface:IInfoflowAborts 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- Specified by:
abortAnalysisin interfaceIInfoflow
-
setThrowExceptions
public void setThrowExceptions(boolean b) -
initializeInfoflowManager
protected abstract InfoflowManager initializeInfoflowManager(ISourceSinkManager sourcesSinks, IInfoflowCFG iCfg, GlobalTaintManager globalTaintManager) Initializes the data flow manager with which propagation rules can interact with the data flow engine- Parameters:
sourcesSinks- The source/sink definitionsiCfg- The interprocedural control flow graphglobalTaintManager- The manager object for storing and processing global taints- Returns:
- The data flow manager
-
initializeReverseInfoflowManager
protected InfoflowManager initializeReverseInfoflowManager(IInfoflowCFG iCfg, GlobalTaintManager globalTaintManager) -
onBeforeTaintPropagation
protected void onBeforeTaintPropagation(IInfoflowSolver forwardSolver, IInfoflowSolver backwardSolver) Callback that is invoked when the main taint propagation is about to start- Parameters:
forwardSolver- The forward data flow solverbackwardSolver- The backward data flow solver
-
onTaintPropagationCompleted
protected void onTaintPropagationCompleted(IInfoflowSolver forwardSolver, IInfoflowSolver aliasSolver, IInfoflowSolver backwardSolver, IInfoflowSolver backwardAliasSolver) Callback that is invoked when the main taint propagation has completed. This method is called before memory cleanup happens.- Parameters:
forwardSolver- The forward data flow solverbackwardSolver- The backward data flow solver
-
createPathBuilder
Creates the path builder that shall be used for path reconstruction- Parameters:
executor- The execute in which to run the parallel path reconstruction tasks- Returns:
- The path builder implementation
-
initializeRuleManagerFactory
Initializes an appropriate instance of the rule manager factory- Returns:
- The rule manager factory
-
initializeReverseRuleManagerFactory
Initializes an appropriate instance of the rule manager factory- Returns:
- The rule manager factory
-
setUsageContextProvider
Description copied from interface:IInfoflowSets the usage context provider- Specified by:
setUsageContextProviderin interfaceIInfoflow- Parameters:
usageContextProvider- The usage context provider object
-