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: docs/source/quark_script.rst
+40-31Lines changed: 40 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -491,67 +491,76 @@ Quark Script Result
491
491
492
492
493
493
494
-
Detect CWE-94 in Android Application
495
-
------------------------------------------------
494
+
Detect CWE-94 in Android Application
495
+
-------------------------------------
496
496
497
497
This scenario seeks to find **code injection** in the APK file.
498
498
499
-
CWE-94 Improper Control of Generation of Code
500
-
================================================
499
+
CWE-94: Improper Control of Generation of Code
500
+
===============================================
501
501
502
502
We analyze the definition of CWE-94 and identify its characteristics.
503
503
504
504
See `CWE-94 <https://cwe.mitre.org/data/definitions/94.html>`_ for more details.
505
505
506
-
.. image:: https://imgur.com/faWwd3p.jpg
506
+
.. image:: https://imgur.com/M9Jlgrn.png
507
507
508
508
Code of CWE-94 in ovaa.apk
509
-
=========================================
509
+
===========================
510
510
511
511
We use the `ovaa.apk <https://github.com/oversecured/ovaa>`_ sample to explain the vulnerability code of CWE-94.
512
512
513
-
.. image:: https://imgur.com/duobWF2.jpg
513
+
.. image:: https://imgur.com/MdlAnvu.png
514
514
515
-
Quark Script: CWE-94.py
516
-
========================
515
+
CWE-94 Detection Process Using Quark Script API
516
+
================================================
517
517
518
518
Let's use the above APIs to show how the Quark script finds this vulnerability.
519
519
520
520
First, we design a detection rule ``loadExternalCode.json`` to spot on behavior using the method ``createPackageContext``. Then, we find the caller method that calls the ``createPackageContext``. Finally, we check if the method ``checkSignatures`` is called in the caller method for verification.
0 commit comments