1 00:00:00,820 --> 00:00:18,400 Hello everyone. First of all, that's a lot of people. So the whiskey was needed. Welcome to my talk, the art of compromising C2 servers, a web application vulnerabilities perspective. 2 00:00:18,400 --> 00:00:41,900 Although, as we might see later, there is a better title for this talk. First of all, this talk and this research is dedicated to a close friend and the father figure for me that passed away three years ago. 3 00:00:42,620 --> 00:00:47,800 My friend Leonidas, who was one of the very few people together with my wife. 4 00:00:48,400 --> 00:00:58,520 That enforced me and helped me to switch from becoming a developer to becoming whatever the hell I am right now. 5 00:01:02,640 --> 00:01:15,460 So, thanks for that. I'm Vangelis Tsikas. I'm currently the CTO of the trust and safety startup named Tremo and an independent security researcher. 6 00:01:16,160 --> 00:01:18,380 My research interests are mainly related to security. 7 00:01:18,400 --> 00:01:22,300 I work mainly with APIs for IOT devices and web application security. 8 00:01:23,130 --> 00:01:31,140 And I had the great idea that in my forties I should also pursue a PhD on offensive web application security. 9 00:01:32,040 --> 00:01:43,700 You can follow me on Twitter or X or whatever the hell it's called right now on Evie's stickers and this is my personal website where I usually post my latest research. 10 00:01:45,120 --> 00:01:47,160 The past year or so. 11 00:01:47,160 --> 00:01:59,580 I have been working on an AI LLM that will generate some content aware AI attacks. 12 00:02:00,440 --> 00:02:06,240 It will target logic flows and typical developer cut corners that we see throughout the years. 13 00:02:06,600 --> 00:02:13,260 And it was used in this talk, as you will see it was not that necessary though. 14 00:02:13,260 --> 00:02:21,020 So, the question is why go after C2s and why go after malware? 15 00:02:22,820 --> 00:02:30,840 Around a year ago I was doom scrolling on Twitter when I saw Tatiana Siskova's Twitter 16 00:02:31,520 --> 00:02:39,040 about Harley, a malware, an Android malware that we are going to see really deeply later 17 00:02:39,040 --> 00:02:39,860 in this talk. 18 00:02:40,080 --> 00:02:43,140 And I was introduced to malware as a service. 19 00:02:43,140 --> 00:02:48,000 And the wonderful threat that tries to take them down. 20 00:02:49,440 --> 00:02:51,180 The malware market is booming. 21 00:02:51,540 --> 00:02:59,600 Malware vendors, as with anything in late capitalism this year, have switched to as 22 00:02:59,600 --> 00:03:00,240 a service model. 23 00:03:00,680 --> 00:03:07,100 So it means that most of them need a monthly subscription which varies from 100 to a couple 24 00:03:07,100 --> 00:03:10,180 of thousand per year, per month. 25 00:03:10,420 --> 00:03:12,500 And some old ones still. 26 00:03:15,220 --> 00:03:20,340 On the malware development market, there is a pyramid. 27 00:03:20,840 --> 00:03:25,660 On the very top, there are the developers, they are the people who develop malware and 28 00:03:25,660 --> 00:03:26,260 its functionality. 29 00:03:26,700 --> 00:03:27,500 They are C2. 30 00:03:27,820 --> 00:03:38,260 And they can either be lone wolves or some market, some smaller companies that have switched 31 00:03:38,260 --> 00:03:39,180 bad. 32 00:03:39,180 --> 00:03:48,660 On composers are the ones who take most of the profits and don't advertise them on marketplaces 33 00:03:48,660 --> 00:03:56,900 aggressively and reach out to new customers so that they can purchase their malware and 34 00:03:56,900 --> 00:03:59,140 by is the final cut. 35 00:03:59,420 --> 00:04:05,420 They are the ones who try to install the malware to the victims so that they can make profits 36 00:04:05,420 --> 00:04:05,840 for them. 37 00:04:06,120 --> 00:04:06,800 그러� enriched of them. 38 00:04:08,100 --> 00:04:08,960 C2 d. 39 00:04:08,960 --> 00:04:09,160 Q8 Q11. 40 00:04:09,160 --> 00:04:15,080 market is booming right now it's not ransomware size but it's close to 2.2 41 00:04:15,080 --> 00:04:20,400 billion dollars for its profits as you are going to see all the malware have 42 00:04:21,740 --> 00:04:28,100 strict restrictions to never run in the Commonwealth of Independent States for 43 00:04:28,100 --> 00:04:34,060 whoever don't know what it is this is Russia and vendors are part of criminal 44 00:04:34,060 --> 00:04:42,800 rigs that enjoy immunity and that gets me to the actual title of my talk which 45 00:04:42,800 --> 00:04:52,600 is will I get one today a little intro on malware it's it can be run on Android 46 00:04:52,600 --> 00:04:57,420 Windows and Mac it can deliver via a variety of methods it tries to achieve 47 00:04:57,420 --> 00:05:02,760 resistance through a number of ways it's usually heavily obfuscated and difficult 48 00:05:02,760 --> 00:05:03,280 to reserve 49 00:05:03,280 --> 00:05:08,800 to reverse and it connects to a C2 server for further instructions 50 00:05:09,320 --> 00:05:13,180 periodically this is the part that we are going to take a deeper look into 51 00:05:14,060 --> 00:05:18,720 some malware lingo that will be used in this talk first of all Stealer an 52 00:05:18,720 --> 00:05:21,880 application that will try to steal all information and send it to the 53 00:05:21,880 --> 00:05:26,780 command-and-control server a dropper is the typical basic program that is used 54 00:05:26,780 --> 00:05:33,100 to drop other malware to the victims a subscriber is an app that subscribes the 55 00:05:33,100 --> 00:05:39,300 victims phone to a number of premium services and if you don't know what the button it is 56 00:05:39,300 --> 00:05:46,720 you're probably in the wrong conference or looking out the wrong video so the 57 00:05:46,720 --> 00:05:50,980 typical matter when analysis what the smart reversers doing is highly 58 00:05:50,980 --> 00:05:56,660 technical usually they do static analysis they are doing dynamic analysis 59 00:05:56,660 --> 00:06:03,080 in sandboxes that are reversing and jumping through a lot of ships they focus on the reverse of the victims family railway and a number of premium services and if You don't know what the bot As you don't know what the bot t ne t is you're probably in the wrong conference or looking at the wrong Video, it's an application called modernise with the 41 servers to некalmar and Fürsler's, there are two images. one honest the morning analysis is what the Smart reversers doing is highly technical usually they do static analysis they are doing dynamic analysis inside boxes and there are different options to give you other properties dijacking away outside the two.atically, 60 00:06:03,080 --> 00:06:10,380 raising the bar by a lot and if you are here for reversing tips I just have one 61 00:06:10,380 --> 00:06:16,640 slide it's this slide I don't really understand all of those things so the 62 00:06:16,640 --> 00:06:21,920 potential obstacles that the people who reverse and are really smart won't 63 00:06:21,920 --> 00:06:27,180 surprise is under debugging techniques obfuscation techniques runtime function 64 00:06:27,180 --> 00:06:32,920 decryption states downloads and the plethora of stuff that I don't really 65 00:06:32,920 --> 00:06:37,080 understand and I don't want to understand so that's why I will 66 00:06:37,080 --> 00:06:44,480 introduce you to the Toyota Corolla of penetration testing which is called web 67 00:06:44,480 --> 00:06:51,060 application testing it's neither sexy nor nice but it will take you from place 68 00:06:51,060 --> 00:06:56,960 a to place B and it will probably also get you a couple of million 69 00:06:57,180 --> 00:07:05,360 bots in the process so malware command and control analysis it's definitely 70 00:07:05,360 --> 00:07:10,220 not that technical I'm going to treat the C2 as a black box web application 71 00:07:10,220 --> 00:07:16,820 test if black box fails I'm gonna cheat and use some of the communication from 72 00:07:16,820 --> 00:07:23,100 the sandbox that was running the malware if all fails mail if all else 73 00:07:23,100 --> 00:07:26,520 fails I will run it on my victim devices and 74 00:07:26,520 --> 00:07:26,700 just 75 00:07:26,700 --> 00:07:35,880 proxy through burp and last I will apply some art to it and this is all the 76 00:07:35,880 --> 00:07:42,560 art that is needed to really own most of the C2s it's just a typical 77 00:07:42,560 --> 00:07:48,360 dear search yeah I'm old I'm not using FFUF I'm not using their buster and 78 00:07:48,360 --> 00:07:56,060 that's the typical dear search with the typical vocabulary there are a couple of 79 00:07:56,060 --> 00:07:56,640 すarz � jsem 80 00:07:56,640 --> 00:08:03,860 downfalls for their c2 analysis the most difficult part is that it is highly 81 00:08:03,860 --> 00:08:09,140 opportunistic because they have a really small life which means that you 82 00:08:09,140 --> 00:08:14,500 have only up to a couple of days to attack and find any vulnerabilities so 83 00:08:14,500 --> 00:08:18,840 it needs to be automated and integrated with threatened and tools to maximize 84 00:08:18,840 --> 00:08:26,040 the small window that I have and you also have to surprise that if you in the 85 00:08:26,040 --> 00:08:31,100 If you are using VPSs, the bad people will also blacklist your IP addresses, so you have 86 00:08:31,100 --> 00:08:32,760 to continue changing VPSs. 87 00:08:34,360 --> 00:08:40,100 The thread intel that I was using is mostly Twitter thread intel. 88 00:08:40,420 --> 00:08:47,220 Unfortunately this is no longer working due to mask wanting to monetize over everyone. 89 00:08:47,220 --> 00:08:59,320 I am also using triage, and a really nice GitHub from a Twitter user called g7worm. 90 00:09:03,080 --> 00:09:08,160 The finished product was a Python script in a loop that updated the database of all targets. 91 00:09:09,000 --> 00:09:14,580 It scanned all targets for potential issues, or if it knew there was an issue, it immediately 92 00:09:14,580 --> 00:09:16,700 exploited for a known vulnerability. 93 00:09:17,220 --> 00:09:25,520 As I said, it's a really small time window, and if a new panel appeared, it would send 94 00:09:25,520 --> 00:09:27,340 a push notification on my phone. 95 00:09:28,040 --> 00:09:34,840 Spoiler alert, don't do that if you are married or put limitations on your push notifications 96 00:09:34,840 --> 00:09:35,480 in the evening. 97 00:09:37,480 --> 00:09:45,060 The tools that I used, as I said, my trustworthy dirsearch, burp-sweep, Zadek's decompilers 98 00:09:45,060 --> 00:09:47,080 so that I could try... 99 00:09:47,080 --> 00:09:52,120 I am not that good, as I said. 100 00:09:53,680 --> 00:09:59,160 APK lab and Teniran as the sandboxes. 101 00:09:59,600 --> 00:10:03,840 Several droplets on this so I can avoid blacklisting. 102 00:10:03,920 --> 00:10:08,200 I also can find more of the panels. 103 00:10:08,800 --> 00:10:15,020 And if all else fails, my cancerous Android phone that at some point was running 10 different 104 00:10:15,020 --> 00:10:15,400 malware. 105 00:10:18,200 --> 00:10:21,780 Going up to the methodology, it's as simple as it seems. 106 00:10:22,200 --> 00:10:25,700 I acquire the C2 URL and run automated tools. 107 00:10:26,100 --> 00:10:30,900 If the automated tools doesn't find anything, I run it in a sandbox and review the communication 108 00:10:30,900 --> 00:10:31,460 logs. 109 00:10:31,740 --> 00:10:34,040 I rerun the automated tools with added knowledge. 110 00:10:34,520 --> 00:10:40,960 And if that also doesn't find anything, I fire up Burp and treat it as a penetration 111 00:10:40,960 --> 00:10:41,520 test. 112 00:10:41,520 --> 00:10:48,560 And, last but not least, obviously not profit, but submit a DEF CON talk so that I can talk 113 00:10:48,560 --> 00:10:49,180 in front of you. 114 00:10:50,680 --> 00:10:52,820 What are the goals of my research? 115 00:10:53,160 --> 00:10:58,760 First, get admin access to the panel, which means I want to be the admin in the panel. 116 00:10:59,280 --> 00:11:01,540 Get remote command execution on the server. 117 00:11:02,140 --> 00:11:05,900 Acquire the source code of the panel and potentially the malware. 118 00:11:06,340 --> 00:11:10,200 And the main thing, don't end up in a black van. 119 00:11:10,920 --> 00:11:12,260 How did it go? 120 00:11:13,330 --> 00:11:15,780 Seven panels I got admin access. 121 00:11:16,200 --> 00:11:20,320 I got three remote command executions on servers. 122 00:11:20,800 --> 00:11:25,300 I acquired the source code of five different panels. 123 00:11:25,600 --> 00:11:29,620 And I still haven't ended up in a black van. 124 00:11:32,880 --> 00:11:37,020 I added a slide for the not horrible mention. 125 00:11:37,380 --> 00:11:38,840 First of all, it's Cloudflare. 126 00:11:39,260 --> 00:11:39,960 Okay. 127 00:11:40,200 --> 00:11:42,440 Cloudflare, they never took down anything. 128 00:11:42,680 --> 00:11:46,520 They just enabled bad people to do bad things. 129 00:11:46,760 --> 00:11:51,900 And they never respect researchers, at least to my knowledge. 130 00:11:52,420 --> 00:11:56,860 Second, it's Hedgner, which never took down anyone. 131 00:11:57,160 --> 00:12:03,800 They took down my VPSs because they thought that I was doing something malicious. 132 00:12:04,340 --> 00:12:10,140 And all the bulletproof hosting providers for, obviously. 133 00:12:10,140 --> 00:12:10,180 Okay. 134 00:12:10,180 --> 00:12:10,460 For those reasons. 135 00:12:14,600 --> 00:12:16,860 So enough with the fluffy words. 136 00:12:17,800 --> 00:12:22,580 Anything from here on is a zero day or a taken down botnet. 137 00:12:22,780 --> 00:12:24,420 So let's go. 138 00:12:26,400 --> 00:12:32,420 First, it's the Harley malware, as we saw on Tatiana's tweet. 139 00:12:32,680 --> 00:12:34,660 It was found by Kaspersky. 140 00:12:34,880 --> 00:12:39,180 The first report was on 22nd of September of 2022. 141 00:12:40,180 --> 00:12:42,420 Which means they have a birthday coming up. 142 00:12:43,560 --> 00:12:46,760 They are extensively researched from Tatiana Siskova. 143 00:12:47,440 --> 00:12:50,220 I'm also going to introduce you with my matter. 144 00:12:50,400 --> 00:12:54,200 On the very left, it's great. 145 00:12:54,420 --> 00:12:55,340 So I'm secure. 146 00:12:55,580 --> 00:12:57,640 On the very left, it's vant. 147 00:12:57,860 --> 00:12:59,760 So I'm not really that secure. 148 00:13:00,000 --> 00:13:02,440 For Harley, I think I'm not so okay. 149 00:13:02,580 --> 00:13:04,080 But I can live with that. 150 00:13:05,040 --> 00:13:09,320 So Harley is a Trojan subscriber to paid services. 151 00:13:09,580 --> 00:13:10,160 And I'm going to talk a little bit about that. 152 00:13:10,160 --> 00:13:14,600 Two hundred apps were found in 2022 and 2023. 153 00:13:15,180 --> 00:13:20,500 The realistic estimation is that over a thousand apps to this day have been developed. 154 00:13:20,700 --> 00:13:23,420 And they're affecting 12 million users. 155 00:13:24,260 --> 00:13:28,120 They are based on an encrypted SDK in Go and Rust. 156 00:13:29,480 --> 00:13:30,920 I'm going to spoil it to you. 157 00:13:31,080 --> 00:13:34,660 In a couple of slides, this is not going to be so encrypted. 158 00:13:36,600 --> 00:13:39,120 Harley had an administration interface. 159 00:13:40,160 --> 00:13:42,160 It's based on ZooSpring application. 160 00:13:42,780 --> 00:13:45,700 I hope we don't have any Java developers in here. 161 00:13:45,900 --> 00:13:48,320 If we do, I'm feeling sorry for you. 162 00:13:50,960 --> 00:13:58,080 I just checked on JavaScript and saw that there was no actual backend verification. 163 00:13:58,720 --> 00:14:01,780 There was only frontend verification on the login. 164 00:14:02,180 --> 00:14:09,540 And once the code was 200, it was adding it was set item on season storage. 165 00:14:09,540 --> 00:14:10,520 The user name. 166 00:14:10,660 --> 00:14:17,640 So all I had to do was do a season storage.setitem for an admin. 167 00:14:17,900 --> 00:14:28,600 And I saw the admin interface, which first of all, I hope the dog is a default one and 168 00:14:28,600 --> 00:14:29,340 not someone's dog. 169 00:14:29,620 --> 00:14:32,860 But this means that I don't know. 170 00:14:33,300 --> 00:14:34,900 First of all, I'm the admin. 171 00:14:35,020 --> 00:14:35,900 First goal met. 172 00:14:36,360 --> 00:14:38,400 But as I said, we have other goals, too. 173 00:14:40,980 --> 00:14:47,980 I don't know if anyone has worked with actuators, but the research found actuators. 174 00:14:48,360 --> 00:14:55,220 If you haven't worked with actuators, you're going to know they're leaky bastards. 175 00:14:55,980 --> 00:14:58,380 I want to introduce you to Jolokia. 176 00:14:59,140 --> 00:15:01,780 Jolokia is the playground for remote command execution. 177 00:15:02,380 --> 00:15:07,980 Unfortunately, the people who were behind this didn't pay for Jolokia. 178 00:15:08,100 --> 00:15:09,480 So all the commercial features. 179 00:15:09,480 --> 00:15:13,960 features were not enabled, which meant I had to find another way to remote command execution. 180 00:15:16,140 --> 00:15:24,280 I found a way to dump the diagnostics, the virtual machine system properties, which you 181 00:15:24,280 --> 00:15:29,560 see a wall of text in here. Let me get it a little bit formatted. You can see that I 182 00:15:30,180 --> 00:15:37,960 acquired the secret access key and the access key for AWS and for Alibaba Cloud. Unfortunately, 183 00:15:37,960 --> 00:15:45,720 this was not root access key, but it was an access key that was giving me access to 184 00:15:45,720 --> 00:15:53,720 S3 buckets. And as you can see in here, this was a legitimate web application company that 185 00:15:53,720 --> 00:16:00,180 was doing web applications. You can see the bucket that is really interesting in there. 186 00:16:00,360 --> 00:16:06,060 It's called Jenkins, and it has a master key and credentials in there. 187 00:16:06,620 --> 00:16:07,940 So I just wanted to show you that. 188 00:16:07,960 --> 00:16:13,620 I just went to GitHub, found Jenkins Credential Decrypter. I decrypted all the credentials 189 00:16:14,100 --> 00:16:19,940 and then I used it on that company's server that we're going to meet in a little bit. 190 00:16:20,260 --> 00:16:31,660 And yeah, all the repos of the company were dumped. All malicious code was dumped. All 191 00:16:31,660 --> 00:16:37,520 the command and control server code was dumped. It will be shared at the end of this talk. 192 00:16:38,180 --> 00:16:44,120 I want to talk about the company behind it. It's called Star Pavilion. They're based in China, 193 00:16:44,320 --> 00:16:52,600 and their main product is a payment gateway, which is also providing paid SMS services, 194 00:16:52,900 --> 00:17:00,240 like the one that Harley is using. Second is Clipper, not so private messaging. 195 00:17:02,440 --> 00:17:07,240 I'm going to say that this is one of the benign, probably the most benign of 196 00:17:07,960 --> 00:17:16,200 applications in this talk, so I'm safe. They were reviewed by Asset. They were reversed by 197 00:17:16,200 --> 00:17:23,020 the legend that is Lucas Stefanko and Petter Stricek. They're delivered as a Trojanized 198 00:17:23,020 --> 00:17:27,900 WhatsApp and Telegram Messenger, and their sole purpose is to switch wallet addresses 199 00:17:27,900 --> 00:17:34,620 from the one that the victim is having to the one that the attacker is controlling. 200 00:17:36,520 --> 00:17:37,200 Again, 201 00:17:37,960 --> 00:17:45,920 research. You can see that it found a lot of files. I don't know if anyone has worked with 202 00:17:45,920 --> 00:17:51,980 Laravel. I had the privilege of being a Laravel developer for enough years, so I know a Laravel 203 00:17:51,980 --> 00:17:58,680 when I see it. It's Laravel-based. The environment files are juicy files, and they are using these 204 00:17:58,680 --> 00:18:05,720 files on every installation, which means that, as you can see in here, I had the app key. 205 00:18:07,960 --> 00:18:14,380 App key encrypts cookies, which means that I can rebuild the cookie and login as any user. 206 00:18:14,560 --> 00:18:20,140 By any user, I mean, again, I'm the admin. 207 00:18:24,900 --> 00:18:37,020 But goal one. It also found a readme.md. As you can see, in readme.md, there is an integrate with your tools and the GitLab 208 00:18:37,960 --> 00:18:43,920 repository in there. I checked five minutes ago. This user is still online. You can go 209 00:18:43,920 --> 00:18:51,880 there and check his repositories. That repository for the C2 is unfortunately now deleted. Everything 210 00:18:51,880 --> 00:18:59,060 is public. But I have it and it's going to be released in a bit. Those are all the people 211 00:18:59,060 --> 00:19:07,160 that have interacted with any of the repositories. I dumped all the malware related repositories. 212 00:19:07,160 --> 00:19:11,540 Unfortunately, the Android application was already compiled. It's going to be shared 213 00:19:11,540 --> 00:19:17,600 on my GitHub. I'm not going to pursue any more information for them as we have bigger 214 00:19:17,600 --> 00:19:18,260 fish to fry. 215 00:19:22,440 --> 00:19:29,260 Okay. Let's go on the big guns. This is Amadei. If anyone knows what malware is, they know 216 00:19:29,260 --> 00:19:37,140 what Amadei is. They are typically 15% of all the malware C2s on 2023. They serve a 217 00:19:37,160 --> 00:19:43,380 test on October of 2018. It's a typical stealer. They're sold in Russian forums for between 218 00:19:43,380 --> 00:19:51,200 $400 and $800. They're usually used as a dropper for other malware. Its source was leaked five 219 00:19:51,200 --> 00:20:04,000 years ago. And today. And they have known connections to log bit TA505, TA5406, TA511. 220 00:20:04,380 --> 00:20:07,140 And, like, I don't know. 221 00:20:07,160 --> 00:20:13,660 I'm not exaggerating. I have just named four different APTs, so we're well within the 222 00:20:13,660 --> 00:20:15,560 Vant region. I hope you understand. 223 00:20:17,680 --> 00:20:25,940 What did I find? My trusted research found a stray files.zip, which was unfortunately 224 00:20:25,940 --> 00:20:32,920 password protected. It was cracked in less than a day by my good friend that is sitting 225 00:20:32,920 --> 00:20:34,320 there, Felipe Solferini. 226 00:20:38,700 --> 00:20:46,420 I was able to find the cracking password. And unfortunately, I saw that they have a static 227 00:20:46,420 --> 00:20:53,300 login and password. So I started reading the code. I found a lot of SQL injections. 228 00:20:53,600 --> 00:21:04,240 And I mean a lot. But unfortunately, as you can see, the login is checking on your configuration. 229 00:21:04,820 --> 00:21:06,540 And it's not... 230 00:21:06,540 --> 00:21:07,140 Okay. 231 00:21:07,160 --> 00:21:09,480 It's vulnerable to SQL injections. 232 00:21:10,200 --> 00:21:17,700 But then again, you can see that there is really nice function which is called parse 233 00:21:17,700 --> 00:21:28,340 underscore credentials. And it file put contents on a user controlled file name and user controlled 234 00:21:29,360 --> 00:21:29,780 content. 235 00:21:31,620 --> 00:21:33,720 Which I had to check. 236 00:21:33,940 --> 00:21:35,780 There was some limitations. 237 00:21:35,780 --> 00:21:43,720 The file name needs to be exactly 12 characters, including the extension. And there was a delimiter 238 00:21:43,720 --> 00:21:46,960 that I couldn't have guessed. But I have the source, so I didn't need to guess. 239 00:21:48,170 --> 00:21:58,720 I then tried this really nifty postman with the really interesting ID of 12345678.php. 240 00:21:58,760 --> 00:22:00,960 Exactly 12 characters. 241 00:22:01,200 --> 00:22:04,900 And this really nice command. 242 00:22:04,900 --> 00:22:06,920 Which is echoing a word. 243 00:22:07,760 --> 00:22:13,720 And then I went to credentials slash 12whatever.php. 244 00:22:13,860 --> 00:22:15,640 And I saw this nice world. 245 00:22:15,920 --> 00:22:18,100 So server, somebody's fucked. 246 00:22:18,340 --> 00:22:19,120 That's not me. 247 00:22:27,520 --> 00:22:29,560 What did I do from there on? 248 00:22:30,030 --> 00:22:31,580 I developed a reverse shell. 249 00:22:31,780 --> 00:22:34,480 I found an automated way of extracting everything. 250 00:22:34,480 --> 00:22:40,340 Everything in less than 30 seconds from the report of all the intelligence to fully owning 251 00:22:40,340 --> 00:22:40,780 the website. 252 00:22:41,140 --> 00:22:46,920 I added this really sneaky cron job to corrupt the percentage of the files so that the people 253 00:22:46,920 --> 00:22:47,840 wouldn't know. 254 00:22:50,620 --> 00:22:54,300 Unfortunately, as of late June 2023, this is fixed. 255 00:22:55,220 --> 00:22:56,960 We're going to find something though afterwards. 256 00:22:59,640 --> 00:23:01,760 From December of 2022. 257 00:23:02,460 --> 00:23:04,360 More than 1000 instances. 258 00:23:04,360 --> 00:23:06,560 Were found and exploited. 259 00:23:06,940 --> 00:23:11,380 More than 7 million devices were compromised and reported. 260 00:23:12,080 --> 00:23:18,840 This is really not that nice graph, but you can see that per month how many instances 261 00:23:19,460 --> 00:23:21,400 I got access to. 262 00:23:21,740 --> 00:23:24,880 And how many victims I got access to. 263 00:23:26,780 --> 00:23:31,220 And we're getting to the really huge guns in here. 264 00:23:31,460 --> 00:23:32,280 Smoke loader. 265 00:23:32,680 --> 00:23:33,020 Is. 266 00:23:33,020 --> 00:23:39,680 20 to 22% of all the C2s that are being run this year. 267 00:23:39,960 --> 00:23:42,800 The first record was in 2014. 268 00:23:43,220 --> 00:23:44,820 They mainly target Windows. 269 00:23:45,520 --> 00:23:49,720 They use it as a generic dropper for other malware. 270 00:23:50,040 --> 00:23:54,820 The price for full packets is more or less $1,500. 271 00:23:55,940 --> 00:24:02,940 They have no connections to Lockbit, TA-505, TA-406, TA-I don't know what. 272 00:24:02,940 --> 00:24:03,240 Not ever. 273 00:24:03,480 --> 00:24:07,740 All the APTs have worked at some point with smoke loader. 274 00:24:08,060 --> 00:24:10,780 So yeah. 275 00:24:12,820 --> 00:24:14,000 I'm not feeling that good. 276 00:24:14,940 --> 00:24:15,560 But. 277 00:24:16,160 --> 00:24:20,580 Dear search to the rescue again, I found a stray zip with credentials. 278 00:24:20,960 --> 00:24:25,760 The really sad part is that the admin username is millionaire. 279 00:24:26,160 --> 00:24:30,480 And knowing how many bots he has, he probably is a millionaire. 280 00:24:30,840 --> 00:24:32,520 By exploiting those. 281 00:24:32,940 --> 00:24:34,020 Sorry about that. 282 00:24:34,300 --> 00:24:45,760 But after using the credentials, again, sounds really boring. 283 00:24:45,880 --> 00:24:46,780 But that's it. 284 00:24:48,320 --> 00:24:53,580 Really a scary picture, if you ask me. 285 00:24:53,680 --> 00:24:56,260 This is 25,000 pictures. 286 00:24:56,900 --> 00:25:01,220 25,000 pages of 20 PCs. 287 00:25:01,220 --> 00:25:04,660 With all the information that you could have. 288 00:25:04,880 --> 00:25:10,620 You can see that they have admin access on most of those PCs. 289 00:25:12,900 --> 00:25:16,560 This is one of the C2s. 290 00:25:16,680 --> 00:25:18,060 You can see the old bot in there. 291 00:25:18,180 --> 00:25:19,040 That's half a million. 292 00:25:19,420 --> 00:25:24,240 The online is 250,000. 293 00:25:24,440 --> 00:25:30,040 And you can send whatever you want and run it whatever you want as an admin. 294 00:25:30,040 --> 00:25:35,260 There's also the little bots and the cancel bots deletion in there. 295 00:25:35,860 --> 00:25:37,520 I did not press it. 296 00:25:37,640 --> 00:25:39,080 I'm going to explain later why. 297 00:25:40,480 --> 00:25:42,680 I unfortunately did not manage to get RC. 298 00:25:43,060 --> 00:25:44,540 The source code is available. 299 00:25:45,500 --> 00:25:48,720 Minus the credentials, of course, as most of them are still active. 300 00:25:49,340 --> 00:25:52,920 All the shared malware will be downloadable from Git. 301 00:25:54,760 --> 00:25:58,160 What could I do with the knowledge that I had in there? 302 00:25:58,300 --> 00:25:59,320 I knew the default. 303 00:25:59,320 --> 00:26:00,940 I knew the zip name of the source code. 304 00:26:01,200 --> 00:26:09,480 So when I upped my loop to use every minute, I could find new references in ThreadModel. 305 00:26:09,680 --> 00:26:16,740 That means that one out of five of the new C2s were vulnerable once I was quick enough. 306 00:26:17,120 --> 00:26:19,820 I was able to pwn 60 different instances. 307 00:26:20,920 --> 00:26:24,340 Two of them had over half a million bots. 308 00:26:24,980 --> 00:26:29,300 A realistic estimation is that over 10 million users. 309 00:26:29,300 --> 00:26:30,900 The unique devices were compromised. 310 00:26:32,160 --> 00:26:33,600 This is still open. 311 00:26:33,800 --> 00:26:36,000 The vulnerability is still a zero day. 312 00:26:36,500 --> 00:26:48,660 And you can see a nice graphic of how the victims went from February till now. 313 00:26:50,680 --> 00:26:55,160 This is why the next one is why DEF CON hates me. 314 00:26:57,100 --> 00:26:59,280 It wasn't supposed to be in here. 315 00:26:59,300 --> 00:27:05,680 Because it was reported on late July, but I convinced DEF CON to accept it. 316 00:27:05,840 --> 00:27:07,080 It was revealed. 317 00:27:07,360 --> 00:27:09,220 It's named ManipulatedGayman. 318 00:27:09,480 --> 00:27:15,560 It's revealed in heavily reversed and researched via Perception Point, which are those three 319 00:27:15,560 --> 00:27:20,200 nice people on Twitter, OX Toxin, and two people that I cannot pronounce. 320 00:27:20,420 --> 00:27:20,700 Sorry. 321 00:27:20,920 --> 00:27:23,080 It targets mostly Mexican victims. 322 00:27:23,520 --> 00:27:25,660 It's active for at least two years. 323 00:27:25,780 --> 00:27:29,280 And the potential revenue is over 55 million. 324 00:27:31,640 --> 00:27:32,960 I don't know. 325 00:27:33,100 --> 00:27:34,620 I'm not really scared of them. 326 00:27:35,960 --> 00:27:38,840 After Smoke Loader, everything seems easy to me. 327 00:27:40,460 --> 00:27:49,120 The thing that Perception Point already found was that they have a Junko API that was open. 328 00:27:49,280 --> 00:27:53,640 So we could dump all the info from all the victims. 329 00:27:53,920 --> 00:27:58,400 That's how the 55 million were calculated. 330 00:27:59,280 --> 00:28:05,680 I was mostly interested in a spamming interface that was found there, which is called C6. 331 00:28:06,060 --> 00:28:09,780 And this is what you see exactly, which means they have no authentication. 332 00:28:10,300 --> 00:28:12,000 So I don't know. 333 00:28:12,340 --> 00:28:14,580 I didn't really need to have an admin. 334 00:28:14,940 --> 00:28:17,020 Everybody's an admin just by browsing there. 335 00:28:17,580 --> 00:28:22,200 But we also have other goals. 336 00:28:24,500 --> 00:28:27,020 Well, the other goal was rather easy. 337 00:28:27,160 --> 00:28:28,400 I have Git. 338 00:28:29,200 --> 00:28:30,480 Already in there. 339 00:28:30,580 --> 00:28:31,540 Deer Search found it. 340 00:28:32,600 --> 00:28:35,200 I was able to download all the files. 341 00:28:35,480 --> 00:28:40,980 This is where it was the at Bitbucket. 342 00:28:41,640 --> 00:28:46,560 Unfortunately, it was not public, but I was able to replicate the Git from the files that 343 00:28:46,560 --> 00:28:48,660 were in the Git repository on the server. 344 00:28:48,980 --> 00:28:57,180 And I also found out that it was running a really huge Mexican, mostly Mexican targeted 345 00:28:57,180 --> 00:28:58,040 spam list. 346 00:28:58,400 --> 00:29:02,940 This is already shared with Troy Hunt on Have I Been Pwned? 347 00:29:03,040 --> 00:29:08,580 And as you can see, it's a tad less than 34 million email addresses. 348 00:29:10,720 --> 00:29:16,360 Due to time limitations, I was not able to get remote command execution. 349 00:29:16,760 --> 00:29:20,640 The source code will be available, minus the list, obviously, because I don't want 350 00:29:20,640 --> 00:29:21,620 to enable any spammers. 351 00:29:23,400 --> 00:29:25,460 Next, is Nexus Panel. 352 00:29:25,660 --> 00:29:27,980 Their first appearance was in 2022. 353 00:29:28,400 --> 00:29:30,360 They act as an Android stealer. 354 00:29:30,440 --> 00:29:33,540 They have a really sophisticated way of bypassing MFA. 355 00:29:34,400 --> 00:29:36,920 They target a lot of banking applications. 356 00:29:37,460 --> 00:29:38,860 They're mostly active in Turkey. 357 00:29:39,140 --> 00:29:42,800 And they're inactive for the past two and a half months. 358 00:29:43,060 --> 00:29:47,300 So I say I'm safe, but you never know. 359 00:29:48,460 --> 00:29:49,020 Easy. 360 00:29:49,600 --> 00:29:53,580 They have an SQL injection on how they submitted the files. 361 00:29:53,780 --> 00:29:56,360 So it means I'm the admin. 362 00:29:58,860 --> 00:30:01,220 They have a really sophisticated panel. 363 00:30:01,400 --> 00:30:04,540 You could see all the info for all the users. 364 00:30:05,600 --> 00:30:08,520 The SQL injection could dump the full database. 365 00:30:09,700 --> 00:30:11,480 They had clear text passwords. 366 00:30:12,180 --> 00:30:17,540 Unfortunately, as I said, while I was researching, they went off. 367 00:30:17,720 --> 00:30:20,620 So I wasn't able to get any code or RCE. 368 00:30:20,920 --> 00:30:23,440 And unfortunately, there is no panels available. 369 00:30:23,740 --> 00:30:28,380 So I have to say that I didn't manage it. 370 00:30:28,400 --> 00:30:29,060 That's all it goes, unfortunately. 371 00:30:31,000 --> 00:30:34,800 And then it's the one that got away, Aurora. 372 00:30:35,780 --> 00:30:41,360 I had a really big speech on what Aurora was and what it was supposed to be doing. 373 00:30:41,560 --> 00:30:50,220 But the day before yesterday, Titan Stealer, which is basically Aurora 2, got its code 374 00:30:50,220 --> 00:30:50,840 dumped. 375 00:30:51,080 --> 00:30:53,380 So good for them, I guess. 376 00:30:53,820 --> 00:30:55,900 Their first appearance is early 2022. 377 00:30:56,340 --> 00:30:57,420 They're a Windows Stealer. 378 00:30:58,400 --> 00:31:00,260 They are right in Golang. 379 00:31:00,420 --> 00:31:03,720 They are capable of stealing a lot of crypto wallets. 380 00:31:03,800 --> 00:31:06,120 And the panel was written in Golang. 381 00:31:07,160 --> 00:31:07,980 They are off. 382 00:31:08,100 --> 00:31:08,680 So I'm great. 383 00:31:08,840 --> 00:31:10,420 I'm not afraid of them. 384 00:31:12,340 --> 00:31:17,200 The story is that the dear search found a stray image loading advertisements. 385 00:31:17,700 --> 00:31:18,560 I followed the lead. 386 00:31:18,740 --> 00:31:23,800 I found the base building server handling all builds and licensing. 387 00:31:24,160 --> 00:31:25,240 You could add the user. 388 00:31:25,480 --> 00:31:26,960 You could create stealers. 389 00:31:26,960 --> 00:31:30,180 You could do whatever you want, because they had no authentication at all. 390 00:31:30,320 --> 00:31:35,000 The only thing that you needed to find was the actual URL and port that it was running. 391 00:31:36,920 --> 00:31:38,740 And then this happened. 392 00:31:40,000 --> 00:31:44,800 Aurora and their admins went silent. 393 00:31:44,920 --> 00:31:45,900 They deleted everything. 394 00:31:46,300 --> 00:31:50,340 So again, I wasn't able to finish what I wanted to. 395 00:31:53,260 --> 00:31:56,580 And there comes the ethical side. 396 00:31:56,580 --> 00:31:58,720 Ethical slash legal dilemmas. 397 00:31:59,520 --> 00:32:03,280 I vastly dislike the word ethical hacker. 398 00:32:04,000 --> 00:32:10,040 I'm an ethical person, but that has nothing to do with hacking. 399 00:32:10,420 --> 00:32:16,900 I deliberately, in this research, didn't touch any machine that was not owned by criminals. 400 00:32:17,260 --> 00:32:24,500 And that's the line that I wasn't happy to go over. 401 00:32:24,680 --> 00:32:26,560 So all my research. 402 00:32:26,560 --> 00:32:30,840 All my research took down only people who were criminals. 403 00:32:34,080 --> 00:32:35,660 Criminals will get better. 404 00:32:36,960 --> 00:32:39,600 The C2s will get some focus, too. 405 00:32:39,780 --> 00:32:45,060 I hope some of you here, you can see how easy it is to own command and control servers. 406 00:32:45,540 --> 00:32:51,120 It has nothing to do with the really, really difficult part that is reversing applications. 407 00:32:52,260 --> 00:32:53,940 The bar will be raised. 408 00:32:54,160 --> 00:32:56,540 And I'm expecting all this work. 409 00:32:56,560 --> 00:33:01,040 I'm expecting zero days that are reported today to be fixed in the next week or so. 410 00:33:01,400 --> 00:33:06,740 And this could interfere with active police investigation, but all of them were reported 411 00:33:06,740 --> 00:33:10,180 six months ago, so I cannot really do anything else. 412 00:33:12,240 --> 00:33:13,560 What's the next steps for me? 413 00:33:14,520 --> 00:33:16,660 I will continue monitoring for new panels. 414 00:33:16,920 --> 00:33:19,800 I will try to find more zero days on all the panels. 415 00:33:20,760 --> 00:33:25,640 I will try to collaborate with a lot of researchers to identify and take down criminals. 416 00:33:26,560 --> 00:33:31,160 And my main goal is to continue my 40 years of don't get banned strike. 417 00:33:42,500 --> 00:33:49,760 I was really not expecting for so much traffic in DEF CON. 418 00:33:49,900 --> 00:33:51,800 So the GitHub is live. 419 00:33:52,420 --> 00:33:55,790 My blog post is going to be live later. 420 00:33:56,420 --> 00:33:56,540 Okay. 421 00:33:56,560 --> 00:34:01,080 Later this week when I'm hopefully back in Greece and have some time to finish it up. 422 00:34:01,260 --> 00:34:03,940 So I will keep you posted. 423 00:34:04,160 --> 00:34:12,600 But you can go to github.com slash tix slash DEF CON 31 and acquire all the C2 and the 424 00:34:12,600 --> 00:34:14,840 malware source code that is available right now. 425 00:34:15,740 --> 00:34:17,560 Thank you for attending the talk. 426 00:34:24,740 --> 00:34:29,820 I think we have time for questions if anyone feels like it. 427 00:34:34,940 --> 00:34:35,580 Yeah? 428 00:34:37,360 --> 00:34:38,000 . 429 00:34:44,900 --> 00:34:45,540 No. 430 00:34:46,320 --> 00:34:47,540 I have reported to you. 431 00:34:47,560 --> 00:34:49,900 I have reported to Europol, but they didn't even answer. 432 00:34:50,080 --> 00:34:55,580 I also have to say that I reported to the company that was doing Harley, but they didn't 433 00:34:55,580 --> 00:34:56,100 answer either. 434 00:34:58,020 --> 00:34:59,000 Any other questions? 435 00:35:01,760 --> 00:35:02,500 Thanks, guys.