Class AndroidSourceSinkManager
java.lang.Object
soot.jimple.infoflow.sourcesSinks.manager.BaseSourceSinkManager
soot.jimple.infoflow.android.source.AndroidSourceSinkManager
- All Implemented Interfaces:
IConditionalFlowManager,IOneSourceAtATimeManager,IReversibleSourceSinkManager,ISourceSinkManager
- Direct Known Subclasses:
AccessPathBasedSourceSinkManager
public class AndroidSourceSinkManager
extends BaseSourceSinkManager
implements ISourceSinkManager, IOneSourceAtATimeManager
SourceManager implementation for AndroidSources
- Author:
- Steven Arzt
-
Nested Class Summary
Nested classes/interfaces inherited from class soot.jimple.infoflow.sourcesSinks.manager.BaseSourceSinkManager
BaseSourceSinkManager.SourceType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected final Set<soot.SootMethod>protected Stringprotected AndroidEntryPointUtilsprotected soot.SootClass[]protected final Map<Integer,AndroidLayoutControl> protected List<ARSCFileParser.ResPackage>protected soot.SootMethodprotected soot.SootMethodprotected static final StringFields inherited from class soot.jimple.infoflow.sourcesSinks.manager.BaseSourceSinkManager
callbackMethods, conditionalSinks, conditionalSinkToExcludedClasses, currentSource, excludedMethods, oneSourceAtATime, osaatIterator, osaatType, parentClassesAndInterfaces, secondarySinkClasses, secondarySinkMethods, sinkDefs, sinkFields, sinkMethods, sinkReturnMethods, sinkStatements, sourceCallbackMethods, sourceDefs, sourceFields, sourceMethods, sourceSinkConfig, sourceStatements, valueProvider -
Constructor Summary
ConstructorsConstructorDescriptionAndroidSourceSinkManager(Collection<? extends ISourceSinkDefinition> sources, Collection<? extends ISourceSinkDefinition> sinks, Set<AndroidCallbackDefinition> callbackMethods, InfoflowAndroidConfiguration config, Map<Integer, AndroidLayoutControl> layoutControls) Creates a new instance of theAndroidSourceSinkManagerclass with strong matching, i.e. the methods in the code must exactly match those in the list.AndroidSourceSinkManager(Collection<? extends ISourceSinkDefinition> sources, Collection<? extends ISourceSinkDefinition> sinks, InfoflowAndroidConfiguration config) Creates a new instance of theAndroidSourceSinkManagerclass with either strong or weak matching. -
Method Summary
Modifier and TypeMethodDescriptionprotected CallbackDefinitiongetCallbackDefinition(soot.SootMethod method) protected Collection<ISourceSinkDefinition>getInverseSinkDefinition(soot.jimple.Stmt sCallSite, IInfoflowCFG cfg) protected AndroidLayoutControlgetLayoutControl(soot.jimple.Stmt sCallSite, IInfoflowCFG cfg) Gets the layout control that is referenced at the given call siteprotected Collection<ISourceSinkDefinition>getSinkDefinitions(soot.jimple.Stmt sCallSite, InfoflowManager manager, AccessPath ap) protected ISourceSinkDefinitiongetUISourceDefinition(soot.jimple.Stmt sCallSite, IInfoflowCFG cfg) voidprotected booleanisEntryPointMethod(soot.SootMethod method) voidsetAppPackageName(String appPackageName) Sets the name of the app's base packagevoidsetResourcePackages(List<ARSCFileParser.ResPackage> resourcePackages) Sets the resource packages to be used for finding sensitive layout controls as sourcesMethods inherited from class soot.jimple.infoflow.sourcesSinks.manager.BaseSourceSinkManager
checkCallbackParamSource, createInverseSinkInfoPairs, createSourceInfoPairs, excludeMethod, getInverseSinkInfo, getInverseSourceDefinition, getInverseSourceInfo, getInverseSourceMethod, getSinkInfo, getSource, getSourceDefinition, getSourceInfo, getSourceMethod, hasNextSource, isConditionalSink, isOneSourceAtATimeEnabled, isSecondarySink, nextSource, registerSecondarySink, registerSecondarySink, resetCurrentSource, setOneSourceAtATimeEnabledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface soot.jimple.infoflow.sourcesSinks.manager.IOneSourceAtATimeManager
hasNextSource, isOneSourceAtATimeEnabled, nextSource, resetCurrentSource, setOneSourceAtATimeEnabledMethods inherited from interface soot.jimple.infoflow.sourcesSinks.manager.ISourceSinkManager
getSinkInfo, getSourceInfo
-
Field Details
-
Activity_FindViewById
- See Also:
-
View_FindViewById
- See Also:
-
smActivityFindViewById
protected soot.SootMethod smActivityFindViewById -
smViewFindViewById
protected soot.SootMethod smViewFindViewById -
layoutControls
-
resourcePackages
-
appPackageName
-
analyzedLayoutMethods
-
iccBaseClasses
protected soot.SootClass[] iccBaseClasses -
entryPointUtils
-
-
Constructor Details
-
AndroidSourceSinkManager
public AndroidSourceSinkManager(Collection<? extends ISourceSinkDefinition> sources, Collection<? extends ISourceSinkDefinition> sinks, InfoflowAndroidConfiguration config) Creates a new instance of theAndroidSourceSinkManagerclass with either strong or weak matching.- Parameters:
sources- The list of source methodssinks- The list of sink methodsconfig- The configuration of the data flow analyzer
-
AndroidSourceSinkManager
public AndroidSourceSinkManager(Collection<? extends ISourceSinkDefinition> sources, Collection<? extends ISourceSinkDefinition> sinks, Set<AndroidCallbackDefinition> callbackMethods, InfoflowAndroidConfiguration config, Map<Integer, AndroidLayoutControl> layoutControls) Creates a new instance of theAndroidSourceSinkManagerclass with strong matching, i.e. the methods in the code must exactly match those in the list.- Parameters:
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 systemconfig- The configuration of the data flow analyzerlayoutControls- A map from reference identifiers to the respective Android layout controls
-
-
Method Details
-
initialize
public void initialize()- Specified by:
initializein interfaceISourceSinkManager- Overrides:
initializein classBaseSourceSinkManager
-
setResourcePackages
Sets the resource packages to be used for finding sensitive layout controls as sources- Parameters:
resourcePackages- The resource packages to be used for looking up layout controls
-
setAppPackageName
Sets the name of the app's base package- Parameters:
appPackageName- The name of the app's base package
-
getLayoutControl
Gets the layout control that is referenced at the given call site- Parameters:
sCallSite- A call tofindViewById()or a similar methodcfg- The bidirectional control flow graph- Returns:
- The layout control that is being accessed at the given statement, or
nullif no such control could be found
-
getUISourceDefinition
- Overrides:
getUISourceDefinitionin classBaseSourceSinkManager
-
isEntryPointMethod
protected boolean isEntryPointMethod(soot.SootMethod method) - Specified by:
isEntryPointMethodin classBaseSourceSinkManager
-
getSinkDefinitions
protected Collection<ISourceSinkDefinition> getSinkDefinitions(soot.jimple.Stmt sCallSite, InfoflowManager manager, AccessPath ap) - Overrides:
getSinkDefinitionsin classBaseSourceSinkManager
-
getInverseSinkDefinition
protected Collection<ISourceSinkDefinition> getInverseSinkDefinition(soot.jimple.Stmt sCallSite, IInfoflowCFG cfg) - Overrides:
getInverseSinkDefinitionin classBaseSourceSinkManager
-
getCallbackDefinition
- Overrides:
getCallbackDefinitionin classBaseSourceSinkManager
-