Hadoop Enumeration
Apache Hadoop exposes multiple web interfaces and RPC ports across its components. The main services are HDFS NameNode (port 9870/50070), YARN ResourceManager (port 8088), and MapReduce JobHistory (port 19888). These web UIs often lack authentication, exposing cluster configuration, file system contents, and the ability to submit applications for code execution.
Port Discovery
Hadoop uses many ports. Scan the common range to identify which components are running.
PORT STATE SERVICE VERSION 8020/tcp open hadoop-hdfs Hadoop HDFS namenode 8042/tcp open http Hadoop YARN NodeManager 8088/tcp open http Hadoop YARN ResourceManager 9870/tcp open http Hadoop HDFS NameNode WebUI 50075/tcp open http Hadoop HDFS DataNode WebUI
Key ports: 9870/50070 (HDFS NameNode UI), 8088 (YARN ResourceManager UI, leads to RCE), 8042 (NodeManager), 8020/9000 (HDFS RPC).
HDFS NameNode Web UI
The NameNode web UI (port 9870, or 50070 on older versions) provides a file browser for the entire HDFS filesystem.
{
"FileStatuses": {
"FileStatus": [
{"pathSuffix": "tmp", "type": "DIRECTORY", "owner": "hdfs"},
{"pathSuffix": "user", "type": "DIRECTORY", "owner": "hdfs"},
{"pathSuffix": "data", "type": "DIRECTORY", "owner": "hadoop"}
]
}
}
The WebHDFS REST API allows listing, reading, and writing files. No authentication by default.
Explain command
| -L | Follow the redirect to the DataNode that holds the file data. |
OPEN returns a 307 redirect to the DataNode serving the file. The -L flag follows it automatically. Look for credentials, configs, and application data.
YARN ResourceManager
The YARN ResourceManager UI (port 8088) shows running and completed applications. More critically, it accepts new application submissions.
Application list reveals running jobs, users, queues, and resource allocation. Check for application logs that may contain credentials.
Returns all cluster nodes with internal IPs, ports, resource capacity, and health status.
Configuration Exposure
Dumps the full Hadoop configuration as XML/JSON. Check for: fs.defaultFS (HDFS address), yarn.resourcemanager.address, authentication settings, and any property containing password/secret/key.
If YARN ResourceManager is accessible on port 8088, continue to Hadoop YARN RCE for unauthenticated command execution via application submission.
References
-
Hadoop: WebHDFS REST APIDOCS: Hadoop: WebHDFS REST API, hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html (opens in new tab)
Official HDFS REST API for file operations.
-
HackTricks: Pentesting HadoopTOOL: HackTricks: Pentesting Hadoop, hacktricks.wiki/en/network-services-pentesting/pentesting-web/hadoop.html (opens in new tab)
Hadoop enumeration and exploitation reference.