Full Report
In Parts 1 and 2, every command targeted port 9200. Every exploit, every reconnaissance query, every credential test hit the Elasticsearch REST API directly. But Elasticsearch rarely operates alone. Sitting alongside it on most deployments is Kibana, the visualization and management interface, quietly serving dashboards on port 5601 with its own API surface, plugin architecture, and history of critical vulnerabilities.
Analysis Summary
# Tool/Technique: RAVEN (Kibana Modules)
## Overview
RAVEN is an offensive reconnaissance and attack tool designed to target the Elastic Stack. While previous iterations focused on Elasticsearch (port 9200), this specific component targets **Kibana** (port 5601). It automates the discovery, exploitation, and data extraction from Kibana instances, specifically leveraging vulnerabilities in its Node.js architecture and plugin system.
## Technical Details
- **Type**: Attack Tool / Framework
- **Platform**: Cross-platform (targets Kibana/Node.js environments)
- **Capabilities**: Automated reconnaissance, CVE scanning, LFI (Local File Inclusion), Prototype Pollution, and Remote Code Execution (RCE).
- **First Seen**: August 2024 (SpiderLabs Research)
## MITRE ATT&CK Mapping
- **[TA0001 - Initial Access]**
- [T1190 - Exploit Public-Facing Application]
- **[TA0007 - Discovery]**
- [T1595.002 - Vulnerability Scanning]
- [T1046 - Network Service Scanning]
- **[TA0002 - Execution]**
- [T1059 - Command and Scripting Interpreter]
- **[TA0009 - Collection]**
- [T1560 - Archive Collected Data]
## Functionality
### Core Capabilities
- **kb-recon**: Fingerprints Kibana instances via the `/api/status` endpoint. It extracts versions, build numbers, and lists installed plugins.
- **kb-cve**: Automatically maps the identified Kibana version against a catalog of known vulnerabilities to identify potential exploits.
- **Automated Intelligence Extraction**: Accesses the `saved_objects` API to extract dashboard definitions, internal metrics, and infrastructure configurations even when standard dashboard routes are blocked.
### Advanced Features
- **Exploit Modules**: Includes dedicated triggers for:
- **CVE-2018-17246**: A Local File Inclusion (LFI) vulnerability in the Console plugin.
- **CVE-2019-7609**: A Prototype Pollution vulnerability in the Timelion plugin that leads to Remote Code Execution (RCE).
- **Integrated Browser Trigger**: Automated handling of complex RCE triggers that require specific web-based interactions (e.g., Timelion/Canvas).
## Indicators of Compromise
- **File Names**: `raven-es` (Primary binary)
- **Network Indicators**:
- Traffic targeting port `5601/tcp` (Kibana default).
- Requests to `hxxp://[target]:5601/api/status`.
- Requests to `hxxp://[target]:5601/api/saved_objects/_find`.
- **Behavioral Indicators**:
- Rapid automated enumeration of Kibana plugins.
- Node.js processes spawning unexpected shell commands (indicative of CVE-2019-7609 exploitation).
- Attempts to access local system files (e.g., `/etc/passwd`) via the Kibana plugin paths.
## Associated Threat Actors
- Primarily used by **Red Teams** and **Penetration Testers** (released by LevelBlue SpiderLabs).
- However, the techniques are modeled after real-world exploitation patterns seen in opportunistic attacks against misconfigured cloud assets.
## Detection Methods
- **Signature-based detection**: Monitor for RAVEN-specific User-Agents (if not masked) and specific URI patterns associated with the `kb-recon` module.
- **Behavioral detection**:
- Monitor for `GET` requests to Kibana's API endpoints from unauthorized internal or external IPs.
- Detect prototype pollution attempts in HTTP POST bodies sent to the Timelion or Canvas plugins.
- **Log Analysis**: Search Kibana access logs for status codes and paths associated with CVE-2018-17246 (Console plugin LFI).
## Mitigation Strategies
- **Patch Management**: Immediately update Kibana to versions where CVE-2018-17246 and CVE-2019-7609 are remediated.
- **Network Segmentation**: Do not expose Kibana (Port 5601) to the public internet. Use VPNs or Zero Trust Network Access (ZTNA).
- **Authentication**: Enable Role-Based Access Control (RBAC) and ensure that even the Kibana status and API endpoints require authentication.
- **Disable Unused Plugins**: Disable plugins like Timelion or Canvas if they are not required for business operations.
## Related Tools/Techniques
- **Elasticsearch Exploitation**: RAVEN's core modules for targeting port 9200.
- **Metasploit Framework**: Contains modules for similar Kibana CVEs.
- **LFI/RCE Techniques**: General web exploitation methodologies applied to Node.js applications.