Okay, good afternoon everyone. Welcome to the Packet, welcome back to the Packet Hacking Village. It is now the top of the hour, 3 p.m., and it is my absolute honor to introduce to you the man of the hour. He is a security consultant out of Chicago. And so, what else? God, I know a lot of your colleagues are in the audience. And I know some of you are, some of your folks as well. It is my absolute pleasure, you're going to really enjoy this talk, to introduce to you Elliot Brink, or what I call, also known as Brinkster. He's going to give a talk on Honeypot. So, without much ado, Elliot Brink, everyone. Where do we put this thing? All right. Check, check. Hello, DEF CON. How are we doing today? Yeah. Yeah, better? All right, much better. All right. Hello, DEF CON. My name is Elliot Brink. Today, we're going to talk about global Honeypot transactions. Trends. It's going to be, you're going to get some information, a little bit of comedy, a tiny bit of sarcasm. User, Ben, who am I? My name is Elliot Brink. I am a senior penetration tester at McGladrey LLP. Soon to be RSM in October, going through a rebranding. I perform internal penetration testing, external penetration testing, and quite a bit of social engineering as well. I am Honeypot crazy, as most of my friends and coworkers would accept that fact and agree, and I'll be available for questions after if time is cramped. I want to make sure that the next person has enough time to get set up, and just as a general disclaimer, all words here are my own and do not reflect the official views of my employer. So, here's a quick 10-second agenda. We're going to talk about what a Honeypot is, we're going to talk about why people run them, and we're going to spend the majority of the time talking about my research and results, initial results for the first couple months, a little bit of a foray into the study of the attackers and methods and techniques, and then we're going to conclude by talking about some of the global trends when we compare systems in the U.S. versus systems abroad. So, introduction to Honeypots. So, a Honeypot is an intentionally vulnerable or fake system designed as a trap for potential attackers. Generally, there is no good interaction with a Honeypot. Generally, I would say, outside of the scope, the majority of the time it isn't good, any sort of interaction with this system, but the kind of one-liner that I use is, just because Honeypots are a trap, it's just not good. it isn't good doesn't mean it is bad. It is an event. It should be analyzed. But generally it's designed to any sort of interaction with this type of system is generally questionable and should be investigated. Traditionally they are used on the external facing side of the network. However, there are usage cases for internal honey pots. I don't cover those in this talk. And there are very good detection of attacks aside from your traditional IDS and firewall. So why do we run them? The first reason, personal, fun, I think the best reason to do this. Again, corporate, you have the detection of attacks outside, aside from traditional IDS firewall, internal detection scenario is possible. And they are heavily used in academia to study malware abroad. They are used in a lot of different ways. They are used in a lot of different ways. So I would say boil these down to the three general uses. So enter Kipo. So Kipo is a medium interaction SSH honey pot written in Python and based on a prior honey pot called Cajoni. It emulates SSH log in and a full Linux system. So obviously it's running on port 22. It's a very easy way to run. Someone can hit it. If they log in correctly with the user name and password, they can run kind of a quick little, you know, set of some generic Unix commands. It records all of the user name and password guesses in a MySQL database. And it also records the user interaction. So you can see a live, you can do a play log and actually watch as the attackers type. Or, you know, if the commands are running really fast, then it's obviously a script. And you can find it on GitHub. However, for the purposes of this talk, I use my original, original Kipo version. In the past couple of months, a new version has come out and I wanted to just mention that for future reference for anyone who is later interested. It's called Kauri. It is based on Kipo but has a couple of added features such as logging with JSON, SFTP, is it a allowed? And there is that. Also, when you're running this honeypot, obviously you have all the data either in a text log or in a MySQL database. You need something to be able to, you know, consolidate all these, all these numbers and data into a visual diagram for you to see. I use Kipo graph. You can find that on a, I, I'm going to butcher his name again, but I'm going to butcher his name. I can, I can, I can. There is also Kipo to elastic search that is quite cool. And more recent one called Tango Honeypot Intelligence lets you send the logs to Splunk instance which lets you filter and manipulate the data quite, quite good actually. So here's the start of the project. So I started this back in January 2014. I had a Raspberry Pi lying around and I think I was reading like a Lifehacker article or something similar on good uses for Raspberry Pi and Honeypot came up and I thought, okay, let me give this a shot. Because it's great because it's a low powered device. It's perfect for single use. And, you know, Raspberry Pis are fun. After installing Kipo, I liked making a couple little pieces of customization. Quite often attackers go in and look at the CPU info and mem info and by default I think it emulates just a basic laptop with a couple of gigs of RAM. Actually I had a buddy who worked at a big IT firm and I said, hey, can you give me a CPU info and mem info of like a big Linux server? And he's like, how big? And he's like, I don't know, 48 gigs of RAM, you know. He comes back to me and he says, here's a CPU info with four, you know, 10 core hyperthreaded processors and you know, I don't really know if that's and a terabyte of RAM. All right, that will work. Change the host name. Pick your favorite core banking provider. I won't list any, but et cetera. Pre-log on banner lastly. Want to give something juicy for the attackers to look at before they're logging in, assuming it's a manual attacker. Mine says IBM banking server version 7 or something. Complete gibberish. So here's the first three months. Quarter of a million password guess attempts. About 40 to 10 correctly guessed root slash 123456 per day. But something interesting to note about this graph. You'll notice, you'll see the initial spike at the beginning. It's very clear from this graph that there are groups out there that are very, very, very good at detecting when new hosts hit the Internet. And they're able to tackle this system and get on top of that, enumerate it, save it, save the data for later. And then the rest is just general grind of the Internet that's always, always constantly going on. Here's the top ten usernames attempted. So root's obviously a heavy hitter. They got admin and FTP. But can anyone see the third one? The username is root forward 12345 comma period. Do we know why that's the case? Because someone was using a combined username and password list and obviously wasn't using Hydra correctly. So this ended up as the username and it was guessed 233 times. Bravo. Hydra is hard to use. Top ten passwords attempted. So we can see, you know, generic admin password 123456. There was one in here in particular that sparked my eye for a quick. I said, okay, what is this? Exclamation point QAZ at WSX. That doesn't look like it has a normal pattern or something that would be easily guessed. Well, it's a location-based password. So brute forcing on external IPs with location-based passwords, probably not as clever as we think. Because if you look at the full list of guest passwords, there's generated patterns. And I think that's a good thing. And I think that's a good thing. And I think that's a good thing. And I think that's a good thing. So pattern-based passwords, location-based passwords, all across the keyboard. So be wary of that. And then the last hop of attack. So disclaimer. Last hop of attack. This is the last place where I know that the attack originated from. It could have come from another country prior. But this is the last place that I know that it existed. We have China, 65, India, USA, Russia, Romania. I got to give kid a it to France. This was due to like one or two hosts that were hitting this nonstop and for some reason did not have 1, 2, 3, 4, 5, 6 in their dictionary. So they just kept rotating the dictionary and just kept rotating and rotating. So they screwed up the statistics a little bit because of that. A for effort? I don't know. So user input. So this is what I was waiting for. Because obviously a lot of the data that I'm going to get has to do with brute force attacks. Because once they successfully get access to this system, then they're going to be able to log in and do things. So typically it's very common to get a Wget command and then they download some file from some source. And then they're able to log in and do things. So this is a strange port and some file name. So once I started to get these, I started thinking, what happens if I hack back? What happens if I just cut off the file name and the folder? And I just start navigating to these places and just seeing what's there? So then it began. So this is the typical situation or typically what I found about 9 out of 10 times. Something called http file server beta. This is basically the backup file that you can get from a database. or HFS. Typically had, you know, malware, zip folders, EXEs, etc. Ranging from just generic stuff to complicated stuff. This over here is the number of times downloaded. Sometimes I'd run into one that had 20,000 downloads or a couple that had zero. So it's interesting to be able to correlate these based on how many systems they've potentially compromised. So I'm browsing around. This is like one of the first ones that I was looking at. And I see this. I see some hacker note taking or hacker notate. It was a nice HTML file. I assumed it was like a UG devil PHP or some kind of back door. No. This person was conveniently keeping track of the IP port, username and password that they were compromising in the same way. So I'm looking at this. And I'm going to take a look at the same system where they have their malware. So 500 IPs for me to go consume if my hat was a little darker. So once I saw that then later I found this. So now I'm getting the same word lists that they're hitting me with. So those are free for me to take. Thank you for those because now I use those in my pen tests. And then once I found these two things, I knew exactly what I had to do. I just had to go and download all the things. I didn't have a lot of found a Google hack I did index those as well this was the string now it says about 93,000 results stale links you know compromised systems that would get wiped or fixed it was more realistically about 100 or 200 that Google had indexed that we're still live and these are some of the findings and some of them are pretty spectacular typically I'd say the the highest thing that I found was Linux local root exploits there you know circuit 2007 in 2012 but here's the funny thing they log in with the root account and the password 1 2 3 4 5 6 they download a local root exploit and then they run it so you already have root there is no root root yeah another thing I'd find Windows DDoS just generic botnet exes compromise sends traffic the two craftier types of backdoors that I would see our SSH backdoors with Perl scripts as well as I'd say the most sophisticated which was very very very few was when people go in and add their own SSH key which to me seems like a no-brainer but depending on this you know black hat level of expertise this could be too complicated for them so here's an example of one of the exes that I just a random server dot exe I throw it through virus total it's got a very high detection ratio I hope I I'm glad I don't have any of the five AV scanners that didn't detect this for some reason detector ratio 50 out of 55 obviously prepackaged malware you know very easy to detect you know Gronkforce or whatever you like. The last thing I would think about is anything made ofív grandma with a three month old, you know, virus definitions would probably not suffer from this. Then I saw this one file named FreeBSD. And originally I thought, okay, this is, they just named it this, but they're probably going to put it, you know, in a Linux system maybe to blend in. Maybe the sys admin has no idea what he's doing. But upon further inspection, it's L32 Intel FreeBSD for FreeBSD 8.4. So some of these people have very basic tool kits, but some of these guys actually had some pretty complicated tool, you know, sophisticated tool kits, which is nice to see. And then the crown jewel. This is only from the first three months. Originally I found a file named FreeBSD 8.4, and I was like, okay, this is a file containing just a text file just chilling on the directory, just, you know, right next to all the little malware is this text file. And I go, oh, what's this? It's an SSH file that contained 1,000 IPs, ports, usernames and passwords. Later a couple months I found one with 5,000. And about three months ago I found one that was like a couple megs. I look at it, it's got about 80,000 lines in it. So if you want to compromise a bunch of theoretically compromise a bunch of things, just run a honeypot for a year and that data just comes to you. So it's interesting, because you've got two or fours going on here. I mean, if I'm a member of the competing hacking team and I find this, I'm going to be able to take these systems, flip them, and now their portion of their botnet becomes mine. One last note on this. You know, obviously since, you know, enumerating these would be illegal, I would be under the assumption that even if half of the numbers here were correct logons, that is still a lot of systems that you just stumble on. So now I'm going to make the move into taking a look at the interesting attackers. I say interesting because some are funny, some are dumb, some are actually kind of, you know, unique. So we're going to learn the difference between little baby Winnie Googling how to use Hydra. And we're going to learn how to use Hydra. And we're going to learn how to use the six pack, abs, Winnie Googling how to eat souls. Here's the script kitty. Or secretly a genius, but I'm guessing script kitty. The password is root every time, but the user name changes. Again, Hydra, you know, there's a user name flag and a password flag. You've got to make sure you get the two right, otherwise this happens. This was someone from the San Francisco area, or slash San Jose. So shout out to the West Coast. What's going on here? And the success of this is debatable. At least there's no account lockout. But again, this is going to be noisy enough to any good corporation that finds something like this is going to shut this person off very, very quickly. That graph right there shows that I only had 3.5 megabits in and they throttled my Internet connection and I had to turn off the Pi. You have the everything under the sun attackers. They're using a dictionary slash dictionary. This is extremely noisy and it's going to get picked up in a corporate environment in a heartbeat. I have seen worse attacks, but this is not the best. You've got to minimize your scope, guy. Dictionary, dictionary, not how it works. I will say this. There are a couple of industries where I could a assume that someone is using the username straddle on a server, but those won't be discussed here. You see some interesting coincidence. So these were three separate systems that I own. And from the same IP across the entire day, I get the UBNT username, UBNT password. So it's interesting. When you set up multiple systems, you can actually see one single attacker hit your system, the other system, and the other system all within the course of a day. So. And then here we have the better attackers. So I give these guys a gold star. Good job. Because these are targeted, you know, targeted attacks that are a little bit more specific. Postgres, you know, targeting Linux service accounts, you know, accounts that would actually be in existence versus the username straddle. These guys are doing much better. But then finally, we have the bizarre. And I kid you not, this actually happened. This was the username. It was web footed horse expletive phenomite with the password lull dongs. I watched this. I watched all nine of my systems. This guess happened across all nine systems. Slowly over the course of the day. It was a long day. If a botnet exists or if the botnet owner is watching this, please find me because I would like to buy you a drink because that is an amazing username and password combination for your botnet. Or maybe they figured out it was a honeypot. If so, well done because that is possible. So, expansion. I expanded to Russia, Singapore, and as unlikely as it sounds, a China VPS that's actually behind the great firewall. You know, it's got all the classic symptoms of being behind the great firewall, can't access Gmail, et cetera. And more sensors means more data. So, after adding these other eight systems, I had nine. I have five in the U.S. I got about 18 million password guesses, guess attempts across the world. All nine of them. And from this, I got about 900,000 unique. I also add in all the dictionaries that I stole from the HFS systems. So, that adds a couple extra thousand as well. So, with more sensors means more user interaction. And it means a broader range of attackers. So, Russia, China, and Singapore. So, I'm going to start with China. These sensors were designed to answer a couple of important questions. Are there geographic differences in the attackers depending on the country? At least from the last hops perspective, so the last place that we know where the attack originated, China is the main aggressor for the U.S.A. If I go and get a system in mainland China, is the U.S.A. going to be the main aggressor for China? And through that, I was able to get a system in the U.S.A. I don't know why. So, the China VPS honeypot is very, I'm talking a little bit about the infrastructure and just kind of things I noticed before I got it, or while I got it. Very, very, very spooky. There were random net stand entries by default. So, I'm not going to go into that. This was probably something that was just recycled. And they just reset the root user name and password and just handed it off to me. A app get update, app get upgrade, signaled the reinstall of the grub bootloader. And it was already up to date. So, I don't know, back door maybe? Who knows? I'm going to take a second look at this. Maybe I'll get something interesting for another talk based on this. And there were two, I've been thinking about this for a long time. There were two IPs that were constantly port scanning me every 30 seconds. They're owned by a China telecom company. And from what I can imagine is they have the infrastructure to do a heartbeat across the whole network. You know, consistently. Every 30 seconds. And so, China has some strange laws about port 80. You need something called an ICP license for port 80. The reason I bring this up is my statistics program, which is the one that Google Graph utilizes, HTTP and HTTPS. You either have to change HTTP for another port, or they just say, just use SSL or TLS and you'll be okay. So, okay. Nothing on port 80. Never. So, here is the country per unique IP for the China VPS. So, some surprising statistics that I ended up seeing. China is using a port 80. China remains almost the same percentage as if it was a US system. But then you've got a little bit of chunk in there added that incorporates Hong Kong. France has a significantly bigger TAC profile. The USA is about the same. So we've got about 8 or 9% hitting a US system, and 8 or 9% hitting a China system. And, you know, little good mentions for a couple of the other ones. Germany, Turkey, Italy, South Korea, United Kingdom. in Poland. Here are a couple of the honorable mentions. I mainly show this because it points out the fact that there are compromised hosts in a lot of different countries that you wouldn't, you know, think of. And the one that I'm noting one interesting item for each of the international honeypots. What I noticed from the China VPS is there was no really real initial surge. So in the prior, we saw a graph that went, you know, up. You know, honeypotting in the USA went up and then it went down and, you know, just the general grind. Whereas here, we don't actually see that as a trend, which could be just a coincidence or it could relate to the fact that this has significantly higher numbers of successes per day. So there, the surge really is difficult to measure. And of course, there's, you know, there's some anomalies such as that day. It was a bad day for that system. The Singapore VPS. The question I had was, is anyone going to attack a Singapore IP address? Very, very, very few attacks. Most of the other systems have two, three million password guess attempts. This has been on consistently. Only 600,000 total password guesses. And significantly less distinct IPs versus a USA system, which traditionally had 13,000 or more distinct IP addresses attacking it from the, from its inception. And some other interesting statistics for Singapore versus the China VPS. Hong Kong was the biggest hitter. At 50%, it was very interesting to see Hong Kong as the key player versus China as the key player. Japan had a quarter. Japan really didn't make too much of a dent in any of the U.S. systems. But in the Singapore systems, they did. As well as China. And miscellaneous other countries where the remaining 15%. The interesting item about this system, you've got the USA systems. You've got China, Russia, Singapore. One of the things the honey pot keeps track of is how many people do root password changes. So a lot of the times, you know, an attacker come in, just go ahead and jump in on the code and try to hack to the road. So many of the change the root password and then just leave. It seems a little bit abrupt for me. I mean, it's going to set off some red flags, especially if the system is actually actively being monitored. But the Singapore VPS consistently about, you know, once a week had root password change. So, you know, maybe it has to do with the technical abilities or those that are attacking, those that are attacking from these specific nations, maybe that's a strategy that they use, more than groups based in the U.S. or China. And just as a side note, this system actually validates the initial surge quite effectively, too. Starting off with basically nothing and then for the period of basically a whole month just getting absolutely slammed. I mean, a hundred and... You know, 130, you know, all the way down with a couple of additional spikes to be noted. And then the Russia VPS, decent amount of attacks, one and a half million total. Distinct IP is actually less than Singapore. So it's kind of along the same lines as Singapore VPS. And again, primary attackers. Hong Kong had over half of the attacks, specifically Hong Kong IP addresses. The only, the only issue with the statistics for this one is a huge chunk, interestingly, came from IP addresses that had absolutely no lookup values. I was using the MaxMind database and just a large chunk just came from unknown IPs and then miscellaneous countries took up the remaining. Oh, I'm sorry. That should be, it should be, it should be, it should be, it should be 30%. I'm sorry. Yeah, 30%. 30% unknown IPs, 30%. Yikes. And it was interesting to see this gap in statistics. You know, I have a lot of systems that are attacking this with no known origin. You know, interesting the GIP spread was slightly different than the USIP. It's because it has this concentration of Hong Kong. So what's next? Well, we're going to talk a little bit about the past, versus what's out next. So I wrote a detailed guide on how to deploy a honey pot, specifically a Quippo honey pot on my blog and website. It will also, we are working on getting it published on the Wall of Sheep blog as well. The word list, how many people want the 9000 word list? All right, that will be on my blog too. We're going to get some more censors added across the world. I want to get Australia and California and South Korea. So, this is also kind of a Belgium and the U.K. I actually tried to get a U.K. VPS. I made the poor mistake of naming the host name honeypot-UK. My system actually went on my account went under review and I paid for it and everything and I said where is my system available? And I just get this one line question from a system administrator that says what are you going to do with this system? I was like oh, you know, I'm a student. I'm just going to open up a lamp server and just, you know, I just don't have a Linux server at home so I need to, you know, I need a system to test on. Two weeks later nothing. A week later I'm like am I going to get this system? They're like we can't accept you as a customer at this time. Thank you very much. And just refunded my money. So I got to try again except be a little bit more sneaky this time. Malware analysis. How many people in this room like to analyze malware? Quite a few. So through this I have gathered quite a bit. I plan on putting them into some encrypted zip files and putting them on my website. I will release them for anyone who wants to play with them at your leisure. Go ahead. If you get owned and you get a remote connection back to, back to China or some other country, don't blame me. And implementing different types of sounds. I'm going to show you how to do that. I'm going to show you how to do that. I'm going to show you a couple of ways to deploy new sensors. Particularly an RDP honey pot and web application honey pot, I have already deployed a couple of RDP honey pots on the same systems I have and I'm actually starting to, I will give you guys a sneak peek, the initial results I'm seeing I'm gathering a really great list of default passwords for POS systems and I love it. It's great. Just feed them to me. Web application honey pots as well are still on the to do. So I have a slide for some special thanks. Special thanks to the McGladrey security and privacy team. Some, all members of Threat Incorporated, a little cooperative for honeypot enthusiasts came together and we came under one name called Threat Incorporated. I want to give a shout out to these guys. A couple, if not most, should actually be here in the audience. I can hear us. He's got a pretty good foothold in KippoGraph. It's how I generate all my statistics. Gurkhan spoke there. Love it. If you live in the Midwest area and you haven't gone to Gurkhan, highly recommend. And yeah. So thank you, DEF CON, Wallace Shee. Does anyone else have any questions? Any questions? No? Yes. Oh, man, I can't hear you. I'm sorry, what? Why didn't I? Oh, well, if you want to know who I used for hosting, call, you know, come talk to me. Because I would rather not reveal that, you know, ethical dilemma. But the system in China costs $70 a year. Most of these, most of these VPS systems are actually pretty low specs. Half a gig of RAM, quarter gig of RAM, one to two processors, 20 gigs of disk space and like five terabytes of data. You know, it's five, I, I, I at max use three gigs of disk space. Like, five gigs per, per system. Yep. How easy is it to detect? So, there is an interesting talk at Blackhat about this. I have yet to take a look at it. But, you know, one of these, one of the people I actually thanked wrote a meta-sploit module that will scale up the performance. So, I'm in a Kippo system and detect if it's a honeypot or not. So that makes it pretty easy. There are nuances. For example, if someone logs in and types, and this is my favorite example, if you type ifconfig, it gives you, you know, RXTX number of packets. If you type ifconfig again, those numbers should be different. They are not. And that's like, you know, step one, see if a command that produces two different outputs after you run it a second time, if the numbers are the same, yeah. A second favorite is if someone tries to compile or run a shell script, it's a little blatantly obvious. A little owl pops up and it says, oh, really? And you have to type a Y, and then when you type Y and enter, it will say, no way, and just cut you out. Yeah. Yes. So double exit feature. So the system that I used had a double exit feature. You have to cut the TCP connection in order to exit the honeypot. If you log into the honeypot and you type exit, it will reset, it will say root at local host, and people will begin to type commands assuming that they're on their home system or their remote system. I have a couple of those. I have a couple of them. I have a couple of them. I have a couple of them. I have a couple of those. I didn't discuss any of the results, but they're, you know, it's typically like, hey, let me CD to JDOE, you know. So they're revealing a little bit of information about themselves without them knowing. And then they type the command and they see, oh, that folder doesn't exist. And then really quickly I see, like, a cut. So sometimes they figure it out. Sometimes they don't. Any other questions? No? All right. Well, feel free to come in and ask questions. If not, that's it. Thank you. Thank you, DEF CON.