Go Back

Honeypots: Tracking Attacks Against Misconfigured or Exposed Services

October 17, 2019
Honeypots: Tracking Attacks Against Misconfigured or Exposed Services

Honeypots can be useful tools for gathering information on current attack techniques. Conversely, they can be an overwhelming source of data if you don’t have a specific goal in mind. I have been running a series of honeypots with rsync, FTP, SMB, and RDP services enabled and exposed to the internet throughout the month of August, evaluating weekly data sets to gather information on the overall volume and frequency of attacks against commonly misconfigured or exposed services associated with data loss. Based on the results, the data suggests that automated enumeration and attacks against these services is the most common threat. Given the widespread presence of devices currently connected to the internet, it is easy for attackers to create botnets that number in the hundreds of thousands. For example, a 21-year-old in Vancouver, Washington was recently convicted for creating an Internet of Things botnet that contained approximately 800,000 devices. With just one botnet containing that many devices, that should give you a clear picture of the scale of malicious automated activity that takes place daily.

A few definitions to get out of the way right up front:

  • Honeypot: intentionally misconfigured computer with vulnerable services exposed to the internet.
  • FTP: basic file transfer protocol that allows users to move files between networked computers.
  • SMB: Server Message Block protocol is another file sharing service that also allows network browsing and printing services.
  • RDP: Remote Desktop Protocol allows users to remotely access a network computer and use it like they normally would in person.

As you can see, all of these protocols allow for various forms of file sharing and remote access that could be problematic if they are abused by someone with malicious intent. These services, particularly the SMB protocol, were chosen because they are some of the more common ones that may be misconfigured when exposed to the internet, leading to inadvertent data exposure and loss. SMB is one of the most widely accessible protocols mainly due to the ubiquity of Windows systems exposed on the internet – SMB comes preinstalled with Windows, and admins may not even realize that the protocol is being exposed. Common misconfigurations of these services include: allowing anonymous login, default credentials, weak passwords, inadvertent exposure due to poor firewall configuration, and unpatched software on the exposed host.

I used T-Pot, developed by T-Mobile (https://dtag-dev-sec.github.io/mediator/feature/2019/04/01/tpot-1903.html), with some modifications to allow the gathering of data in the environment I had chosen. Outbound network traffic from the vulnerable services was disabled to prevent communication with C2 infrastructure or the delivery of multi-stage payloads. The honeypots used were:

  • Cowrie: an SSH honeypot that was reconfigured to allow users to transfer files between remote and local machines via the rsync protocol.
  • Dionaea: a multipurpose honeypot configured to use the FTP and SMB protocols.
  • RDPy: a RDP honeypot.

I decided to focus on these services largely due to the high-profile exploits that impact the SMB (EternalBlue and DoublePulsar) and RDP (BlueKeep) protocols. Suricata, an open source IDS, was used to monitor activity on the honeypots and an Elasticsearch, Logstash, Kibana (ELK) stack was used to visualize data. Now that we’ve discussed how data was collected and inspected, we can get into the results!

 

(Honey)combing through the data

honeypots data findings

  • 1,287,747 attempts to communicate with C2 infrastructure were made by the DoublePulsar backdoor which is delivered by the EternalBlue exploit.
  • 5,546 alerts were generated by an attacker accessing the honeypot’s SMB share.
  • 4,605 alerts were due to the SMB share in question running unpatched SMBv1 software that is vulnerable to attack.
  • Additionally, there were 14,805 combined alerts for RDP connection requests and confirmation.
  • SMB and RDP were attacked approximately 8 minutes after being exposed to the internet. It took approximately 13 minutes for the first attack against the FTP service.
  • rsync was the lowest volume victim service, and it took several days for someone to attempt to rsync files via SSH.

During the reporting period, Dionaea was attacked 146,696 times, Cowrie was attacked 34,946 times (the overwhelming majority was SSH bruteforce attempts, only 14 rsync commands were issued), and RDPy was attacked 2,585 times. The breakdown of attacks by port can be seen below (FTP is not visible, as it made up 0.03% of all attacks total). 79.55% of the attacks were directed towards SMB on port 44. This averages out to 761 attacks against SMB, 182 attacks against SSH, and 13 attacks against RDP per hour.

 

Suricata logged the following alerts as the most frequent over the most recent reporting period of September 5th and 13th 2019.

Suricata honeypots 1

 

Suricata also logged the following CVEs as the most attempted during the reporting period:

Suricata honeypots 2

 

  • CVE-2001-0540: Allows attackers to cause a Denial of Service attack against RDP.
  • CVE-2012-0152: Allows attackers to send crafted packets and cause a Denial of Service attack against RDP.
  • CVE-2019-0708: Allows unauthenticated attackers to cause a Denial of Service or remotely execute code against RDP. This CVE was used in the BlueKeep attack and proof of concept.
  • CVE-2003-0818: Allows attackers to remotely execute code via flaws in commonly used Microsoft dynamic link libraries.
  • CVE-2017-0143: Allows attackers to remotely execute code against SMB services. This CVE was used in the WannaCry ransomware attacks and was also known as EternalBlue.
  • CVE-2017-7494: Allows attackers to upload a malicious shared library to Samba and get the server to execute it. Also known as EternalRed.

 

Analysis

As seen in the above charts, SMB was attacked the most frequently, and RDP had the most CVE labelled exploits being thrown against it. Surprisingly, there was not a spike in RDP attacks involving BlueKeep after a module for the exploit was added to the open source penetration testing tool Metasploit. This is likely due to the module requiring manual installation into the Metasploit Framework, as it is not included in the current release. The module also requires manual configuration for a single target, so attacking IP ranges from within Metasploit is not currently possible.

honeypots analysis

 

Given the high volume and frequency of attacks against these services, it is likely that much of the traffic is automated botnet activity. As mentioned earlier, these services are typically exploited by criminals to exfiltrate data, deploy ransomware, and otherwise wreak havoc on misconfigured or unprotected networks.

 

Mitigation Strategies

Manual exploitation attempts ranged in the single digits per day. Taking that into account shows that the most effective risk mitigation strategies an organization can do involves patching vulnerable services, and not exposing unnecessary ports to the internet. While patch management can be a logistical nightmare for large organizations, it is important to develop a plan to keep critical infrastructure up to date and secure, especially with the increasingly popular trend of ransomware being used against enterprise environments. Thorough asset visibility and knowledge of devices that are exposed to the internet will help admins configure rules to appropriately restrict services and reduce the overall attack surface. A good rule of thumb is that if the service isn’t going to be used, turn it off and disable external access to the port in your firewall configuration. Instead of just being the victim of a large botnet attempting to exploit known vulnerabilities, your attacker will have to search for more specific issues to exploit, which requires much more effort and potentially no reward on their behalf.

Following these basic security principles can drastically improve the security posture of your organization. There is no way to make things unhackable, but reducing the surface area of attack vectors with a defense in depth approach will certainly help reduce the risk many organizations face.

 

attack surface reduction honeypots

 

Digital Shadows SearchLight™ helps our clients gain an attackers-eye-view of their external-facing infrastructure. If you’d like to see for yourself, try poking around our tool for 7 days:

Test Drive Searchlight

 

Indicators of Compromise sourced from Digital Shadows Honeypots:

Source IP Count
185.220.221.208 124,173
176.97.190.124 30,654
134.19.187.75 25,293
49.88.112.75 12,704
193.32.161.176 12,654
5.188.86.165 10,462
193.32.161.172 9,921
5.188.86.171 9,299
5.188.87.49 8,480
5.188.86.169 8,303

 

MD5 hashes of files uploaded to the SMB honeypot
01bdc6fb077098f4a3b60f4b0e479a7f
879d69d4c18d6947f9ea5e545ac16d01
033f9150e241e7accecb60d849481871
8c81ab1ed40c6a1b1d359b305c1c8d7d
0ab2aeda90221832167e5127332dd702
8fa0e5dd92185799b73cbfab3da3e919
0b1d61164780dbce2d235762afa79c24
996c2b2ca30180129c69352a3a3515e4
2bd2d9f0ef853448021287b17f89bfd6
a135677250b0007496c39cb5c876954d
2f76b88b420003516f90062940ef7881
a4d49eaf60a8e333708469606ad9e1a4
3553aeb71299e94c2549f1b34f6c1a43
a55b9addb2447db1882a3ae995a70151
3efedcd8e3f9a66c14d707d694f73ddd
ae12bb54af31227017feffd9598a6f5e
414a3594e4a822cfb97a4326e185f620
b51563797502c9a6eaa297017ca4b4ca
43b8bb691f84c4ec8b4030f251681bcb
b6c1abb7fb3c7e94fa310546a6d7e76f
460d954551187b65670074c8d5a7210c
bb9476ec4c2366281b59de213b20e659
54dd9593fb858bb8b1a77fe5e9238ae2
bdcaf7ef34cd9b02932e5ee2297e4893
57a8a78851450a008ca6f11da0fefcb4
c2b3f51728001fbaaa5a73fcaf3e1a68
58244389501ed08823b6c50702efca46
c536e9cf3bc585a121dd8b3fa7195438
59b5090fad3d62f05572470f0c79c9a4
cd99e5e4f44621978faf8df0e01d2d2b
5a5108a1155b3e7405774116f42452a4
cf4f46336abeec03630297f846d17482
6350f8da991da9ee85c63e15cce88fbb
d2a55bb270a8c534c59f35cf47cdf36a
65328db928ad56fa9c8eb7d4512697d7
d6b2b46909157ca39f33bea260aed7da
6b0ac3a36170aa066c86caec90aea67b
d8eb20e4ad1f300c6df99668e23dab6f
6d2543c53d9e316af0806f8a853160b7
e5840a9753ed8f90fbd7264c8db27c4b
730be98ac373fe078cd5b180148b5c42
e9d1ba0ee54fcdf37cf458cd3209c9f3
77a33592ed14954642c7bd767f066a0d
ef894d1c6dd120fad5a885bc737d6338
7a0ac52a1c46839ac8b661b4b27bb536
f70557802f671ae027d602d2bd3fd6cf
7d958a95cf70253e10234d0a597adf7d
fecedeedc700847c52753f372c6b6357
807b7f96008f6256ea140dd29faf7ac3
ffbd760d6d27782701092600bc99b61f
82950f72bf5f5bd63b3cc652cd88d31c