Earlier this month, security news media reported attackers holding internet-exposed MongoDB and Elasticsearch databases for ransom. Attackers said they’d return the data if they got paid — otherwise, the data would be erased. In many reported instances, attackers simply deleted the data. Unfortunately, more attacks are underway.
Last week, Fidelis Cybersecurity Threat Research observed similar attacks on Internet-facing Hadoop Distributed File System (HDFS) installations. Like the MongoDB and Elasticsearch incidents, attackers would erase all the data on the system. To make matters worse, we confirmed additional attacks on HDFS instances worldwide.
For these events, attackers are leveraging a logical blend of key technology trends:
- Minimal security. Many new “big-data” database solutions introduced over the past decade include minimal native authentication and security. It’s expected that implementers will handle these vital security functions separately. But many times they do not.
- Mandatory internet access. A number of these solutions are available within the platform-as-a-service (PaaS) model, which must be accessed via the internet. Undoubtedly, numerous managed instances are also directly exposed to the internet. Researchers such as John Matherly have been talking about the risks of such exposed installations for some time.
- Denial of access. A few years ago, the consequences of exposed data included theft and resale on the underground. We’re now seeing ransomware and outright deletion – a ‘denial of access’ to the user’s data. While attackers are targeting end users with ransomware, it’s also being effectively deployed against enterprises and their services in the past 18 months.
These factors have combined in attacks against Mongo and Elasticsearch instances in the past few weeks. The purpose of this post is to make the security community aware of similar incidents involving Hadoop delivered by service providers.
Example HDFS Site where data has been wiped
In this case, we observed an attacker erasing most of the directories and creating a single directory called “NODATA4U_SECUREYOURSHIT”. There was no attempt to claim a ransom or any other communication — the data was simply deleted and that directory name was left as a calling card. We estimate that the potential exposure of this attack is around 8,000-10,000 HDFS installations worldwide, but precise numbers are difficult to determine.
A core issue is similar to MongoDB, namely the default configuration can allow “access without authentication.” This means an attacker with basic proficiency in HDFS can start deleting files. On or around January 5 to January 6, traffic to port 50070 soared as attackers scanned for open HDFS installations to target:
Port 50070 traffic from the SANS Internet Storm Center
Port 50070 Traffic Graph from Qihoo 360
Port statistics from the SANS Internet Storm Center (above) and the Qihoo 360’s Netlab (below) show a significant spike in traffic when this attack occurred on January 5-6. Qihoo shows this almost exclusively from a single Chinese IP of 22.214.171.124. However, it’s important not to jump to conclusions about the attacker’s location simply by looking at an IP address. Attackers use infrastructure all over the world to hide their identities. Coincidently, the second highest scanner is adjacent to our suspect, 126.96.36.199.
A quick scan using Shodan shows just how prevalent exposed HDFS installations are. In many cases, installations also lack authentication. In researching this post, the screen capture was taken from the initial few hits showing those sites had been wiped. It’s unclear what the motivation of the attacker is, but it seems like this was an intentional “security awareness training” exercise, albeit a criminal one.
So what can you do to prevent these attacks?
- First, avoid having HDFS on internet-facing connections. If that’s not possible, use built-in methods that require authentication and only use the HTTPS versions of these web services.
- Second, remember that no authentication is required by default, so if anything running HDFS connects to the internet, the entire world has access to your data.
- Third, brush up on attacker tools. Check out some of the freely available Hadoop attack tools, like the Hadoop-attack-library, that make these kinds of attacks easy (note, we found no evidence this specific tool was used in this case).
“Big data” databases are often consumed as a service from third parties or installed and managed from cloud assets. Any database service directly exposed to the internet without adequate authentication is at risk. Exposed data will be stolen, encrypted and/or erased.
Service providers should implement strong authentication and access isolation. Users of such services should assess these protective measures before entrusting their data to these services. Always back up data using a robust monitoring program to detect and respond to instances in the event unauthorized access occurs.
-Fidelis Threat Research Team