public abstract class BaseSourceSinkManager extends Object implements ISourceSinkManager, IOneSourceAtATimeManager
| 限定符和类型 | 类和说明 |
|---|---|
static class |
BaseSourceSinkManager.SourceType
Types of sources supported by this SourceSinkManager
|
| 构造器和说明 |
|---|
BaseSourceSinkManager(Collection<? extends ISourceSinkDefinition> sources,
Collection<? extends ISourceSinkDefinition> sinks,
InfoflowConfiguration config)
Creates a new instance of the
BaseSourceSinkManager class with either
strong or weak matching. |
BaseSourceSinkManager(Collection<? extends ISourceSinkDefinition> sources,
Collection<? extends ISourceSinkDefinition> sinks,
Set<? extends CallbackDefinition> callbackMethods,
InfoflowConfiguration config)
Creates a new instance of the
BaseSourceSinkManager class with strong
matching, i.e. the methods in the code must exactly match those in the list. |
| 限定符和类型 | 方法和说明 |
|---|---|
protected ISourceSinkDefinition |
checkCallbackParamSource(soot.jimple.Stmt sCallSite,
IInfoflowCFG cfg)
Checks whether the given statement obtains data from a callback source
|
protected SourceInfo |
createSourceInfo(soot.jimple.Stmt sCallSite,
InfoflowManager manager,
ISourceSinkDefinition def) |
void |
excludeMethod(soot.SootMethod toExclude)
Excludes the given method from the source/sink analysis.
|
protected CallbackDefinition |
getCallbackDefinition(soot.SootMethod method)
Checks whether the given method is registered as a callback method.
|
protected ISourceSinkDefinition |
getSinkDefinition(soot.jimple.Stmt sCallSite,
InfoflowManager manager,
AccessPath ap)
Gets the sink definition for the given call site and tainted access path
|
SinkInfo |
getSinkInfo(soot.jimple.Stmt sCallSite,
InfoflowManager manager,
AccessPath ap)
Checks if the given access path at this statement will leak.
|
protected ISourceSinkDefinition |
getSource(soot.jimple.Stmt sCallSite,
IInfoflowCFG cfg)
Checks whether the given statement is a source, i.e. introduces new
information into the application.
|
protected ISourceSinkDefinition |
getSourceDefinition(soot.SootMethod method)
Checks whether the given method is registered as a source method
|
SourceInfo |
getSourceInfo(soot.jimple.Stmt sCallSite,
InfoflowManager manager)
Determines if a method called by the Stmt is a source method or not.
|
protected ISourceSinkDefinition |
getSourceMethod(soot.SootMethod method)
Checks whether the given method is registered as a source method.
|
protected ISourceSinkDefinition |
getUISourceDefinition(soot.jimple.Stmt sCallSite,
IInfoflowCFG cfg)
Checks whether the given call site indicates a UI source, e.g. a password
input.
|
boolean |
hasNextSource()
Checks whether there is another source with which to run the data flow
analysis
|
void |
initialize()
Initialization method that is called after the Soot instance has been
created and before the actual data flow tracking is started.
|
protected abstract boolean |
isEntryPointMethod(soot.SootMethod method)
Checks whether the given method is an entry point, i.e., a lifecycle method
|
boolean |
isOneSourceAtATimeEnabled()
Gets whether this source/sink manager shall run with one source at a time
instead of all of them together
|
void |
nextSource()
Advances the iterator to the next source.
|
void |
resetCurrentSource()
Resets the iterator.
|
void |
setOneSourceAtATimeEnabled(boolean enabled)
Sets whether this source/sink manager shall run with one source at a time
instead of all of them together
|
protected soot.util.MultiMap<String,ISourceSinkDefinition> sourceDefs
protected soot.util.MultiMap<String,ISourceSinkDefinition> sinkDefs
protected Map<soot.SootMethod,ISourceSinkDefinition> sourceMethods
protected Map<soot.jimple.Stmt,ISourceSinkDefinition> sourceStatements
protected Map<soot.SootMethod,ISourceSinkDefinition> sinkMethods
protected Map<soot.SootMethod,ISourceSinkDefinition> sinkReturnMethods
protected Map<soot.SootMethod,CallbackDefinition> callbackMethods
protected Map<soot.SootField,ISourceSinkDefinition> sourceFields
protected Map<soot.SootField,ISourceSinkDefinition> sinkFields
protected Map<soot.jimple.Stmt,ISourceSinkDefinition> sinkStatements
protected final InfoflowConfiguration.SourceSinkConfiguration sourceSinkConfig
protected final Set<soot.SootMethod> excludedMethods
protected boolean oneSourceAtATime
protected BaseSourceSinkManager.SourceType osaatType
protected Iterator<soot.SootMethod> osaatIterator
protected soot.SootMethod currentSource
protected IValueProvider valueProvider
protected final com.google.common.cache.LoadingCache<soot.SootClass,Collection<soot.SootClass>> interfacesOf
public BaseSourceSinkManager(Collection<? extends ISourceSinkDefinition> sources, Collection<? extends ISourceSinkDefinition> sinks, InfoflowConfiguration config)
BaseSourceSinkManager class with either
strong or weak matching.sources - The list of source methodssinks - The list of sink methodsconfig - The configuration of the data flow analyzerpublic BaseSourceSinkManager(Collection<? extends ISourceSinkDefinition> sources, Collection<? extends ISourceSinkDefinition> sinks, Set<? extends CallbackDefinition> callbackMethods, InfoflowConfiguration config)
BaseSourceSinkManager class with strong
matching, i.e. the methods in the code must exactly match those in the list.sources - The list of source methodssinks - The list of sink methodscallbackMethods - The list of callback methods whose parameters are
sources through which the application receives data
from the operating systemweakMatching - True for weak matching: If an entry in the list has no
return type, it matches arbitrary return types if the
rest of the method signature is compatible. False for
strong matching: The method signature in the code
exactly match the one in the list.config - The configuration of the data flow analyzerprotected ISourceSinkDefinition getSinkDefinition(soot.jimple.Stmt sCallSite, InfoflowManager manager, AccessPath ap)
sCallSite - The call sitemanager - The manager object providing access to the configuration and
the interprocedural control flow graphap - The incoming tainted access pathpublic SinkInfo getSinkInfo(soot.jimple.Stmt sCallSite, InfoflowManager manager, AccessPath ap)
ISourceSinkManagergetSinkInfo 在接口中 ISourceSinkManagersCallSite - The call site to checkmanager - The manager object for interacting with the solverap - The access path to check. Pass null to check whether the given
statement can be a sink for any given access path.public SourceInfo getSourceInfo(soot.jimple.Stmt sCallSite, InfoflowManager manager)
ISourceSinkManagergetSourceInfo 在接口中 ISourceSinkManagersCallSite - a Stmt which should include an invokeExrp calling a methodmanager - The manager object for interacting with the solverprotected SourceInfo createSourceInfo(soot.jimple.Stmt sCallSite, InfoflowManager manager, ISourceSinkDefinition def)
protected ISourceSinkDefinition getSourceMethod(soot.SootMethod method)
method - The method to checkprotected ISourceSinkDefinition getSourceDefinition(soot.SootMethod method)
method - The method to checkprotected CallbackDefinition getCallbackDefinition(soot.SootMethod method)
method - The method to checkprotected ISourceSinkDefinition getSource(soot.jimple.Stmt sCallSite, IInfoflowCFG cfg)
sCallSite - The statement to check for a sourcecfg - An interprocedural CFG containing the statementprotected ISourceSinkDefinition checkCallbackParamSource(soot.jimple.Stmt sCallSite, IInfoflowCFG cfg)
sCallSite - The statement to checkcfg - The interprocedural control flow graphprotected abstract boolean isEntryPointMethod(soot.SootMethod method)
method - the methodprotected ISourceSinkDefinition getUISourceDefinition(soot.jimple.Stmt sCallSite, IInfoflowCFG cfg)
ISourceSinkDefinition for itsCallSite - The call site that may potentially read data from a
sensitive UI controlcfg - The bidirectional control flow graphISourceSinkDefinition if the given call site
reads data from a UI source, null otherwisepublic void initialize()
ISourceSinkManagerinitialize 在接口中 ISourceSinkManagerpublic void setOneSourceAtATimeEnabled(boolean enabled)
IOneSourceAtATimeManagersetOneSourceAtATimeEnabled 在接口中 IOneSourceAtATimeManagerenabled - True to return only one source at a time and hide all other
ones, otherwise falsepublic boolean isOneSourceAtATimeEnabled()
IOneSourceAtATimeManagerisOneSourceAtATimeEnabled 在接口中 IOneSourceAtATimeManagerpublic void resetCurrentSource()
IOneSourceAtATimeManagerresetCurrentSource 在接口中 IOneSourceAtATimeManagerpublic void nextSource()
IOneSourceAtATimeManagernextSource 在接口中 IOneSourceAtATimeManagerpublic boolean hasNextSource()
IOneSourceAtATimeManagerhasNextSource 在接口中 IOneSourceAtATimeManagerpublic void excludeMethod(soot.SootMethod toExclude)
toExclude - The method to excludeCopyright © 2022 Fraunhofer SIT. All rights reserved.