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
<liclass="toctree-l2"><aclass="reference internal" href="quark_script.html#analyzing-real-case-instastealer-using-quark-script">Analyzing real case (InstaStealer) using Quark Script</a></li>
100
100
<liclass="toctree-l2"><aclass="reference internal" href="quark_script.html#detect-cwe-798-in-android-application-ovaa-apk">Detect CWE-798 in Android Application (ovaa.apk)</a></li>
101
101
<liclass="toctree-l2"><aclass="reference internal" href="quark_script.html#detect-cwe-94-in-android-application-ovaa-apk">Detect CWE-94 in Android Application (ovaa.apk)</a></li>
102
+
<liclass="toctree-l2"><aclass="reference internal" href="quark_script.html#detect-cwe-921-in-android-application-ovaa-apk">Detect CWE-921 in Android Application (ovaa.apk)</a></li>
Copy file name to clipboardExpand all lines: docs/source/quark_script.rst
+64-1Lines changed: 64 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -220,7 +220,7 @@ Let's use this `APK <https://github.com/oversecured/ovaa>`_ and the above APIs t
220
220
221
221
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.
222
222
223
-
Quark Scipt: cwe-798.py
223
+
Quark Scipt: CWE-798.py
224
224
========================
225
225
226
226
.. code-block:: python
@@ -372,3 +372,66 @@ Quark Script Result
372
372
373
373
Method: checkSignatures not found!
374
374
CWE-94 is detected in ovaa.apk
375
+
376
+
377
+
Detect CWE-921 in Android Application (ovaa.apk)
378
+
------------------------------------------------
379
+
380
+
This scenario seeks to find unsecure storage mechanism of data in the APK file. See `CWE-921 <https://cwe.mitre.org/data/definitions/921.html>`_ for more details.
381
+
382
+
Let's use this `APK <https://github.com/oversecured/ovaa>`_ and the above APIs to show how Quark script find this vulnerability.
383
+
384
+
First, we design a detection rule ``checkFileExistence.json`` to spot on behavior that checks if a file exist on given storage mechanism. Then, we use API ``getParamValues()`` to get the file path. Finally, CWE-921 is found if the file path contains keyword ``sdcard``.
0 commit comments