public class Infoflow extends AbstractInfoflow
| 限定符和类型 | 字段和说明 |
|---|---|
protected Collection<soot.SootMethod> |
additionalEntryPointMethods |
protected TaintPropagationHandler |
backwardsPropagationHandler |
protected Set<soot.jimple.Stmt> |
collectedSinks |
protected Set<soot.jimple.Stmt> |
collectedSources |
protected soot.SootMethod |
dummyMainMethod |
protected IExecutorFactory |
executorFactory |
protected InfoflowManager |
manager |
protected IMemoryManagerFactory |
memoryManagerFactory |
protected FlowDroidMemoryWatcher |
memoryWatcher |
protected Set<ResultsAvailableHandler> |
onResultsAvailable |
protected InfoflowResults |
results |
protected IPropagationRuleManagerFactory |
ruleManagerFactory |
protected SolverPeerGroup |
solverPeerGroup |
protected TaintPropagationHandler |
taintPropagationHandler |
androidPath, config, forceAndroidJar, hierarchy, icfgFactory, ipcManager, nativeCallHandler, pathBuilderFactory, postProcessors, preProcessors, sootConfig, taintWrapper| 构造器和说明 |
|---|
Infoflow()
Creates a new instance of the InfoFlow class for analyzing plain Java code
without any references to APKs or the Android SDK.
|
Infoflow(String androidPath,
boolean forceAndroidJar)
Creates a new instance of the Infoflow class for analyzing Android APK files.
|
Infoflow(String androidPath,
boolean forceAndroidJar,
BiDirICFGFactory icfgFactory)
Creates a new instance of the Infoflow class for analyzing Android APK files.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
abortAnalysis()
Aborts the data flow analysis.
|
void |
addResultsAvailableHandler(ResultsAvailableHandler handler)
Adds a handler that is called when information flow results are available
|
void |
computeInfoflow(String appPath,
String libPath,
IEntryPointCreator entryPointCreator,
ISourceSinkManager sourcesSinks)
Computes the information flow on a list of entry point methods.
|
void |
computeInfoflow(String appPath,
String libPath,
String entryPoint,
ISourceSinkManager sourcesSinks)
Computes the information flow on a single method.
|
protected Aliasing |
createAliasController(IAliasingStrategy aliasingStrategy)
Creates the controller object that handles aliasing operations.
|
protected IInfoflowSolver |
createDataFlowSolver(InterruptableExecutor executor,
AbstractInfoflowProblem problem,
InfoflowConfiguration.SolverConfiguration solverConfig)
Creates the instance of the data flow solver
|
protected IAbstractionPathBuilder |
createPathBuilder(InterruptableExecutor executor)
Creates the path builder that shall be used for path reconstruction
|
protected InfoflowPerformanceData |
createPerformanceDataClass()
Factory method for creating the data object that will receive the data flow
solver's performance data
|
protected void |
eliminateDeadCode(ISourceSinkManager sourcesSinks)
Runs all code optimizers
|
Set<soot.jimple.Stmt> |
getCollectedSinks()
Gets the concrete set of sinks that have been collected in preparation for
the taint analysis.
|
Set<soot.jimple.Stmt> |
getCollectedSources()
Gets the concrete set of sources that have been collected in preparation for
the taint analysis.
|
protected Collection<soot.SootMethod> |
getMethodsForSeeds(IInfoflowCFG icfg) |
InfoflowResults |
getResults()
getResults returns the results found by the analysis
|
protected InfoflowManager |
initializeInfoflowManager(ISourceSinkManager sourcesSinks,
IInfoflowCFG iCfg,
GlobalTaintManager globalTaintManager)
Initializes the data flow manager with which propagation rules can interact
with the data flow engine
|
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)
|
protected boolean |
isUserCodeClass(String className)
Checks whether the given class is user code and should not be filtered out.
|
protected boolean |
isValidSeedMethod(soot.SootMethod sm)
Gets whether the given method is a valid seen when scanning for sources and
sinks.
|
protected void |
onBeforeTaintPropagation(IInfoflowSolver forwardSolver,
IInfoflowSolver backwardSolver)
Callback that is invoked when the main taint propagation is about to start
|
protected void |
onTaintPropagationCompleted(IInfoflowSolver forwardSolver,
IInfoflowSolver backwardSolver)
Callback that is invoked when the main taint propagation has completed.
|
void |
removeResultsAvailableHandler(ResultsAvailableHandler handler)
Removes a handler that is called when information flow results are available
|
protected void |
runAnalysis(ISourceSinkManager sourcesSinks)
Conducts a taint analysis on an already initialized callgraph
|
void |
setBackwardsPropagationHandler(TaintPropagationHandler handler)
Sets a handler which is invoked whenever an alias is propagated backwards
|
void |
setExecutorFactory(IExecutorFactory executorFactory)
Sets the factory to be used for creating thread pool executors
|
void |
setMemoryManagerFactory(IMemoryManagerFactory factory)
Sets the factory to be used for creating memory managers
|
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
|
void |
setTaintPropagationHandler(TaintPropagationHandler handler)
Sets a handler which is invoked whenever a taint is propagated
|
void |
setThrowExceptions(boolean b) |
computeInfoflow, computeInfoflow, computeInfoflow, constructCallgraph, getConfig, getLibraryClassPatcher, getTaintWrapper, initializeSoot, initializeSoot, setConfig, setGeomPtaSpecificOptions, setIPCManager, setNativeCallHandler, setPathBuilderFactory, setPostProcessors, setPreProcessors, setSootConfig, setSourcePrec, setTaintWrapperprotected InfoflowResults results
protected InfoflowManager manager
protected Set<ResultsAvailableHandler> onResultsAvailable
protected TaintPropagationHandler taintPropagationHandler
protected TaintPropagationHandler backwardsPropagationHandler
protected IMemoryManagerFactory memoryManagerFactory
protected IExecutorFactory executorFactory
protected IPropagationRuleManagerFactory ruleManagerFactory
protected FlowDroidMemoryWatcher memoryWatcher
protected Set<soot.jimple.Stmt> collectedSources
protected Set<soot.jimple.Stmt> collectedSinks
protected soot.SootMethod dummyMainMethod
protected Collection<soot.SootMethod> additionalEntryPointMethods
protected SolverPeerGroup solverPeerGroup
public Infoflow()
public Infoflow(String androidPath, boolean forceAndroidJar)
androidPath - 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
versionpublic Infoflow(String androidPath, boolean forceAndroidJar, BiDirICFGFactory icfgFactory)
androidPath - 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
versionicfgFactory - The interprocedural CFG to be used by the
InfoFlowProblempublic void computeInfoflow(String appPath, String libPath, IEntryPointCreator entryPointCreator, ISourceSinkManager sourcesSinks)
IInfoflowappPath - 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 codepublic void computeInfoflow(String appPath, String libPath, String entryPoint, ISourceSinkManager sourcesSinks)
IInfoflowappPath - 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 codeprotected void runAnalysis(ISourceSinkManager sourcesSinks)
sourcesSinks - The sources and sinks to be usedprotected IAbstractionPathBuilder createPathBuilder(InterruptableExecutor executor)
executor - The execute in which to run the parallel path reconstruction
tasksprotected InfoflowPerformanceData createPerformanceDataClass()
protected Aliasing createAliasController(IAliasingStrategy aliasingStrategy)
aliasingStrategy - The aliasing strategy to useprotected void onBeforeTaintPropagation(IInfoflowSolver forwardSolver, IInfoflowSolver backwardSolver)
forwardSolver - The forward data flow solverbackwardSolver - The backward data flow solverprotected void onTaintPropagationCompleted(IInfoflowSolver forwardSolver, IInfoflowSolver backwardSolver)
forwardSolver - The forward data flow solverbackwardSolver - The backward data flow solverprotected InfoflowManager initializeInfoflowManager(ISourceSinkManager sourcesSinks, IInfoflowCFG iCfg, GlobalTaintManager globalTaintManager)
sourcesSinks - The source/sink definitionsiCfg - The interprocedural control flow graphglobalTaintManager - The manager object for storing and processing
global taintsprotected IInfoflowSolver createDataFlowSolver(InterruptableExecutor executor, AbstractInfoflowProblem problem, InfoflowConfiguration.SolverConfiguration solverConfig)
executor - The executor on which the solver shall run its tasksproblem - The problem to be solved by the new solversolverConfig - The solver configurationprotected void eliminateDeadCode(ISourceSinkManager sourcesSinks)
sourcesSinks - The SourceSinkManagerprotected Collection<soot.SootMethod> getMethodsForSeeds(IInfoflowCFG icfg)
protected boolean isValidSeedMethod(soot.SootMethod sm)
sm - The method to checkprotected boolean isUserCodeClass(String className)
className - The name of the class to checkpublic InfoflowResults getResults()
IInfoflowpublic boolean isResultAvailable()
IInfoflowpublic void addResultsAvailableHandler(ResultsAvailableHandler handler)
IInfoflowhandler - The handler to addpublic void setTaintPropagationHandler(TaintPropagationHandler handler)
IInfoflowhandler - The handler to be invoked when propagating taintspublic void setBackwardsPropagationHandler(TaintPropagationHandler handler)
IInfoflowhandler - The handler to be invoked when propagating aliasespublic void removeResultsAvailableHandler(ResultsAvailableHandler handler)
IInfoflowhandler - The handler to removepublic Set<soot.jimple.Stmt> getCollectedSources()
IInfoflowpublic Set<soot.jimple.Stmt> getCollectedSinks()
IInfoflowpublic void setMemoryManagerFactory(IMemoryManagerFactory factory)
IInfoflowfactory - The memory manager factory to usepublic void setExecutorFactory(IExecutorFactory executorFactory)
IInfoflowexecutorFactory - The executor factory to usepublic void setPropagationRuleManagerFactory(IPropagationRuleManagerFactory ruleManagerFactory)
IInfoflowruleManagerFactory - The factory class for the propagation rule managerpublic void abortAnalysis()
IInfoflowpublic void setThrowExceptions(boolean b)
Copyright © 2022 Fraunhofer SIT. All rights reserved.