CVE-2021-41096 (published 2021-09-27T20:15Z)

Rucky is a USB HID Rubber Ducky Launch Pad for Android. Versions 2.2 and earlier for release builds and versions 425 and earlier for nightly builds suffer from use of a weak cryptographic algorithm (RSA/ECB/PKCS1Padding). The issue will be patched in v2.3 for release builds and 426 onwards for nightly builds. As a workaround, one may disable an advance security feature if not required.

Severity: MEDIUM
CVSS v2 base score: 5.0 (AV:N/AC:L/Au:N/C:P/I:N/A:N)
CVSS v3 base score: 7.5, HIGH (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)

Weakness information:
cwe_id: CWE-327
cwe_name: Use of a Broken or Risky Cryptographic Algorithm
description: The product uses a broken or risky cryptographic algorithm or protocol.
extended_description: 
	   Cryptographic algorithms are the methods by which data is scrambled to prevent observation or influence by unauthorized actors. Insecure cryptography can be exploited to expose sensitive information, modify data in unexpected ways, spoof identities of other users or devices, or other impacts.
           It is very difficult to produce a secure algorithm, and even high-profile algorithms by accomplished cryptographic experts have been broken. Well-known techniques exist to break or weaken various kinds of cryptography. Accordingly, there are a small number of well-understood and heavily studied algorithms that should be used by most products. Using a non-standard or known-insecure algorithm is dangerous because a determined adversary may be able to break the algorithm and compromise whatever data has been protected.
           Since the state of cryptography advances so rapidly, it is common for an algorithm to be considered "unsafe" even if it was once thought to be strong. This can happen when new attacks are discovered, or if computing power increases so much that the cryptographic algorithm no longer provides the amount of protection that was originally thought.
	   For a number of reasons, this weakness is even more challenging to manage with hardware deployment of cryptographic algorithms as opposed to software implementation. First, if a flaw is discovered with hardware-implemented cryptography, the flaw cannot be fixed in most cases without a recall of the product, because hardware is not easily replaceable like software. Second, because the hardware product is expected to work for years, the adversary's computing power will only increase over time.
	 
         

Fix information:
repo_url: https://github.com/mayankmetha/Rucky
commit_details: repo_url: https://github.com/mayankmetha/Rucky
author: mayankmetha
author_date: 2021-09-25 16:34:34+05:30
msg: Fix security vulnerabilities
repository: repo_url: https://github.com/mayankmetha/Rucky
repo_name: mayankmetha/Rucky
description: A simple to use USB HID Rubber Ducky Launch Pad for Android.
repo_language: Java
owner: mayankmetha
file_changes: filename: ConfigActivity.java
change_type: ModificationType.MODIFY
diff: @@ -140,8 +140,8 @@ public class ConfigActivity extends AppCompatActivity {
         if (config.getHIDMode() == 0) {
             config.setNetworkStatus(false);
             EditorActivity.stopNetworkSocketService(this);
-            ipButton.setVisibility(View.GONE);
-            ipStatusDivider.setVisibility(View.GONE);
+            ipButton.setVisibility(View.INVISIBLE);
+            ipStatusDivider.setVisibility(View.INVISIBLE);
             if (config.getUSBStatus()) {
                 statusText.setText(R.string.config_status_usb_on);
                 statusImage.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_usb));

programming_language: Java
filename: Constants.java
change_type: ModificationType.MODIFY
diff: @@ -35,12 +35,6 @@ public class Constants {
     public static final String PREF_HID_FILE = "hidFile";
     public static final String PREF_HID_FILE_SELECTED = "hidFileSelected";
 
-    //keystore
-    public static final String PREF_GEN_KEY = "genKeyDone";
-    public static final String KEYSTORE_PROVIDER_ANDROID_KEYSTORE = "AndroidKeyStore";
-    public static final String RUCKY_KEYSTORE = "RuckyKeystore";
-    public static final String RUCKY_KEYSTORE2 = "RuckyKeystore2";
-
     //notifications
     public static final String CHANNEL_ID = "com.mayank.rucky.update";
     public static final String CHANNEL_NAME = "Update";

programming_language: Java
filename: Randoms.java
change_type: ModificationType.MODIFY
diff: @@ -1,14 +1,14 @@
 package com.mayank.rucky.utils;
 
 import java.util.Date;
-import java.util.Random;
+import java.security.SecureRandom;
 
 public class Randoms {
 
-    Random random;
+    SecureRandom random;
 
     Randoms() {
-        random = new Random();
+        random = new SecureRandom();
         Date date = new Date();
         random.setSeed(date.getTime());
     }

programming_language: Java