My name is Alberto, like he told you. I'm from Spain. My accent is not the best. I'm here to speak about how to hack all the transport networks of a country, how to make black hacking, how to hack critical infrastructures. So, let's begin. This is the index of the main topics I'm going to speak about in this speech. First of all, I want to introduce myself. This is me when I was pretty, and this thing is handsome, handsome for men. I'm from Valladolid. Valladolid is a city 200 kilometers from the north of Madrid. I'm 24 years old. I'm single. If anyone wants to... No, I'm not like girls. Sorry. Okay, I study maths and IT, system IT. I don't know how to say in English. Maybe it's the same, the career, system IT. In Salamanca. Salamanca is another beautiful city in Spain. It's near Madrid, two hours. This is Salamanca. This is Salamanca. It's so cool. And I want to introduce myself. Thank you. And I'm going to tell you how I learned English, because this is very important to me. I was in a university city. Salamanca is a university city. In Salamanca, there are a lot of young people. But not only Spanish people. There are a lot of parties. This is the main square in Salamanca on Christmas. Okay, all the students go to the main squares and drink a little bit. I, in this parties, I met a lot of foreign girls, foreign people. So, I want to appreciate you, appreciate the American girls. I want to appreciate the Irish girls. I want to appreciate the Ibiza people who is going there to learn English with me. I want to say thank you to all of you, all of your girls, because they really helped me to improve my English. Okay, so... Where did I get this material? I'm going to talk about some material that I'm going to be clear in this. I want to be clear in this. I did not do it. No, it's not a joke. Really. Okay? I just don't know the torrent that I found around. Okay? I don't have the knowledge to do those things. I just... I was looking for porn. That's all. Okay, that's all. Perfect. Clear. This thing must to be clear. Okay. Who I think that are the really guys who did it, who did this research? I imagine that something like that. Someone like this guy. I get something. Some pictures in the torrent. This picture was around. And I thought this was the really guys who did all this stuff. Okay. Related research. There was a similar talk about the same topic that I'm going to talk this evening. Now. This is anatomy of a subway hack on DEFCON 16. It was a special... My name is Alberto. I told you. I'm from Spain. My accent is not the best. I'm here to speak about how to hack all the transport network of a country. How to make black hacking. How to hack critical infrastructure. Okay? So, let's begin. This is the index of the main topics I'm going to speak about in this speech. Okay? First of all, I want to introduce myself. This is me when I was pretty. And these things. Handsome. Handsome for men. Okay? I'm from Valladolid. Valladolid is a city 200 kilometers on the north of Madrid. And I'm 24 years old. I'm single. If anyone wants to... Okay? No. I'm only like girls. Sorry. Okay. I study math and IT. System IT. I don't know how to say in English. Maybe it's the same, the career. System IT. In Salamanca. Salamanca is another beautiful city in Spain. It's near Madrid. Two hours. This is Salamanca. And I want to introduce myself. Telling to you how I learned English. Because this is very important to me. I was in a university city. Salamanca is a university city. In Salamanca there are a lot of young people. But not only Spanish people. There are a lot of parties. This is the main square in Salamanca. In the Christmas. Okay? All the study... All the students. Go to the main square. Okay? And drink a little bit. I... In these parties I met a lot of foreign girls. Foreign people. From... So I want to appreciate you. I appreciate the American girls. I want to appreciate the Irish girls. I want to appreciate the Ibiza people who are going there to learn English with me. I want to say thank you to all of you. All of your girls. To improve my English. Okay, so... Where did I get this material? I'm going to talk about some material that I'm going to be clear in this. I want to be clear in this. I did not do it. No, it's not a joke. Really. Okay? I just downloaded a torrent that I found around. Okay? I don't have the knowledge to do those things. I just... I was looking for porn. That's all. Okay, that's all. Perfect. Clear. This thing must to be clear. Okay. Who I think that are the really guys who did it. Who did this research. I imagine that something like that. And... Someone like this guy. I get some pictures in the torrent and this picture was around and I thought this was the really guys who did all this stuff. Okay. Related research. There was a similar talk about the same topic that I'm going to talk this evening. Now. This is anatomy of a subway hack on DEFCON 16. This was a special talk because there was so many conflicts. You can see here I... Can I read? Court blocks MIT students from sewing subway hack. Dude to DEFCON speech on subway car hacking. So on. Okay? So this is the related research. I'm going to speak about something like that that I found in the torrent. Okay. Whoops. Wait. First of all, the first target is a kind of machine who is in the subway stations. Okay? It's just an informative machine. Only to see the best route to going from this station to this other station. The best route to... Anyway. The information. Information stuff. Only information. This kind of shit. Okay. So this machine I call them Pinger machines. They say try me. This is not a real machine. Okay? This is just another machine that say try me. All of you, did you see a machine that say try me? You try, of course. So the Pinger machine. There were a lot of informative machines in the subway station. Like I told you before. The machine has informative function to search the fastest route or tourist info. That's all. That's all. This is a stupid machine at first. But then... Okay. There are many ways to touch in. It's a touch screen machine. You touch the screen and there are so many ways to go to get some free internet time. To surf on the internet. To check your Facebook. To check your emails. It's very easy. So you have to touch this icon. Then you have to touch this hyperbuncle. Then you have to touch this thing. And then you have the Google for you. This is so easy. So important here. And there are some protections because they try to download executable X file. But there are so many restrictions. Canine. This is tough. But is there anything better than a cell? Okay. This machine has a print option. Just say print to a file. Then you go to system 32. And you drag and drop to the CMD execution. That's all. Trivial. Okay. Then when the guys these pretty guys that I showed you before has a command cell CMD. They connect to the FTP and download a server of a rat. Okay. That was all. And here you have the rat application tool to look at the files and all the stuff. Perfect. But I want to be clear. This is a stupid machine. Okay. At first. It's just for informative function. The boys who did all this stuff thought that it's not important. There is no juicy files. There is no juicy application into these machines. But looking for juicy files. Okay. The machine just see the router. First of all the typical network scan to see if there are a lot of other hosts in the same network. And this stuff. But there is only the router. The router was the only one who we can see. But the router has not the default password. But it's okay. But we they look at the application who was installed in this machine. And they found this application. They said ping. Pinger machine. I don't know what's that. So I look around. They look around. There was there was an interesting application called There was a config file with the SQL server connection string. Perfect. The IP There was a public IP. Not internal IP. Perfect. Okay. But anyway. This is a stupid machine in the middle of the station. I'm pretty sure that this application is not bad. Okay. It's harmless. A harmless application. But how it works is he makes a ping to the IP of the server. And so on. And this stuff. But here you have all the tables. I make a string. Just strings to get the strings of the application. And I get the tables. The columns. I get some info about the people who developed this application. And finally I realized that this application is used to control all the stats of all the country. Of all the trains of all the country. Okay. It was the stats of the time of arrive, the history and this shit. This is a stupid machine. A machine just to look the faster road to go somewhere. But there is installed this kind of application. Why? Why? Stupid. Really stupid. I have the connection string. They have the connection string. User password and all of this. Okay? Whoa, whoa. Ah. Okay. I don't see here. I'm gonna stay here. Okay. Possible bugs. Possible bugs. Some parameters are sent to the application. One of them called ID terminal is extracted from a TXT file. Okay? So... Okay. Just to remember this is a SQL server. If we have the enough privilege we are able to drop database exec to the user and connect remotely to this system. Just select all the statics of the subway or just to get some info, some juicy info about the frequency, status, all this stuff. Okay? I have funny story because someday all these machines disappear. So these guys went to some station to ask to security man why this machine was not in his place. In his place that the machine used to be. And this guy said to me... Okay, okay. Okay. I want to be clear. If I say me, it's because it's so personal for me. I found this story... Okay. Yeah. It's true. My English is the worst. I'm sorry. I was to say. Okay. Let's go. So I go there and the man told to me that okay, this machine was removed like two weeks ago. But do you know I am a hacker. Oh yeah? Your job is security man. You don't like like... You don't look like a hacker. You don't have this cool hair dress. And he says yeah. I know a way to go to check my email. Your password is mine. Okay. More or less he was this guy. Okay. Let's continue. Getting cheapest subway tickets. This is the kind of tickets used in this city that I don't want to say the name. They try to read a row. The tickets. The magnetic strip. They try to read it in this thing. The credit card reader. Okay. But it doesn't work because if you strip faster or not faster the dump is different. Okay. It doesn't work. This is the sectors and prices. This is very important. Okay. In these cities there are a lot of sectors. You can see A, B1, B2. You can see it. Down in the left and the right. Okay. If you want to travel further you have to pay more. Typical. Okay. This is the those are the prices to travel. Okay. If you go to the A zone you pay like 51 euros I thought. 51. Yeah. If you go further you pay 123. There is a lot of prices and sectors. But you can read Tercera Edad. It's like retired people. Old people. Okay. The old people. The people who is older than 65 years old. They just pay 11 euros Cool. For them. This is the monthly pass. Okay. There are two important things in this pass that Okay. This is important thing. This number. It's not a number. These letters and numbers. Q. This thing. And the barcode. Do you see the barcode? The barcode and this pass. Okay. There are two important things. Okay. When I want to Oh. Another thing. It's important too. Do you see B2? In the middle. In the head of Lisa Simpson. B2. It's the sector. Okay. Three things. The sector. This number. This string. And the barcode. Okay. The barcode in the pass is used to renew the monthly ticket. Okay. So I have the barcode. I introduce the barcode into the machines. And then I pay and I get the new ticket of this month. Okay. The barcode has this format. But they realize that the barcode is a character and the pass number. I showed you before. Okay. This is the barcode. So if we change this character, we can get the older older older people ticket. So it's so cheap. We can travel with the older people ticket. And we can generate in the machines is not to clone. This is not. They are they was paying for the tickets. Okay. But they has not 65 years old. So everybody knows that will do fast in tool. Contest application tool. The bar intruder or I don't know. To make fast in things. But the new fast in techniques for them was was a guy with barcode trying every barcode in the machines to get was the real character that he has to use to get the older ticket. Okay. So finally a lot of barcodes. Introducing the barcodes in the machines. Okay. Finally we got this ticket. This is a 65 years old ticket that they generate in the machines. Okay. They can generate any number. This is the pass. It's hacker. Oh. Nice. I did not realize until now. Okay. So thank you. They can travel in all the sectors only paying the 11 euros. Okay. So nice. Okay. Casualties. The ticket is yellow. Yellow ticket. The usual ticket is orange or white. So if someone of the staff look at you when you are introducing the ticket in the machine to enter in the subway, this ticket works with the subway, with the buses, with the local trains, with all this stuff. So if someone of the staff is looking at you when you are introducing your ticket in the machine to go to the subway, they say no. Come here. So our friends as I told you before had some casualties. 93 euros because this guy look at him when he was introducing the tickets. So but our friends that were so so smart make some improvements in the tickets. Okay. They just put the magnetic strip strip the magnetic strip paste it in a usual in a usual ticket. So finally RFID. Next target. Okay. There is a new RFID system in the subway. It works with a zone only. A sector. Okay. In the middle of the town only. Okay. But RFID is used by the staff. Aha. Okay. The staff holds his RFID in the neck. Like you with the badge. So it's easy to get close to them to ask a question. They are so kind. They are so kind. Yep. So if we mix an ultrabook or any other computer and a touch tag this is a reader of RFID tags. Just a reader. And you're going for a visit. This is a I think. I don't know because I'm not the guy. But I think that this is a cigarette box. And you can put the touch tag inside the cigarette box and going with the cigarette box asking for a question. Oh, sorry. Where is the faster way to go? Okay. And then you have the dump of the RFID and you just RFID hacking. Okay. To process information. To get the password of it. Okay. To get the password and clone it. And finally you have a RFID keychain. And you can access to all the sectors with this shit. Okay. I love the word shit in English. So shit. Okay. Thank you. Security cameras. Next target. There is a big camera in all the transport network. Okay. All the transport network is recorded all the time. There are several control centers like this. You can see that was the operating system used by the staff. Okay. XP. And there is a wireless network. There is wireless network. So many APs in all the transport network. Okay. What? Nice. But. But. Wait. SSID are hidden. . . Okay. Let's go. Okay. There are a lot of antennas. So many. So many antennas. Omnidirectional. Okay. And there are APs that are accessible from everywhere. Why? . . Man in the middle. So easy. Okay. But our guys was nice guys. The guys I saw you before. So they did not do anything with these things. They used another AP. . . . . . What's inside? There was not DHCP. But, Wireshark is our friend. ARP 2. Of course. So the guys just had to wait an ARP packet to know what's the range of the IPs to manually put themselves this IP, this subway, this, yeah. Okay. First of all, ARP scan. They found three hosts. There was our friend, our AP friend. The router and some other host. Port scanner of the host. Typical IP network pen testing. Typical. I'm not a magician. They was not a magician. So, a router. The router was, I don't know, do you see the ports open? Yeah? No? Okay. Wait. 21, 23, 80, and 1998. Nice. Okay. This is the router. But this is the other host. This is my favorite. 23 and 443. Oh, nice. And 50,000. Strange. Okay. They saw 443, this is HTTPS, so they accessed to this host by throw through HTTPS. And that's what they found. Oh. Invalid certificate. Okay. sign certificate. This is the way. SPC, SPC. What's that? Okay. I'm continuous. And I arrive here. SPC 5300. I have no idea. They have no idea what was that. I don't have idea. I just look at the torrent and I find this information. Wait, wait, wait. And I found about this hardware. Because it's a hardware. Okay? And I look what it is used for. And there is a web server. This is the web server. The slide before. And you can see. This is okay. You can control through Internet, GMS, wireless detectors, wireless detectors. Fire warnings. IP cameras. Audio gate pass. Door control. So, like in append testing. I have no knowledge to do that. But some friend told me that append testing is doing like this. Man in the middle. And invalid certificate was used. So, it's too easy to use our signature certificate in the middle of the client. And we have the credentials in clear. And this is cool. Because there is an invalid certificate. So, the admin is used to accept the invalid certificate. Who looks at the fingerprint of the certificate? Okay. I know you are so great. So, I'm going to show you how to do it. And maybe you are. Do it. Do it. But we can go deeper. More funny. Do you remember the port 5000? No. 50,000? You remember in the port scan? Okay. There is an IP from another net mask. Net mask. Okay. So, we can take our range and we can start another append testing on this network. This network. Okay. But there is oh, wait. There is other IP who is sending the same. The same UDP. The same length. And all the same by other IP. I don't know. I don't know. I don't know. I don't know. Maybe my friends know. But they didn't write nothing in the in the in the torrent. So, I don't know. But we can go deeper. Because we can use an invalid certificate, send it by us and so on. And finally, our last last target. Train machines. Used to print tickets from a paid trip. Change tickets. Upgrade ticket. Cancel tickets. Buy tickets with credit cards. Nice. There was an update. Recently there was an update. Before that, anyone was able to get a login panel. Okay. I want to clearize this. The machines were touch. Touch screen machines. Like our first friend. Okay? Touch screen machines. So, there was a place in the screen. To print, print. And after that, you have this press in this zone and you get a login panel. Four digits. Four numbers only to get into the admin panel. Social engineering, do you know about that? So, we say, oh, what happened with my ticket? I don't know. I introduced my credit card and it's into the machine. What happened? Wait, wait, wait. Four numbers. Okay. But not number one. Number two. Number three. Now, just a couple weeks ago, this function disappeared. But we can get full access of all of these machines. These machines are present in all the country. All the stations of all the country. Okay? I have a video. Here. This is the way to access to the CMD. In a video. Going. One going. Select the destiny. Next. Change the date of the travel. And what's that? Internet Explorer. Thanks, Microsoft. Okay. And I'm going to show you how to do this. And do you know here? Do you know this staff who is here, these things? Okay. Look. Okay. Complements administration. Internet Explorer function. That's all. Complements administration. Internet Explorer has this option. You can call it what you want. Then, And click here, down, okay, it's a little geek, here, okay. But to get this Windows, and then you push, you press a lot of time, there. And there, there, there, there, there, and not responding. So thank you Microsoft, not responding. Close. Oh. . Okay. But, it's a touch screen, they fail sometimes, okay, but, finally, okay. Do you know, this is small. . . The keyboard on the screen is small. And this is a touch screen, this is a shit. . Okay. You want to press A, and you press S. You want to press W, and you press M. . . But we have our cell, our CMD. GZ applications. We are there. There's an internal application who has several functions. Accept any serious card to know the alarm temperature you can control the machine. . Good. You can open the door. So, so many stuff so many parameters with the machine. This is the application. Okay. There are so many, so many options. You can do a lot of things with the machines. . Remote control, all the time they were in front of the machine with the security cameras here, with the security hacking boys around there, okay? So, this is important. So, the guys that did all of it want remote control, like every one of you. So, there is an application for the remote control, but it can be only used if you are in the internal network. So, this is not useful. So, they want to remote control the machine, of course. They tried to install a Trojan, downloading the server of the Trojan by through HTTP or HTTPS, but all the records were forbidden. Only internal webpages were allowed. Tried to use FTP, it didn't work. Oh, shit. Losing hope. The machine resolves DNS request. Nice. So, they thought UDP traffic was allowed. Okay? Easy. They tried using FTP through UDP. TFTP. Okay? Do you know old-fashioned TFTP? Okay. TFTP is installed in all Windows versions. The machines run XP professional. So, there was TFTP client was installed in this machine. So, perfect. But timeout. It didn't work. But they still thought UDP traffic were allowed, but only using 53 port DNS. So, TFT used 69 by default. So, they changed the TFTP control settings to change the TFTP destination port to the 53. And then in his house, they make an Sorry. oil. But finally, they realized that this is the network map. The machines, router, DNS, firewall and the server, and little kin internet. Okay. All the traffic sent from router to internet is dropped. It's not allowed. But the DNS has a rule in the firewall that allow all the traffic. Only if the traffic come from this DNS. If you make an NS lookup directly to Google, it doesn't work. You have to use this DNS. And use the implementation of the DNS protocol. Okay? If I have no information, I ask to another DNS and these things. So, this is the saying I told you. So, to remotely control the machine, they have to use a RAT, remote application tool, through DNS. And now, right? There is an interesting project called DNScat who makes something like that. But our friends were a bunch of geeks. You know. This friend. I think it's maybe more than the first one. The real guy. I think so. So, these guys developed modular RAT using Python. Yeah. Python. It's heavy. Because you have to use to convert. To load all the libraries. It's heavy. But it's so easy to develop. It's too easy. Okay? The RAT server, okay, the server who was in the machine, in the machine, just asked to DNS server for A register. Okay? The DNS response. And if some of the response has some pattern, the infected system did did some action, okay? If you resolve my domain, it's one, two, three, 52. The DNS tool take the 52 and say, oh, 52 is there. Directory listing, maybe. Or is, whatever. It did not establish a connection. Okay? Nice. Finally, the executable file was downloaded using TXT records of a controlled DNS server. Okay? We have to install the server. The server of this Python tool. So, perfect. They use that to make the DNS request. The machine was remotely under their control. Perfect. Pivoting. The operating system using the machine was XP service pack two. Somebody knows NetApi. This is the final slide. Once the machine and all the other NetApi machines was under a control, the system So, it's time to look for UEC application and files. All the machines stored without encryption, the CC dumps of the clients. The credit card of all the clients. It's not necessary to make a hooking of the application. It's not necessary. Is there? It means that the bad guys, if those guys I told you before, if they were bad guys, bad guys, they are able to get all the CC dumps of all the customers of the entire transport network of the country. Of all the country. Okay? So, epic fail. Okay, that's all. I want to thank you for listening here today. I want to, wait, I want to appreciate the real guys that did all I have told you. To all of you for listening to me today, of course, this is, I'm so proud to be here, to be with you. To my family and friends, this is, yeah, I appreciate that. All those who want to understand how and why things work. Okay? Continues in this way. Thank you. Thank you. Thank you all. Have a good day. Bye-bye. Thank you. We are going to be doing Q&A in Q&A room one if you want to follow us. And, yeah, that's it for this room. Talk? Because there was... Yeah. So many conflicts. You can see here, can I read? Court blocks MIT students from sewing subway hack. Dude orders help to DEFCON speech on subway car hacking. So on, OK? So this is the related research. I'm going to speak about something like that that I found in the torrent. OK. Oops. Wait. First of all, the first target is a kind of machine who is in the subway stations, OK? It's just an informative machine, only to see the best route to going from this station to this other station, the best route to any way. The information, information stuff, all information that politics, information is kind of shit. OK. So this machine, I call them Bingham machines, they say, try me. This is not the real machine, OK? This is just another machine that say try me. All of you, do you see a machine that say, try me? You try, of course. So the Bingham machine. But there were a lot of information machines in the subway station. Like I told you before. Okay, the machine has Informative function to search the fastest route or tourist info. That's all That's all this is a stupid machine at first but then Okay There are many many ways to touch in. It's a touch screen machine Okay, you touch the screen and there are so many ways to go to get some free Internet time to surf on the internet to check your Facebook to check your emails It's very easy. This is So you have to touch this This this icon then you have to do that in this hyperbuncle then you have to check to touch this This thing and then you have the Google for you. Okay, this is so easy. This is not important here And there are some protection because I they try to download Executable X file. Okay, but there are so many restriction canine. Okay, this stuff But is there anything better than a cell? Okay, this this this web this this machine has a print option Just to say print to a file Then you go to system 32 and you drag and drop to the CMD exit execution. That's all Trivial trivial, okay, then when the guys this pretty guys that I saw you before Has a command cell CMD they connect to the FTP and download on a server of a rat remote application tool Okay, that was all Here you have the black sage, so the right remote application tool with the to look there the file I know the stuff this perfect. But I want to be clear. This is a stupid machine. Okay at first is just for informative function they I They get the boys who did all this this stuff thought that is not important There is no juicify. There is not juicy application into these machines, but But looking for juice files, okay. The machine just see the router, okay. First of all, the typical network scan to see if there are a lot of other hosts in the same network and this stuff, but there is only the router. The router was the only one who we can see. But the router has not the default password, but it's okay. But we, they, look at the application who was installed in this machine and they found this application. They said pingeador, okay. It's like pinger, ping, to make a ping, I-C-N-P, ping, okay, pingeador, pinger machine. I don't know what's that, so. I look around. I look around. They look around. There was, there was an interesting application called pingeador. There was a config file with the SQL server connection string. Perfect. The IP, there was public IP, not internal IP. Perfect. Okay. But anyway, I say, what was that? This is, this is a stupid machine in the middle of the station. This, I'm pretty sure that this application is not, it's not bad, okay. It's, it's harmless, a harmless application. But I am, how it works is he makes a ping to the, to the IP of the server and so on. The three-way handset to connect and this stuff. But here you have all the connect, all the tables. I make a string. Just strings to get the strings of the application. And I get the tables, the columns. I get some info about the people who developed this application. And finally, I realized that this application is used to control all the stats of all the country, of all the trains. Of all the country. Okay. It was the stats of the time of arrive, the history and this shit. This is a, this is a stupid machine. A machine just to, to, to, to look the faster road to go some, some, somewhere. But there is installed this kind of application. Why? Why? Stupid, really stupid. I had the connection string. Use, they have the connection string. User, password and all of this. Okay. Whoa, whoa. Ah, okay. I don't see here. I'm gonna stay here. Okay. Possible bugs, possible bugs. Some parameters are sent to the application. But one of them called ID terminal is extracted from a TXT file. TXT file. Okay. So. Okay. Okay. Just remember this is a SQL server. If we have the, enough privileges. We have, we, we are able to draw, drop database. Exec XP, CMD sale and user to other user and connect remotely to this system. Just select all the studies. of the subway, or just to get some info, some juicy info about the frequency status, historial, all this stuff. Okay? I have a funny story because someday all these machines disappear. So these guys went to some station to ask to a security man why this machine was not in his place, in his place that the machine used to be. And this guy said to me, said to them, okay, okay, okay, okay, I want to be clear. If I say me, it's because it's so personal for me. I found this story. Okay. Yeah, oh, it's true. My English is the worst. I'm sorry. I was to say. Okay. Let's go. So I go there. And the man told to me that, oh, I'm sorry. Okay. This machine was removed like two weeks ago, but do you know, I am a hacker. Oh, yeah? You look like, your job is security man. You don't like like, you don't look like a hacker. You don't have this cool hair dress. And he says, yeah, I know a way to go to check my e-mail. And I say, oh, your password is mine. It's more or less he was this guy. Okay. Okay. Let's continue. Getting cheapest subway tickets. This is the kind of ticket used in this city that I don't want to say the name. They try to read a row. Okay. The tickets. The magnetic strip. They try to read. read it in this thing, the credit card reader. Okay? But it doesn't work because if you strip faster or not faster, the dump is different. Okay. It doesn't work. This is the sectors and prices. This is very important. Okay? In these cities there are a lot of sectors. You can see A, B1, B2. You can see it. Down in the left and the right. Okay? If you want to travel farther, you have to pay more. Typical. Okay? This is the those are the prices to travel. Okay? If you go to the A zone, you just pay like 51 euros, I thought. 51, yeah. If you go farther, you pay 123. There is a lot of prices and sectors. But you can read tercera edad. It's like retired people, old people. Okay? The old people, the people who is older than 65 years old, they just pay 11 euros in all sectors. Cool. For them. So, math questions for you. Okay. This is the monthly pass. Okay? This is the monthly pass. Okay? There are two important things in this pass that okay. This is the important thing. This number, it's not a number. Leathers and numbers. Queue. This thing. rad顯 doors. You see the barcode? The barcode and the pass. Okay? Two important things. Okay. When I want to... Oh, another thing is important too. Do you see B2 in the middle, in the head of Lisa Simpson? B2 is the sector. Okay? Three things. The sector, this number, this string, and the barcode. Okay? The barcode in the past is used to renew the monthly ticket. Okay? So I have the barcode, I introduce the barcode into the machines, and then I pay and I get the new ticket of this month. Okay? The barcode has this format. But they realize that the barcode is a character and the past number I showed you before. Okay? This is the barcode. So, if we change this character, we can get the all their, all other... All their people, all their people ticket. So it's so cheap. We can travel with the all their people ticket and we got generate in the machines is not to clone. This is not. I'm... They are... They was playing for the for the tickets. Okay? But they has not 65 years old. So everybody knows that will do fast, a fuzzing, fuzzing tool, contest application tool, the bar intruder, or I don't know, Hydra, to make fuzzing, fuzzing things. But the new fuzzing techniques for them was fuzzing man, was a guy with barcode trying every barcode in the machines to get what's the real character that he has to use to get the all their ticket. Okay? So finally, after try a lot of barcodes, introducing the barcodes in the machines, okay, finally, we got this ticket. This is a 65 years old ticket that we, that they generate in the machines. Okay? We can... They can generate any, any, any number. This is the pass. It's hacker. Oh, nice. I did not realize until now. Okay. So, they... Thank you. They can travel a lot. The rest of the... In all the sectors only paying the 11 euros. Okay? So... Nice. Okay. Casualties. The ticket is yellow. Yellow ticket, the usual ticket is orange or white. So if some launch a staff look at you when you are introducing the ticket in the machine, to enter our price. in the subway. This ticket works with the subway, with the buses, with the local trains, with all this stuff. So, if someone of the staff is looking at you when you are introducing your ticket in the machines to go to the subway, they say, no, come here. So, our friends, I told you before, had some casualties. 93 euros because this guy looked at him when he was introducing the tickets. So, but our friends that were so smart make some improvements in the tickets. Okay. They just cut the magnetic strip. And then, paste it in a usual ticket. So, finally, RFID. Next target. Okay. There is a new RFID system in the subway. It works with a phone only. A sector. Okay. In the middle of the town only. But RFID is used by the staff. Okay. The staff holds his RFID in the neck. Like you with the badge. So, it's easy to get close to them to ask a question. They are so kind. They are so kind. Yep. So, if we mix an Ultrabook or any other computer, and a touch that is a reader of RFID tags. That's a reader. And you're going for a visit. This is a this, I think, I don't know because I'm not the guy. But I think that this is a cigarette box. And you can put the touch around it. And you can stack inside the cigarette box and going with the cigarette box asking for a quest. Oh sorry where is the faster way to go to Bob? Bye. And then you have the dump of the RFID and do just this RFID hacking, okay? To process the information, to get the the password of it, okay, to get the password and clone it and finally, you have a RFID keychain and you can access to all the sectors with these shit, okay? I love the word shit, in English, so shit. Okay thank you. Security cameras. Next target. There is a big camera circuit in all the transport network, okay? All the transportation network is is recorded all the time. There are several consequences. I'm going to put a link to the comments or something here. Control centers like this. You can see that was the operating system used by the by the staff Okay XP And there is a wireless network. There's wireless network so many a piece in all the transport network Okay, what nice Nice But but wait the SSID are hidden Okay, let's go Okay There are a lot of antenna so many but so many antennas plan out of the next omnidirectional Okay, that's okay. And there is there are a piece That accessible from everyone Why Man in the middle So easy Okay, but our guys was nice guys the guys I saw you before so they did not did not do anything with these things things. They use another AP. Okay. What's inside? There was not DHCP. But Wireshark is our friend. ARP2, of course. So, the guys just have to wait to get an ARP packet to know what's the range of the IPs to manually put themselves this IP, this subway. Yeah. Okay. First of all, ARP scan. They found three hosts. There was our friend, our AP friend. The router and some other host. Port scanner of the host. Typical network pen testing. Typical. I'm not a magician. They was not a magician. So, router. The router was, I don't know, do you see the ports open? Yeah? No? Okay. Wait. 21, 23, 80, and 1998. Nice. Okay. This is the router. But this is the other host. This is my favorite. 23 and 443. Oh, nice. And 50,000. Strange. Okay. They saw 443. So, they access to this host by throw through HTTPS. And that's what they found. Oh, invalid certificate. Okay. Self-signed certificate. This is the way. SPC, SPC. What's that? Okay. Continuous. And I arrive here. They arrive here. SPC 5300. I have no idea. They have no idea what was that. I don't have idea. I just look the torrent and I find this information. Wait, wait, wait, wait, wait. And I found about this hardware. Because it's a hardware. Okay? And I look what it is used for. And there is a web server. This is the web server. The slide before. And you can see. This is, okay, you can control through internet, GMS, wireless detectors, wireless detectors, fire warnings, IP cameras, audio gate path, door control. Okay. Thanks to the ARC. I have some questions. Thanks to everyone. Thank you so much, everyone. Hmmmm. Oh, hey. Who is gorgeous. Oh, too bad. I could say nothing in English right there. OK. Guadalquivir. Um. And this is cool, because there is an invalid certificate, so the admin is used to accept the invalid certificate. Who looks at the fingerprint of the certificate? OK, I know you are so Greeks, and maybe you are. You do it. But we can go deeper, more funny. Do you remember the port 5000, no, 50,000, do you remember in the port scan? OK. There is an IP from another net mask, so we can take our range and we can start another pen testing on this network. And this network, OK. But there is, wait, there is other IP who is sending the same, the same UDP, the same length and all the same by other IP. I don't know. I don't know. Maybe my friends know. But they didn't write nothing in there. In there. In the torrent. So I don't know. But we can go deeper. We can use an invalid certificate, send it by us and so on. And finally, our last target. Train machines. Used to print tickets from a paid trip. Change tickets. Upgrade ticket. Cancel tickets. Buy tickets with credit cards. Nice. OK. There was an update. Recently there was an update. Before that, anyone was able to get a login panel. OK. I want to clear this. The machines were touch screen machines. Like our first friend. OK. Touch screen machines. So there was a place in the screen to press this, in this zone and to get a login panel. And you get a login panel. And you get a login panel. And you get a login. And you get a login. Four digits. Four numbers. Only. To get into the admin panel. Social Engineering. Do you know about that? So we say, oh, what happened with my ticket? I don't know. I introduced my credit card. Is it into the machine? What happened? Wait, wait, wait. Four numbers. OK. But not now. A couple of weeks ago. go, this function disappears. But we can get full access of all of these machines. These machines are present in all the country. All the stations of all the country. Okay? I have a video. Here. This is the way to access to the CMD. In a video. Going. One going. Select the destination. Next. Change the date of the travel. And what's that? Internet explorer. Thanks, Microsoft! Okay. And, do you know, here, do you know this stuff? Who is here, this things? Okay. Look. Okay. Complements administration. Let's go. Internet Explorer function. That's all. Complement administration, Internet Explorer has this option. You can click here, down, okay, it's a little geek on here, okay. But to get these windows, and then you push, you press a lot of time, there, and not responding. So, thank you, Microsoft, not responding. Close. Oh. But it's a touch screen. They fail sometimes. They're bad. They're bad. Finally. Okay. Do you know? This is small. The keyboard on the screen is small. And this is a touch screen. This is a shit. Okay. You want to press A and you press S. You want to press W and you press M. Okay, but we have our cell. Our CMD. GC applications. We are there. There's an internal application that has several functions. Accept any credit card, turn off the alarm, temperature of the machine, you can control the temperature of the machine. Good. You can open the door, the machine door. So many stats and parameters of the machine. This is the application. Okay. Here, there are a lot of so many options. You can do a lot of things with the machines. Remote control. All the time, they was in front of the machine. With the security cameras here. With the security hacking boys around there. Okay? So, this is important. So, the guys. That did all of it. Wants remote control. Like every one of you. So, there is an application for the remote control. But it can be only used if you are in the internal network. So, this is not useful. So, they want to remote control the machine. Of course. They try to install a Trojan downloading the server of the Trojan by through HTTP or HTTPS. But all the records were forbidden. Only internal webpages were allowed. Tried to use FTP. It didn't work. Oh, shit. Losing hope. The machine resolves DNS request. Nice. So, they thought UDP traffic was allowed. Okay? Easy. They tried using FTP through UDP. TFTP. Okay? You know. Old fashion. TFTP. Okay. TFTP is installed in all Windows versions. The machines run XP professional. So, there was TFTP client was installed in this machine. So, perfect. But time out. It didn't work. But they still thought UDP traffic were allowed. But only using 53. Port. DNS. So, TFT used 69 by default. So, they changed the TFTP control settings to change the TFTP destination port to the 53. And then in his house, they make an add to redirect. But time out. Yeah. But finally, they realize that this is the network map. The machines, router, DNS, a firewall, and the lovely Internet. Okay. All the traffic sent from router to Internet is dropped. It's not allowed. But the DNS has a rule in the firewall. That allow all the traffic. Only if the traffic come from this DNS. If you make an NS lookup directly to Google, it doesn't work. You have to use this DNS. And use the implementation of the DNS protocol. Okay. If I have no information, I ask to another DNS and these things. So, this is the saying I told you. So, whoop, whoop, whoop, whoop. Okay. Okay. To remotely control the machine, they had to use a RAT, remote application tool, through DNS. No? Right? There is an interesting project called DNS cut who makes something like that. But our friends were a bunch of geeks. You know. This friend. I think it's maybe more than the first one. The real guy. I think so. So, these guys developed modular RAT using Python. Yeah. Python. It's heavy. Because you have to use Py2X to convert, to load all the libraries. It's heavy. But it's so easy to develop. It's too easy. Okay. The RAT server. Okay. The server who was installed in the machine. In the hacked machine. Just ask to a DNS server for a register. Okay? The DNS response. And if some of the response has some pattern, the infected system did some action. Okay? If you resolve my domain, it's one, two, three, 52. The DNS tool. Take the 52. And say, oh, 52 is there. Directory listing. Maybe. Or is. Whatever. It did not establish a connection. Okay? Nice. Finally, the executable file was downloaded using TXT records of a controlled DNS server. Okay? We have to install the server. The server of this Python tool. So... Perfect. They used batch to make the DNS request. The machine was remotely under their control. Perfect. Pivoting. The operating system using the machine was XP service pack 2. Somebody knows NetApi? NetApi? NetApi? NetApi in Spanish? And this is the final slide. You can hold. Once the machine and all the other NetApi machines was under control, it's time to look for UEC application and files. All the machines stored without encryption, the CC dumps of the clients. The credit card of all the clients. It's not necessary to make a hooking of the application. It's not necessary. Is there? It means that the bad guys, if those guys I told you before, if they were bad guys, they are able to get all the CC dumps of all the customers of the entire transport network of the country. Of all the country. Okay? So... Epic fail. Okay. That's all. I want to thank you for listening to me here today. I want to appreciate the real guys that did all I have told you. To all of you for listening to me today, of course. This is... I'm so proud to be here. To be with you. To my family and friends. This is... Yeah. I appreciate that. And all those who want to understand how and why things work. Okay? Continues in this way. Thank you.