start	end	text
1840	4820	Okay, hello everyone!
7520	9380	Yeah, NRG!
9640	13960	Thanks everyone for coming, especially to being the last day.
13960	18180	And most of the people that we knew are going home, so...
18180	21940	We are very glad for us to have you here.
21940	26060	Thanks to the La Villa Hacker people that are here, I'm sure,
26060	29520	because I cried for that. Yeah!
29520	35540	And, well, we are prepared now to talk to you
35540	38920	about Railroad Hacking.
39960	44200	We call this... it's working? Not working? Okay.
44660	48040	We are Gabriela Garcia and David Melendez.
48040	51680	I am a security software developer that got into hacking
51680	55040	and hardware hacking because of the hardware hacker people
55040	59760	that they like to introduce you to their weird world.
59760	63400	And David Melendez, I am the embedded software engineer
63400	69400	that is here to talk to you, with me, about Railroad Hacking.
69780	74540	We call this the Dark Territory because in the railway sector,
74680	78120	a Dark Territory is a section of the railway that lacks
78120	83780	remotely control of signals and you have no automatic
83780	87140	blocking systems. So, in this area, the communication
87340	91660	and coordination is really exclusive on the railway operator
91660	98400	and the term has gained popularity in railway hackers
98400	104000	to describe sectors that lack supervision in any other kind of way.
104000	108060	So, we are introducing you, forward trains.
113010	115770	As you can see, graphic design is our passion.
117790	121250	So, let me introduce you to some concepts.
121250	123270	For example, the railway blockers.
123270	127530	Railway blockers is a section that is normally no more than
127530	133190	one train can be present to evade collision between two trains.
133590	140170	This block session can be between stations and can be between signals
140170	147210	for the railroad control people to be able to control the passes
147210	151070	of the trains between these blocks.
151410	156970	To know where and how they have been passing the trains,
156970	163030	we have axle counters that are systems that count the axis of every train
163030	168090	and every train needs to be the same amount of axles
168090	170950	in the first one and in the last one.
170950	174970	It's nice because you don't lose people or have all your trains.
174970	176550	So, it's very cool.
177510	181550	And we can have train blockings in different ways.
181550	183510	For example, we can give a token.
183510	187350	It's vintage, but it's still happening in some parts of the world.
187670	193710	You can give the railway operator a token and he takes it.
193710	194830	It's vintage, okay?
194830	200010	It takes it and then you know that this train has passed through your station.
200130	206570	The next technological advancement has been to call people instead of giving them a token
206570	208110	because it's weird.
208110	216150	So, the telephone block is just to tell the next block that the train is passing through your block.
216390	219070	It's less vintage, but vintage too.
219430	223790	And then we pass it to the train blocking, the electronic train blocking.
223790	232510	What we have is slices of railway that are controlled by signals or controlled by a central operation center
232510	240290	that blocks the slice of railway when the train is passing out,
240290	245170	taking into account the data received through the access counter.
245950	248790	We have it in one track.
248790	252790	We have two tracks and we have reversible two tracks.
252790	260730	So, we can have control in every direction you have your train passing.
260730	268910	The control is just set by the side where these beacons in the railway are set.
268910	279690	So, if you are in one direction, the beacon that is controlling you is in the right side of the railway.
279690	283870	And if you are in the opposite direction, in your direction,
283870	289370	there will be another beacon controlling that you are passing through this segment.
289550	291850	And this is the central light traffic control.
291850	294850	This is specially in Madrid called Chamartín.
294850	302290	And there are like lots of people working here controlling that the trains don't collide.
302290	303450	It's specially.
304530	312730	We have based this investigation in one of the systems that is present in Spain that is called ASFA.
312730	316070	In Spanish is Anuncio de Señales y Frenado Automático.
316070	319690	In English, Announcement of Signal and Automatic Braking.
319750	327470	What it does is support the train circulation based on a core capacitor circuit connected to a signal.
327470	337690	And depending on the signal, the aspect, they need to transmit one frequency or another in the onboard equipment.
338190	340330	So, this is the whole process.
340330	347850	You have a railway signal that connects to a unit that gives a signal to a beacon.
347850	354130	The beacon is received by the perturbation, is the name?
354130	357230	The perturbation is received by the antenna.
357230	367690	And this antenna gives a signal to a console that is inside the train and gives different aspects related to different signs.
367690	376770	The first of all is that you can have fixed aspects that are signals or beacons that only transmit one signal.
376770	382670	And variable aspects that have beacons that have different signals.
382770	384830	And it depends on the frequency.
384830	392130	They leave the antenna is the aspect that the railway operator is receiving inside.
392450	402910	So, the first problem is that as you can see, a couple of different signals give different aspects.
402910	410890	Or the same range of frequencies give different signals to the railway operator.
411130	419810	So, for example, the L1 and the L3 are in the same range of frequencies.
419830	428110	So, we can have little problems when we are not controlling it as much as we need.
428490	431910	And this is the panel that the operator receives here.
431910	447230	It's completely in Spanish because this picture is taken on open source documentation that the railway company in Spain have completely publicly available on the internet.
447230	451550	So, this is a screenshot of their documentation.
452230	455210	And this is what the train driver sees.
455210	471650	As you can see, this little blue dashboard has some buttons that represent the acknowledgement of the train driver that they have received this signal or the advice of this signal.
471650	478030	So, they push, I have acknowledged this signal and I have to keep moving forward.
478790	491270	And we get into what we call the dark territory because there have been several serious accidents in Spain related to the control of the signals.
491930	507550	The first one is the Huarte Araquil. It was like 30 years ago and it was related to not having any kind of beacons or signals or systems of control on the railway.
507550	524050	And the train driver saw a signal but misconfused the signal and misinterpreted what he saw and lots of people died.
524050	533290	And then, like 10 years ago, when was the Galician accident? It was 10 years ago, right?
533910	546830	They had a huge accident in Spain too where kind of lots of people died because there was a misconfiguration between other factors.
548790	559050	So, it could be not completely avoidable but less difficult to fix.
560230	574230	So, we have these beacons. These are the beacons that we have in the ASFA systems and these beacons sit on the railway and you can receive it by the capture.
578190	580730	So, I have to work here.
582170	591470	So, we have the beacon in the black box. The wood doesn't count. It's only the black box.
591470	598330	And inside this black box is a coil and a capacitor.
598330	611350	So, we have a coil capacitor circuit in closed loop. No batteries, no voltage here, no batteries, no IC power.
611350	621130	So, it's a passive device that is powered by the train when the train passes along the track.
621130	633070	So, we have here a very simple circuit with a coil and capacitors in parallel.
633070	642510	So, I'm going to explain why this setup makes sense.
642510	648790	The technology behind the ASFA system is based on induction.
649050	660670	As you can find in your kitchen or in your phone charger, wireless of course, and even in RFID tags and so on.
660670	667630	But it's a very primitive kind of RFID tag.
667630	674570	Very primitive because there is no data transmit, but it's only an aspect transmit.
674570	676670	So, we're going to see that.
678690	682730	All of this is in Spanish because it's open source.
683070	690290	All of this is publicly available if you Google that.
690290	701790	So, a guy put this on the internet that, oh, I have to repair an ASFA tester.
701790	708190	An ASFA tester is a device that will be on the train part.
708190	717550	So, this device, you put this device above the beacon.
717790	722990	And this device reads what kind of beacon it is.
722990	729330	So, we have two coils here. The two circles are two coils.
729330	735330	One coil is for transmit, to give power to the beacon.
735330	738270	And the other one is to receive power.
738590	751950	So, what about if you use a circuit with a coil and capacitor to emulate a beacon?
755610	761190	We could replicate a beacon and we could make a fake beacon.
761190	768350	So, we require wire and a capacitor. That's all.
769630	771610	It's enough for that.
772370	779750	So, I think this is the most important slide here in this talk.
779750	786550	Because it represents very well how the setup is configured.
786550	790450	So, we have the beacon itself in the DAC.
790450	797410	And the beacon is, as you can see in the diagram, we have a coil and a capacitor.
797690	806770	We represent a variable capacitor because you can change the capacitance of the circuit to change the aspect.
806990	813410	For example, if I want to transmit a red light, we change the capacitance.
814890	826030	This beacon is by default in red signal. It's the safest symbol that is red light, obviously.
826030	837510	So, if we put a smart current temporarily to that symbol, we can change the aspect.
837510	845610	So, we only need power only to change from red to another symbol.
845610	848970	For example, green or yellow.
849530	856290	And the other setup here is in the train part.
856290	864370	So, we have a capture that has two items.
864370	871570	We have a 111 kilohertz generator, IEC power.
871570	879650	So, we can generate a frequency of that kind with also a coil and a capacitor.
879650	896310	At the same time, the train has put together another device that receives that power by inductance coupling.
897570	905050	Oh, I've seen 111 kilohertz. That's okay. It's working.
905050	932750	But, when the train passes through the beacon, an inductive coupling is produced between the first coil that transmits 111 kilohertz,
932750	944510	the second coil that receives that signal, and the third coil that is on the tracks that modifies the inductance coupling to another frequency.
944510	948910	To the frequency that this configures that beacon.
949270	952710	It's easy to understand. Yes? Okay?
955550	956810	It's okay.
956990	958270	Easy.
959390	963570	So, that's our desk.
964250	970370	And we have the transmitter part.
970510	978470	Firstly, to make the fake beacon, we need the framework like Java, Javascript, and so on.
979470	983870	So, this is our code editor.
983870	993250	So, we need a framework to test the beacon at that point that was not existing.
993250	996490	So, firstly we need a transmitter.
996650	1007670	So, we set up a coil and a capacitor that is suitable to transmit power at 111 kilohertz.
1007670	1008790	Okay?
1009550	1018970	We use a device called Nano VNA that is a vector network analyzer that you can buy.
1019510	1021930	It's cheap.
1022430	1027370	You can see the impedance, the inductance, the resonance, and so on.
1028830	1031970	So, this is the receiver part.
1032930	1042650	It's more or less the same setup, but instead of transmitting power, it receives power.
1042650	1052570	So, it's fine-tuned to capture frequencies from 50 kilohertz to 111.
1053570	1061330	So, it's a very wide range to capture all the aspects of any beacon.
1061530	1066770	So, we have a signal generator, also from AliExpress.
1067310	1076210	And we receive that signal on the receiver part.
1076950	1080870	So, we already have the tester.
1080870	1084090	So, we need to make the beacon itself.
1087050	1097130	So, what if two people here or not here could replicate this beacon and show it to you right now?
1098290	1099110	Shall we?
1099430	1100810	I'll pay you for that.
1100810	1101970	It's my turn.
1104090	1105790	The tester.
1109550	1118150	Well, the most important part of this tester we did is a can of morteruero de cuenca, which is...
1118150	1123090	They are laughing because morteruero de cuenca means meat in a can.
1123710	1130110	So, it's what helped us to have this coil or setup.
1130110	1132610	And it works perfectly.
1132610	1137190	So, meat in a can may be a key factor in this tester.
1137350	1142410	And the second part is the beacon.
1142410	1159310	So, we could replicate the beacon by following the calculus that you can do with data that is completely, I repeat, completely available on the internet in open source information.
1159310	1164470	So, this one is the L5 as you saw.
1165690	1166690	One second.
1166690	1171470	Here, this one is the L5, the yellow sign.
1171710	1179870	And for legal reasons, we cannot show you here on this stage the proof that this works.
1179870	1185790	But outside of the stage, anyone that comes and asks will have the answer.
1185790	1186730	Okay?
1188710	1193710	We don't want to go to jail, but we like to brag about our things.
1194910	1195830	Yeah, okay.
1206530	1207490	Hacking.
1207490	1208550	Hacking.
1212170	1221790	So, as a computer engineer, I have to make the work of the electronic engineer here.
1222110	1229730	So, if any electronic engineer here can come to explain that, we rest here.
1229730	1238030	So, if there is any electronic engineer in the house, is there any electronic engineer here?
1238210	1239630	Just raise your hand.
1239630	1241850	Okay, we are sorry in advance.
1245750	1262170	So, when you put current in an inductor and capacitive circuit, it's like magic, you know.
1265270	1268810	Indeed, it's black magic here.
1268830	1272990	Because, would you put a set of frequencies?
1272990	1283310	So, the circuit behaves differently according to the frequency that you put in the circuit.
1284150	1290030	We, the computing engineers here, we couldn't understand this.
1290110	1303690	Like, the circuit behaves as a capacitive, as a virtual capacitor, as a virtual resistance, or as a virtual inductor.
1303870	1306510	It's okay, eh? That's cool.
1307510	1314890	You don't get rid of virtual devices even if you are an electronic engineer.
1315590	1327510	The point here is to design a circuit that resonates at a very specific and very narrow set of frequencies.
1327510	1336810	Indeed, you need to resonate at a very narrow interval of frequencies.
1336810	1350990	So, as you see, as Gavs explained to you, we need a circuit that resonates at a certain set of frequencies to make the train think that this is a symbol.
1350990	1360270	It's a real symbol. A red light, a green light, a yellow, even a yellow and green light. That exists.
1360890	1364130	It's training stuff, don't worry.
1365250	1371870	So, we need that, but how do you do that? We are computing engineers.
1371870	1389730	So, we need to wire, by public photos and seeing the device in real world, we can get the dimensions of the beacon.
1389730	1401850	We can guess that because there is a public documentation, but they don't give you the exact details to make the beacon, obviously.
1401850	1405210	So, you have to guess that at some point.
1405630	1421110	So, guessing the dimensions of the beacon and the shape, indeed, we started to wire one turn, two turns, three turns, all day long.
1421110	1430850	So, we ask ourselves, what am I doing with my life? I could be in the swimming pool.
1431870	1437970	So, we end with a lot of turns and what happens now?
1437970	1443230	So, we test it with the nano VNA and nothing works.
1443230	1449390	The resonance of the circuit is very far from the target resonance.
1449390	1456830	So, we cut the wire and we put on the nano VNA.
1456830	1462570	So, we start to wire another round of turns.
1462970	1477730	And we saw real time how this graph moves in real time, getting closer and closer and closer to the target frequency of the desired symbol.
1477730	1483210	So, turning and turning and messing it up and what the fuck.
1483410	1487370	So, we achieve one symbol.
1487370	1498970	So, indeed, this is not a real coil capacitor setup, but it is a double inductor setup.
1498970	1506650	There are two inductors put together and taking advantage of the parasitic capacitance.
1506650	1515250	We have a virtual NC circuit that makes the same work at the real device.
1515250	1519130	We know that the real device is one coil and one capacitor.
1519130	1528850	But this stuff is two coils put together and taking advantage of the parasitic capacitance.
1528850	1533750	So, this is the center frequency.
1534150	1539150	And the less frequency, the circuit behaves as a capacitor.
1539150	1544770	The more frequency, the circuit behaves as an inductor.
1544790	1550370	So, at the very exact point, the circuit is a resistance.
1551650	1563010	So, this is the graph that you have to see to make sure you are doing right.
1564710	1569570	In order to achieve the correct resonant frequency.
1569570	1580030	The yellow line is the resonance that has to be just in the middle of the graph.
1580030	1584390	The green line is the impedance.
1584930	1589670	So, it has to be as low as possible at the resonant point.
1590010	1592950	And the other one is the standing wave ratio.
1592950	1600970	That is how well is the energy transferred from the system to outside and backwards.
1603720	1606420	So, that is the device.
1606420	1611720	As you can see, it is very complex, very expensive.
1611720	1612860	And beautiful.
1612860	1614060	And beautiful.
1614060	1617820	Because it has... I think this is Amazon cardboard.
1618060	1619300	Thank you, Amazon.
1619300	1620300	Thank you, Amazon.
1622400	1629540	You have to use isolated copper wire.
1631980	1638600	Once we have this item, we have to put glue on the device.
1638600	1646480	That is very important, because you make with the fingers any movement and the frequency changes.
1646500	1648340	It is crazy.
1648580	1653660	You take the device and no more words.
1653660	1664340	So, you have to glue the wire to make sure that the center frequency remains at the target frequency.
1664340	1668100	In the tester, the most important was the can and here is the glue.
1668420	1675480	The most important thing in the tester is the can of meat.
1676560	1681940	And here is the glue, the key component.
1683660	1688920	I am seeing the electronic engineering looking at us.
1688920	1690640	Sorry, really.
1691480	1694960	I have speakers for you to compensate this.
1697260	1701880	So, how do you know that this works?
1702860	1707820	Firstly, you have to know what to see.
1708420	1712840	It is a key factor.
1712840	1715920	You have to know that I have to see things.
1715920	1726360	So, in the picture of the left, we have the default frequency being received by the receiver device.
1726360	1730220	So, we transmit 111 kilohertz.
1730220	1735780	Okay, I'm working. I'm receiving the same frequency as the train transmits.
1735900	1741620	That's a permanent testing that the system works.
1741620	1755300	So, the left one, the right one is when you pass through a beacon.
1755300	1762440	So, you see another spike on the spectrum analyzer.
1762440	1769060	You have another spike that represents the resonant frequency of the beacon.
1769060	1771380	So, that works.
1776950	1783610	Thank you for this sincere applause.
1784470	1789150	So, where should I place my fake beacon?
1789150	1797370	Well, the official documentation already tells you where to put your device, your fake device.
1797370	1799750	So, that's the dimension.
1799750	1808110	You have to keep a distance from the rails and a certain height from the sleepers.
1813490	1818630	So, the most important thing is that it matches the position perfectly
1818630	1828290	to make all the setup take place, the induction coupling.
1828290	1835890	This is not a radio frequency stuff, but it's more an inductive coupling.
1837910	1848610	We firstly thought that it was a radio frequency problem, but it's more like an inductive coupling, as Gabriela says to you.
1850790	1858170	So, what about other systems all over Europe and worldwide?
1858170	1862330	Well, in the UK you have the AWS system.
1862330	1864030	Not powered by Amazon.
1864030	1865810	Not powered by Amazon.
1867010	1878590	Indeed, the Spanish system is the most sophisticated legacy system because they have more symbols to transmit.
1878590	1883270	The UK system only has two symbols, go and stop. That's all.
1884290	1888350	So, you see a star in the cabin?
1888350	1889550	It's called a sunflower.
1889550	1890890	A sunflower.
1891530	1894430	It's okay? Not okay. That's all.
1895770	1902430	And this is the Indus-E. In German it's very...
1908790	1913450	It has a name in German that we don't know how to spell.
1913450	1918450	So, let's call it Indus-E and let's have some fun.
1919370	1921990	We don't have to offend German people.
1923770	1936210	So, there is also that kind of systems that is based on the same principle, but they are not one-to-one compatible.
1936210	1943290	So, you will have to make your own device adjusted to that kind of setups.
1945310	1961110	And that is the North American system that also is based on the same principle, but they are not entirely widespread on all the tracks.
1961110	1964350	It's intermittent. It's an intermittent system.
1965930	1971490	But it's based, again, in the same principle, by induction.
1974150	1976710	What about new things?
1979370	1989070	Well, we talk about legacy system that was invented in the middle of the 20th century.
1989070	1996470	So, what about new system? We are talking about new because it was invented in the 90s.
1996470	1997890	Cool.
2000010	2012690	Well, we have the ATCS, the European Trade Control System, that is based, again, on beacons, but they transmit digital data.
2012690	2017650	So, we will talk about this next year, maybe.
2018650	2031430	So, the main thing here is that all the European region has very different systems.
2034390	2037710	They thought, what about a new protocol?
2038090	2046950	So, we have a new protocol that covers all Europe, but it is not implemented already widespread.
2046950	2051410	Only in high-speed trains and very crowded lines.
2051410	2055270	Because it takes money, you know.
2056550	2061310	So, it combines beacons called Euroballis.
2061690	2064350	I like more beacons.
2064970	2074310	And they combine that system with some kind of mobile communications, changing the protocol.
2074310	2079550	It is called JCM-R. R means railroad.
2082190	2095070	So, as you have seen in the whole presentation, what we have discovered is that by inductive coupling,
2095070	2111470	we can reach most of the signaling system in Spain, because they don't use this system, ETCS, in most of the railway segments.
2111470	2121670	So, what we have is now security problems that was in their time a really robust protocol.
2121670	2128770	Because these kinds of protocols are not being properly revised.
2128770	2136870	So, one of the main things that we receive when we talk about this investigation is why we are talking about this.
2136870	2146770	And the reason is that we want companies to revise these kinds of systems.
2146770	2154950	For example, we can adopt this new ETCS system.
2154950	2168950	This system started being quite less robust, but now it's like in level 3, developing level 3, and having very good results in terms of security.
2168950	2180750	But it costs money, and money is a key factor in the decision making of the petitions and authorities related to this.
2180750	2191930	So, one of the other measures that we can offer, and we are completely willing to work with authorities in that,
2191930	2198010	is the usage, for example, of trained drones that are being developed.
2198530	2203870	This one is AI generated, because I didn't find the picture.
2203870	2210990	Italy has now quite bigger, but yet tiny, trained drones.
2210990	2222070	And these trained drones can be deployed through the whole railway segments to investigate or inspect the beacons,
2222070	2232570	just to know if there is anything, any weird objects, for example, in the railway, or anyone has covered these beacons.
2232570	2248690	Because these kind of beacons, asphalt beacons, can be just shut down by putting above them a plate, a slice of lead.
2249190	2261510	So, we are trying to make quite a concern and talk with our authorities to make them inspect them.
2261510	2270670	Another object they can use are normal drones, just surveillance, and looking at these railway segments,
2270670	2279710	just to, again, know if there is any strange objects in the railway segments.
2279710	2288330	And, of course, we can use testers and pass testers more frequently, just to know everything is okay with the beacons.
2288330	2300770	Actually, we don't have to create this chaos or fear, just want to have more intensity in the inspection rounds,
2300770	2307750	or to change these devices into more newer devices around the world.
2307750	2318070	Because this investigation is based on the most robust legacy system, that is the ASFA, but here Amtrak is using it.
2318070	2326250	UK is using it. Not the same, but less robust systems. And, of course, Germany, Austria, Hungary.
2326250	2335570	So, we can work to change this, or at least to revise this, to keep everyone safe around the world.
2335570	2341030	So, thanks everyone that helped us to get here.
2348560	2353920	And, of course, we are here for the questions.
2358480	2368280	Right. Thanks for the talk. Very educational, funny, and scary, honestly.
2369200	2377440	When you have a signal that can display multiple aspects, how does that relate to the meat cans that are set on the track?
2377440	2381920	Does it change its own resonance to reflect the current aspect on the signal?
2381920	2393640	Yeah, actually they do. Because what differentiates one signal through the other is the state they leave the capacitor circuit in the train.
2393640	2401760	So, the difference between these frequencies is the aspect the operator receives inside the train.
2402840	2404040	Okay.
2404040	2413830	Okay. What are the related risks or threats related with this finding that you get?
2414380	2424240	Mostly, beyond that, to prevent accidentality in the trains, what are the risks?
2425130	2433680	Well, actually we started this investigation because in Spain we are in terrorist alert 4 from 5.
2433680	2443420	So, it's quite important because most of the biggest accidents that have happened in Spain have happened with trains.
2443420	2462260	Actually, we have a real difficult incident that happened on the 11th of March that marked before and after on the way that people seized the railway and the metro in Spain.
2462260	2470660	So, any people with the right amount of motivation and knowledge could exploit this.
2470660	2485580	So, we want to make a wake-up call before something like this happens and make people invest more time and money to keep the safety around Spain and, of course, around the world.
2485580	2488240	Because this can happen mostly everywhere.
2489440	2491900	So, thanks. This is really fascinating.
2491900	2501980	I'm curious to know if there are any other systems that the drivers rely on to make their decisions about what speed to control the trains.
2501980	2510000	Is it primarily these beacons that they are using for that? Or is there any other input they are also using to make the judgment?
2510400	2512580	Sorry, I didn't hear you.
2513140	2515620	Is there another system?
2523370	2538590	Well, the train driver has the real signals and the system is an acknowledged system to make sure that the train driver has seen the right signal.
2538590	2543870	So, by default, there is no other resource.
2543870	2552610	And the point here is that you could make a red signal device in the middle of the track with no lights.
2552610	2553980	For example.
2555340	2556890	Thank you.
2557570	2559750	Any other questions?
2560970	2562030	More questions?
2562030	2563000	More questions?
2564130	2564900	No?
2565330	2566900	Thank you.
2568170	2569890	Thank you very much.
