1 00:00:00,000 --> 00:00:01,460 Good morning everyone. 2 00:00:01,460 --> 00:00:08,840 My name is Julian Blanco and I'm going to be giving a talk on C2 over maritime automatic identification system and commercial aggregation websites. 3 00:00:08,980 --> 00:00:15,720 A couple favors, if I'm talking too fast, if I'm talking too quietly, please somebody throw something at me, let me know. 4 00:00:15,720 --> 00:00:20,360 I hate public speaking so let's keep this as informal as possible. 5 00:00:21,540 --> 00:00:29,220 Alright, so the abstract I submitted for this talk was that AIS is a worldwide program that assists vessels in preventing collisions at sea. 6 00:00:29,220 --> 00:00:37,600 By compromising an endpoint connected to a vulnerable AIS transmitter or connecting a software defined radio to a traditional IT network, one can bypass web filters, blah blah blah. 7 00:00:38,040 --> 00:00:45,720 Basically the idea is that we have this system known as AIS that works pretty much all over the world on land and at sea. 8 00:00:45,720 --> 00:01:01,240 On land because we have satellites that pass over, we have terrestrial towers that pick up the signal and anywhere the signal can be picked up it can then be rebroadcast because it's a mesh protocol and it's collected into a bunch of websites and published. 9 00:01:01,620 --> 00:01:08,260 And what that allows you to do is create a low bandwidth throughput connection to wherever you want. 10 00:01:08,260 --> 00:01:26,040 And because you're connecting to a bunch of random websites it's almost anonymous because you'd have to go through a monumental task of trying to figure out who is accessing what websites, where they're coming from with a couple of hops you basically have a nearly anonymous C2 source that I will talk about a little bit later. 11 00:01:26,560 --> 00:01:27,600 Um, who am I? 12 00:01:27,600 --> 00:01:31,400 In my professional life I'm a Coast Guard officer stationed at Coast Guard Cyber Command. 13 00:01:31,400 --> 00:01:32,780 I like doing DFIR. 14 00:01:32,780 --> 00:01:34,260 My background is in electrical engineering. 15 00:01:34,260 --> 00:01:36,420 I do all cyber IT stuff now. 16 00:01:36,420 --> 00:01:41,860 Um, and this talk is completely mine, not the views of the government and this is not government sponsored work. 17 00:01:42,800 --> 00:01:45,900 Uh, I'd like to give a shout out to my best friend Trey Maxim. 18 00:01:45,900 --> 00:01:49,900 He helped me tremendously and I'm building off of some of his previous work. 19 00:01:49,900 --> 00:01:53,560 I wish he could be here giving the talk with me but he could not make it out to Vegas. 20 00:01:53,780 --> 00:01:59,120 Um, so we've been working on this together and this is probably more his than mine. 21 00:01:59,160 --> 00:02:01,340 Um, but we've been working on this for a while. 22 00:02:01,940 --> 00:02:03,780 So, why do we care? 23 00:02:03,900 --> 00:02:07,920 AIS is a system that is crucial to the maritime industry. 24 00:02:08,060 --> 00:02:18,940 Uh, it's regu- it's required by SOLAS, which is Safety of Life at Sea, and all international ships with 300 or more gross tonnage and all passenger ships regardless of size has to have this system on. 25 00:02:18,940 --> 00:02:21,800 And when it has to have this system, it's not just receive, it's transmit. 26 00:02:21,800 --> 00:02:25,800 So all of these devices, all of- are on commercial ships. 27 00:02:25,800 --> 00:02:27,180 They are transmitting. 28 00:02:27,180 --> 00:02:31,540 They have, uh, transmitters on them that could be useful. 29 00:02:31,680 --> 00:02:32,780 Do not know. 30 00:02:34,080 --> 00:02:35,280 How does it help? 31 00:02:35,280 --> 00:02:41,360 So, why we have this system is basically if you're looking at your radar screen and this is not very helpful. 32 00:02:41,360 --> 00:02:50,960 I mean, it's helpful, you can see things are coming at you, but if I want- was on a collision course with one of these vessels, it's really hard to see, hey, I need to basically look at the window. 33 00:02:50,960 --> 00:02:58,220 If I'm in fog, it makes it even harder and say, hey, vessel, you know, white with a black superstructure, uh, come back on the radio. 34 00:02:59,280 --> 00:03:12,300 With AIS, basically it overlays, uh, who they are, where they're heading, how large they are, their speed is, and now I can just go, hey, vessel Castello, come back on the radio, let's talk, let's pass port to port however we need to. 35 00:03:12,340 --> 00:03:23,780 And it can also be used with- since it's going to be broadcasting their speed, if they're outside of radar, we can pick them up farther and maybe we can even plan a course around them that's not going to be a collision course whatsoever. 36 00:03:25,120 --> 00:03:39,840 Uh, there's some previous work, so back at Black Hat in 2014, I believe, uh, Embright did a AIS exposed where he talked about the protocol that was very vulnerable, did not have any security built into the protocol, um, and they did a whole bunch of cool things. 37 00:03:39,840 --> 00:03:48,060 They did a lot of spoofing, they did a lot of jamming, they filled up all the time slots in the AIS, uh, and basically didn't allow legitimate traffic to transmit. 38 00:03:48,220 --> 00:03:57,060 Um, and then my buddy Trey and his partner Shano did, uh, a lot of work doing- with software-defined radios, they created their own protocol, um, to be able to transmit. 39 00:03:57,060 --> 00:04:09,760 Trend Micro also has theirs publicly, uh, on their GitHub, if you want to use their thing to create your own AIS transmitter, uh, I've never been able to get their code to work, but supposedly it does, so there's that as well. 40 00:04:10,840 --> 00:04:27,340 Alright, so, kind of talked about AIS a little bit, basically here you can see, this is just a cheesy infographic that the signal's mesh, if I can't see the land base, uh, receiver, it'll transmit over to a ship and then another ship will bounce that signal to land. 41 00:04:27,340 --> 00:04:32,940 It is a mesh protocol, that way it gets, uh, maximum effectiveness and coverage. 42 00:04:32,940 --> 00:04:42,140 It is on VHF, um, and I believe the frequency is 161.975 is the first channel, and 162.025 megahertz is the second. 43 00:04:42,140 --> 00:04:59,900 It is, uh, GMSK, which is really annoying to work with, uh, if you're not familiar with GMSK, instead of, uh, modulating the actual carrier signal, it modulates the phase to encode the data into the carrier signal, um, which is, it works, uh, it's just a little less documented and a little harder to work with, 44 00:04:59,900 --> 00:05:02,300 with, uh, software defined radios. 45 00:05:03,780 --> 00:05:10,440 So, my buddy Trey, when they built their own software defined radio, this is what their GNU radio block ended up looking like. 46 00:05:10,440 --> 00:05:23,280 They basically had a sync where they created what their message they wanted to look like, they created that in Python, created it into a text file, shoved it into GNU radio, and basically did all this math to get it to actually broadcast a signal. 47 00:05:24,640 --> 00:05:27,660 Um, this is what their GMSK ended up looking like. 48 00:05:27,840 --> 00:05:29,440 This is what it looks like demodulated. 49 00:05:29,440 --> 00:05:35,960 You can see the signal, um, all the ones and zeros were then transmitted and received on the other end. 50 00:05:37,360 --> 00:05:40,240 Uh, this is the actual block of Python that they used. 51 00:05:40,500 --> 00:05:46,480 So, what it looks like is something like this, excuse the horribly code, and this is probably way too small to see. 52 00:05:46,880 --> 00:05:58,860 Basically, we would plug in an MSSI number, um, what we wanted to name, the ship type, uh, the draft, what their destination was, and we just shoved it into a bunch of hex and transmitted it. 53 00:05:58,860 --> 00:06:09,420 I will, we're going to publish all this stuff open source once we get it a little bit better documented and commented, um, so don't feel like you need to take pictures of this, we will put it out there. 54 00:06:10,960 --> 00:06:21,900 Um, but basically the goal was to be able to take something modular, uh, in this case Python, that's pretty easy to work with for anybody, and use that to be able to create new transmissions. 55 00:06:21,900 --> 00:06:37,140 Whether that's because you want to legitimately, hey, we want to not buy an expensive, uh, transceiver to put on our boat, we want to just use the software to find radio for 150 bucks, have our own, uh, MSSI number put in registration to the FCC and have basically a low cost, 56 00:06:37,140 --> 00:06:42,940 uh, transmitter, just cause let's say we're doing a regatta sailing, a lot of people like to do that. 57 00:06:43,100 --> 00:06:49,540 Um, but that's why we wanted to create a modular, it also because it's modular is able, easy to be used for nefarious purposes. 58 00:06:50,000 --> 00:06:51,680 So, we had some fun with it. 59 00:06:51,680 --> 00:06:56,520 Uh, this is an example where we spit out a bunch of coordinates and, uh, created a bunch of tracks. 60 00:06:56,520 --> 00:07:13,440 Uh, we did this null terminated into another software to find radio and then picked up in, uh, OpenCPN, so this was not broadcast, it looks like Cape Cod, um, but because we have this modular piece of Python that we can create new AIS, uh, messages, then it makes it really easy to spit out, 61 00:07:13,440 --> 00:07:16,280 in this case, a smiley face or whatever we wanted to do with it. 62 00:07:16,560 --> 00:07:25,960 Now, why this is important is, uh, when we want to generate messages, let's say for creating C2, the idea is we're not going to be broadcasting a legitimate target. 63 00:07:25,960 --> 00:07:28,460 We're going to be broadcasting an illegitimate target. 64 00:07:28,460 --> 00:07:30,540 Now, could it look like a legitimate target? 65 00:07:30,540 --> 00:07:30,800 Sure. 66 00:07:30,800 --> 00:07:38,020 We have a vessel, we make it look like it's navigating, uh, but let's say the least significant digits of the coordinates or something in the info field. 67 00:07:38,080 --> 00:07:55,200 We are encoding data into there, uh, depending on how much data we want to get through and how, uh, much risk we're willing to be taking and whether we want to be detected or not, kind of determines whether we want to just use like one single digit on the back of the lat and long or if we're just going to put a bunch of, 68 00:07:55,200 --> 00:08:00,920 let's say, encrypted or encoded text into the info, uh, field of the AIS message. 69 00:08:02,440 --> 00:08:07,800 Uh, so, some of the benefits of doing C2 over AIS is it could be extremely hard to trace. 70 00:08:07,800 --> 00:08:09,780 It can bypass your IDS and IPS. 71 00:08:09,780 --> 00:08:21,720 If you have a traditional SATCOM, uh, IP connectivity on your ship and you're beaconing traffic, most of the time these are really small links, um, maybe 250 kilobits per second, five or six endpoints. 72 00:08:21,720 --> 00:08:34,020 If you were having legitimate, let's say, C2 over a common , let's say, a meterpreter shell or a power shell empire, it's probably pretty easy to pick up in your IPS, especially since there's not going to be a lot of traffic leaving the vessel. 73 00:08:34,100 --> 00:08:43,520 If you were to do something with a, either a radio link or over AIS, your traditional SOC is not going to be able to notice it. 74 00:08:43,980 --> 00:08:46,260 Uh, it allows us to connect to air gap networks. 75 00:08:46,260 --> 00:08:52,820 If we're at ship and they don't have a SATCOM unit, then we could use AIS as a possible another venue to talk to that air gap network. 76 00:08:52,820 --> 00:08:59,620 Whether that's on the engine control network, on their traditional IT network, or if we just want to foothold on their network to be able to do something. 77 00:08:59,660 --> 00:09:01,280 And it works on land and sea. 78 00:09:01,280 --> 00:09:02,780 It's not just limited to vessels. 79 00:09:02,800 --> 00:09:14,240 If we wanted to use this method and go plug a software defined radio into a workstation in a bank in Miami, there's plenty of towers in that area that are going to pick up that signal and vessels that are going to relay that signal. 80 00:09:14,240 --> 00:09:24,280 If we created a fake vessel that's just sitting in one of the ports and just shove this on a traditional endpoint in a bank, uh, you could smuggle C2 out that way. 81 00:09:24,320 --> 00:09:26,180 Is it going to be used? 82 00:09:26,180 --> 00:09:26,820 Probably not. 83 00:09:26,820 --> 00:09:37,100 It's a very niche, um, but it just highlights a vulnerability in the AIS protocol and the fact that there's no security, um, which has been discussed before and I'm not going to really talk about here. 84 00:09:37,400 --> 00:09:39,040 Um, but yeah. 85 00:09:39,040 --> 00:09:41,040 So detractors, it is easy to detect. 86 00:09:41,040 --> 00:09:49,820 Because all these signals are picked up and you're probably going to have to use an illegitimate MMSI number or an MMSI number of a ship that is already broadcasting. 87 00:09:50,260 --> 00:09:54,000 Uh, you're probably going to get, it's going to be noticed. 88 00:09:54,000 --> 00:09:56,680 Whether it's going to be traced back to you, who knows? 89 00:09:56,840 --> 00:09:58,080 Um, it is very niche. 90 00:09:58,080 --> 00:10:00,560 You're not going to get a lot of data and it's expensive. 91 00:10:00,640 --> 00:10:08,580 Um, if you have to plant a software defined radio or, uh, like let's say one of these, this is a Lime SDR. 92 00:10:08,580 --> 00:10:09,200 These are tiny. 93 00:10:09,200 --> 00:10:11,040 This would be really easy to plant onto a ship. 94 00:10:11,040 --> 00:10:12,640 Nobody would ever notice it. 95 00:10:12,680 --> 00:10:15,820 Um, either on a Raspberry Pi or directly into one of their endpoints. 96 00:10:16,540 --> 00:10:22,260 It's going to cost you between 200 bucks a pop for each thing you're going to try to create a transmitter on. 97 00:10:22,720 --> 00:10:26,740 Whether that's expensive to you or not depends on your threat model and who you're going up against. 98 00:10:28,200 --> 00:10:32,520 So let's talk , uh, how would you get that signal off? 99 00:10:32,640 --> 00:10:40,160 So one way you could get the signal off is sit there with another software defined radio or legitimate AIS receiver and pick up the signal. 100 00:10:40,280 --> 00:10:49,400 Now, why that is not maybe your best option is because if you're within radio distance of your target, then you're probably pretty easy to find. 101 00:10:49,560 --> 00:10:54,900 Um, one thing you could do is wait for it to be picked up on either ShipTracker or MarineTraffic.com. 102 00:10:54,900 --> 00:11:03,600 And these are commercial aggregation websites that show basically, um, all of your ships in real time. 103 00:11:03,600 --> 00:11:09,960 So if we take a look at all the AIS targets that are out in the world right now, you can see there's a whole lot of stuff out there. 104 00:11:10,060 --> 00:11:12,960 Um, would someone notice an extra dot on this map? 105 00:11:13,020 --> 00:11:14,560 Uh, maybe, maybe not. 106 00:11:14,560 --> 00:11:19,080 There's also some weird dots on here like this one over here in Vegas, uh, not in Vegas, but in Nevada. 107 00:11:19,180 --> 00:11:25,020 Not really sure what that one is, but that also shows that there is pretty good coverage inland in the United States. 108 00:11:25,140 --> 00:11:30,140 And if you look in some of these major rivers in Europe, there's also a lot of coverage over there. 109 00:11:33,040 --> 00:11:46,360 Uh, so what you do is you would basically scrape the website and you would pull, depending on however you're encoding your message, whether you encode it in the coordinates, do you encode it in the info field, or even in the name of the AIS ship that you're broadcasting. 110 00:11:46,500 --> 00:11:52,080 Uh, you would put your signal in there, put your message in there, and then you would pick it up on one of these commercial websites. 111 00:11:52,460 --> 00:12:07,280 Uh, if somebody, let's say, knew that was an illegitimate target, uh, whether let's say the government or somebody who's really curious, they would have to rely on cooperation from the website to be able to say, hey, give us your access dot logs, let's pull all the IP addresses of who's reaching out to your website. 112 00:12:07,280 --> 00:12:11,340 And at that point, it's really hard to be able to pinpoint, uh, who that is. 113 00:12:11,340 --> 00:12:23,600 So, is it possible to then trace from, I plugged a software defined radio into a ship, it broadcasts a signal, and then I go on the other end and I know what website I want to use, or what multitude of websites I'm going to use. 114 00:12:23,900 --> 00:12:28,240 Technically, yes, it is possible to trace all that way back, although it would be very, very difficult. 115 00:12:31,880 --> 00:12:43,040 Uh, bypass IDS IPS, because you're going to be routing your traffic through the AIS transmitter, it's not going to go through your traditional network, I think I talked about that a little bit, um, especially on ships where you don't have a lot of throughput, 116 00:12:43,040 --> 00:12:45,380 this might be important depending on who you are. 117 00:12:45,940 --> 00:12:47,960 And, uh, works on LAN and C. 118 00:12:49,860 --> 00:12:51,700 And, that's not really important. 119 00:12:54,780 --> 00:12:56,680 Uh, air gaps is another one. 120 00:12:59,400 --> 00:13:05,300 And what we're going to be hoping to do in the next couple months is we want to rewrite everything from GNU radio over to SOAP ESDR. 121 00:13:05,300 --> 00:13:10,680 Uh, this is an all Python based module that's cross platform, works on Linux, Mac, Windows. 122 00:13:10,680 --> 00:13:17,680 Uh, the reason we want to do this is GNU radio is kind of heavy, um, it's very well documented, but it is annoying to work with. 123 00:13:17,680 --> 00:13:24,800 By switching to SOAP ESDR, we can put it even on the smallest of a Raspberry Pi and be able to, you know, transmit our signal that way. 124 00:13:24,800 --> 00:13:27,940 Plus working in purely Python is preferable to us. 125 00:13:28,020 --> 00:13:43,280 Uh, we did all of our previous work on, um, really expensive software defined radios, so we're hoping to get it working on either a Hack RF1 or a Lime SDR Mini, uh, just to bring the cost down from, uh, you know, expensive USRPs that are, let's say $8,000 126 00:13:43,280 --> 00:13:47,140 once you buy the right daughterboards to transmit on the signals that you want. 127 00:13:47,300 --> 00:13:49,880 And, uh, we're going to be open, open sourcing the tools soon. 128 00:13:50,060 --> 00:14:04,740 Uh, basically what we'd like to hit is reliable transmission and then commented that way other people can not just look at our code and make fun of us, um, and be able to improve and hopefully make this a useful tool that obviously is not going to be widespread, 129 00:14:04,740 --> 00:14:14,820 but for a niche client, uh, if you're trying to work with an AS, uh, or work with a maritime client, you can say, hey, this is another, uh, method that you should be aware of. 130 00:14:14,840 --> 00:14:17,480 Probably not going to happen, but another thing to throw in your report. 131 00:14:19,000 --> 00:14:20,480 And, uh, I think that's it. 132 00:14:20,580 --> 00:14:27,840 Uh, we're going to be putting it up on my GitHub, so I'll put these slides are going to be up there later, uh, and this is where we will put the code once we're done. 133 00:14:29,120 --> 00:14:33,880 I got about five minutes for questions before the next person needs to set up. 134 00:14:37,090 --> 00:14:38,130 Cool. 135 00:14:38,130 --> 00:14:39,310 Appreciate it. 136 00:14:42,090 --> 00:14:43,030 Yep. 137 00:14:43,030 --> 00:14:50,570 You mentioned, uh, it would be easily detectable to the, uh, MMSI, the only register that can be not a real ship. 138 00:14:50,570 --> 00:15:06,510 Uh, if there are anything stopping you from, for example, uh, more software to find radio, for example, listening or legitimate trapping and then sending out essentially identical, uh, ship and maybe a modified MMSI number that we then overlay and then you can notice that it's the same. 139 00:15:06,510 --> 00:15:20,690 So the question was, um, would it be difficult to listen to, uh, existing traffic and then it be detectable because you're using an MSSI number that is either illegitimate, illegitimate already broadcast. 140 00:15:20,690 --> 00:15:29,510 Um, no, it is possible to just grab somebody's MSSI number because there's no encryption or any basically thing protecting the protocol. 141 00:15:29,510 --> 00:15:32,830 You can easily just spoof somebody else's MSSI number and use that. 142 00:15:32,870 --> 00:15:36,230 Um, if they weren't broadcasting, it'd probably not be picked up as easily. 143 00:15:36,270 --> 00:15:41,330 Uh, there's a lot of work in looking at, uh, the data for illegal phishing. 144 00:15:41,330 --> 00:15:46,750 Basically they'll monitor the AIS tracks and watch where they go dark, especially as they go into protected zones. 145 00:15:46,830 --> 00:15:50,650 Um, so it's possible that some of those heuristics would pick up on our stuff. 146 00:15:50,650 --> 00:15:57,610 If you're broadcasting and then all of a sudden goes dark, um, they might not realize what you're doing, but it might show on somebody's screen. 147 00:15:57,890 --> 00:16:00,150 Um, the other thing is there's two channels of AIS. 148 00:16:00,150 --> 00:16:07,750 So if you broadcast on the other channel that's not, uh, very, uh, frequently used, there's a chance that nobody would even notice it because nobody's looking. 149 00:16:07,910 --> 00:16:14,350 Um, and another thing you can do is message 42, I believe in AIS will tell a receiver to switch channels. 150 00:16:14,430 --> 00:16:22,970 So if I have a legitimate vessel or a buoy that is, uh, let's say it's a ATON buoy underneath one of the bridges saying, hey, there's 20 feet of clearance right now. 151 00:16:22,970 --> 00:16:34,670 If I broadcast at that one and say, hey, switch to channel B, I'm going to take your main spot on channel A and I'm going to look legitimate, maybe even have the legitimate height under the bridge, uh, but maybe throw some extra data in there. 152 00:16:35,190 --> 00:16:37,250 Maybe, maybe no one would notice that. 153 00:16:37,290 --> 00:16:40,590 It's really a question of who's looking.