Good morning everyone. 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. A couple favors, if I'm talking too fast, if I'm talking too quietly, please somebody throw something at me, let me know. I hate public speaking so let's keep this as informal as possible. Alright, so the abstract I submitted for this talk was that AIS is a worldwide program that assists vessels in preventing collisions at sea. 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. 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. 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. And what that allows you to do is create a low bandwidth throughput connection to wherever you want. 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. Um, who am I? In my professional life I'm a Coast Guard officer stationed at Coast Guard Cyber Command. I like doing DFIR. My background is in electrical engineering. I do all cyber IT stuff now. Um, and this talk is completely mine, not the views of the government and this is not government sponsored work. Uh, I'd like to give a shout out to my best friend Trey Maxim. He helped me tremendously and I'm building off of some of his previous work. I wish he could be here giving the talk with me but he could not make it out to Vegas. Um, so we've been working on this together and this is probably more his than mine. Um, but we've been working on this for a while. So, why do we care? AIS is a system that is crucial to the maritime industry. 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. And when it has to have this system, it's not just receive, it's transmit. So all of these devices, all of- are on commercial ships. They are transmitting. They have, uh, transmitters on them that could be useful. Do not know. How does it help? So, why we have this system is basically if you're looking at your radar screen and this is not very helpful. 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. 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. 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. 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. 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. 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. 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. 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. 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. It is a mesh protocol, that way it gets, uh, maximum effectiveness and coverage. It is on VHF, um, and I believe the frequency is 161.975 is the first channel, and 162.025 megahertz is the second. 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, with, uh, software defined radios. So, my buddy Trey, when they built their own software defined radio, this is what their GNU radio block ended up looking like. 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. Um, this is what their GMSK ended up looking like. This is what it looks like demodulated. You can see the signal, um, all the ones and zeros were then transmitted and received on the other end. Uh, this is the actual block of Python that they used. So, what it looks like is something like this, excuse the horribly code, and this is probably way too small to see. 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. 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. 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. 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, uh, transmitter, just cause let's say we're doing a regatta sailing, a lot of people like to do that. 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. So, we had some fun with it. Uh, this is an example where we spit out a bunch of coordinates and, uh, created a bunch of tracks. 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, in this case, a smiley face or whatever we wanted to do with it. 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. We're going to be broadcasting an illegitimate target. Now, could it look like a legitimate target? Sure. 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. 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, let's say, encrypted or encoded text into the info, uh, field of the AIS message. Uh, so, some of the benefits of doing C2 over AIS is it could be extremely hard to trace. It can bypass your IDS and IPS. 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. 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. 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. Uh, it allows us to connect to air gap networks. 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. 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. And it works on land and sea. It's not just limited to vessels. 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. 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. Is it going to be used? Probably not. 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. Um, but yeah. So detractors, it is easy to detect. 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. Uh, you're probably going to get, it's going to be noticed. Whether it's going to be traced back to you, who knows? Um, it is very niche. You're not going to get a lot of data and it's expensive. Um, if you have to plant a software defined radio or, uh, like let's say one of these, this is a Lime SDR. These are tiny. This would be really easy to plant onto a ship. Nobody would ever notice it. Um, either on a Raspberry Pi or directly into one of their endpoints. It's going to cost you between 200 bucks a pop for each thing you're going to try to create a transmitter on. Whether that's expensive to you or not depends on your threat model and who you're going up against. So let's talk, uh, how would you get that signal off? 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. 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. Um, one thing you could do is wait for it to be picked up on either ShipTracker or MarineTraffic.com. And these are commercial aggregation websites that show basically, um, all of your ships in real time. 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. Um, would someone notice an extra dot on this map? Uh, maybe, maybe not. There's also some weird dots on here like this one over here in Vegas, uh, not in Vegas, but in Nevada. Not really sure what that one is, but that also shows that there is pretty good coverage inland in the United States. And if you look in some of these major rivers in Europe, there's also a lot of coverage over there. 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. 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. 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. And at that point, it's really hard to be able to pinpoint, uh, who that is. 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. Technically, yes, it is possible to trace all that way back, although it would be very, very difficult. 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, this might be important depending on who you are. And, uh, works on LAN and C. And, that's not really important. Uh, air gaps is another one. 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. Uh, this is an all Python based module that's cross platform, works on Linux, Mac, Windows. 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. 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. Plus working in purely Python is preferable to us. 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 once you buy the right daughterboards to transmit on the signals that you want. And, uh, we're going to be open, open sourcing the tools soon. 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, 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. Probably not going to happen, but another thing to throw in your report. And, uh, I think that's it. 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. I got about five minutes for questions before the next person needs to set up. Cool. Appreciate it. Yep. You mentioned, uh, it would be easily detectable to the, uh, MMSI, the only register that can be not a real ship. 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. 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. Um, no, it is possible to just grab somebody's MSSI number because there's no encryption or any basically thing protecting the protocol. You can easily just spoof somebody else's MSSI number and use that. Um, if they weren't broadcasting, it'd probably not be picked up as easily. Uh, there's a lot of work in looking at, uh, the data for illegal phishing. Basically they'll monitor the AIS tracks and watch where they go dark, especially as they go into protected zones. Um, so it's possible that some of those heuristics would pick up on our stuff. 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. Um, the other thing is there's two channels of AIS. 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. Um, and another thing you can do is message 42, I believe in AIS will tell a receiver to switch channels. 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. 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. Maybe, maybe no one would notice that. It's really a question of who's looking.