Hello, and welcome to Rock the Cashbox. This talk is about hands-on ATM protocol analysis, and we'll be covering ATMs and, of course, the protocols that power them, at least one specific protocol. This talk has been made specifically for DEF CON 30 and Retail Hacking Village. I hope that for those of you who have not been at Hacker Summer Camp in some time, this will be a good refresher on ATMs. And if you're new to security and you want to know how ATMs work or you want to look at protocol analysis, this talk should and is tailored for you. I really wanted to focus on the basics and how protocols work. So with that, enough about the introduction. You really aren't here to just hear about ATMs. You're here to hear about the talk. You want to actually see it. So let's get started. So about me. I am Wasabi, sometimes Spicy, at least on Twitter, and I am a perpetual volunteer. That's how this whole event started, and that's how I get a lot of interesting ideas and work for some of the research I do. The events that I help put on are the Collegiate Pen Testing Competition, the global Collegiate Pen Testing Competition. My apologies. It's a very awesome competition, which is how we got to this. In this particular year, they were tasked with pen testing a bank. And I also participate in the Collegiate Cyber Defense Competition, which is the cyber defense aspect of that. These events are very interesting, and if you're a student, you should definitely look into getting involved. I am a researcher of embedded devices. I have researched voting machines, ATMs, of course, and many routers. And other devices of an embedded nature. The great thing about embedded devices, there's always something new. And you may think, oh, this device is secure and it's fully updated. Nope, never is. So it's a very interesting topic, and I can go on and on about all the embedded devices that are out there today. This includes the Internet of Things. But we're really focusing on ATMs, and these ATMs specifically are quite old. But they're still in use. So it should be an interesting rediscovery for everyone. Now, I will be sitting in the audience probably that way. And if you happen to see me, please ask questions. I know that this is a little weird. I was not either expecting to be doing an in-person talk via recording. But here we are. And I'm grateful for this opportunity because, for one, everyone's going to be wearing masks. And, two, this gives me an opportunity to make sure that all the content that I'm going to be talking about is going to be available. So the content and demo and videos are all working as expected. Because if anyone's ever done a talk before, you know things go sideways. Anyway, finally, I am a cloud engineer by day. So none of the stuff we're talking about really is my day job. But if you are interested in these topics, I'm happy to answer questions or find people who might know or do know the answers to these questions. Now, my partner with this was formerly known as JRWR. He's now going as Balsa. At least on Twitter. He is the creator and designer of Hatchan. He is working with the DEFCON Scavenger Hunt for some really cool stuff this year. And so you should go check him out. And also he does some really interesting work on some CTFs and things like that. Overall, he is a really good guy to work with. And if you have any questions about so many topics, please go reach out to him. He's awesome. Unfortunately, I don't think he's going to be here today because, of course, he's running the Scavenger Hunt. But I wanted to give credit where credit's due. And that was the team that helped make this happen. So anyway, you're here not to hear about us, of course. You're here about rocking the cash box. And fun fact, if you ever see an ATM do what's in the picture, it's fake. It's, in fact, so fake that it's been modified. It's tampered with. It's not real. In fact, the ATMs that we're dealing with, that is one of them. They have a guard to prevent money from flying out because, as one should with designing an ATM, you probably don't want the money flying out into the air. And, of course, what is a cash box? Well, inside of an ATM, you have to get money. Now, unlike a vending machine, you don't want to have the vendors who refill the machines handling the money. They could take some, do all sorts of stuff. So they are handed cash boxes with specific keys. And the machine can pull money out of that cash box. So our goal is to get the money out of the cash box. And how are we going to do that? Well, we're not modifying the ATMs. We are not modifying the firmware. We are not doing anything with the ATMs, in fact. The ATMs are stock. We have not customized them except for maybe a few repairs because the ones that we got were in pretty bad condition. We think this talk is going to be interesting. This talk, at very least, is interesting and unique because not many people have looked at the protocol that powers a lot of these ATMs. These ATMs are still in use. And so we are specifically talking about that protocol that powers them. And we are bringing ATM protocols, at least one of them, to the masses at DEF CON 30 Retail Village. So I'm excited that everyone here is interested in that. And, again, feel free to ask. Ask me any questions. So here's a photo. This was actually a couple of weeks ago. That is, in fact, the same ATM that we will be talking about today. And it, in fact, was out of order. I almost was tempted to offer them a fix, but I thought better of it. So the background of this event and why we got so many ATMs and why we had to do this was, ironically enough, the event was the Collegiate Pentesting Competition. And it was a prehistoric bank. And, of course, we got prehistoric ATMs. These are circa 2000 to 2004. And then there was an EMV update in around 2010. I guess that's still a lot more modern than some may expect. But they're fairly old by ATM standards. And so the simulated bank had a lot of custom applications. We had custom tools and everything built to simulate custom software and what a real-world pentest would be like. And the students are required to write a report on their findings. In previous years, some of the event, well, at least the past three or four years, teams have found odes on the software that we use. It's not that the software is custom in those particular cases. It's actually off the shelf. And we did not know there were vulnerabilities. But because of the pentest that the students are performing, they find vulnerabilities. It's actually very exciting. We look forward to those findings. We've done this every year. And so far, the teams have not disappointed us. It's a really cool competition. And if you're like, oh, my gosh, I don't think I can find 0 days, odes, sorry, however you want to say it, don't worry. The competition is meant, it goes through a regional qualifying and several rounds. We want it to be fun. So not every team finds vulnerabilities like that. But the key thing is it's a very interesting competition. We try to make it as realistic as possible. But you're probably wondering, how did you get ATMs? Well, it turns out you can buy anything on eBay and sometimes in great numbers. Turns out you can get an entire truckload of ATMs for maybe less than $500. And maybe you have to get that from one state to another and travel over 1,000 miles. You know, just things. And the good news is the Mission Impossible for ATMs was a success. The truck almost flipped once. And it was a journey. But purchasing ATMs, it's a very strange world. People are no questions asked. And they expect you to just deliver an ATM or get an ATM and buy it and take it away. So it's interesting. And all of these were from various locations. In fact, a lot of the ATMs as we were analyzing the configurations were from waffle houses. So some of them actually were sticky. One at least had some dead critters in it. They were pretty disgusting. But as it turns out, again, you can pretty much buy anything. This is the current listing. The bottom one is a single one for $300. We did much better than that. But you can see all the different variants of the ATM machines and parts. So here are all the ATM machines running in unison. I don't think that the audio will come through. And in fact, the video footage is pretty broken. But that was all the ATMs and doing their boot up. So unfortunately, the videos probably won't work today. So anyway, the problem with the ATMs was they were in bad shape. They were falling apart. And we needed to find a way to communicate them. So first we found the working ones. And then we had to figure out what to do. So it turned out there were a few things, not just one thing. And so we tried to find the user manual. Of course, the user manual is meant for users and not people trying to make the ATMs work. Most of the time, you go through a trusted vendor to buy your ATM and get a actual service for the payment processing. And our goal was to make them work. That was the most simple goal of them. We weren't trying to reverse engineer a protocol at the time. We just wanted to see what can we do. Can we make them dispense money? Can we do anything? Of course, it says out of order unless you do the correct sequence for the protocol. And so we were running into some issues. And our final goal was to make it as realistic as possible. We didn't have any defined goals. We didn't have anything other than make them work. So our one item was where we started. Of course, the ATM itself is a little bit different. It is a Tranax Minibank 1500. Hyosung is the brand who took that over as far as I know or one of them bought the other. So you see various names of those interchangeably. And some models actually support up to Windows CE 6.0 with EMV support. Now, Windows CE 6.0 end of life took place in February 2022. So I guess it was fairly modern until recently. But it is what it is. And the main problem, though, was that was released in about 2014. And they don't receive any updates since. And with that upgrade, you would be switching between the current protocol we use and Ethernet if you so desired. However, in our particular case, the ATM did not have Ethernet. It supported 56 baud modem. And that was it. And there was a safe. Fun fact. If you can get that door open on the bottom where the money dispenser comes out, most of these ATMs are actually programmed for code 1234 or 000. There were a couple where we actually had to get the locks like they were spin locks. And so we had to actually listen and get in that way. But for the most part, the ATMs were with a default code. Even though these were directly from the vendor, they said they didn't know the pins. So we ended up Googling. And that was the answer. Google is your friend. So specs. It's a pretty old system. It's powered by a 16-bit microcontroller. Main communication mechanism is the dial-up system. The pin pad contains the crypto keys. If you remove the pin pad, it resets. And then nothing works anymore. You have to reset it. Printer controller also uses the same processor and is an independent board. This allows you to update the main board while keeping the dispenser controller and the printer controller the same. All of it's communicating via serial. People have tried to attack the serial protocol, but that was not as interesting for us because that means you have to have physical access to the ATM. And as we all know, once you have physical access, all bets are off. So with enough determination, you could. Here's a picture of the classic main board from the ATM. You can see the main logic chip right there. There's a real-time clock that actually did not work. I believe because these were the ones with the integrated battery and those go flat after a while. But either way, didn't quite work. So you can see here where the main board is. This is a different variant. You can see all the connections to the main or the accessories to the main board. And then there's this one little thing. If you take a look with the question mark, that wasn't a soldered-on accessory board. We're not quite sure what it did. If you flip the DIP switches, it would not boot. We couldn't find any identifiers. It is a microcontroller, of course, on there. But what it was actually trying to do and how it was connected, we weren't able to fully trace. You can see the FPGA and the memory on board. Overall, fairly simple setup. But this is what it looks like. This is what powers the ATM. If you want to get the upgrade, the upgrade, you can see the LAN and modem options. And it's now in a metal enclosure. And then it has a new display board and the EMV-compatible reader. Of course, we didn't have this. And we weren't really trying to. We were just trying to get ATMs to work. So we figured EMV would add to the complications. And, of course, it did. It does, but we didn't deal with that. How does an ATM work? And if you're new to ATMs and maybe I'm, you know, or not as familiar, I may be going over these things in a basic sense. But, again, this is for people who are not familiar with anything. So we're going to go through a little bit of background quickly. But ATMs usually need to communicate to a payment processor. If you go over a network that can be online and whatnot, if you're going over the phone, there's two options. You either have to have a local payment processor that converts the dial-up communication to Ethernet and then off to the actual payment server with more security and whatnot. Or you have to connect to a dial-in payment processor. Way back in the day, this was known as VisaNet. And we'll be following that again in a little bit on the talk. But we didn't have either. We didn't know where we could obtain a local payment processor. And we had no operating manuals or guides. Or figuring out how we could connect. The only options we had was to actually pay a service to give us access. And as an academic competition, we don't have a lot of funds. So that was off the table. Our first thing to look at, can we emulate the payment processor? And, of course, we did. But we weren't quite sure how. Of course, near the end of the competition, or right before the competition, one of the volunteers was able to obtain an actual payment processor. This one is the external for localized payment. In is the modem and out is Ethernet. And it connects to the Internet. You can configure it using the Ethernet port. And this allows you to communicate to either one or multiple phone dial-in ATMs. So in the competition setting, we had a challenge. We had, I believe, eight or nine ATMs. We had eight ATMs in use. We needed a way for them all to communicate. And we only had so many Raspberry Pis. And phone modems, USB modems. So how do you do that? Well, we ended up buying some PBXs to allow banks of ATMs to communicate to the PBX, which would then connect to two lines in to the Raspberry Pi. This allowed us to have two simultaneous connections. And then the additional ATMs would be queuing until they were able to dial to the payment processor. Each, in our case, which was the Raspberry Pi. And then each Raspberry Pi was connected to a central processor, which connected to our simulated bank. And then, of course, the challenge was... Before all this was set up, how do we communicate? So in my case, I was one of the developers. So I connected to DevSystem, which tunneled through the internet to a jump box at... I almost said JRWR, but Valsa's house. And then it tunneled to the Raspberry Pi, which then allowed us to communicate to the ATM. Now, the many layers of connection posed a problem. Because if you killed the connection to the Raspberry Pi or the ATMs... Or the Raspberry Pi crashed, you might still be able to get to the jump box. But the Pi would be dead and you'd have to reboot it. And then the other fun was the modems would lock up and you'd have to physically reset them. So those were quite a few challenges that we had to deal with. And then, of course, a few times the jump box itself would just die. So the Pi was up, but we couldn't reach it. So it's a bit of a challenge. And then, of course, because all the ATMs were on the East Coast and I was on the West Coast... We had to work through the time zone challenges where things were very challenging sometimes. When I would be working at 9pm or 8pm and it was almost midnight for Valsa. So that was a challenge. But we worked through it and we found out a couple of things. Dialing, dial-up is a bit of a lost art. A few years ago, there was a CTF at DEF CON that used dial-up modems for people to connect in. And I thought that was very cool. But it's a bit of a dying and lost art because people don't really use this. We had to get used but new. And I say that with quotes, of course, because they were pre-used. PBXs and we had to find USB modems compatible actually with the Raspberry Pi and Linux. And then, of course, we had to find how to dial into the ATMs or have the ATMs dial. And then, of course... How many retries and how to get them to communicate was a problem. And, of course, the PBXs we got were off eBay. And they were the wrong frequency, 50 versus 60 hertz to communicate. So we had a lot of things going against us to figure out how to get this all working. And for those of you who are familiar with dial-up, it was a learning experience. And I'm going to say that again. I'm glad I learned it again. It's been a few years. But it's something that we're just not familiar with anymore as a team because most of the time you're dealing with Ethernet or Wi-Fi. So, of course, this is the simplified diagram of the payment processor. The payment processor can operate off of a Raspberry Pi or a micro-router running OpenWrt, which connects to the USB modem and then to a PBX. You probably don't need the PBX to directly communicate, but it's a good idea. And then, of course, you can control in the final version, the one that I've released more recently, you can control the way the ATM operates from a web interface if you connect over Wi-Fi. This can force the ATM to accept or reject cards, change transaction fees, and, of course, manipulate the payments in transit. So, for example, if a user thinks they're getting $20. You can request $100 out of their bank account. And then the user gets back a validation. Of course, not quite the correct validation that they expected. So that's the process. The only thing that's interesting for this is it actually checks to make sure that it's a valid card type, that it knows. The ATM internally does. So we were trying to find ATM valid cards. The only thing that we were able to obtain that wasn't an old credit card. Because we didn't want to hand them out for the competition was gift cards, Visa prepaid gift cards. So those actually were accepted. And we were able to use them and read the card data. So, of course, we worked on weekends and weekdays to get this working. I would start on the weekends at least at 6 a.m. Pacific time, which was about 9 a.m. Eastern. We would spend the whole day over. We had a Discord or voice call. And the end process was trying to just get them to communicate. We had two ATMs at once, but only one Raspberry Pi. So what this and because we were working in parallel trying to understand how these worked, we rediscovered time sharing because we would have to split the workload and wait until someone was done dialing in to get everything. And, of course, we rediscovered at commands, which are very fun. The ATM internally uses that commands as well as commands are required to ring and hang up the modems. We needed some way to configure the ATMs, of course. And the challenge was we weren't familiar with these ATMs. They have a guide, but it's a general maintenance guide. And the good news is U.S. Robotics still sort of exists. And they have actually some great documentation as long as you're able to use an old browser, which was not so good. So here's some of the key commands. Plus, plus, plus, which is the command mode. And then A is answer. And then there's A slash, which is, of course, the repeat. There's the dial. So when you do the ATS 0 equals 2, it would auto answer. And you needed the proper new lines. Otherwise, it wouldn't communicate right. So that was a lot of fun. So, of course, once we got this working, the ATM would dial. It would send a message. And that's it. How do we know what it's sending? In this particular case, you can see the data when we were trying to decode it. And we were seeing a pattern. We were seeing data, but we weren't quite sure what, you know, it was. So we really didn't know. And we tried sending the same string back. Maybe it was, you know, a handshake. But really, we were only getting a reply from the modem. And it's even funnier in a second because we were trying to make this work. We started with PySerial, and that wasn't good. We tried Screen because we thought maybe it's just in a different encoding. Then we tried Minicom. And then we actually switched to Intercept TTY, which is an old program. You compile it, and it outputs a socket that allows you to run two things to the specific serial line. And that allowed us to run our Python code and Minicom to monitor the messages at the same time. Of course, with Balsa, everything is in PHP. He once described it to me that he is the Jack Sparrow of PHP programming. And I can't disagree. You don't know how he ends up with the stuff he does, but it works. And it exists. So we tried PHP, but it wasn't quite working. It was impressive. It was impressive how far we got with PHP, considering it's not really meant for serial work. But overall, the serial was just unreliable. We kept seeing messages, and we kept seeing them stack. So we knew something was going on, but we weren't quite sure we saw the patterns. And so we switched back to Python using the OS sockets for serial. We thought maybe it's encoded. So we started looking for the patterns. And if you're ever doing protocol analysis, it's a really good idea to start breaking down the messages. If you look at some of these screenshots, you'll see new lines. But in this case, I was looking for patterns. We found 94. We found 0D0A. And then we found other strings of messages that were grouped together, and then it was repeating. There were some F7s, lucky 7s maybe. I don't know. But you can see I started highlighting things. To try to find a pattern and where things started over. You can see because of the 7s, we were able to roughly get a reset of where the communication started over. So it wasn't actually just continuing the same message. It was resetting. You can probably find more patterns than this. But that is not necessarily needed as long as you can make the structure. We did have a major oops moment though. Because when you just... Decode the text to ASCII, you get ring, ring, ring, connect, no carrier. Ring, ring, ring, connect, no carrier. Where was this coming from? Well, I will give you a hint. It is the modems. I guess that's not much of a hint. It's more of just the answer. But the unknown part, this FFF and 7s, was something interesting. We couldn't quite figure out what this was. But we figured it was from the ATM. So when you're looking for patterns, you're trying to find, especially with unknown protocols, protocols generally follow a structure. Even if they're encrypted, there's usually probably some kind of like preamble or repeating pattern. I broke off the different hex to show you how it looks. And so we were looking for like line level to see if maybe there was a pattern. Like you have to go so many highs before a low. Looking for a start of packet by the pattern. This is all logic signaling. So if it's high or it's low, it allows you to really start seeing if maybe there's like a sequence. You can see with the 077, this of course is a character, but you can see there's a distinct pattern. And when you divide these by time slots, that's how computers are able to process these. And process the signal and respond. So we were looking for something that a machine might recognize. We didn't quite see anything. But we kept searching through vendor sites. The good news is the vendors talk about how this supports amazing encryption, including DES compliant or triple DES encryption. And Visa certified PIN encryption. So don't worry, it's safe. But we were trying to find gaps. We were looking for guides and documents. And we were really struggling. And then we found a vendor guide. And this vendor guide was not the typical vendor guide. It was very detailed. And it was listed as a draft. So that was exciting. From the documentation, it spoke about how the modem connects. It talks about the bit configuration. The parity. And the way the message must start. So these are all ASCII control characters. STX, ETX, and ENQ. And specifically, it also spoke about how to configure and reset the ATM. And we are using, I believe, standard 3. These EPS link and ST3 link are ones that we didn't use. ST standard 3 is what we used. And so we, from researching and being able to, you know, with the breakthrough of the protocol. Or the vendor guide. We were able to start figuring out the protocol. So the standard flow request was terminal call. It will ring. It sends an enquiry. Then we get a request. Response. ACK. End of transmission. End of transmission. Everyone is happy. Disconnect. But how does that work? Well, we knew that from the vendor guide. That it's supposed to do an ENQ to start. So we were sending ENQ and it just ignored us. But when you start looking online. And it's actually really funny. This was an old FRAC article from 1994. And on the other side of this article was an advertisement for DEF CON 2. So 28 years later, the FRAC article is relevant again. It was really cool to see that though. But based on VisaNet. It turns out that the way you trigger it. Is you send ENQ, ENQ, ENQ. Which would trigger the ATM to respond. Good little tidbit. This was not documented anywhere else. And so once we found this. We were able to get a message. So this is the message we were seeing. And we were so excited. We got a message back. It's funny actually. Because I'm looking at this message. And I can see where the different protocol structure is. For the different payment parts. And things like that. That it's trying to do for the setup. But this was the message we got back. And we didn't see an ENQ back. We didn't see an ETX. We didn't see a NAC. So what happened? It doesn't seem to match this at all. And well we were a little concerned. We started looking at the manual again. And it says that it can operate either in a batch mode. Where it queues up all the transactions. And then sends them all at once. So if someone wants to do a withdrawal deposit. And things like that. It'll queue them up until they're ready to do a single transmission. And send it over. Or it can do single mode. Which every transaction is a dial in. And request. We tried both. Concerned that maybe we had accidentally got it into batch mode. But the batch mode was unlikely. Because it requires a keepalive connection with the payment process. So it dials in. And it keeps sending messages back and forth. We didn't want to handle that. So we went with the simpler single option. So we were trying to figure out what's going on. We started doing parity bits. And it's a challenge. We were not familiar with the raw parity bits. Because we don't really have to deal with it much. So we were able to identify some characters. And find valid stuff. But we weren't sure what was going on. We tried shifting over. And you can see when you shift a message over. Some of the stuff rolls off. And you can restructure the message. But that didn't help. So it wasn't just a pure shift. But the question was. Why would sending a valid enqueue return a response. But not the invalid one that we were getting back. Well it turns out. With classic protocols. Classic ASCII. The only six of the bits are used. The seventh bit is the parity bit. The parity bit is allowing it. So that you can make sure that a message comes through correctly. And so in our case. We were able to strip the parity bit. And get the correct ASCII code. Usually the seventh bit. The eighth bit actually. Sorry. Is not used nowadays. It's just static. But it can be used. And so that was how we were getting messed up. Because it was error detection. Even or odd. It would either get turned on or off. So we were seeing some valid characters and some not. So now we were getting an actual message back. Where we could actually see the ASCII control characters. And of course that was a challenge. Because we weren't sure what was going on. We got these messages back. But we were like. Huh. There's some blank parts. And things like that. We were trying to empty out certain fields. To see what we were doing. I have actually transcoded this into things that it is. This is the terminal ID. This is the field separator. Field separator. The transaction code. And so we were able to start building up. Like what was what. By editing the ATM configuration. To send out specific messages. Of course. Things still didn't work. There was a LRC at the end. For parity. It was trying to make sure that the messages were good. Essentially like a CRC or a validation bit. And we. I got a bad implementation. That I had used to implement. And it was overly complex. And didn't work. So we were sending the wrong. LRC. What we ended up doing was. And. Going and finding another reference. Guide to make sure we were correct. And. There's a couple ways you can do this. If the field is small. You can make a table. A lookup table. To make sure that you have all the values. Based on a specific calculation. Or you can do. What in this case. And that would be like CRC. In this case. It's. It's even simpler. It's just bit math. And so we were able to. Get everything out with that. And. Once we got this. We would. With the invalid one. We would get a knack. And once we sent the valid one. With the message. We got a knack. So that was a nice. Nice progress. So how does it work. Now we're talking to the ATM. And that's really exciting. Well. The ATM. Does a host download table. Request. This request. Gives the ATM. Everything it needs. Including encryption. Keys. Charge amount. And. A few other values. It supports up to. Triple DES. With. Left and right. Key combos. So you could do. Multiple hosts. So. Not everyone knows. The whole. Key. It's a 64 bit. Key. However. What we found. Is you can also just send it. To all zeros. Which is great. And so when the. ATM. Loads this up. Everything is just. Just zeros. And it's like. Okay. Cool. And that makes it really easy. To decrypt. There is. A. Actual standard. The. ANSI standard. For. Pin management. And security. X. Dot. Nine. Dot. Eight. And it actually. Is where this comes from. That. The. Pin codes. Will be 64 bits. In length. Each nibble. Being stored. Zero. Through. Nine. Eight. Through. F. Is. A. Hex. Representing. The. Hex. Characters. Left. To. Right. So. That. Was. Interesting. That. Was. Actually. A. Well. Documented. Piece. You. Can. Actually. See. It. Here. This. Is. The. Protocol. Handler. That. We. Wrote. And. You. Can. See. The. Messages. And. Sending. Messages. Back. It. Was. Actually. A. Very. Basic. Message. Handling. You. Can. See. Below. The. Field. Separate. Terminal. I. D. Code. Encryption. Field. Separator. And. So. This. Is. The. Messages. The. Data. And. Breaking. It. Off. And. Where. We. Have. Like. Gangling. Bits. And. Bytes. So. We. Were. Dealing. With. The. Extra. Characters. And. Trying. To. Find. The. Replies. And. We. Would. Always. Get. Either. A. Success. Or. A. Failure. And. That. Allowed. Us. To. Moving. Forward. Because. It. Was. Very. Simple. In. Response. Did. It. Work. No. Okay. Let's. Keep. Trying. So. That. That. Was. Helpful. You. Can. See. At. The. End. We. Got. The. Asky. Character. The. Control. Character. So. But. Was. Still. Sending. A. Failure. So. We. Also. Needed. Some. Messages. Afterward. We. Realize. That. We. To. Build. A. State. Machine. So. State. Machines. For. Those. Of. Who. Are. Familiar. Are. A. Very. Fundamental. Of. Computer. Follow. Specific. Conditions. And. Allows. Us. To. Scale. With. New. Protocols. And. Messages. And. See. What's. Going. On. So. From. The. Start. We. Receive. Either. Nothing. Or. We. Get. A. Clear. Parity. Bit. Then. Complete. The. Handshake. Start. The. Timer. If. Everything. Does. Not. Succeed. Within. 30. Seconds. Reset. Back. To. Here. And. Wait. For. A. Message. If. It's. Success. Or. Failure. Failure. You. Stop. In. The. Message. Send. A. Failure. With. Success. We. Have. A. Few. Things. That. We. To. Check. For. The. Messages. And. Then. The. Message. Type. We. Can. Send. It. Off. See. What. It. Is. And. Send. It. To. Our. Payment. Processor. The. Original. Code. Looks. Something. Like. This. Where. We. Are. Hand. Constructing. The. Message. And. Looking. For. The. Parody. To. Make. Sure. Everything. Worked. And. I. Do. Love. The. Comment. At. Beginning. Encryption. Key. Should. Be. Changed. From. The. It. Allows. Us. To. Do. Things. Like. This. Where. We. Can. See. Unknown. Messages. Unknown. Parts. Process. The. Messages. And. You. Can. Actually. See. Here. In. This. Message. The. Components. That. Actually. Make. Up. The. Terminal. ID. Transaction. Code. The. Amount. The. Pin. Block. And. Then. All. The. Other. Data. That. Is. Associated. And. So. Then. We. Send. It. Back. So. Once. You. Get. An. Atm. Working. You. You. You. Need. To. Get. Everything. Working. Because. It's. It's. Of. Service. So. Once. We. Able. To. Get. The. Atms. In. Service. We. Started. Working. On. A. Protocol. To. Allow. The. Atms. To. Communicate. To. Us. In. A. Meaningful. Manner. So. This. One. Is. The. First. Successful. Message. That. Had. And. You. Will. See. In. A. Second. That. It. Actually. I. Don't. Know. If. You. Hear. Dialing. But. It. Makes. The. Actual. Dial-Up. Noises. And. Then. Thinks. For. A. Second. And. Then. Now. It's. Going. To. Spit. Out. The. Money. And. So. That. Was. Our. First. Successful. Next. Message. Through. The. Problem. Was. Again. We. Were. On. A. Budget. This. Is. Not. Real. Money. This. Is. Play. Money. And. The. Atms. Are. Designed. For. A. Specific. The. Result. Was. We. Support. And. We. Built. Out. Support. I. Should. Say. For. Over. 20. Different. Transaction. Types. We. Actually. Wrote. 10. Types. And. Then. There's. Success. Usually. There's. Two. Tracks. One. With. The. Number. And. Then. Some. Name. Information. Only. Track. One. Is. Red. That's. Not. A. Feature. Of. Us. We. Can't. Read. The. Second. Track. Really. It. Only. Is. Coming. Through. With. The. Atm. So. We. Only. Can. Read. What. It. Provides. The. Hard. Part. Was. Actual. Padding. The. Zero. Padded. Number. So. You. Have. Three. Sets. Of. Pairs. Of. Zeros. So. Six. In. Total. And. You. Have. To. Move. It. Over. To. Either. Get. Cents. Dollars. Or. A. Larger. Amount. When. Don't. Pad. It. Correctly. This. Was. All. Static. When. This. Was. Done. You. Get. You. Can. Either. Get. Negative. Numbers. Or. Cents. So. This. Was. A. Ledger. Balance. Requested. Fee. Those. Those. Responded. Back. As. The. M. A. T. M. So. Here's. A. Successful. Run. This. Was. Actually. At. The. Competition. So. I'm. Going. To. Mute. Because. Nobody. Can. Hear. That. So. She. Successfully. Did. The. Enter. To. Send. The. Message. And. Then. You. Could. See. It. Where. It. Took. A. Second. In. The. Updated. And. The. Money. Came. Out. So. At. The. End. Of. This. What. We. Want. To. Switch. Gears. A. Little. Bit. And. Ask. Ourselves. Why. Are. You. Know. 16. To. 20. Year. Old. A. T. M. Still. In. Use. Why. Is. The. Protocol. Still. The. Same. Way. I. Know. We're. Going. To. E. M. V. On. A. Of. These. And. That's. A. Much. Better. Protocol. But. As. You. Were. Seeing. At. The. Beginning. It's. Still. Windows. C. 6. Which. Is. End. Of. Life. Those. A. M. Are. Going. To. Be. In. Use. For. Many. Years. And. It. Is. An. Expensive. Upgrade. At. That. So. You. Know. It's. Something. To. Think. About. That. These. Atms. Are. Still. Out. There. And. That. People. Are. Putting. Their. Banking. Details. Into. These. Systems. You. Know. There's. There. Is. Some. Security. But. Triple. Does. Is. Not. Exactly. Known. At. Defcon. For. Being. Particularly. Good. Let. Alone. Anywhere. Else. So. You. Know. We. Really. Need. To. Think. About. That. And. When. Designing. Protocols. Yeah. These. Were. Maybe. At. Least. HCP. Instead. Of. Unencrypted. Dial-up. Not. Much. Better. But. There's. HPS. There's. Websocket. Which. Should. Be. Used. And. Be. Used. And. Make. But. Most. Of. All. Make. The. Modules. Upgradeable. And. Cheap. Because. At. The. End. Of. The. Day. If. You. Give. Someone. An. Easy. Way. To. Upgrade. Their. Components. They. Will. And. They. Will. Use. The. Security. That. Is. Provided. To. Them. Most. People. Are. Not. Security. Experts. So. That. Would. Be. A. Point. Of. Starting. Anyway. I'm. Happy. To. Answer. Your. Questions. If. Have. Any. Questions. Feel. Free. To. Ask. Me. And. Then. If. Not. Contact. Us. All. Right. Thank. You. So. With. If. There's. Any. Questions. Feel. Any. Questions.