[00:00.000 --> 00:04.100] Good morning everyone. My name is Julian Blanco and I'm going to be giving a talk on C2 over [00:04.100 --> 00:10.040] maritime automatic identification system and commercial aggregation websites. A couple favors, [00:10.040 --> 00:14.780] if I'm talking too fast, if I'm talking too quietly, please somebody throw something at me, [00:14.780 --> 00:20.360] let me know. I hate public speaking so let's keep this as informal as possible. [00:21.540 --> 00:26.100] Alright, so the abstract I submitted for this talk was that AIS is a worldwide program that [00:26.100 --> 00:31.260] assists vessels in preventing collisions at sea. By compromising an endpoint connected to a [00:31.260 --> 00:35.500] vulnerable AIS transmitter or connecting a software defined radio to a traditional IT network, [00:35.500 --> 00:41.220] one can bypass web filters, blah blah blah. Basically the idea is that we have this system [00:41.220 --> 00:46.420] known as AIS that works pretty much all over the world on land and at sea. On land because [00:46.420 --> 00:51.000] we have satellites that pass over, we have terrestrial towers that pick up the signal [00:52.400 --> 00:56.900] and anywhere the signal can be picked up it can then be rebroadcast because it's a mesh protocol [00:56.900 --> 01:02.760] and it's collected into a bunch of websites and published. And what that allows you to do is [01:02.760 --> 01:09.620] create a low bandwidth throughput connection to wherever you want. And because you're connecting [01:09.620 --> 01:15.160] to a bunch of random websites it's almost anonymous because you'd have to go through [01:15.280 --> 01:19.380] a monumental task of trying to figure out who is accessing what websites, where they're coming from [01:19.380 --> 01:25.300] with a couple of hops you basically have a nearly anonymous C2 source that I will talk about a [01:25.300 --> 01:30.740] little bit later. Um, who am I? In my professional life I'm a Coast Guard officer stationed at Coast [01:30.740 --> 01:34.900] Guard Cyber Command. I like doing DFIR. My background is in electrical engineering. I do [01:34.900 --> 01:40.240] all cyber IT stuff now. Um, and this talk is completely mine, not the views of the government [01:40.240 --> 01:45.100] and this is not government sponsored work. Uh, I'd like to give a shout out to my best friend [01:45.100 --> 01:50.100] Trey Maxim. He helped me tremendously and I'm building off of some of his previous work. I wish [01:50.100 --> 01:55.140] he could be here giving the talk with me but he could not make it out to Vegas. Um, so we've been [01:55.140 --> 02:00.560] working on this together and this is probably more his than mine. Um, but we've been working on this [02:00.560 --> 02:08.600] for a while. So, why do we care? AIS is a system that is crucial to the maritime industry. Uh, [02:08.600 --> 02:13.400] it's regu- it's required by SOLAS, which is Safety of Life at Sea, and all international [02:13.400 --> 02:17.920] ships with 300 or more gross tonnage and all passenger ships regardless of size has to have [02:17.920 --> 02:21.800] this system on. And when it has to have this system, it's not just receive, it's transmit. [02:21.800 --> 02:27.180] So all of these devices, all of- are on commercial ships. They are transmitting. [02:27.180 --> 02:32.780] They have, uh, transmitters on them that could be useful. Do not know. [02:34.080 --> 02:39.020] How does it help? So, why we have this system is basically if you're looking at your radar screen [02:39.020 --> 02:43.720] and this is not very helpful. I mean, it's helpful, you can see things are coming at you, [02:43.720 --> 02:48.260] but if I want- was on a collision course with one of these vessels, it's really hard to see, [02:48.260 --> 02:53.180] hey, I need to basically look at the window. If I'm in fog, it makes it even harder and say, [02:53.180 --> 02:58.220] hey, vessel, you know, white with a black superstructure, uh, come back on the radio. [02:59.280 --> 03:04.220] With AIS, basically it overlays, uh, who they are, where they're heading, how large they are, [03:04.220 --> 03:09.300] their speed is, and now I can just go, hey, vessel Castello, come back on the radio, [03:09.300 --> 03:14.620] let's talk, let's pass port to port however we need to. And it can also be used with- since [03:14.620 --> 03:18.200] it's going to be broadcasting their speed, if they're outside of radar, we can pick them up [03:18.200 --> 03:23.020] farther and maybe we can even plan a course around them that's not going to be a collision course [03:23.020 --> 03:30.240] whatsoever. Uh, there's some previous work, so back at Black Hat in 2014, I believe, uh, [03:30.240 --> 03:35.240] Embright did a AIS exposed where he talked about the protocol that was very vulnerable, [03:35.240 --> 03:39.840] did not have any security built into the protocol, um, and they did a whole bunch of cool things. [03:39.840 --> 03:43.620] They did a lot of spoofing, they did a lot of jamming, they filled up all the time slots in [03:43.620 --> 03:49.240] the AIS, uh, and basically didn't allow legitimate traffic to transmit. Um, and then my buddy Trey [03:49.240 --> 03:53.820] and his partner Shano did, uh, a lot of work doing- with software-defined radios, they created [03:53.820 --> 03:59.900] their own protocol, um, to be able to transmit. Trend Micro also has theirs publicly, uh, [03:59.900 --> 04:04.600] on their GitHub, if you want to use their thing to create your own AIS transmitter, [04:04.600 --> 04:08.060] uh, I've never been able to get their code to work, but supposedly it does, [04:08.060 --> 04:14.420] so there's that as well. Alright, so, kind of talked about AIS a little bit, basically here [04:14.420 --> 04:20.000] you can see, this is just a cheesy infographic that the signal's mesh, if I can't see the land [04:20.000 --> 04:26.800] base, uh, receiver, it'll transmit over to a ship and then another ship will bounce that signal to [04:26.800 --> 04:33.560] land. It is a mesh protocol, that way it gets, uh, maximum effectiveness and coverage. It is on [04:33.560 --> 04:41.660] VHF, um, and I believe the frequency is 161.975 is the first channel, and 162.025 megahertz is [04:41.660 --> 04:46.620] the second. It is, uh, GMSK, which is really annoying to work with, uh, if you're not familiar [04:46.620 --> 04:52.860] with GMSK, instead of, uh, modulating the actual carrier signal, it modulates the phase to encode [04:52.860 --> 04:58.220] the data into the carrier signal, um, which is, it works, uh, it's just a little less documented [04:58.220 --> 05:05.900] and a little harder to work with, with, uh, software defined radios. So, my buddy Trey, when [05:05.900 --> 05:09.820] they built their own software defined radio, this is what their GNU radio block ended up looking [05:09.820 --> 05:14.520] like. They basically had a sync where they created what their message they wanted to look like, [05:14.520 --> 05:19.760] they created that in Python, created it into a text file, shoved it into GNU radio, and basically [05:19.760 --> 05:26.680] did all this math to get it to actually broadcast a signal. Um, this is what their GMSK ended up [05:26.680 --> 05:32.200] looking like. This is what it looks like demodulated. You can see the signal, um, all the ones [05:32.200 --> 05:39.080] and zeros were then transmitted and received on the other end. Uh, this is the actual block of [05:39.080 --> 05:44.760] Python that they used. So, what it looks like is something like this, excuse the horribly code, [05:44.760 --> 05:50.220] and this is probably way too small to see. Basically, we would plug in an MSSI number, um, [05:50.220 --> 05:55.400] what we wanted to name, the ship type, uh, the draft, what their destination was, and we just [05:55.400 --> 06:01.100] shoved it into a bunch of hex and transmitted it. I will, we're going to publish all this stuff [06:01.100 --> 06:06.920] open source once we get it a little bit better documented and commented, um, so don't feel like [06:06.920 --> 06:12.940] you need to take pictures of this, we will put it out there. Um, but basically the goal was to be [06:12.940 --> 06:18.380] able to take something modular, uh, in this case Python, that's pretty easy to work with for [06:18.380 --> 06:23.020] anybody, and use that to be able to create new transmissions. Whether that's because you want to [06:23.020 --> 06:29.220] legitimately, hey, we want to not buy an expensive, uh, transceiver to put on our boat, we want to [06:29.220 --> 06:34.100] just use the software to find radio for 150 bucks, have our own, uh, MSSI number put in [06:34.100 --> 06:39.120] registration to the FCC and have basically a low cost, uh, transmitter, just cause let's say [06:39.120 --> 06:44.260] we're doing a regatta sailing, a lot of people like to do that. Um, but that's why we wanted to [06:44.260 --> 06:49.540] create a modular, it also because it's modular is able, easy to be used for nefarious purposes. [06:50.000 --> 06:53.940] So, we had some fun with it. Uh, this is an example where we spit out a bunch of coordinates [06:53.940 --> 06:58.700] and, uh, created a bunch of tracks. Uh, we did this null terminated into another software to [06:58.700 --> 07:03.380] find radio and then picked up in, uh, OpenCPN, so this was not broadcast, it looks like Cape [07:03.380 --> 07:09.980] Cod, um, but because we have this modular piece of Python that we can create new AIS, uh, [07:09.980 --> 07:15.120] messages, then it makes it really easy to spit out, in this case, a smiley face or whatever we [07:15.120 --> 07:20.980] wanted to do with it. Now, why this is important is, uh, when we want to generate messages, [07:20.980 --> 07:25.960] let's say for creating C2, the idea is we're not going to be broadcasting a legitimate target. [07:25.960 --> 07:29.880] We're going to be broadcasting an illegitimate target. Now, could it look like a legitimate [07:29.880 --> 07:34.920] target? Sure. We have a vessel, we make it look like it's navigating, uh, but let's say the least [07:34.920 --> 07:39.720] significant digits of the coordinates or something in the info field. We are encoding data into [07:39.720 --> 07:45.940] there, uh, depending on how much data we want to get through and how, uh, much risk we're willing [07:45.940 --> 07:50.380] to be taking and whether we want to be detected or not, kind of determines whether we want to [07:50.380 --> 07:54.660] just use like one single digit on the back of the lat and long or if we're just going to put a [07:54.660 --> 08:03.020] bunch of, let's say, encrypted or encoded text into the info, uh, field of the AIS message. Uh, [08:03.020 --> 08:08.120] so, some of the benefits of doing C2 over AIS is it could be extremely hard to trace. It can [08:08.120 --> 08:13.920] bypass your IDS and IPS. If you have a traditional SATCOM, uh, IP connectivity on your ship [08:13.920 --> 08:19.440] and you're beaconing traffic, most of the time these are really small links, um, maybe 250 [08:19.440 --> 08:26.340] kilobits per second, five or six endpoints. If you were having legitimate, let's say, C2 over a [08:26.340 --> 08:30.820] common, let's say, a meterpreter shell or a power shell empire, it's probably pretty easy to pick [08:30.820 --> 08:34.460] up in your IPS, especially since there's not going to be a lot of traffic leaving the vessel. If [08:34.460 --> 08:42.240] you were to do something with a, either a radio link or over AIS, your traditional SOC is not [08:42.240 --> 08:46.820] going to be able to notice it. Uh, it allows us to connect to air gap networks. If we're at ship [08:46.820 --> 08:51.740] and they don't have a SATCOM unit, then we could use AIS as a possible another venue to talk to [08:51.740 --> 08:55.320] that air gap network. Whether that's on the engine control network, on their traditional IT [08:55.320 --> 09:00.220] network, or if we just want to foothold on their network to be able to do something. And it works [09:00.220 --> 09:05.600] on land and sea. It's not just limited to vessels. If we wanted to use this method and go plug a [09:05.600 --> 09:11.080] software defined radio into a workstation in a bank in Miami, there's plenty of towers in that [09:11.080 --> 09:14.600] area that are going to pick up that signal and vessels that are going to relay that signal. If [09:14.600 --> 09:19.740] we created a fake vessel that's just sitting in one of the ports and just shove this on a [09:19.740 --> 09:26.380] traditional endpoint in a bank, uh, you could smuggle C2 out that way. Is it going to be used? [09:26.380 --> 09:32.480] Probably not. It's a very niche, um, but it just highlights a vulnerability in the AIS protocol [09:32.480 --> 09:36.100] and the fact that there's no security, um, which has been discussed before and I'm not going to [09:36.100 --> 09:41.840] really talk about here. Um, but yeah. So detractors, it is easy to detect. Because all these [09:41.840 --> 09:46.340] signals are picked up and you're probably going to have to use an illegitimate MMSI number or an [09:47.040 --> 09:53.340] MMSI number of a ship that is already broadcasting. Uh, you're probably going to get, it's [09:53.340 --> 09:57.680] going to be noticed. Whether it's going to be traced back to you, who knows? Um, it is very [09:57.680 --> 10:03.400] niche. You're not going to get a lot of data and it's expensive. Um, if you have to plant a [10:03.400 --> 10:09.200] software defined radio or, uh, like let's say one of these, this is a Lime SDR. These are tiny. [10:09.200 --> 10:13.820] This would be really easy to plant onto a ship. Nobody would ever notice it. Um, either on a [10:13.820 --> 10:18.900] Raspberry Pi or directly into one of their endpoints. It's going to cost you between 200 [10:19.020 --> 10:23.640] bucks a pop for each thing you're going to try to create a transmitter on. Whether that's [10:23.640 --> 10:29.220] expensive to you or not depends on your threat model and who you're going up against. So let's [10:29.220 --> 10:34.920] talk, uh, how would you get that signal off? So one way you could get the signal off is sit there [10:34.920 --> 10:40.680] with another software defined radio or legitimate AIS receiver and pick up the signal. Now, why [10:40.680 --> 10:46.900] that is not maybe your best option is because if you're within radio distance of your target, [10:46.900 --> 10:52.300] then you're probably pretty easy to find. Um, one thing you could do is wait for it to be picked [10:52.300 --> 10:56.620] up on either ShipTracker or MarineTraffic.com. And these are commercial aggregation websites [10:56.620 --> 11:05.980] that show basically, um, all of your ships in real time. So if we take a look at all the AIS [11:05.980 --> 11:09.440] targets that are out in the world right now, you can see there's a whole lot of stuff out [11:09.440 --> 11:15.060] there. Um, would someone notice an extra dot on this map? Uh, maybe, maybe not. There's also [11:15.060 --> 11:19.380] some weird dots on here like this one over here in Vegas, uh, not in Vegas, but in Nevada. Not [11:19.380 --> 11:24.000] really sure what that one is, but that also shows that there is pretty good coverage inland in [11:24.000 --> 11:28.980] the United States. And if you look in some of these major rivers in Europe, there's also a lot [11:28.980 --> 11:36.940] of coverage over there. Uh, so what you do is you would basically scrape the website and you would [11:36.940 --> 11:40.400] pull, depending on however you're encoding your message, whether you encode it in the [11:40.400 --> 11:45.320] coordinates, do you encode it in the info field, or even in the name of the AIS ship that you're [11:45.320 --> 11:50.020] broadcasting. Uh, you would put your signal in there, put your message in there, and then you [11:50.020 --> 11:54.060] would pick it up on one of these commercial websites. Uh, if somebody, let's say, knew that [11:54.060 --> 11:57.940] was an illegitimate target, uh, whether let's say the government or somebody who's really [11:57.940 --> 12:03.420] curious, they would have to rely on cooperation from the website to be able to say, hey, give us [12:03.420 --> 12:07.280] your access dot logs, let's pull all the IP addresses of who's reaching out to your website. [12:07.280 --> 12:13.360] And at that point, it's really hard to be able to pinpoint, uh, who that is. So, is it possible to [12:13.360 --> 12:18.860] then trace from, I plugged a software defined radio into a ship, it broadcasts a signal, and [12:18.860 --> 12:22.320] then I go on the other end and I know what website I want to use, or what multitude of [12:22.320 --> 12:26.720] websites I'm going to use. Technically, yes, it is possible to trace all that way back, although [12:26.720 --> 12:34.960] it would be very, very difficult. Uh, bypass IDS IPS, because you're going to be routing your [12:34.960 --> 12:38.620] traffic through the AIS transmitter, it's not going to go through your traditional network, I [12:38.620 --> 12:42.300] think I talked about that a little bit, um, especially on ships where you don't have a lot of [12:42.300 --> 12:47.960] throughput, this might be important depending on who you are. And, uh, works on LAN and C. [12:49.860 --> 13:00.520] And, that's not really important. Uh, air gaps is another one. And what we're going to be [13:00.520 --> 13:04.340] hoping to do in the next couple months is we want to rewrite everything from GNU radio over to [13:04.340 --> 13:09.960] SOAP ESDR. Uh, this is an all Python based module that's cross platform, works on Linux, Mac, [13:09.960 --> 13:15.220] Windows. Uh, the reason we want to do this is GNU radio is kind of heavy, um, it's very well [13:15.220 --> 13:19.700] documented, but it is annoying to work with. By switching to SOAP ESDR, we can put it even on [13:19.700 --> 13:25.140] the smallest of a Raspberry Pi and be able to, you know, transmit our signal that way. Plus [13:25.140 --> 13:30.960] working in purely Python is preferable to us. Uh, we did all of our previous work on, um, [13:30.960 --> 13:35.100] really expensive software defined radios, so we're hoping to get it working on either a Hack [13:35.100 --> 13:40.980] RF1 or a Lime SDR Mini, uh, just to bring the cost down from, uh, you know, expensive USRPs [13:40.980 --> 13:46.400] that are, let's say $8,000 once you buy the right daughterboards to transmit on the signals that [13:46.400 --> 13:51.320] you want. And, uh, we're going to be open, open sourcing the tools soon. Uh, basically what [13:51.320 --> 13:55.480] we'd like to hit is reliable transmission and then commented that way other people can not just [13:55.480 --> 14:02.480] look at our code and make fun of us, um, and be able to improve and hopefully make this a useful [14:02.480 --> 14:07.180] tool that obviously is not going to be widespread, but for a niche client, uh, if you're [14:07.180 --> 14:12.640] trying to work with an AS, uh, or work with a maritime client, you can say, hey, this is [14:12.640 --> 14:16.280] another, uh, method that you should be aware of. Probably not going to happen, but another [14:16.280 --> 14:21.600] thing to throw in your report. And, uh, I think that's it. Uh, we're going to be putting it up [14:21.600 --> 14:26.480] on my GitHub, so I'll put these slides are going to be up there later, uh, and this is where we [14:26.480 --> 14:32.160] will put the code once we're done. I got about five minutes for questions before the next [14:32.160 --> 14:39.310] person needs to set up. Cool. Appreciate it. [14:42.090 --> 14:43.030] Yep. [14:43.030 --> 14:49.470] You mentioned, uh, it would be easily detectable to the, uh, MMSI, the only register that can be [14:49.470 --> 14:54.610] not a real ship. Uh, if there are anything stopping you from, for example, uh, more software [14:54.610 --> 14:59.210] to find radio, for example, listening or legitimate trapping and then sending out essentially [14:59.210 --> 15:05.550] identical, uh, ship and maybe a modified MMSI number that we then overlay and then you can [15:05.550 --> 15:06.510] notice that it's the same. [15:06.510 --> 15:14.730] So the question was, um, would it be difficult to listen to, uh, existing traffic and then it [15:14.730 --> 15:19.270] be detectable because you're using an MSSI number that is either illegitimate, illegitimate [15:19.270 --> 15:25.850] already broadcast. Um, no, it is possible to just grab somebody's MSSI number because there's [15:25.850 --> 15:30.570] no encryption or any basically thing protecting the protocol. You can easily just spoof [15:30.570 --> 15:35.210] somebody else's MSSI number and use that. Um, if they weren't broadcasting, it'd probably not [15:35.210 --> 15:40.850] be picked up as easily. Uh, there's a lot of work in looking at, uh, the data for illegal [15:40.850 --> 15:45.010] phishing. Basically they'll monitor the AIS tracks and watch where they go dark, especially [15:45.010 --> 15:49.770] as they go into protected zones. Um, so it's possible that some of those heuristics would [15:49.770 --> 15:53.550] pick up on our stuff. If you're broadcasting and then all of a sudden goes dark, um, they [15:53.550 --> 15:58.510] might not realize what you're doing, but it might show on somebody's screen. Um, the other [15:58.510 --> 16:03.130] thing is there's two channels of AIS. So if you broadcast on the other channel that's not, uh, [16:03.130 --> 16:07.170] very, uh, frequently used, there's a chance that nobody would even notice it because nobody's [16:07.170 --> 16:13.010] looking. Um, and another thing you can do is message 42, I believe in AIS will tell a [16:13.010 --> 16:18.590] receiver to switch channels. So if I have a legitimate vessel or a buoy that is, uh, let's [16:18.590 --> 16:22.130] say it's a ATON buoy underneath one of the bridges saying, hey, there's 20 feet of [16:22.130 --> 16:26.170] clearance right now. If I broadcast at that one and say, hey, switch to channel B, I'm [16:26.170 --> 16:30.710] going to take your main spot on channel A and I'm going to look legitimate, maybe even [16:30.710 --> 16:34.670] have the legitimate height under the bridge, uh, but maybe throw some extra data in there. [16:35.190 --> 16:40.590] Maybe, maybe no one would notice that. It's really a question of who's looking.