start	end	text
0	4100	Good morning everyone. My name is Julian Blanco and I'm going to be giving a talk on C2 over
4100	10040	maritime automatic identification system and commercial aggregation websites. A couple favors,
10040	14780	if I'm talking too fast, if I'm talking too quietly, please somebody throw something at me,
14780	20360	let me know. I hate public speaking so let's keep this as informal as possible.
21540	26100	Alright, so the abstract I submitted for this talk was that AIS is a worldwide program that
26100	31260	assists vessels in preventing collisions at sea. By compromising an endpoint connected to a
31260	35500	vulnerable AIS transmitter or connecting a software defined radio to a traditional IT network,
35500	41220	one can bypass web filters, blah blah blah. Basically the idea is that we have this system
41220	46420	known as AIS that works pretty much all over the world on land and at sea. On land because
46420	51000	we have satellites that pass over, we have terrestrial towers that pick up the signal
52400	56900	and anywhere the signal can be picked up it can then be rebroadcast because it's a mesh protocol
56900	62760	and it's collected into a bunch of websites and published. And what that allows you to do is
62760	69620	create a low bandwidth throughput connection to wherever you want. And because you're connecting
69620	75160	to a bunch of random websites it's almost anonymous because you'd have to go through
75280	79380	a monumental task of trying to figure out who is accessing what websites, where they're coming from
79380	85300	with a couple of hops you basically have a nearly anonymous C2 source that I will talk about a
85300	90740	little bit later. Um, who am I? In my professional life I'm a Coast Guard officer stationed at Coast
90740	94900	Guard Cyber Command. I like doing DFIR. My background is in electrical engineering. I do
94900	100240	all cyber IT stuff now. Um, and this talk is completely mine, not the views of the government
100240	105100	and this is not government sponsored work. Uh, I'd like to give a shout out to my best friend
105100	110100	Trey Maxim. He helped me tremendously and I'm building off of some of his previous work. I wish
110100	115140	he could be here giving the talk with me but he could not make it out to Vegas. Um, so we've been
115140	120560	working on this together and this is probably more his than mine. Um, but we've been working on this
120560	128600	for a while. So, why do we care? AIS is a system that is crucial to the maritime industry. Uh,
128600	133400	it's regu- it's required by SOLAS, which is Safety of Life at Sea, and all international
133400	137920	ships with 300 or more gross tonnage and all passenger ships regardless of size has to have
137920	141800	this system on. And when it has to have this system, it's not just receive, it's transmit.
141800	147180	So all of these devices, all of- are on commercial ships. They are transmitting.
147180	152780	They have, uh, transmitters on them that could be useful. Do not know.
154080	159020	How does it help? So, why we have this system is basically if you're looking at your radar screen
159020	163720	and this is not very helpful. I mean, it's helpful, you can see things are coming at you,
163720	168260	but if I want- was on a collision course with one of these vessels, it's really hard to see,
168260	173180	hey, I need to basically look at the window. If I'm in fog, it makes it even harder and say,
173180	178220	hey, vessel, you know, white with a black superstructure, uh, come back on the radio.
179280	184220	With AIS, basically it overlays, uh, who they are, where they're heading, how large they are,
184220	189300	their speed is, and now I can just go, hey, vessel Castello, come back on the radio,
189300	194620	let's talk, let's pass port to port however we need to. And it can also be used with- since
194620	198200	it's going to be broadcasting their speed, if they're outside of radar, we can pick them up
198200	203020	farther and maybe we can even plan a course around them that's not going to be a collision course
203020	210240	whatsoever. Uh, there's some previous work, so back at Black Hat in 2014, I believe, uh,
210240	215240	Embright did a AIS exposed where he talked about the protocol that was very vulnerable,
215240	219840	did not have any security built into the protocol, um, and they did a whole bunch of cool things.
219840	223620	They did a lot of spoofing, they did a lot of jamming, they filled up all the time slots in
223620	229240	the AIS, uh, and basically didn't allow legitimate traffic to transmit. Um, and then my buddy Trey
229240	233820	and his partner Shano did, uh, a lot of work doing- with software-defined radios, they created
233820	239900	their own protocol, um, to be able to transmit. Trend Micro also has theirs publicly, uh,
239900	244600	on their GitHub, if you want to use their thing to create your own AIS transmitter,
244600	248060	uh, I've never been able to get their code to work, but supposedly it does,
248060	254420	so there's that as well. Alright, so, kind of talked about AIS a little bit, basically here
254420	260000	you can see, this is just a cheesy infographic that the signal's mesh, if I can't see the land
260000	266800	base, uh, receiver, it'll transmit over to a ship and then another ship will bounce that signal to
266800	273560	land. It is a mesh protocol, that way it gets, uh, maximum effectiveness and coverage. It is on
273560	281660	VHF, um, and I believe the frequency is 161.975 is the first channel, and 162.025 megahertz is
281660	286620	the second. It is, uh, GMSK, which is really annoying to work with, uh, if you're not familiar
286620	292860	with GMSK, instead of, uh, modulating the actual carrier signal, it modulates the phase to encode
292860	298220	the data into the carrier signal, um, which is, it works, uh, it's just a little less documented
298220	305900	and a little harder to work with, with, uh, software defined radios. So, my buddy Trey, when
305900	309820	they built their own software defined radio, this is what their GNU radio block ended up looking
309820	314520	like. They basically had a sync where they created what their message they wanted to look like,
314520	319760	they created that in Python, created it into a text file, shoved it into GNU radio, and basically
319760	326680	did all this math to get it to actually broadcast a signal. Um, this is what their GMSK ended up
326680	332200	looking like. This is what it looks like demodulated. You can see the signal, um, all the ones
332200	339080	and zeros were then transmitted and received on the other end. Uh, this is the actual block of
339080	344760	Python that they used. So, what it looks like is something like this, excuse the horribly code,
344760	350220	and this is probably way too small to see. Basically, we would plug in an MSSI number, um,
350220	355400	what we wanted to name, the ship type, uh, the draft, what their destination was, and we just
355400	361100	shoved it into a bunch of hex and transmitted it. I will, we're going to publish all this stuff
361100	366920	open source once we get it a little bit better documented and commented, um, so don't feel like
366920	372940	you need to take pictures of this, we will put it out there. Um, but basically the goal was to be
372940	378380	able to take something modular, uh, in this case Python, that's pretty easy to work with for
378380	383020	anybody, and use that to be able to create new transmissions. Whether that's because you want to
383020	389220	legitimately, hey, we want to not buy an expensive, uh, transceiver to put on our boat, we want to
389220	394100	just use the software to find radio for 150 bucks, have our own, uh, MSSI number put in
394100	399120	registration to the FCC and have basically a low cost, uh, transmitter, just cause let's say
399120	404260	we're doing a regatta sailing, a lot of people like to do that. Um, but that's why we wanted to
404260	409540	create a modular, it also because it's modular is able, easy to be used for nefarious purposes.
410000	413940	So, we had some fun with it. Uh, this is an example where we spit out a bunch of coordinates
413940	418700	and, uh, created a bunch of tracks. Uh, we did this null terminated into another software to
418700	423380	find radio and then picked up in, uh, OpenCPN, so this was not broadcast, it looks like Cape
423380	429980	Cod, um, but because we have this modular piece of Python that we can create new AIS, uh,
429980	435120	messages, then it makes it really easy to spit out, in this case, a smiley face or whatever we
435120	440980	wanted to do with it. Now, why this is important is, uh, when we want to generate messages,
440980	445960	let's say for creating C2, the idea is we're not going to be broadcasting a legitimate target.
445960	449880	We're going to be broadcasting an illegitimate target. Now, could it look like a legitimate
449880	454920	target? Sure. We have a vessel, we make it look like it's navigating, uh, but let's say the least
454920	459720	significant digits of the coordinates or something in the info field. We are encoding data into
459720	465940	there, uh, depending on how much data we want to get through and how, uh, much risk we're willing
465940	470380	to be taking and whether we want to be detected or not, kind of determines whether we want to
470380	474660	just use like one single digit on the back of the lat and long or if we're just going to put a
474660	483020	bunch of, let's say, encrypted or encoded text into the info, uh, field of the AIS message. Uh,
483020	488120	so, some of the benefits of doing C2 over AIS is it could be extremely hard to trace. It can
488120	493920	bypass your IDS and IPS. If you have a traditional SATCOM, uh, IP connectivity on your ship
493920	499440	and you're beaconing traffic, most of the time these are really small links, um, maybe 250
499440	506340	kilobits per second, five or six endpoints. If you were having legitimate, let's say, C2 over a
506340	510820	common, let's say, a meterpreter shell or a power shell empire, it's probably pretty easy to pick
510820	514460	up in your IPS, especially since there's not going to be a lot of traffic leaving the vessel. If
514460	522240	you were to do something with a, either a radio link or over AIS, your traditional SOC is not
522240	526820	going to be able to notice it. Uh, it allows us to connect to air gap networks. If we're at ship
526820	531740	and they don't have a SATCOM unit, then we could use AIS as a possible another venue to talk to
531740	535320	that air gap network. Whether that's on the engine control network, on their traditional IT
535320	540220	network, or if we just want to foothold on their network to be able to do something. And it works
540220	545600	on land and sea. It's not just limited to vessels. If we wanted to use this method and go plug a
545600	551080	software defined radio into a workstation in a bank in Miami, there's plenty of towers in that
551080	554600	area that are going to pick up that signal and vessels that are going to relay that signal. If
554600	559740	we created a fake vessel that's just sitting in one of the ports and just shove this on a
559740	566380	traditional endpoint in a bank, uh, you could smuggle C2 out that way. Is it going to be used?
566380	572480	Probably not. It's a very niche, um, but it just highlights a vulnerability in the AIS protocol
572480	576100	and the fact that there's no security, um, which has been discussed before and I'm not going to
576100	581840	really talk about here. Um, but yeah. So detractors, it is easy to detect. Because all these
581840	586340	signals are picked up and you're probably going to have to use an illegitimate MMSI number or an
587040	593340	MMSI number of a ship that is already broadcasting. Uh, you're probably going to get, it's
593340	597680	going to be noticed. Whether it's going to be traced back to you, who knows? Um, it is very
597680	603400	niche. You're not going to get a lot of data and it's expensive. Um, if you have to plant a
603400	609200	software defined radio or, uh, like let's say one of these, this is a Lime SDR. These are tiny.
609200	613820	This would be really easy to plant onto a ship. Nobody would ever notice it. Um, either on a
613820	618900	Raspberry Pi or directly into one of their endpoints. It's going to cost you between 200
619020	623640	bucks a pop for each thing you're going to try to create a transmitter on. Whether that's
623640	629220	expensive to you or not depends on your threat model and who you're going up against. So let's
629220	634920	talk, uh, how would you get that signal off? So one way you could get the signal off is sit there
634920	640680	with another software defined radio or legitimate AIS receiver and pick up the signal. Now, why
640680	646900	that is not maybe your best option is because if you're within radio distance of your target,
646900	652300	then you're probably pretty easy to find. Um, one thing you could do is wait for it to be picked
652300	656620	up on either ShipTracker or MarineTraffic.com. And these are commercial aggregation websites
656620	665980	that show basically, um, all of your ships in real time. So if we take a look at all the AIS
665980	669440	targets that are out in the world right now, you can see there's a whole lot of stuff out
669440	675060	there. Um, would someone notice an extra dot on this map? Uh, maybe, maybe not. There's also
675060	679380	some weird dots on here like this one over here in Vegas, uh, not in Vegas, but in Nevada. Not
679380	684000	really sure what that one is, but that also shows that there is pretty good coverage inland in
684000	688980	the United States. And if you look in some of these major rivers in Europe, there's also a lot
688980	696940	of coverage over there. Uh, so what you do is you would basically scrape the website and you would
696940	700400	pull, depending on however you're encoding your message, whether you encode it in the
700400	705320	coordinates, do you encode it in the info field, or even in the name of the AIS ship that you're
705320	710020	broadcasting. Uh, you would put your signal in there, put your message in there, and then you
710020	714060	would pick it up on one of these commercial websites. Uh, if somebody, let's say, knew that
714060	717940	was an illegitimate target, uh, whether let's say the government or somebody who's really
717940	723420	curious, they would have to rely on cooperation from the website to be able to say, hey, give us
723420	727280	your access dot logs, let's pull all the IP addresses of who's reaching out to your website.
727280	733360	And at that point, it's really hard to be able to pinpoint, uh, who that is. So, is it possible to
733360	738860	then trace from, I plugged a software defined radio into a ship, it broadcasts a signal, and
738860	742320	then I go on the other end and I know what website I want to use, or what multitude of
742320	746720	websites I'm going to use. Technically, yes, it is possible to trace all that way back, although
746720	754960	it would be very, very difficult. Uh, bypass IDS IPS, because you're going to be routing your
754960	758620	traffic through the AIS transmitter, it's not going to go through your traditional network, I
758620	762300	think I talked about that a little bit, um, especially on ships where you don't have a lot of
762300	767960	throughput, this might be important depending on who you are. And, uh, works on LAN and C.
769860	780520	And, that's not really important. Uh, air gaps is another one. And what we're going to be
780520	784340	hoping to do in the next couple months is we want to rewrite everything from GNU radio over to
784340	789960	SOAP ESDR. Uh, this is an all Python based module that's cross platform, works on Linux, Mac,
789960	795220	Windows. Uh, the reason we want to do this is GNU radio is kind of heavy, um, it's very well
795220	799700	documented, but it is annoying to work with. By switching to SOAP ESDR, we can put it even on
799700	805140	the smallest of a Raspberry Pi and be able to, you know, transmit our signal that way. Plus
805140	810960	working in purely Python is preferable to us. Uh, we did all of our previous work on, um,
810960	815100	really expensive software defined radios, so we're hoping to get it working on either a Hack
815100	820980	RF1 or a Lime SDR Mini, uh, just to bring the cost down from, uh, you know, expensive USRPs
820980	826400	that are, let's say $8,000 once you buy the right daughterboards to transmit on the signals that
826400	831320	you want. And, uh, we're going to be open, open sourcing the tools soon. Uh, basically what
831320	835480	we'd like to hit is reliable transmission and then commented that way other people can not just
835480	842480	look at our code and make fun of us, um, and be able to improve and hopefully make this a useful
842480	847180	tool that obviously is not going to be widespread, but for a niche client, uh, if you're
847180	852640	trying to work with an AS, uh, or work with a maritime client, you can say, hey, this is
852640	856280	another, uh, method that you should be aware of. Probably not going to happen, but another
856280	861600	thing to throw in your report. And, uh, I think that's it. Uh, we're going to be putting it up
861600	866480	on my GitHub, so I'll put these slides are going to be up there later, uh, and this is where we
866480	872160	will put the code once we're done. I got about five minutes for questions before the next
872160	879310	person needs to set up. Cool. Appreciate it.
882090	883030	Yep.
883030	889470	You mentioned, uh, it would be easily detectable to the, uh, MMSI, the only register that can be
889470	894610	not a real ship. Uh, if there are anything stopping you from, for example, uh, more software
894610	899210	to find radio, for example, listening or legitimate trapping and then sending out essentially
899210	905550	identical, uh, ship and maybe a modified MMSI number that we then overlay and then you can
905550	906510	notice that it's the same.
906510	914730	So the question was, um, would it be difficult to listen to, uh, existing traffic and then it
914730	919270	be detectable because you're using an MSSI number that is either illegitimate, illegitimate
919270	925850	already broadcast. Um, no, it is possible to just grab somebody's MSSI number because there's
925850	930570	no encryption or any basically thing protecting the protocol. You can easily just spoof
930570	935210	somebody else's MSSI number and use that. Um, if they weren't broadcasting, it'd probably not
935210	940850	be picked up as easily. Uh, there's a lot of work in looking at, uh, the data for illegal
940850	945010	phishing. Basically they'll monitor the AIS tracks and watch where they go dark, especially
945010	949770	as they go into protected zones. Um, so it's possible that some of those heuristics would
949770	953550	pick up on our stuff. If you're broadcasting and then all of a sudden goes dark, um, they
953550	958510	might not realize what you're doing, but it might show on somebody's screen. Um, the other
958510	963130	thing is there's two channels of AIS. So if you broadcast on the other channel that's not, uh,
963130	967170	very, uh, frequently used, there's a chance that nobody would even notice it because nobody's
967170	973010	looking. Um, and another thing you can do is message 42, I believe in AIS will tell a
973010	978590	receiver to switch channels. So if I have a legitimate vessel or a buoy that is, uh, let's
978590	982130	say it's a ATON buoy underneath one of the bridges saying, hey, there's 20 feet of
982130	986170	clearance right now. If I broadcast at that one and say, hey, switch to channel B, I'm
986170	990710	going to take your main spot on channel A and I'm going to look legitimate, maybe even
990710	994670	have the legitimate height under the bridge, uh, but maybe throw some extra data in there.
995190	1000590	Maybe, maybe no one would notice that. It's really a question of who's looking.
