Liferay Portal Remote Code Execution (direct check) - Nessus

Critical   Plugin ID: 146861

This page contains detailed information about the Liferay Portal Remote Code Execution (direct check) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 146861
Name: Liferay Portal Remote Code Execution (direct check)
Filename: liferay_portal-cve-2020-7961.nbin
Vulnerability Published: 2020-03-20
This Plugin Published: 2021-02-25
Last Modification Time: 2022-05-03
Plugin Version: 1.16
Plugin Type: remote
Plugin Family: Web Servers
Dependencies: liferay_detect.nasl
Required KB Items [?]: installed_sw/liferay_portal

Vulnerability Information


Severity: Critical
Vulnerability Published: 2020-03-20
Patch Published: 2019-09-25
CVE [?]: CVE-2020-7961
CPE [?]: cpe:/a:liferay:liferay_portal
Exploited by Malware: True

Synopsis

The web application running on the remote web server is affected by a remote code execution vulnerability.

Description

A remote code execution vulnerability exists in Liferay Portal prior to 7.2.1 CE GA2 due to Deserialization of Untrusted Data. An unauthenticated, remote attacker can exploit this to bypass authentication and execute arbitrary commands.

Solution

Refer to the vendor advisory.

Public Exploits


Target Network Port(s): 8080
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Liferay Portal Remote Code Execution (direct check) vulnerability:

  1. Metasploit: exploit/multi/http/liferay_java_unmarshalling
    [Liferay Portal Java Unmarshalling via JSONWS RCE]
  2. Exploit-DB: exploits/java/remote/48332.msf
    [EDB-48332: Liferay Portal - Java Unmarshalling via JSONWS RCE (Metasploit)]
  3. GitHub: https://codewhitesec.blogspot.com/2020/03/liferay-portal-json-vulns.html
    [CVE-2020-7961]
  4. GitHub: https://github.com/Astrogeorgeonethree/Starred
    [CVE-2020-7961]
  5. GitHub: https://github.com/Mathankumar2701/ALL-PENTESTING-BIBLE
    [CVE-2020-7961]
  6. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2020-7961]
  7. GitHub: https://github.com/Spacial/awesome-csirt
    [CVE-2020-7961]
  8. GitHub: https://github.com/ThePirateWhoSmellsOfSunflowers/TheHackerLinks
    [CVE-2020-7961]
  9. GitHub: https://github.com/codereveryday/Programming-Hacking-Resources
    [CVE-2020-7961]
  10. GitHub: https://github.com/erSubhashThapa/pentest-bible
    [CVE-2020-7961]
  11. GitHub: https://github.com/fofapro/vulfocus
    [CVE-2020-7961]
  12. GitHub: https://github.com/gacontuyenchien1/Security
    [CVE-2020-7961]
  13. GitHub: https://github.com/gobysec/Goby
    [CVE-2020-7961]
  14. GitHub: https://github.com/iamrajivd/pentest
    [CVE-2020-7961]
  15. GitHub: https://github.com/lovechinacoco/https-github.com-mai-lang-chai-Middleware-Vulnerability-detection
    [CVE-2020-7961]
  16. GitHub: https://github.com/mathiznogoud/Liferay-Deserialize-POC
    [CVE-2020-7961]
  17. GitHub: https://github.com/mishmashclone/qazbnm456-awesome-web-security
    [CVE-2020-7961]
  18. GitHub: https://github.com/mzer0one/CVE-2020-7961-POC
    [CVE-2020-7961]
  19. GitHub: https://github.com/papa-anniekey/CustomSignatures
    [CVE-2020-7961]
  20. GitHub: https://github.com/qazbnm456/awesome-web-security
    [CVE-2020-7961]
  21. GitHub: https://github.com/random-robbie/liferay-pwn
    [CVE-2020-7961]
  22. GitHub: https://github.com/raystyle/paper
    [CVE-2020-7961]
  23. GitHub: https://github.com/shacojx/LifeRCEJsonWSTool-POC-CVE-2020-7961-Gui
    [CVE-2020-7961]
  24. GitHub: https://github.com/tdtc7/qps
    [CVE-2020-7961]
  25. GitHub: https://github.com/wcxxxxx/CVE-2020-7961
    [CVE-2020-7961]
  26. GitHub: https://github.com/yamori/pm2_logs
    [CVE-2020-7961]
  27. GitHub: https://github.com/shacojx/GLiferay-CVE-2020-7961-golang
    [CVE-2020-7961: Detect vulns liferay CVE-2020-7961 by Nattroc (EOG Team)]
  28. GitHub: https://github.com/shacojx/POC-CVE-2020-7961-Token-iterate
    [CVE-2020-7961: POC-CVE-2020-7961-Token-iterate]
  29. GitHub: https://github.com/ShutdownRepo/CVE-2020-7961
    [CVE-2020-7961: Exploit script for CVE-2020-7961]
  30. GitHub: https://github.com/thelostworldFree/CVE-2020-7961-payloads
    [CVE-2020-7961: Deserialization of Untrusted Data in Liferay Portal prior to 7.2.1 CE GA2 allows ...]
  31. GitHub: https://github.com/Udyz/CVE-2020-7961-Mass
    [CVE-2020-7961: CVE-2020–7961 Mass exploit for Script Kiddies]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2020-7961
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:H/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.5 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.5 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


The liferay_portal-cve-2020-7961.nbin Nessus plugin is distributed in a propriatory binary format and its source code is protected. This script is Copyright (C) 2021-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/liferay_portal-cve-2020-7961.nbin
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\liferay_portal-cve-2020-7961.nbin
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/liferay_portal-cve-2020-7961.nbin

Go back to menu.

How to Run


Here is how to run the Liferay Portal Remote Code Execution (direct check) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Web Servers plugin family.
  6. On the right side table select Liferay Portal Remote Code Execution (direct check) plugin ID 146861.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl liferay_portal-cve-2020-7961.nbin -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a liferay_portal-cve-2020-7961.nbin -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - liferay_portal-cve-2020-7961.nbin -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state liferay_portal-cve-2020-7961.nbin -t <IP/HOST>

Go back to menu.

References


IAVA | Information Assurance Vulnerability Alert:
  • 2021-A-0296
See also: Similar and related Nessus plugins:
  • 155678 - Liferay Portal 6.2.x < 6.2.5 / 7.0.x < 7.0.6 / 7.1.x < 7.1.3 / 7.2.x < 7.2.1 RCE
  • 59230 - Liferay Portal < 6.0.6 Multiple Vulnerabilities
  • 59231 - Liferay Portal 6.0.5 / 6.0.6 Arbitrary File Download
  • 59358 - Liferay Portal 6.1.0 User Enumeration
  • 59359 - Liferay Portal 6.1.0 Forward Target Handling Security Bypass
  • 59360 - Liferay Portal upload_progress_poller.jsp XSS
  • 80304 - Allegro RomPager HTTP Cookie Management Remote Code Execution Vulnerability (Misfortune Cookie)
  • 80228 - Allegro RomPager HTTP Cookie Management Remote Code Execution Vulnerability (Misfortune Cookie)
  • 156164 - Apache Log4Shell CVE-2021-45046 Bypass Remote Code Execution
  • 148239 - Apache OFBiz Remote Code Execution (CVE-2021-26295)
  • 40353 - DD-WRT HTTP Daemon Metacharacter Injection Remote Code Execution
  • 142137 - Nostromo < 1.9.7 Remote Code Execution
  • 136770 - Apache Tomcat 7.0.0 < 7.0.104 Remote Code Execution
  • 124064 - Apache Tomcat 7.0.0 < 7.0.94 Remote Code Execution Vulnerability (Windows)
  • 124063 - Apache Tomcat 8.5.0 < 8.5.40 Remote Code Execution Vulnerability (Windows)
  • 136807 - Apache Tomcat 8.5.x < 8.5.55 Remote Code Execution
  • 124058 - Apache Tomcat 9.0.0.M1 < 9.0.19 Remote Code Execution Vulnerability (Windows)
  • 136806 - Apache Tomcat 9.0.0 < 9.0.35 Remote Code Execution
  • 105484 - Oracle WebLogic WSAT Remote Code Execution
  • 124338 - Oracle WebLogic WLS9-async Remote Code Execution (remote check)
  • 133270 - IBM WebSphere Application Server 7.0.0.x <= 7.0.0.45 / 8.0.0.x <= 8.0.0.15 / 8.5.x < 8.5.5.15 / 9.0.0.x < 9.0.0.10 Remote Code Execution (CVE-2018-1567)
  • 125630 - IBM WebSphere Application Server Virtual Enterprise 7.0.x / Network Deployment 8.5.x < 8.5.5.16 / Network Deployment 9.0.0.x <= 9.0.0.11 Remote Code Execution Vulnerability (CVE-2019-4279)
  • 137398 - IBM WebSphere Application Server 7.0.0.x <= 7.0.0.45 / 8.0.0.x <= 8.0.0.15 / 8.5.x < 8.5.5.18 / 9.0.x < 9.0.5.4 Remote Code Execution (CVE-2020-4448)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file liferay_portal-cve-2020-7961.nbin version 1.16. For more plugins, visit the Nessus Plugin Library.

Go back to menu.