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 Cleartext Transmission of Sensitive Information**. See `CWE-319 <https://cwe.mitre.org/data/definitions/319.html>`_ for more details.
1151
+
This scenario seeks to find **Cleartext Transmission of Sensitive Information** in the APK file.
1152
1152
1153
-
Let's use this `APK <https://github.com/oversecured/ovaa>`_ and the above APIs to show how the Quark script finds this vulnerability. This sample uses the package Retrofit to request Web APIs, but the APIs use cleartext protocols.
1153
+
CWE-319 Cleartext Transmission of Sensitive Information
We first design a detection rule ``setRetrofitBaseUrl.json`` to spot on behavior that sets the base URL of the Retrofit instance. Then, we loop through a custom list of cleartext protocol schemes and use API ``behaviorInstance.hasString(pattern, isRegex)`` to filter arguments that are URL strings with cleartext protocol.
1156
+
We analyze the definition of CWE-319 and identify its characteristics.
1156
1157
1157
-
Quark Script CWE-319.py
1158
-
=======================
1158
+
See `CWE-319 <https://cwe.mitre.org/data/definitions/319.html>`_ for more details.
1159
+
1160
+
.. image:: https://imgur.com/tk8rtYf.jpg
1161
+
1162
+
Code of CWE-319 in ovaa.apk
1163
+
============================
1164
+
1165
+
We use the `ovaa.apk <https://github.com/oversecured/ovaa>`_ sample to explain the vulnerability code of CWE-319.
1166
+
1167
+
.. image:: https://imgur.com/Ew4UOAR.jpg
1168
+
1169
+
Quark Scipt: CWE-319.py
1170
+
========================
1171
+
1172
+
Let's use the above APIs to show how the Quark script finds this vulnerability. This sample uses the package Retrofit to request Web APIs, but the APIs use cleartext protocols.
1173
+
1174
+
We first design a detection rule ``setRetrofitBaseUrl.json`` to spot on behavior that sets the base URL of the Retrofit instance. Then, we loop through a custom list of cleartext protocol schemes and use API ``behaviorInstance.hasString(pattern, isRegex)`` to filter arguments that are URL strings with cleartext protocol.
0 commit comments