You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+104-9Lines changed: 104 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ Quark-Engine is also bundled with [Kali Linux](https://tools.kali.org/tools-list
39
39
## Quark Script - Ecosystem for Mobile Security Tools
40
40
41
41
#### Innovative & Interactive
42
-
The goal of Quark Script aims to provide an innovative way for mobile security researchers to analyze or pentest the targets.
42
+
The goal of Quark Script aims to provide an innovative way for mobile security researchers to analyze or __pentest__ the targets.
43
43
44
44
Based on Quark, we integrate decent tools as Quark Script APIs and make them exchange valuable intelligence to each other. This enables security researchers to __interact__ with staged results and perform __creative__ analysis with Quark Script.
45
45
@@ -64,7 +64,6 @@ Quark Script is now in a beta version. We'll keep releasing practical APIs and a
@@ -167,7 +186,6 @@ Quark Script is now in a beta version. We'll keep releasing practical APIs and a
167
186
</details>
168
187
169
188
### Analyzing real case (InstaStealer) using Quark Script
170
-
171
189
#### Quark Script that dynamic hooks the method containing urls
172
190
The scenario is simple! We'd like to dynamic hooking the methods in the malware that contains urls. We can use APIs above to write Quark Script.
173
191
@@ -216,12 +234,11 @@ for behaviorInstance in quarkResult.behaviorOccurList:
216
234
217
235
print("\nSee the hook results in Objection's terminal.")
218
236
```
219
-
220
-
> __Note:__ Please make sure you have the dynamic analysis environment ready before executing the script.
237
+
> Note: Please make sure you have the dynamic analysis environment ready before executing the script.
221
238
> 1. Objection installed and running. Check the guideline [here](https://github.com/sensepost/objection/wiki/Installation).
222
239
> 2. Android Virtual Machine with frida installed. Check the guideline [here](https://frida.re/docs/android/).
223
-
> 3. Or a rooted Android Device (Google Pixel 6) with frida installed.\
224
-
Check the root guideline [here](https://forum.xda-developers.com/t/guide-root-pixel-6-with-magisk-android-12-1.4388733/), frida install guideline is the [same](https://frida.re/docs/android/) with Android Virtual Machine.
240
+
> 3. Or a rooted Android Device (Google Pixel 6) with frida installed.
241
+
> Check the root guideline [here](https://forum.xda-developers.com/t/guide-root-pixel-6-with-magisk-android-12-1.4388733/), frida install guideline is the [same]((https://frida.re/docs/android/)) with Android Virtual Machine.
225
242
226
243
#### Quark Script Result
227
244

@@ -232,6 +249,84 @@ Check the root guideline [here](https://forum.xda-developers.com/t/guide-root-pi
232
249
#### Method (callComponentMethod) with urls is detected triggered!
233
250

234
251
252
+
### Quark Script used as a vulnerability finder
253
+
254
+
#### Detect CWE-798 in Android Application
255
+
256
+
This scenario seeks to find hard-coded credentials in the APK file. See [CWE-798](https://cwe.mitre.org/data/definitions/798.html) for more details.
257
+
258
+
Let's use this [APK](https://github.com/oversecured/ovaa) and the above APIs to show how Quark script find this vulnerability.
259
+
260
+
First, we design a detection rule `findSecretKeySpec.json` to spot on behavior uses method SecretKeySpec. Then, we get all the parameter values that input to this method. From the returned parameter values, we identify it's a AES key and parse the key out of the values. Finally, we dump all strings in the APK file and check if the AES key is in the strings. If the answer is YES, BINGO!!! We find hard-coded credentials in the APK file.
0 commit comments