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
This scenario seeks to find **the use of a Broken or Risky Cryptographic Algorithm**. See `CWE-327 <https://cwe.mitre.org/data/definitions/327.html>`_ for more details.
1231
+
This scenario seeks to find **Use of a Broken or Risky Cryptographic Algorithm** in the APK file.
1232
1232
1233
-
Let's use this `APK <https://github.com/B3nac/InjuredAndroid>`_ and the above APIs to show how the Quark script finds this vulnerability.
1233
+
CWE-327 Use of a Broken or Risky Cryptographic Algorithm
We first design a detection rule ``useOfCryptographicAlgo.json`` to spot on behavior using cryptographic algorithms. Then, we use API ``behaviorInstance.hasString(pattern, isRegex)`` with a list to check if the algorithm is risky. If YES, that may cause the exposure of sensitive data.
1236
+
We analyze the definition of CWE-327 and identify its characteristics.
1237
+
1238
+
See `CWE-327 <https://cwe.mitre.org/data/definitions/327.html>`_ for more details.
1239
+
1240
+
.. image:: https://imgur.com/VlX7MTc.png
1241
+
1242
+
Code of CWE-327 in InjuredAndroid.apk
1243
+
=============================================
1244
+
1245
+
We use the `InjuredAndroid.apk <https://github.com/B3nac/InjuredAndroid>`_ sample to explain the vulnerability code of CWE-327.
1246
+
1247
+
.. image:: https://imgur.com/XFvu8zb.png
1236
1248
1237
1249
Quark Script CWE-327.py
1238
-
=======================
1250
+
===========================
1251
+
1252
+
Let’s use the above APIs to show how the Quark script finds this vulnerability.
1253
+
1254
+
We first design a detection rule ``useOfCryptographicAlgo.json`` to spot on behavior using cryptographic algorithms. Then, we use API ``behaviorInstance.hasString(pattern, isRegex)`` with a list to check if the algorithm is risky. If YES, that may cause the exposure of sensitive data.
0 commit comments