Script http-vuln-cve2015-1427

Script types: portrule
Categories: vuln, intrusive
Download: https://svn.nmap.org/nmap/scripts/http-vuln-cve2015-1427.nse

Script Summary

This script attempts to detect a vulnerability, CVE-2015-1427, which allows attackers to leverage features of this API to gain unauthenticated remote code execution (RCE).

Elasticsearch versions 1.3.0-1.3.7 and 1.4.0-1.4.2 have a vulnerability in the Groovy scripting engine. The vulnerability allows an attacker to construct Groovy scripts that escape the sandbox and execute shell commands as the user running the Elasticsearch Java VM.

Script Arguments

command

Enter the shell comannd to be executed. The script outputs the Java and Elasticsearch versions by default.

invasive

If set to true then it creates an index if there are no indices.

slaxml.debug

See the documentation for the slaxml library.

http.host, http.max-body-size, http.max-cache-size, http.max-pipeline, http.pipeline, http.truncated-ok, http.useragent

See the documentation for the http library.

vulns.short, vulns.showall

See the documentation for the vulns library.

smbdomain, smbhash, smbnoguest, smbpassword, smbtype, smbusername

See the documentation for the smbauth library.

Example Usage

nmap --script=http-vuln-cve2015-1427 --script-args command= 'ls' <targets>

Script Output

| http-vuln-cve2015-1427:
|   VULNERABLE:
|   ElasticSearch CVE-2015-1427 RCE Exploit
|     State: VULNERABLE (Exploitable)
|     IDs:  CVE:CVE-2015-1427
|     Risk factor: High  CVSS2: 7.5
|       The vulnerability allows an attacker to construct Groovy
|           scripts that escape the sandbox and execute shell commands as the user
|           running the Elasticsearch Java VM.
|     Exploit results:
|       ElasticSearch version: 1.3.7
|       Java version: 1.8.0_45
|     References:
|       http://carnal0wnage.attackresearch.com/2015/03/elasticsearch-cve-2015-1427-rce-exploit.html
|       https://jordan-wright.github.io/blog/2015/03/08/elasticsearch-rce-vulnerability-cve-2015-1427/
|       https://github.com/elastic/elasticsearch/issues/9655
|_      https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-1427

Requires


Authors:

  • Gyanendra Mishra
  • Daniel Miller

License: Same as Nmap--See https://nmap.org/book/man-legal.html