-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SliceMode不能正确找到入口 #69
Comments
能否1. 提供一下有问题的apk的下载链接,问题中的是latest链接,问题应该修复了吧。 |
1、我放的这个链接是2.1.8版本,就是存在漏洞的 2、数据流就是正常的数据流,问题在于这是一个导出组件,其他跟正常app应该是一样的。核心是getIntent -> getData -> placeCall,这中间用到了几次回调,可能是这个原因,我不太确定 |
@firmianay @nkbai 请问师傅有解决问题么,遇到了相似的问题,但是我的甚至指定入口都会死掉 @override
public void handleIntent() {
super.handleIntent();
Intent intent = getIntent();
if (intent == null) {
return;
}
boolean z9 = false;
boolean booleanExtra = intent.getBooleanExtra(EXTRA_FROM_PRIVATE, false);
this.mFromPrivate = booleanExtra;
if (booleanExtra) {
setResult(100);
}
String str = intent.getBooleanExtra(EXTRA_INNER_CALL, false) ? "inner" : "outer";
String scheme = intent.getScheme();
Uri data = intent.getData();
if (data != null && y.i()) {
y.b("FileActivity", "parsing uri: " + data.toString());
}
if (!TextUtils.isEmpty(scheme) && y.i()) {
y.b("FileActivity", "handle intent with scheme: " + scheme);
}
if ((TextUtils.isEmpty(scheme) || !FirebaseAnalytics.Param.CONTENT.equals(scheme)) && !"android.intent.action.SEND".equals(intent.getAction()) && !"android.intent.action.SEND_MULTIPLE".equals(intent.getAction())) {
String path = data != null ? data.getPath() : "";
if (TextUtils.isEmpty(path)) {
if (intent.hasExtra("explorer_path")) {
path = intent.getStringExtra("explorer_path");
} else if (intent.hasExtra("current_directory")) {
path = intent.getStringExtra("current_directory");
}
}
boolean isEmpty = TextUtils.isEmpty(path);
if (!"android.intent.action.VIEW".equals(intent.getAction()) || TextUtils.isEmpty(path) || !new File(path).exists() || intent.getComponent() == null) {
z9 = isEmpty;
} else {
int checkIntent = checkIntent(intent, path, str);
if (checkIntent == -1) {
return;
}
if (checkIntent == 1) {
z9 = true;
}
}
} else if (data != null || intent.getClipData() == null) {
if (data != null) {
handleUri(data, intent, str);
}
} else if (intent.getClipData().getItemCount() == 1) {
handleUri(intent.getClipData().getItemAt(0).getUri(), intent, str);
} else if (intent.getClipData().getItemCount() > 1) {
ArrayList arrayList = new ArrayList();
for (int i9 = 0; i9 < intent.getClipData().getItemCount(); i9++) {
arrayList.add(intent.getClipData().getItemAt(i9).getUri());
}
handleUri(arrayList, intent, str);
} 假设污点分析 Uri data = intent.getData(); 的返回值能否到达handleUri(data, intent, str);, {
"DirtyStream": {
"DirectMode": true,
"traceDepth": 40,
"desc": {
"name": "DirtyStream",
"category": "DirtyStream",
"detail": "DirtyStream",
"wiki": "",
"possibility": "2",
"model": "high"
},
"entry":{
"method":[
"<com.android.fileexplorer.activity.FileActivity: void handleIntent()>"
]
},
"source": {
"Return": [
"<android.content.Intent : android.net.Uri getData()>"
]
},
"sink": {
"<com.android.fileexplorer.activity.FileActivity: void handleUri(android.net.Uri,android.content.Intent,java.lang.String)>": {
"TaintCheck": [
"p0"
]
}
}
}
} |
我已经发现了我的问题所在,"<android.content.Intent : android.net.Uri getData()>" 这里的签名出现错误导致无法处理source,正确的签名在类名之后不能出现空格,即"<android.content.Intent: android.net.Uri getData()>" |
这个应用存在漏洞CVE-2023-42468,我想写个规则来扫,先试了SliceMode,不行,好像是因为根据source和sink不能自动找到入口,后面跟不动了。
换成DirectMode并指定method可以扫出来,但如果指定的是"ExportedCompos": true,速度贼慢,最后也没扫出来。
请教下师傅,看看是哪儿的问题?
The text was updated successfully, but these errors were encountered: