Yeah, hello. I know I'm at the mic, I don't want to get too close. Right, so hello everybody. Most people here I know. So, my name is Ikwip, I am Alexander, and this is Lew. What? Uh, hi. Oh yeah, no, I do get to say hi. So, today we are presenting our paper, which is a white paper. It's called Hung Out to Dry, and it's airing the dirty laundry of store value washcards. Go back? Oh, good. If you guys want the paper, or the Google Slides, or whatever, you can just scan into our code. Right, okie dokie. No, wait, wait, wait. Scanning it. All right, okay. So, we get the thought in the outline? No. All right, so this is our outline. Take a quick look, because I'm not going to... Take a quick look, because I'm not going to read through it. Okay, so a quick disclaimer is that this is educational research only, and we have omitted the point about creating transaction IDs on the cards, because they aren't needed for the washing machine, but they are needed for the encoder, and it was just a courtesy that we gave to KeoSoft. All right, so we did all this in good faith. We put $47 legitimately loaded, and we used $15 of those dollars, and yeah. Yeah, so we didn't spend any money that we didn't add, legally, I promise. All right, go on then. Okay, so it was last year after DEF CON, I was going to Miami, and I had these washing machines, which had stored value laundry carts, and they were MyFairClassic RFID cards, which can store the money of whatever you put in the encoder, and one day I was like, hey Equip, are these hackable? Can I put money on them? And he's like, let's have a look. Yeah, so we'd just been at DEF CON the previous year, it was still late, late August, when he sent me a message and said, they've got these cards at this condo thing that I'm staying at, they say they're MyFairClassic, what do you think the values, what are the trends of the value being inside? And I was like, not impossible, you know, security does suck, income in places. So he sent me over a dump bin, and I said how much was in it, and I went, I've spotted it, have you spotted it? And then we worked backwards from there. Okay, so, hold on now. These are all the affected systems, the main one being Kiosoft, which is the company which provides the data structure for these cards. And the companies that you see all around, and the universities which have their campuses, self student laundry, have this vulnerable system. So, yeah, so we do have a demo video that we were able to get from Miami, that we've stuck at the end, because it's a little bit of a long one. So, getting into the card structure, I'm not sure if anybody is aware of how MyFairClassic looks underneath the hood. MyFairClassic is one of the most commonly used domestic low to medium security cards used for storing about a kilobyte of data, about 720 bytes of data. But in the block zero, you have the UID, the BCC, a vanity SAK, an ATQA, and original equipment manufacturer usable data, which makes up the last 16 bytes. This just is, it's immutable data on normal cards, can't be changed, can't be cloned, or it can be cloned, but not onto that same card. As for the memory, which is the more important part of this, because we are dealing with stored value in the memory, is you have three blocks of data per sector protected by two keys with access bits in between that determine how those keys can be used with that sector. So this is how the general structure of MyFairClassic does look. There is a lot more blocks than this, but trying to get a one big zoom out, visibly impossible. So yeah, so you've got 16 sectors with each containing four blocks. One of those blocks is a sector trailer. So now moving on to finding the balance. So we initially looked onto the card for the balance of $18.75, because we knew that was how much was on it from the last check of going to the room. So we started thinking, in common systems you usually find them decimalizing it as a whole number, so like 1-8-7-5, or doing 18 and then 75. So we just tried looking backwards from what was the most obvious, and unsurprisingly Arkham's Razor does always prove to be true, and it was the most obvious answer as they were storing it as a whole cent amount. So $18.75 was $18.75, and then we converted that into hex, and then we were able to look into the memory and see does this appear anywhere in the memory. So we were looking for 0-7-5-3 in the memory, because that's the standard forward endian decimalization of $18.75. But very quickly we noticed, taking a look, that they were in fact just endianness reverse, and the value was noted in multiple places in the memory in reverse endian, so $53.07, and it was also in the previous updated block. So we have four representations of the same value. So the value positions were in block 2, bytes 9 and 10, which is the value at the last top up, which tells you how much money was the last added to it. And then we have blocks 4 and 8, which are both mirrored. So everything that happens in both of those blocks is mirrored to each other. Before we get into the technical part, just to be curious, who here loves to spend $7 for laundry every single day? Yeah, that's what I thought. All right, so we have labeled the variables. I know you guys might not be able to see everything in the text, but we will explain each part in detail. Okay, so we have omitted and changed the actual data in the blocks, because a lot of what is written to each individual card in each individual location is very easily identified. And while we did disclose to them, we still don't want them coming after us. So the first bit is the second trailer, which has the keys. So we've obviously changed the keys. And it's got the access conditions that say they were typical write conditions, which were 078069, which were just standard write transfer restore permissions. Then was the card number, which was printed on the back of the card. So the back number on the back of the card was 0129889. And they stored this as decimalized hexadecimal. So in the memory, it said 0129889. So that was decimal converted into hectodecimal to look like the decimal. So if you convert that back to decimal, it's not the same number, but it's very visibly obvious So we started using shorthand K soon after because we had to label a lot of variables. So we started pulling this, the vault byte. This is our value at last top up. And whenever you add money onto the card, the vault byte gets updated. So if your value, if you have $45 on and you add $5, it goes up to $50. So the value at last top up is shown here in block two. And that is immutable. When you spend money, that doesn't go down. It only changes whenever you next top up money. So if you spend $25 and then add $5 more to be up to $30, it goes up to $30. So we have our transaction identifier. Oh, we have our transaction identifier in block two, which is also been changed from a real one. This is used on the encoders to verify that the memory on the card is succinct with what it's expecting. So if you have, you know, a balance that doesn't reflect the transaction identifier, then it goes, no, sorry, you're not allowed to add any more money, you're getting banned. It doesn't do any reporting, though. It just doesn't like you. Okay, so we have some incremental mirror bytes, because everything gets mirrored in this card. Everything. So next to our transaction ID, we have the incremental mirror byte, which is then also reflected next to the value bytes in every single block. So every single time you spend or add money to it, the mirror byte goes up. Oh, it's only when you add money to the card that it goes up. Okay, yeah. So this increases in all places at the exact same time. So there is a terminal byte. We've called it a terminal byte because it was the last byte. And this changes in between every read. So as we tested the cards, when we were noticing changes between them, the last byte on the end of block two always changed, and it didn't seem to have a reason or purpose. You could change it to absolutely anything you want, they wouldn't care. But after talking with a Discord member of the RFIDhack community called Duru Steve, he told us it was a XOR, because he was looking into it at the same time a few months ago. And he goes, it's just a XOR of block two. And we've noticed the same was apparent with block one, because block one also has a terminal byte, but all of the data in block one does not change. Yeah, is that... So the value bad consists of the actual value in in little endian, which is reversing the bytes backwards, except for the last byte in the value block, which is the incremental mirror byte. So the middle bytes are basically unknown at this point, what their purpose is. We have found patterns according to the value paths, but I will explain that later. And they are mirrored also in block four and block eight. So the under value byte is, are just one byte under both of the value pads that are on block eight. And they are also a counter of when the washing machine is used, or when you do a load, and they go up a value. Yeah, so the second one is the under middle byte, and these will all... Okay, this is the under middle byte, and it is, as appropriately named, the middle byte underneath the middle block. And this is, what did that change? Yeah, no, it changes. Yeah, it's just an, it's a XOR of the above value block. And it is one of many, many, many mirrored functions throughout the card that do not contribute to the use case of the card, and you can nix them with absolutely zero consequence to the usage of the card. Okay, yeah, this is your bit, bro. So to figure out the purpose, and the reason why at this point, we're not able to add money in a correct way is because of the middle bytes. The middle bytes are things that they're the bytes that we don't know how they work yet, but we will explain them now. So first, we take the value bytes. And let's just take the first byte of the value bytes and the middle byte. Then after a top up, we're going to take the first byte of value pad and the first byte of the middle bytes. So this, we can put our data together. And then we can create a linear relation with these bytes. Because we thought that the incremental mirror bytes and the last byte of the middle bytes had a relation, because every time you would top up, you would see a decrease in the third middle byte, which means that there could be some relation between the last value byte, which is the incremental byte and the third middle byte. So we put in our values that we gathered before, and we get a slope of negative one. Then let's try to find our actual equation. So for any of you guys that have done sixth grade math, this is a linear algebra for you. So we brought our data and we saw that if we did this experiment again, adding three dollars, we can get gather another point. Let's put ten dollars, same point, it goes in a linear relationship. Until we reach the y-intercept, which is the part where the line touches the y-axis, which is at 255. And if you guys know a bit of hex stuff, 255 is just FF. So we get a formula, which is just y equals minus one times x, so it's minus x plus 255. But this is just an x-score of FF, which means that you could just take the value byte, the first value byte, and just xor it and get the first middle byte. And this is also bitwise negation. So as we figured out eventually how to add in the amount of value that we wanted to add in, I was curious to know why certain things were happening within the card. Because there was a lot of loose data in the card, a lot of things that did not contribute at all to the function of the card. And as we were looking, we could notice value pairs. So there was FF09, 0F0009F6, and those come out to total multiplications of 25. And all across the card, as you can see down here in blocks nine, so we've got the value bytes, the middle bytes, these are all function mirrors that do not contribute to the function of the card, but they tell you exactly how to hack the card. If you watch the relationship between them, they tell you exactly what you need to do to apply to the different bytes in the further up blocks to completely gain control over the card and give yourself as much credit as you would like. So into the middle bytes of 07 and F8, so in between these just underneath the value bytes, they were applying the exact same equation to each other. So you can see them, so they are non-static bytes, they are static bytes, they're not dynamic. So they stayed the exact same. And if you watch how they behave, they would show you exactly what is being applied to the value byte. So here we have F8, the same function that's being applied to 71 to get 20 is applied to 07 to get F8. So if you take a snapshot of this card from the very beginning of when we started researching it and picked up all those bytes and said what's the relationship between these bytes, you would have skipped about two months of research. And then we're on to our last one which is of course the incremental mirror byte which is 0B and then F4. And then if you look at the relationship between 0B and F4, you get the exact same thing of a function mirror that doesn't do absolutely anything to function. It's just showing you exactly how to hack it. Okay, so we have our undervalue bytes and these ones are entirely... no, so these ones did change but not in any formal fashion that was related to the amount that was being added. They were the linear equation that was being discussed earlier so those would go in the same pattern regardless of what was happening. And that just showed you if you watch one, watch another. So if you XOR 36 through the appaf, you get C9. So we know that there's a lot of numbers and stuff which is why we have left the doc at the beginning of the slide. And now we're going to explain why a value card cannot be created from nothing. So each card has site keys and these site keys are like related to the site of where they were created and they're only accessible from the washing machines of that building or college dorm floor. So there's no way of knowing these keys without having an actual card and using modern MyFairClassic attacks to retrieve these keys and do crypto attacks. So as well as card numbers, they cannot be created from nothing because they're in the system and they're only created by the encoder when you purchase a card and they are fully in the back end. Yeah, so something that we observed during the enrollment of a blank card. So in the washing machine rooms, there was a encoder machine that would give you the card and then you'd have to top it up for the first time. As we watched what happened in between it going from being blank to encoded, it was given its location ID. So specifically one from Florida, from Miami, that was already within the card and then it was given its printed card number. And while you can't create a card from nothing, you can't rock up to a wash station and go, I now have a card that works in this location. All you do need is one card from that location. So we were thinking about, once we got to the end of this, we were having a conversation about what the challenges are when it comes to system upgrades. And this is kind of aside from the research itself, but when we were speaking to people in between last DefCon and this DefCon about it, they were like, well, when we told them, they didn't really seem to care. They couldn't really have the capacity to care because it costs way too much money to fix this problem, to go around to every single unit in North America across all these different companies and go and change the hardware in both the encoders, the chips, the washing machines themselves. So as many people as might watch this, they are willing to risk the amount of money that they are willing to lose because it costs too much money and they're like, it's been 20 years, we've had a good run. So they don't really care. And there's low risk perception. So even if it became like, this is not groundbreaking stuff, this is washing machine money. But if it became like a reputational risk , it still would not hit their key demographic areas of people living in, you know, HMOs, apartment buildings, university dorms. They are the less likely people to hear about this news. So even if it did become more known, the people who actually do use this service are unlikely to engage in extortionate behaviors. And yeah, it's absolutely not profitable to be fixed. So now we've got our little demo video from when we did the first top up, when we first successfully got top up. So at this moment , I was just testing cards and I was topping them up. So let's see if we can get the videos load. I had made a script that does this automatically. It calculates the middle bytes, the value bytes, and everything that you need to get a perfect top up and get big money to wash. So yeah, it's a bit lag. So I use my Proxmark and a Python script. You'll see. What I also did was I created a Flipper plugin, which lets you read, well, this is on top of the Flipper plugin that Toron made for CSC. And it reads the card ID, the balance, $85. That's not even possible in the encoder. We top that up. And the last value of top up. So obviously you can see that we loaded $20 and somehow we have $80 now. And top up count, we set it to zero or whatever. Yeah, so how can you top up $20 without a counter? And let's try to see if this video works now. Oh yeah, I do. Oh, no, no, no, listen. It's almost American boy. The slide deck is in the link on the beginning. I will show you guys that later. Desktop Wi-Fi is not very accommodating. So now we have acknowledgements. I really want to thank my parents for supporting me throughout this challenge and letting me stay up until 3am to be testing on the washing machines, having to hide from the security guards and trying to sneak past to get to the encoder at like 5am sometimes. Yeah. Yeah. I also want to thank Lou's parents because we had an 8 hour time difference between us and he was on holiday in Miami and they were perfectly fine with him staying up on voice call with me for absolutely insane hours. So for the next people that we want to thank is Guru Steve who is in the RFIDhackers discord. He did help us out quite a bit when it came to confirming what we already knew. One thing I will say to Steve is I am very sorry that we did beat you because we noticed that they wanted to start on this about a year prior and there was no traction made when we were looking for a historical backlog of people talking about these kinds of cards. And when we brought what we knew to him, he was able to confirm some of the stuff he knew and the same goes for Toran because Toran made the CSE parser. There was some parts that he did know and some parts that he didn't know and together we were able to make a bunch of adjustments so that one, the flipper script could read a bit better and that we were able to show each other what we had found because this is, it's come from so many different brands. So his was CSE and the next person is The Champ who helped confirm that it was coin-o-matic. So we were finding out all these different branches, we were finding all these different people who had started on researching them. But yeah, and then someone's I just want to shout out is Betsy, NBX, ZBE8 and then everyone in the Pirates Plunder Discord because they put up with our absolutely insane ramblings on the constant and they are here to stay. But yeah, that is us. Thank you everybody. Q&A? No. You want to ask him questions, he will answer all of them. Anybody? Yeah. So, funny enough, we, well, I discovered that shadow mode existed on Gen 4 cards like maybe a month ago. Oh, you found out. Yeah, and I was just buying a bunch of My Fair Classic Gen 1 or Gen 2 cards and giving them out to everybody. I didn't even know shadow mode existed. I, yeah. He learned, he found out, he discovered shadow mode a month ago and the Discord logs do say that I did tell him this 11 months ago. But yeah, so one thing that we did learn while doing pre-research, because we weren't going to try and dig up like a kick a dead horse if someone had already taken it apart, we didn't want to build the wheel twice, was there was people using the shadow mode to do that. But what we were like, it's more interesting as a reverse engineering project to know how the transactions made, what all the bytes means and things like that. So instead of just being able to bounce back to the previous amount of value, we were able to add, you know, down to a set amount exactly how much we want. So you now, you know, we do indeed have a shadow mode card that is permanently fixed at $69.69. And for reference, the CSC parser does exist in the flipper already. And that was made by this company right here. And you can probably read some of the other cards of the CSC parser. And yeah. Yeah, that's one big thing is we don't know the totality of who's been who's on the KeoSoft until people see it and try with their flippers. We don't know, which is why that was one big hurdle with finding out information is we would come across a new one and we'd be like, oh, the whole thing might be dead. Someone might have already done it. So we'd then spend days trolling through Reddit. It would be like, oh, the champs told us that it's coin-o-matic. So now we've got to find if someone's done it all for coin-o-matic. It was an absolute nightmare. He kept going. We're so fucked. It's so over. But luckily, nobody had fully documented the actual information about it. Well, do. Not yet. Not yet. Tonight. Yeah, tonight. Maybe. If we're about to. Used in good day. But yeah, that is us. Thank you so much. I'm a boy.