Skip to content

Commit a191880

Browse files
authored
Optimize the document of Quark Script CWE-926 (#823)
1 parent ca96110 commit a191880

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/source/quark_script.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,13 +971,20 @@ We use the `dvba.apk <https://github.com/rewanthtammana/Damn-Vulnerable-Bank>`_
971971

972972
.. image:: https://imgur.com/KoOt5ii.jpg
973973

974-
Quark Script: CWE-926.py
975-
========================
974+
CWE-926 Detection Process Using Quark Script API
975+
================================================
976+
977+
.. image:: https://i.postimg.cc/Qtg97yD0/jie-tu-2025-10-30-wan-shang7-30-04.png
976978

977979
Let's use the above APIs to show how the Quark script finds this vulnerability.
978980

979981
First, we use Quark API ``getActivities(samplePath)`` to get all activity data in the manifest. Then, we use ``activityInstance.hasIntentFilter()`` to check if the activities have ``intent-filter``. Also, we use ``activityInstance.isExported()`` to check if the activities set the attribute ``android:exported=true``. If both are **true**, then the APK exports the component for use by other applications. That may cause CWE-926 vulnerabilities.
980982

983+
Quark Script: CWE-926.py
984+
========================
985+
986+
.. image:: https://i.postimg.cc/KcwSLv9L/jie-tu-2025-10-30-wan-shang7-32-01.png
987+
981988
.. code-block:: python
982989
983990
from quark.script import *

0 commit comments

Comments
 (0)