1 00:00:00,000 --> 00:00:07,100 So, first off, anyone here last year see Rob King in my talk about SSH and shambles and stuff like that? 2 00:00:07,640 --> 00:00:08,520 Sweet, awesome, cool. 3 00:00:08,520 --> 00:00:12,180 So this is like a really quick recap of that but with lots of new 0 to N fun. 4 00:00:12,360 --> 00:00:18,720 So really fast overview of all the SSH stuff, kind of talk about some of the major SSH weaknesses of the last like two years that have been pretty wild. 5 00:00:18,720 --> 00:00:21,160 It's been the most exciting time in SSH in a very long time. 6 00:00:21,540 --> 00:00:26,120 Then some new research, new volumes, new exposure stats and then some updates to open source tooling. 7 00:00:26,500 --> 00:00:32,780 So first off, if you look at the SSH protocol state diagram, there's a lot of stuff that's clear text and a lot of stuff that's encrypted. 8 00:00:33,140 --> 00:00:38,400 All your authentication tends to happen like after the kex in it and then after you authenticate, everything's like multiplexing channels. 9 00:00:38,400 --> 00:00:40,080 So just give an idea of like how SSH works. 10 00:00:40,400 --> 00:00:44,580 A lot of folks don't realize how many different things leak out of SSH before you authenticate. 11 00:00:44,660 --> 00:00:51,120 So you get data from the TCP IP stack, from the server version, the kex in it extensions, the server banner, all the way to authentication handshake. 12 00:00:51,220 --> 00:00:54,920 And so there's many different places where you can learn a lot about the server even before you authenticate. 13 00:00:55,060 --> 00:00:57,900 And so we're going to take advantage of that for some of our research here. 14 00:00:59,080 --> 00:01:05,100 If you look at SSH across the internet, it is actually the second most common admin protocol exposed to the internet, excluding HTTP. 15 00:01:05,240 --> 00:01:11,100 So there's more SSH out there than there is almost anything else, including remote desktop, SNMP, almost anything else. 16 00:01:11,140 --> 00:01:15,220 And these slides will be online pretty quickly, so we're going to go quick, but feel free to look at them later on. 17 00:01:15,760 --> 00:01:18,980 If you look at what makes up SSH though, it's really just two vendors. 18 00:01:18,980 --> 00:01:24,580 It's OpenSSH and DropBear make up something like 98 percent of all possible installations of SSH. 19 00:01:24,680 --> 00:01:28,020 However, the long tail of things that are not SSH and DropBear are actually really important. 20 00:01:28,020 --> 00:01:32,980 Those tend to be things like your OC, sorry, ICS devices, OT devices, things like that. 21 00:01:32,980 --> 00:01:37,620 So you have like the custom Cisco SSH daemon, the lanware, the lancom, all this stuff. 22 00:01:37,620 --> 00:01:42,820 So even though these kind of like oddball SSH daemons are not particularly common, they're pretty important when you do find them. 23 00:01:42,820 --> 00:01:45,460 Things like moveit, et cetera, that expose all your secret data. 24 00:01:46,480 --> 00:01:51,240 So SSH itself provides both a transport and authentication, so it's almost like TLS in that sense. 25 00:01:51,240 --> 00:01:53,020 You got a little version exchange thingy? 26 00:01:56,760 --> 00:01:59,540 Alright, we might have to yell back at them soon at this rate. 27 00:02:00,160 --> 00:02:07,820 So SSH is very much like TLS, then you have like an encrypted transport done through kex in it and then you actually do authentication and then you do your actual thing. 28 00:02:08,040 --> 00:02:18,220 So when you look at the, when you look at SSH authentication overall, almost every server on the planet supports both pub key authentication and password authentication and that's it. 29 00:02:18,220 --> 00:02:21,780 It's really rare to find a machine that doesn't support password authentication by default. 30 00:02:21,780 --> 00:02:29,840 Because password authentication shows up as both password but also shows up as what's called keyboard interactive, which just means interactive PAM which is, it ends up being just a password as well. 31 00:02:30,160 --> 00:02:33,440 So it's a long tale of weird stuff but I want to talk about some really neat things you can do with SH. 32 00:02:33,620 --> 00:02:42,740 My favorite thing probably is you can take someone else's public key and then throw it at a particular server and find out whether they can log into that server while only having their public key, not their private key. 33 00:02:42,980 --> 00:02:50,940 So that's really useful if let's say you want to find out who Gia Tan is by taking their pub key from GitHub and spraying the internet trying to log in as them and then see whether you get a half authentication or not. 34 00:02:50,960 --> 00:02:52,500 But there's other really useful things you can do with it. 35 00:02:52,500 --> 00:03:01,420 You can confirm that a username has access to something, you can see whether like your own credential that you might have tried to rotate is still being used in place and you can always do it with just the private side of the key which is fantastic. 36 00:03:02,260 --> 00:03:04,860 When you start getting into authentication itself, that's where you start getting into the fun part. 37 00:03:04,860 --> 00:03:06,700 Once you authenticate then you do all this other stuff. 38 00:03:06,700 --> 00:03:13,780 You can do interactive shells of course but also command execution that's blind, you can do file transfers, TCP IP forwarding, things like that, VPN tunneling etc. 39 00:03:14,340 --> 00:03:25,640 So when a SH daemon punts authentication until after the, you know, protocol level authentication, let's say an SH daemon just drops you to a log in prompt but after doing the SH off, you actually have a pretty wide attack servers. 40 00:03:25,640 --> 00:03:32,260 You now attack all these other things like these channels and other things like that because they're exposed in that post off even though pre-off technically scenario. 41 00:03:32,800 --> 00:03:36,860 So effectively it's basically like TLS, it's a little bit different but you can almost think of it as TLS. 42 00:03:37,140 --> 00:03:39,820 So I want to do a quick recap of some of the fun bugs. 43 00:03:40,000 --> 00:03:41,400 Terrapin was fun last year. 44 00:03:41,400 --> 00:03:48,840 They found a way to truncate the TCP session in a way that caused it to pick a less secure cipher which led to some neat crypto attacks. 45 00:03:49,000 --> 00:03:52,700 The xy utils backdoor was probably one of the best backdoors in the history of internet. 46 00:03:52,760 --> 00:04:00,380 The person involved, or person, spent about 3 years slowly gaining trust before they really twisted the knife and then dropped a backdoor and unfortunately got caught last second. 47 00:04:00,520 --> 00:04:06,900 We did this whole hunt for geotan last year where we took their pub key and hunted the internet for them and we found absolutely nothing so they had fantastic OPSEC. 48 00:04:07,540 --> 00:04:12,280 Regression was like one of the first RCEs and default open SH in many, many years. 49 00:04:12,460 --> 00:04:15,240 So it was like, you know, OBSD finally had to update their website again. 50 00:04:15,740 --> 00:04:22,540 The great thing about that is this is really difficult to exploit on non 32 bit x86 but it's been shown to be exploitable. 51 00:04:22,540 --> 00:04:28,380 So weirdly enough we're not seeing a lot of machines getting popped through it but it's one of the first real severe exploits in a long time. 52 00:04:28,420 --> 00:04:30,420 Credit to the Qualys threat unit group. 53 00:04:30,900 --> 00:04:32,220 The moveit one is fantastic. 54 00:04:32,220 --> 00:04:36,520 This is probably one of my funniest favorite SH bugs because it's so funny. 55 00:04:36,600 --> 00:04:40,900 The moveit which is a software package you only know about because it's used to ransomware everybody. 56 00:04:40,960 --> 00:04:55,380 They support SH and SH control, they source it from a company called IP works and when you authenticate with a public key to IP works in this stack, it would look at that raw byte of the public key like the daring coded actual key itself and it would treat it like a file path to try to open it up. 57 00:04:55,440 --> 00:04:56,860 For no possible good reason. 58 00:04:56,860 --> 00:04:59,660 Like there's no reason why you take a giant binary blob and treat it like a file path. 59 00:04:59,720 --> 00:05:09,220 But the watchtower folks found out that if you have a UNC URL or back back, you know, local host C dollar et cetera, you can basically make it off to itself to its own log files and things like that and bypass off. 60 00:05:09,220 --> 00:05:10,620 So it's a really funny bug. 61 00:05:10,700 --> 00:05:17,800 It lets you know like there is some crazy stuff out there in SH land where it doesn't matter whether you think SH is boring, people do amazingly silly things with it. 62 00:05:18,700 --> 00:05:20,860 Another recent bug here was the qual sort unit again. 63 00:05:20,860 --> 00:05:25,560 They found a way to do a man in the middle attack on the client by triggering an actual out of memory on the client itself. 64 00:05:25,560 --> 00:05:39,460 So effectively you, you queue up the session and you start smashing ping packets into the client side of it and the client doesn't actually remove them from the queue, you eventually trigger an out of memory error which causes the handshake to fail in an interesting way that lets you bypass key checks. 65 00:05:39,520 --> 00:05:43,860 So a neat way to like turn a DOS bug into a man in the middle bug which is kind of a neat attack. 66 00:05:44,460 --> 00:05:52,720 There's another neat bug in the go SH library where if you use the API and kind of naively, you would actually authenticate the wrong key. 67 00:05:52,720 --> 00:05:58,060 The attacker would send a whole bunch of keys and you would actually trigger the call back for the right key. 68 00:05:58,080 --> 00:05:59,820 They would never finish authenticating with the key. 69 00:05:59,820 --> 00:06:03,040 Then you give them a totally different key, authenticate with that key and they'd think you're the first key again. 70 00:06:03,060 --> 00:06:07,640 So a really neat way to like basically pop shells and things that implemented this API poorly. 71 00:06:07,680 --> 00:06:15,640 As far as I know, no one ever talked about what was exploitable but we did some spelunking and the only one we could find that looked like it was definitely exploitable was the NetApp telegraph agent. 72 00:06:15,640 --> 00:06:18,020 Everything else looked like it was really difficult to actually abuse. 73 00:06:19,280 --> 00:06:23,880 And because it's 2025 and we're still talking about Cisco, they shipped another backdoor cred in SH. 74 00:06:24,060 --> 00:06:28,500 This one is really interesting because it was only in a really narrow set of versions of their particular appliance. 75 00:06:29,040 --> 00:06:35,800 And it's a case where if they had just used like deny user root in their default configuration because they don't normally support the root user, it would have made it a non-issue. 76 00:06:35,840 --> 00:06:43,160 So we're still seeing vendors shipping default passwords and we're still shipping default configurations of SH in a way that they're exploitable as a result. 77 00:06:44,240 --> 00:06:50,280 So one of my favorite bugs in the last year or so is Erlang OTP SH remote code execution bug. 78 00:06:50,280 --> 00:06:51,820 Has anyone here played with it a bit? 79 00:06:52,920 --> 00:06:53,720 A couple folks ? 80 00:06:53,740 --> 00:06:58,760 Alright, this is interesting because you don't necessarily think about Erlang SH team as being a very common attack service. 81 00:06:58,760 --> 00:07:03,440 And if you look at the entire internet, there's almost none of these things on the internet that represent themselves as being Erlang. 82 00:07:03,440 --> 00:07:06,020 They all actually have a different name on them instead. 83 00:07:06,240 --> 00:07:13,920 So what's interesting about this is you would connect to it, you would just send the command exec function even before you authenticate and you would just run it. 84 00:07:14,180 --> 00:07:17,220 And the neat thing about the Erlang one is it actually was Erlang code executions. 85 00:07:17,220 --> 00:07:19,620 You're actually evaluating Erlang code. 86 00:07:19,640 --> 00:07:21,960 So it's like straight up remote code execution without shellcode. 87 00:07:21,960 --> 00:07:23,660 You're just running whatever Erlang you want. 88 00:07:24,820 --> 00:07:30,280 What was interesting about this one in particular is like a lot of people didn't find it just because of how dumb it was, including us. 89 00:07:30,580 --> 00:07:32,580 So we released this tool last year called Chambl. 90 00:07:32,580 --> 00:07:34,140 We'll talk a little bit about it today. 91 00:07:34,260 --> 00:07:36,560 But the idea is that it's a research tool for SSH implementations. 92 00:07:36,560 --> 00:07:38,120 You can quickly scan all kinds of stuff. 93 00:07:38,120 --> 00:07:42,480 You can basically just like Chambl slash 24 and pop random shells out of all your stuff. 94 00:07:42,520 --> 00:07:48,000 And it does a really good job of finding all kinds of dumb bugs and embedded stuff and like weird SSH implementations without having to really think about it too much. 95 00:07:48,200 --> 00:07:50,600 You can use it to do post authentication attacks. 96 00:07:50,700 --> 00:08:00,140 So if a vendor gives you a shell that's SSH but not really SSH, you can use this tool to like try to do TCP IP channel forwarding and all this other kind of like fun side, side attacks on top of that channel. 97 00:08:00,820 --> 00:08:04,200 And you can do a lot of like neat things with like pre-authentication, straight transition attacks. 98 00:08:04,200 --> 00:08:06,140 We can like jam sessions in, things like that. 99 00:08:06,220 --> 00:08:08,060 It can also do post session attacks. 100 00:08:08,120 --> 00:08:13,040 So cases where you get like a get shell, we can then abuse the get shell to upload a shared object and then pop a shell, et cetera. 101 00:08:13,040 --> 00:08:14,220 So it's a really neat library. 102 00:08:14,220 --> 00:08:17,720 It's all ready to go for basically getting shells out of secure shell when you're not supposed to. 103 00:08:18,840 --> 00:08:24,880 So one of the things that we look into is like why did we miss the Chambl bug with, so why did we miss the Erlang bug with Chambl? 104 00:08:24,880 --> 00:08:31,480 Well it ends up when we were doing the SSH handshake, we would send the, you know, the normal banner, the kex in it, the kex response. 105 00:08:31,600 --> 00:08:33,660 Then we'd send the open channel or the exec. 106 00:08:33,840 --> 00:08:36,520 And then if we got a response back, we're like, hey, we got a shell, here we go. 107 00:08:36,560 --> 00:08:39,040 What's interesting about the Erlang one is it does not reply. 108 00:08:39,040 --> 00:08:40,280 So it won't reply to any of this at all. 109 00:08:40,280 --> 00:08:43,180 When it's in the wrong state , it doesn't reply at all, but it still runs the code. 110 00:08:43,440 --> 00:08:46,560 So because we saw a time out on our side, we just thought it wasn't exploitable. 111 00:08:46,680 --> 00:08:48,140 So we, we fixed that. 112 00:08:48,840 --> 00:08:53,100 Unfortunately by fixing that, you have to actually, it's basically a blind RCE. 113 00:08:53,300 --> 00:08:55,040 You have no idea whether RCE works or not. 114 00:08:55,040 --> 00:09:04,540 So the way that most phone scanners check for this, is they actually cause like a DNS lookup to bounce off the internet server, or they do something else that's basically like, will ping you, ping back to you on the back end to let you know that something's happening there. 115 00:09:05,120 --> 00:09:07,380 So we tried to figure out like, is this thing actually exploitable in the wild? 116 00:09:07,380 --> 00:09:08,320 Is it actually interesting? 117 00:09:08,360 --> 00:09:12,000 And there's almost like, there's like four Erlang SHDs in the whole internet on Shodan that are out there. 118 00:09:12,000 --> 00:09:13,640 So like, okay, no one cares about this. 119 00:09:13,720 --> 00:09:20,320 Then we realized that it's actually the base platform for something called Cisco Conf D, which is used in like millions of Cisco routers instead. 120 00:09:20,320 --> 00:09:25,800 But it shows up on a different port on port 830, and it has a different banner, because it has the word Conf D in it, not Erlang. 121 00:09:26,020 --> 00:09:29,040 And so once you figure that out, then it's like, great, now we can actually go out for all this stuff instead. 122 00:09:29,660 --> 00:09:33,020 What's annoying about it though, is the way that Cisco deployed it is also not very exploitable. 123 00:09:33,100 --> 00:09:35,960 They've got a separate shell and a separate thing, and it's like really tough to do anything with. 124 00:09:35,960 --> 00:09:38,160 So, ended up being like the most boring bug ever. 125 00:09:38,440 --> 00:09:48,580 The only fun thing about this bug is if you find somebody else who actually has an exploitable version, you can patch it by setting your payload to be SH colon stop, and you can remotely stop their SH server as the payload, then you fix it for them. 126 00:09:48,580 --> 00:09:50,720 So, if you want to write a patching tool, it's super easy. 127 00:09:50,740 --> 00:09:57,800 You just make a shutdown Erlang as part of the RCE, and that's a nice verifiable way to make sure it's vulnerable, is you turn it off by making it less vulnerable. 128 00:09:57,900 --> 00:10:02,080 So, recapping some of the stuff we found last year. 129 00:10:02,080 --> 00:10:06,100 We found about 27 million devices in IPv4 that had port 22 open. 130 00:10:06,180 --> 00:10:11,880 About 14 million of those were negotiated national authentication session, and we had 110,000 random sessions, like shells. 131 00:10:11,980 --> 00:10:16,440 And so most of the work of this talk is like, how do we go through 100,000 shells and figure out which ones are interesting? 132 00:10:16,440 --> 00:10:19,800 It's mostly just like scrolling through shells by the millions and just trying to figure it out. 133 00:10:20,380 --> 00:10:24,840 So, we found about nine unique vulnerabilities, but this whole test last year was only limited to port 22. 134 00:10:25,560 --> 00:10:28,260 And we found like, there's some of the fun bugs we found last year. 135 00:10:28,260 --> 00:10:32,060 For ruckus wireless APs, we found like a pre-authentication command injection bug. 136 00:10:32,120 --> 00:10:34,700 For digi transports, you can just straight up off bypass. 137 00:10:34,960 --> 00:10:39,840 This one is really funny because it was only exploitable if you had an SH into the machine since last reboot. 138 00:10:39,860 --> 00:10:42,420 So, we're working with a vendor, and the vendor's like, we cannot reproduce this. 139 00:10:42,420 --> 00:10:45,540 Ends up because they're shelling in, setting up the debugging tool, then they'd run the exploit. 140 00:10:45,540 --> 00:10:46,600 The exploit wouldn't work. 141 00:10:46,600 --> 00:10:48,040 But if they reboot it, the exploit would work. 142 00:10:48,040 --> 00:10:50,020 And it took like months to figure out that it was a stupid case. 143 00:10:50,020 --> 00:10:51,100 It was like a Heisen bug for them. 144 00:10:51,100 --> 00:10:52,400 It drove us all crazy. 145 00:10:52,780 --> 00:10:57,920 We also found fun bugs in Panasonic switches, real text , soft serve, gogs, all kinds of fun stuff. 146 00:10:58,240 --> 00:11:06,360 We also found the silliest bug ever in Windows, OpenSH for Windows, where they took the most sensitive function in the entire OpenSH code base and backdoored it by accident. 147 00:11:06,560 --> 00:11:13,320 So, they, there's a timing safe binary comparison function that made carriage return line feed aware, which just breaks everything. 148 00:11:13,320 --> 00:11:14,580 It's no longer timing safe. 149 00:11:14,580 --> 00:11:16,580 It actually leaks memory now, things like that. 150 00:11:16,740 --> 00:11:21,300 One of the fun bugs that, like, didn't get fixed at all was actually the unlimited public key testing. 151 00:11:21,420 --> 00:11:25,460 So, DropBear is the number two most common SH demon out there. 152 00:11:25,460 --> 00:11:31,100 We reported to the DropBear folks, hey guys, you can, like, test millions of pub keys per second against your server just by grinding away on them. 153 00:11:31,100 --> 00:11:37,100 Like, you can take the whole GitHub 117 million user database, grind it against a DropBear box, and tell you which of those keys work in that machine. 154 00:11:37,180 --> 00:11:38,420 And they just kind of shrugged. 155 00:11:38,420 --> 00:11:40,040 So, you can still do that today with DropBear. 156 00:11:40,040 --> 00:11:40,660 It's great. 157 00:11:42,060 --> 00:11:44,060 So, 12 months later, like, what's changed? 158 00:11:44,060 --> 00:11:44,700 What are the new bugs? 159 00:11:44,700 --> 00:11:45,480 What did we find? 160 00:11:45,580 --> 00:11:49,860 Funny enough, like, if you look at the number of SHs on the internet, it's actually back down to 2018 levels. 161 00:11:49,860 --> 00:11:52,740 We've actually, like, have less 22 open to the world than before. 162 00:11:52,940 --> 00:11:58,860 So, it looked like there's a big spike of, like, new kind of tar pits and kind of, you know, fake anti-malware thingies. 163 00:11:58,860 --> 00:12:00,780 And eventually, most of them have been shut down again. 164 00:12:00,780 --> 00:12:04,520 So, weirdly enough, we're back to the exact same level of SH on the internet as 2018. 165 00:12:04,760 --> 00:12:06,000 And this is the Shodan data. 166 00:12:06,000 --> 00:12:09,500 We also ran our own V4 scans and compared them to see, like, how different they were. 167 00:12:09,540 --> 00:12:10,500 And they lined up pretty well. 168 00:12:11,060 --> 00:12:13,520 Another interesting thing is the OpenSH. 169 00:12:13,520 --> 00:12:15,140 Has anyone here used fail to ban before? 170 00:12:16,020 --> 00:12:16,320 Cool. 171 00:12:16,320 --> 00:12:16,620 Great. 172 00:12:16,620 --> 00:12:16,840 Okay. 173 00:12:16,840 --> 00:12:16,980 Yeah. 174 00:12:16,980 --> 00:12:23,240 So, fail to ban is the thing that watches your log files and then when it sees a bunch of failed off attempts, it, like, they see black holes or bans the person. 175 00:12:23,340 --> 00:12:24,320 It's a really dumb thing. 176 00:12:24,320 --> 00:12:26,620 Like, we do it because we have to because there's nothing out there better. 177 00:12:26,620 --> 00:12:30,920 So, OpenSH finally added a built in rate limiter into OpenSH itself. 178 00:12:30,940 --> 00:12:34,800 And it's great because it will prevent a lot of these, like, attacks that require multiple attempts and so on. 179 00:12:34,800 --> 00:12:37,400 It actually, like, kills most useful exploits for SH. 180 00:12:37,580 --> 00:12:38,880 Unfortunately, no one uses the damn thing. 181 00:12:38,880 --> 00:12:40,660 It's only 9.8 and newer. 182 00:12:40,660 --> 00:12:42,480 So, no one's actually using the new version of OpenSH. 183 00:12:42,580 --> 00:12:47,960 So, if you look at the number of devices that are unpatched or, sorry, that don't support this internet, it is, it's all of them. 184 00:12:47,960 --> 00:12:52,240 Like, it's basically made no impact to the exposure of the world because no one's adopted newer versions of OpenSH. 185 00:12:52,520 --> 00:12:53,500 So, it will get fixed eventually. 186 00:12:53,500 --> 00:12:55,000 But right now, almost nobody's using it. 187 00:12:55,000 --> 00:13:01,540 It's like 500K or less out of the 14 odd million are even running a version that supports this rate limiting by default. 188 00:13:02,560 --> 00:13:13,280 So, another useful thing is we thought, okay, let's look at, like, not just port 22, but every port that Shodan has ever found SH on and let's scan all of those across all IPV4 and then compare that with the Shodan results and see, like, what's different, 189 00:13:13,280 --> 00:13:13,460 right? 190 00:13:13,460 --> 00:13:15,460 Like, Shodan typically will do a roll up. 191 00:13:15,460 --> 00:13:19,440 So, they'll say for a given scan, we've seen everything last 30 days and we'll give you stats. 192 00:13:19,440 --> 00:13:21,380 You're not really searching a single day of data with Shodan. 193 00:13:21,380 --> 00:13:23,120 You're searching, like, a 30 day roll up. 194 00:13:23,120 --> 00:13:24,760 We did a single flash snapshot. 195 00:13:24,760 --> 00:13:29,140 Like, the whole internet in, like, a one hour period, bang, on a really big server to snapshot everything real quick, go. 196 00:13:29,240 --> 00:13:35,300 So, you'll see some differences here, like, in port 9022, for example, there's only a tiny little bit of Shodan, a whole lot of our shambles stuff. 197 00:13:35,300 --> 00:13:39,140 Other cases, opposite, where Shodan found a whole lot of stuff, we found very little. 198 00:13:39,140 --> 00:13:42,940 And that's because those devices were changing IPs a lot, so they're getting double counted over a 30 day period. 199 00:13:43,160 --> 00:13:44,760 But, generally, you can trust Shodan . 200 00:13:44,760 --> 00:13:48,940 Like, we did a unfiltered, no exclusions, we just scanned everybody whether they liked it or not. 201 00:13:48,940 --> 00:13:50,920 And the results lined up really well with Shodan. 202 00:13:50,920 --> 00:13:58,060 So, if you're ever worried, like, oh, is Shodan hiding much results, it's not correct, it's actually pretty accurate and our research really shows that it's dependable. 203 00:13:59,100 --> 00:14:04,000 So, starting over from, like, okay, what did 2025 look like versus 2024 from a scan from a couple of days ago? 204 00:14:04,000 --> 00:14:15,260 We found more SH servers, about 23 million, down from 27 million with a port open, but still about 14 million that have SH authentication, still about 107,000 sessions, about 110,000. 205 00:14:15,340 --> 00:14:17,600 So, effectively, there's no real change. 206 00:14:17,600 --> 00:14:21,740 Like, in terms of actual exposed SH daemons, there wasn't really a big impact between last year and this year. 207 00:14:21,740 --> 00:14:25,720 So, we went ahead and said, let's go scan other 110 top SH ports. 208 00:14:25,820 --> 00:14:30,860 That added another 2.3 million daemons and another 20,000 more shells and we found a lot more bugs. 209 00:14:31,320 --> 00:14:32,380 So, yay, more zero day. 210 00:14:33,920 --> 00:14:37,240 So, what was really sad, though, is we went back and looked at all the machines that we found last year. 211 00:14:37,240 --> 00:14:41,820 So, all the Digi routers, all the machines we found new fun bugs on and we had a big list of them, right? 212 00:14:41,820 --> 00:14:45,300 Some of these even spit out the serial number of the device, know exactly who they are, what they were, etc. 213 00:14:45,560 --> 00:14:51,680 And in case like Digi, we even told Digi, the company, here's a list of all the serial numbers of affected devices, please tell your users to patch it. 214 00:14:51,720 --> 00:14:52,600 Nobody patched anything. 215 00:14:52,600 --> 00:14:54,140 It's actually worse than it was last year. 216 00:14:54,280 --> 00:15:00,200 So, we've actually found more vulnerabilities in the stuff we released and patched in advisory last year than we did this year. 217 00:15:00,200 --> 00:15:01,700 Like, it's this year than last year. 218 00:15:02,120 --> 00:15:03,100 So, no one cares. 219 00:15:03,160 --> 00:15:06,560 So, you can do all the research you want, you can tell the world, but no one is going to patch your stuff. 220 00:15:06,560 --> 00:15:08,040 So, whatever, have fun, hack things. 221 00:15:09,380 --> 00:15:14,100 What was interesting, though, is we started digging into like the other odd ports and we started finding all kinds of other interesting stuff. 222 00:15:14,200 --> 00:15:17,640 So, of those 130,000 shells we found, about 50,000 are like real things. 223 00:15:17,640 --> 00:15:19,120 Some of those are definitely honeypots. 224 00:15:19,120 --> 00:15:20,720 We've got a really good honeypot fingerprinter. 225 00:15:20,840 --> 00:15:25,800 Like, for example, if you connect to an open stage port and it gives you the banner and that's it, it's probably open stage. 226 00:15:25,800 --> 00:15:29,440 It gives you the banner and then also skews the kex in its string, it's probably honeypot. 227 00:15:29,440 --> 00:15:31,960 So, that's a super easy way to find like all the pyramico based honeypots. 228 00:15:31,960 --> 00:15:34,520 They just do the handshake slightly differently and it's easy to check. 229 00:15:34,940 --> 00:15:39,500 Sonic walls will authenticate you in and then you can basically do authentication on top of that. 230 00:15:40,100 --> 00:15:44,500 And then about 14,000 new bugs are these carrier ethernet switches that are all across Asia. 231 00:15:44,760 --> 00:15:46,380 Basically, they run like most of Thailand. 232 00:15:46,520 --> 00:15:48,080 And these things are just straight pop shell done. 233 00:15:48,080 --> 00:15:48,700 It's great. 234 00:15:49,360 --> 00:15:50,660 So, I'll go into some details. 235 00:15:50,840 --> 00:15:57,080 So, hopefully this isn't too flashy, but this is just what it looks like when you're scrolling through 130,000 sessions trying to find new zero day. 236 00:15:57,100 --> 00:15:59,600 It's just a lot of grepping until you find new fun stuff. 237 00:16:00,820 --> 00:16:01,620 So, the new bugs. 238 00:16:01,620 --> 00:16:05,320 First one I mentioned, these are all pending disclosure because we only found them a couple days ago. 239 00:16:05,620 --> 00:16:12,620 But this one is fun because it's not just the port 10, it's port 1022 is a national real SHL. 240 00:16:12,620 --> 00:16:21,620 But then if you scan port 830, similar to Cisco, it's a net conf D yang thing where it's a big XML blob and you can reconfigure the router by sending an XML back to it and things like that. 241 00:16:21,660 --> 00:16:23,700 So, funny enough, this off bypass works in both. 242 00:16:23,700 --> 00:16:28,380 You're able to basically send your SH off method to be a single null byte and it just logs you with no press, which is great. 243 00:16:28,680 --> 00:16:31,080 The other fun one you found was this post SH fail log in. 244 00:16:31,080 --> 00:16:34,060 So, this is PBX, it's kind of an older PBX. 245 00:16:34,280 --> 00:16:38,400 And when you first connect to it, it bypasses off, drops you to a username password log in. 246 00:16:38,460 --> 00:16:42,360 Once you fail the username and password three times in a row, it drops you to a shell. 247 00:16:43,080 --> 00:16:43,720 It's great. 248 00:16:43,920 --> 00:16:46,800 So, all you have to do is fail the log in three times and then you get a free shell. 249 00:16:46,800 --> 00:16:47,740 And then from there, you're done. 250 00:16:47,740 --> 00:16:49,240 It's like, it's the dumbest thing ever. 251 00:16:49,600 --> 00:16:54,460 Another fun one we found last year is that you connect to an SH port and then you see, like, escape key is blah. 252 00:16:54,460 --> 00:16:56,380 And you're like, wait, did you just telnet from my SH? 253 00:16:56,380 --> 00:16:56,940 Yes. 254 00:16:57,000 --> 00:17:02,280 And you can do, like, the control bang, like, a control escape bracket to open up the telnet prompt and then tell it to just do whatever. 255 00:17:02,440 --> 00:17:05,360 So, there's lots of fun, like, kind of mini sub shell escapes like that. 256 00:17:05,980 --> 00:17:08,220 And the last one we found that was, like, absolutely hilarious. 257 00:17:08,220 --> 00:17:14,360 There's a Chinese ISP that requires you to run their own sneaky little SH daemon on a high port and it's contractually required. 258 00:17:14,540 --> 00:17:19,960 There are bastion host services in their EULA saying, we will not support you in your cloud service unless you run our special daemon. 259 00:17:20,140 --> 00:17:23,080 Well, this special daemon, of course, has an off bypass and it's parameco. 260 00:17:23,080 --> 00:17:25,520 So, you give it any public key and it drops into a shell. 261 00:17:25,520 --> 00:17:27,600 These are none, uppercase N, because it's Python. 262 00:17:27,820 --> 00:17:32,320 And then you basically have a little mini DMC prompt, reboot the machine, reimage it, whatever, things like that. 263 00:17:32,320 --> 00:17:33,460 Get the serial console. 264 00:17:33,580 --> 00:17:38,720 So, it's really funny that the ISP in this case contractually obligated a backdoor that was triffled exploit. 265 00:17:39,380 --> 00:17:44,620 So, when you do internet scans, something I want to bring out there is there's always a way to get bonus vulnerabilities and I recommend you do this. 266 00:17:44,620 --> 00:17:48,800 If you're ever going to scan the internet, the very first thing you should ever do is run responder on the same machine. 267 00:17:48,980 --> 00:17:53,720 So, get an internet box, set up responder, just run it right now, set up T-speed up in the background too while you're at it. 268 00:17:53,900 --> 00:17:57,120 There's also a tool called Flamingo that I wrote with Tom Steele at Atreides Partners. 269 00:17:57,120 --> 00:17:57,700 That's a lot of fun. 270 00:17:57,700 --> 00:17:59,180 That actually covers a few other protocols. 271 00:17:59,320 --> 00:18:04,260 We're in the middle of porting over SMB to Flamingo, so it'll do all of responders soon and it'll just be one nice go binary. 272 00:18:04,440 --> 00:18:05,620 So, we'll have that done soon. 273 00:18:05,620 --> 00:18:12,220 But basically, you run both these daemons at once and then whenever you start triggering scans and attacks, random machines on the internet start throwing in the password to you. 274 00:18:12,660 --> 00:18:19,760 So, going back to 2014, I did an internet wide scan of SH and I collected 5,000 domain admin credentials by all Palo Alto's customers. 275 00:18:19,760 --> 00:18:25,980 Because Palo Alto machines have a thing called user ID and they were configured to then connect into the attacking machine to find out which users logged in. 276 00:18:25,980 --> 00:18:29,060 But they didn't know that they weren't supposed to do that on the internet too. 277 00:18:29,160 --> 00:18:33,480 So, you could attack them from the internet and then collect their domain admin credentials through NTLM and you're done. 278 00:18:33,480 --> 00:18:36,960 You just own the machine because the Palo Alto gave you the domain admin cred. 279 00:18:37,120 --> 00:18:44,740 So, if I did this with the entire internet, one of the big African national airlines still has the Palo ID user ID set up this way and we still got their domain admin cred. 280 00:18:44,880 --> 00:18:46,900 What's interesting though is we actually got another new bug. 281 00:18:46,900 --> 00:18:52,440 So, watch guard firewalls decided that they wanted to be cool like Palo Alto 2 and they started throwing their passwords at all of you as well. 282 00:18:52,440 --> 00:18:54,020 So, there's some random zero day in watch guard. 283 00:18:54,020 --> 00:18:55,400 I don't even know how the hell it's set up. 284 00:18:55,400 --> 00:19:03,940 But we started just getting thousands of random watch guard domain admin creds flying into our scanning machine just because they decided to connect back when they got an alert from a port scanner. 285 00:19:03,980 --> 00:19:05,040 So, free zero day. 286 00:19:05,040 --> 00:19:07,360 I don't know what useful it is but it's a good reminder. 287 00:19:07,360 --> 00:19:11,120 Always run T speed up, always run responder when you're doing scans because you get bonus zero day. 288 00:19:11,420 --> 00:19:15,380 So, I'm about to run out of time here but shamble, got some new features, lots of new stuff. 289 00:19:15,480 --> 00:19:17,260 You can skip known versions. 290 00:19:17,260 --> 00:19:18,960 You can say I don't want to do weird stuff in OpenSH. 291 00:19:18,960 --> 00:19:20,900 I just want to only focus on the weird stuff. 292 00:19:21,120 --> 00:19:24,060 You can give us some red jacks, some new off bypass stuff. 293 00:19:24,100 --> 00:19:28,400 We added the Hano box bad keys database which lists all the known leaked keys. 294 00:19:28,420 --> 00:19:37,240 He also did an amazing work of dumping the Fortinet major leak and pulling all the Fortinet appliance keys out of it and adding that to the block chain look up thing. 295 00:19:37,680 --> 00:19:44,640 So, you can basically use it to find out are any of the SH keys in your environment already compromised and now shamble will tell you it's part of it. 296 00:19:44,660 --> 00:19:46,020 Whole bunch of built in checks. 297 00:19:46,340 --> 00:19:48,880 Lots of kind of usage information here for running it. 298 00:19:48,880 --> 00:19:49,900 You can do almost anything with it. 299 00:19:49,900 --> 00:19:52,000 Like, is a stale SH key still being used? 300 00:19:52,000 --> 00:19:53,800 Is the default password still working anywhere? 301 00:19:53,800 --> 00:19:57,500 It's kind of like a everything utility Swiss army knife for doing SH testing. 302 00:19:57,820 --> 00:20:00,060 And then lastly, you get an interactive shell. 303 00:20:00,060 --> 00:20:06,940 So, you can do control E and like, you know, make TCP IP 40 and do some port scanning and things like that all from the shell as opposed to having to like create your own SH client. 304 00:20:07,320 --> 00:20:09,080 And if you don't like our tool at all, that's cool. 305 00:20:09,080 --> 00:20:12,000 We're actually in the middle of porting shamble into nuclei itself. 306 00:20:12,020 --> 00:20:18,600 So, if you use a nuclei scanner, we're hopefully going to have all the same shamble checks available as nuclei templates soon and share the same code base. 307 00:20:18,600 --> 00:20:22,000 You can just run nuclei like normal and get all these fun bugs dropping out on nuclei side. 308 00:20:22,140 --> 00:20:23,480 So, that is the talk. 309 00:20:23,480 --> 00:20:24,400 Thank you so much.