WEBVTT

00:00.000 --> 00:01.460
Good morning everyone.

00:01.460 --> 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.

00:08.980 --> 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.

00:15.720 --> 00:20.360
I hate public speaking so let's keep this as informal as possible.

00:21.540 --> 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.

00:29.220 --> 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.

00:38.040 --> 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.

00:45.720 --> 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.

01:01.620 --> 01:08.260
And what that allows you to do is create a low bandwidth throughput connection to wherever you want.

01:08.260 --> 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.

01:26.560 --> 01:27.600
Um, who am I?

01:27.600 --> 01:31.400
In my professional life I'm a Coast Guard officer stationed at Coast Guard Cyber Command.

01:31.400 --> 01:32.780
I like doing DFIR.

01:32.780 --> 01:34.260
My background is in electrical engineering.

01:34.260 --> 01:36.420
I do all cyber IT stuff now.

01:36.420 --> 01:41.860
Um, and this talk is completely mine, not the views of the government and this is not government sponsored work.

01:42.800 --> 01:45.900
Uh, I'd like to give a shout out to my best friend Trey Maxim.

01:45.900 --> 01:49.900
He helped me tremendously and I'm building off of some of his previous work.

01:49.900 --> 01:53.560
I wish he could be here giving the talk with me but he could not make it out to Vegas.

01:53.780 --> 01:59.120
Um, so we've been working on this together and this is probably more his than mine.

01:59.160 --> 02:01.340
Um, but we've been working on this for a while.

02:01.940 --> 02:03.780
So, why do we care?

02:03.900 --> 02:07.920
AIS is a system that is crucial to the maritime industry.

02:08.060 --> 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.

02:18.940 --> 02:21.800
And when it has to have this system, it's not just receive, it's transmit.

02:21.800 --> 02:25.800
So all of these devices, all of- are on commercial ships.

02:25.800 --> 02:27.180
They are transmitting.

02:27.180 --> 02:31.540
They have, uh, transmitters on them that could be useful.

02:31.680 --> 02:32.780
Do not know.

02:34.080 --> 02:35.280
How does it help?

02:35.280 --> 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.

02:41.360 --> 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.

02:50.960 --> 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.

02:59.280 --> 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.

03:12.340 --> 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.

03:25.120 --> 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.

03:39.840 --> 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.

03:48.220 --> 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.

03:57.060 --> 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.

04:10.840 --> 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.

04:27.340 --> 04:32.940
It is a mesh protocol, that way it gets, uh, maximum effectiveness and coverage.

04:32.940 --> 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.

04:42.140 --> 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,

04:59.900 --> 05:02.300
with, uh, software defined radios.

05:03.780 --> 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.

05:10.440 --> 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.

05:24.640 --> 05:27.660
Um, this is what their GMSK ended up looking like.

05:27.840 --> 05:29.440
This is what it looks like demodulated.

05:29.440 --> 05:35.960
You can see the signal, um, all the ones and zeros were then transmitted and received on the other end.

05:37.360 --> 05:40.240
Uh, this is the actual block of Python that they used.

05:40.500 --> 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.

05:46.880 --> 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.

05:58.860 --> 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.

06:10.960 --> 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.

06:21.900 --> 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,

06:37.140 --> 06:42.940
uh, transmitter, just cause let's say we're doing a regatta sailing, a lot of people like to do that.

06:43.100 --> 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.

06:50.000 --> 06:51.680
So, we had some fun with it.

06:51.680 --> 06:56.520
Uh, this is an example where we spit out a bunch of coordinates and, uh, created a bunch of tracks.

06:56.520 --> 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,

07:13.440 --> 07:16.280
in this case, a smiley face or whatever we wanted to do with it.

07:16.560 --> 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.

07:25.960 --> 07:28.460
We're going to be broadcasting an illegitimate target.

07:28.460 --> 07:30.540
Now, could it look like a legitimate target?

07:30.540 --> 07:30.800
Sure.

07:30.800 --> 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.

07:38.080 --> 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,

07:55.200 --> 08:00.920
let's say, encrypted or encoded text into the info, uh, field of the AIS message.

08:02.440 --> 08:07.800
Uh, so, some of the benefits of doing C2 over AIS is it could be extremely hard to trace.

08:07.800 --> 08:09.780
It can bypass your IDS and IPS.

08:09.780 --> 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.

08:21.720 --> 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.

08:34.100 --> 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.

08:43.980 --> 08:46.260
Uh, it allows us to connect to air gap networks.

08:46.260 --> 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.

08:52.820 --> 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.

08:59.660 --> 09:01.280
And it works on land and sea.

09:01.280 --> 09:02.780
It's not just limited to vessels.

09:02.800 --> 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.

09:14.240 --> 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.

09:24.320 --> 09:26.180
Is it going to be used?

09:26.180 --> 09:26.820
Probably not.

09:26.820 --> 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.

09:37.400 --> 09:39.040
Um, but yeah.

09:39.040 --> 09:41.040
So detractors, it is easy to detect.

09:41.040 --> 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.

09:50.260 --> 09:54.000
Uh, you're probably going to get, it's going to be noticed.

09:54.000 --> 09:56.680
Whether it's going to be traced back to you, who knows?

09:56.840 --> 09:58.080
Um, it is very niche.

09:58.080 --> 10:00.560
You're not going to get a lot of data and it's expensive.

10:00.640 --> 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.

10:08.580 --> 10:09.200
These are tiny.

10:09.200 --> 10:11.040
This would be really easy to plant onto a ship.

10:11.040 --> 10:12.640
Nobody would ever notice it.

10:12.680 --> 10:15.820
Um, either on a Raspberry Pi or directly into one of their endpoints.

10:16.540 --> 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.

10:22.720 --> 10:26.740
Whether that's expensive to you or not depends on your threat model and who you're going up against.

10:28.200 --> 10:32.520
So let's talk , uh, how would you get that signal off?

10:32.640 --> 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.

10:40.280 --> 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.

10:49.560 --> 10:54.900
Um, one thing you could do is wait for it to be picked up on either ShipTracker or MarineTraffic.com.

10:54.900 --> 11:03.600
And these are commercial aggregation websites that show basically, um, all of your ships in real time.

11:03.600 --> 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.

11:10.060 --> 11:12.960
Um, would someone notice an extra dot on this map?

11:13.020 --> 11:14.560
Uh, maybe, maybe not.

11:14.560 --> 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.

11:19.180 --> 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.

11:25.140 --> 11:30.140
And if you look in some of these major rivers in Europe, there's also a lot of coverage over there.

11:33.040 --> 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.

11:46.500 --> 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.

11:52.460 --> 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.

12:07.280 --> 12:11.340
And at that point, it's really hard to be able to pinpoint, uh, who that is.

12:11.340 --> 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.

12:23.900 --> 12:28.240
Technically, yes, it is possible to trace all that way back, although it would be very, very difficult.

12:31.880 --> 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,

12:43.040 --> 12:45.380
this might be important depending on who you are.

12:45.940 --> 12:47.960
And, uh, works on LAN and C.

12:49.860 --> 12:51.700
And, that's not really important.

12:54.780 --> 12:56.680
Uh, air gaps is another one.

12:59.400 --> 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.

13:05.300 --> 13:10.680
Uh, this is an all Python based module that's cross platform, works on Linux, Mac, Windows.

13:10.680 --> 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.

13:17.680 --> 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.

13:24.800 --> 13:27.940
Plus working in purely Python is preferable to us.

13:28.020 --> 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

13:43.280 --> 13:47.140
once you buy the right daughterboards to transmit on the signals that you want.

13:47.300 --> 13:49.880
And, uh, we're going to be open, open sourcing the tools soon.

13:50.060 --> 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,

14:04.740 --> 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.

14:14.840 --> 14:17.480
Probably not going to happen, but another thing to throw in your report.

14:19.000 --> 14:20.480
And, uh, I think that's it.

14:20.580 --> 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.

14:29.120 --> 14:33.880
I got about five minutes for questions before the next person needs to set up.

14:37.090 --> 14:38.130
Cool.

14:38.130 --> 14:39.310
Appreciate it.

14:42.090 --> 14:43.030
Yep.

14:43.030 --> 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.

14:50.570 --> 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.

15:06.510 --> 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.

15:20.690 --> 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.

15:29.510 --> 15:32.830
You can easily just spoof somebody else's MSSI number and use that.

15:32.870 --> 15:36.230
Um, if they weren't broadcasting, it'd probably not be picked up as easily.

15:36.270 --> 15:41.330
Uh, there's a lot of work in looking at, uh, the data for illegal phishing.

15:41.330 --> 15:46.750
Basically they'll monitor the AIS tracks and watch where they go dark, especially as they go into protected zones.

15:46.830 --> 15:50.650
Um, so it's possible that some of those heuristics would pick up on our stuff.

15:50.650 --> 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.

15:57.890 --> 16:00.150
Um, the other thing is there's two channels of AIS.

16:00.150 --> 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.

16:07.910 --> 16:14.350
Um, and another thing you can do is message 42, I believe in AIS will tell a receiver to switch channels.

16:14.430 --> 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.

16:22.970 --> 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.

16:35.190 --> 16:37.250
Maybe, maybe no one would notice that.

16:37.290 --> 16:40.590
It's really a question of who's looking.

