1 00:00:00,520 --> 00:00:03,420 Hello survivors, welcome to my DEF CON talk. 2 00:00:03,620 --> 00:00:10,560 I know what you ate last summer, a digital forensic look into a POS system, presented by me, Wesley Alpham. 3 00:00:10,560 --> 00:00:11,460 You might wonder who I am. 4 00:00:11,460 --> 00:00:15,240 I am the president of the Cyber Knights at Middle Georgia State University. 5 00:00:15,240 --> 00:00:25,020 We are a capture the flag team and we do other cyber security things, but the main thing is capture the flag, like NCL, Hivemind, and a few other of those competitions. 6 00:00:25,380 --> 00:00:29,380 I am not a fully trained or certified forensic investigator. 7 00:00:29,720 --> 00:00:36,760 I am just a normal general computer nerdy hacker person, as shown by my plushies behind me. 8 00:00:36,920 --> 00:00:42,900 I'm also an avid cyclist and this is actually my first time ever speaking at DEF CON, so hopefully it goes well. 9 00:00:42,900 --> 00:00:48,320 I had to do remote this year because of some scheduling conflicts, but next year I'll be right there with you guys in Vegas. 10 00:00:49,300 --> 00:00:50,800 What will we be talking about today? 11 00:00:50,800 --> 00:00:55,140 Today we'll be talking about digital forensics and why it matters. 12 00:00:55,180 --> 00:01:06,920 We'll be going over the system that I analyzed, we'll go over what is found on the system, and we'll also go over what food was found on the system, which is what everyone wants to kind of see probably. 13 00:01:07,740 --> 00:01:17,820 What we'll not be talking about today, we will not be talking about how to hide information from authorities, and this will also not be a very in-depth or detailed talk about digital forensics. 14 00:01:17,820 --> 00:01:21,980 It's more of an introductory level talk, a high-level talk per se. 15 00:01:22,520 --> 00:01:30,960 But speaking of that, this is the National Institute of Standards and Technology's definition for what is digital forensics. 16 00:01:31,820 --> 00:01:39,880 This is a very institutional term, and I have made my own definition for this talk, and this is the definition we'll be using. 17 00:01:40,260 --> 00:01:49,520 Gathering digital evidence from electronic devices to be used in a court of law, or in this case, a fun DEF CON talk about a POS system that we found. 18 00:01:50,700 --> 00:01:53,240 Why is digital forensics important though? 19 00:01:53,560 --> 00:01:58,960 It can be used to recover data on company systems that have been either damaged or wiped. 20 00:01:59,220 --> 00:02:06,500 It can be used to find hackers who leave little bits of data or logs on local systems. 21 00:02:06,500 --> 00:02:17,920 It can also be used to catch bad guys like the BTK killer, who on a floppy disk had a little bit of metadata from where he actually created the disk. 22 00:02:18,560 --> 00:02:23,800 It's used a lot in CSAM cases, which if you don't know what CSAM is, it's basically pedophiles. 23 00:02:24,060 --> 00:02:32,900 It's caught a lot of pedophiles, and that small list of three I have on the screen is not in the tip of the iceberg for those cases. 24 00:02:33,060 --> 00:02:38,660 I'll have a link right below there that actually is a longer list of cases that forensics has been used in. 25 00:02:40,100 --> 00:02:41,880 Now time for the meat and potatoes of this talk. 26 00:02:41,880 --> 00:02:45,000 But first, what do you call a baby potato? 27 00:02:45,940 --> 00:02:47,220 A tater tot. 28 00:02:47,280 --> 00:02:52,480 My stand-up career is not going anywhere, neither is the history of this system. 29 00:02:53,120 --> 00:02:56,200 The system was bought in a lot of seven from a university. 30 00:02:56,200 --> 00:03:04,040 The university was selling their systems, and well, one of the community members bought them, and we discovered that one of those systems still has hard drive in it. 31 00:03:04,040 --> 00:03:08,140 And it wasn't just the fact that it has hard drive in it, it was not even wiped. 32 00:03:08,820 --> 00:03:15,140 That IT admin is probably kicking himself right now, because guess who gets, guess who got a look at it all? 33 00:03:15,140 --> 00:03:15,880 Me. 34 00:03:17,020 --> 00:03:28,280 So he cloned the, he cloned the image of the system, and he sent it over to me to analyze, and also to turn into a VM so I can actually kind of get a feel for the system itself. 35 00:03:28,640 --> 00:03:34,900 So this is a picture of the system as I was using Clonzilla on it. 36 00:03:34,900 --> 00:03:47,620 What you have to do for Clonzilla is you basically plug in a virtual ISO for Clonzilla, then you attach the image in another virtual USB drive, and then you just combine the two, and it makes basically your image. 37 00:03:47,620 --> 00:03:52,980 But sadly, I discovered while I was doing it, the MBR was messed up. 38 00:03:52,980 --> 00:03:54,360 It was really badly messed up. 39 00:03:54,360 --> 00:04:03,640 So I had to actually plug in Ryzen boot CD, an older version of it, and actually to make it to use their MBR checker tool to fix it. 40 00:04:04,020 --> 00:04:08,140 And yet after that, I got into Windows Recovery Console. 41 00:04:08,760 --> 00:04:11,040 And sadly, for that, I needed a password. 42 00:04:11,040 --> 00:04:12,660 So guess what I had to do again? 43 00:04:12,660 --> 00:04:15,900 My good old tool, Ryzen boot CD. 44 00:04:16,020 --> 00:04:22,300 So I use NTP editor to edit the passwords and change them to make them whatever I want them to be. 45 00:04:22,300 --> 00:04:24,240 So I changed both accounts while I was at it. 46 00:04:24,240 --> 00:04:32,240 And then after hours of trying to fix it and make it work, I got this, invalid license, and also nothing else works. 47 00:04:33,780 --> 00:04:39,400 Mainly because I do not have a cashier ID or the cashier password or an admin version of those, sadly. 48 00:04:39,400 --> 00:04:46,860 So I decided after that, well, if I'm going to have to see the files, I'm going to have to do a image of the system. 49 00:04:46,860 --> 00:04:55,880 So what I did, I'm going to use FFTK portable imager to acquire a forensic image of the system. 50 00:04:55,880 --> 00:05:02,640 Now, if you don't know what a forensic image is, it's basically a bit -by-bit image of the entire drive. 51 00:05:02,640 --> 00:05:05,560 In this case, it's not really a drive, it's a virtual drive. 52 00:05:05,660 --> 00:05:24,940 But I took a virtual image of the entire drive, every bit and byte of it, all the ones and zeros, and that created an image of 182.5 gigabytes, which is very large and was very hard to work with at times because my system, my computer is only eight gigabytes of RAM, 53 00:05:24,940 --> 00:05:26,740 and it filled it up really quickly. 54 00:05:27,100 --> 00:05:36,360 So I used Optopsy to do the analysis of the image, and what Optopsy does is it organizes and sorts things in different ways, and I'm about to show that. 55 00:05:36,680 --> 00:05:40,300 So after hours of ingesting it through Optopsy, I got this. 56 00:05:41,200 --> 00:05:43,060 This is about what Optopsy looks like. 57 00:05:43,060 --> 00:05:48,080 Now, it's kind of messy, so let me add some labels for you guys so you can easily see it. 58 00:05:48,080 --> 00:05:58,480 So, right up here at the top is the volumes found on the system. 59 00:05:58,740 --> 00:06:03,240 So there's the MBR up there, which is, by the way, still a little messed up, so it doesn't always work. 60 00:06:03,660 --> 00:06:08,240 The OS volume, which is right there, which is NTFS, because it's a Windows system. 61 00:06:08,380 --> 00:06:15,240 And then right below, there's unallocated space, so that could be anything that just isn't allocated to the operating system while it was being imaged. 62 00:06:16,120 --> 00:06:19,000 Right over here on the other side of it, you have file types. 63 00:06:19,000 --> 00:06:28,000 So if you're looking for a specific file type, like a photo, a video, or something like that, so if you're looking for a certain case, you can use file types to search for that. 64 00:06:28,000 --> 00:06:29,980 There's also deleted files right there. 65 00:06:30,100 --> 00:06:36,260 But deleted files, for those who do not know, when you delete a file off a hard drive, it is still there. 66 00:06:36,440 --> 00:06:43,620 Actually, all Windows does, it just removes the headers for the files and also removes its knowledge of where it is. 67 00:06:43,780 --> 00:06:45,380 So it can be overwritten. 68 00:06:46,320 --> 00:06:48,120 Obviously, it has not been overwritten yet. 69 00:06:48,120 --> 00:06:49,820 It actually is still very much there. 70 00:06:49,820 --> 00:06:56,500 And even if it is overwritten, it actually usually is still a little bit there that you can actually pull from. 71 00:06:56,540 --> 00:07:03,020 And that's what Autopsy will do, is actually will pull those headers and stuff and actually fix them. 72 00:07:04,200 --> 00:07:05,520 Right below that is file size. 73 00:07:05,520 --> 00:07:20,440 So if you're looking for a specific file size, so let's say someone had a large amount of explicit materials that you're not supposed to have, you can actually sort by file size and find something, any big file size, like a video. 74 00:07:20,440 --> 00:07:22,260 Right below that is installed programs. 75 00:07:22,260 --> 00:07:30,020 So anything like software updates for Windows and any programs that are on the system will actually be in this list. 76 00:07:30,580 --> 00:07:35,580 Right below that is metadata, which is any RTF files that are found. 77 00:07:36,140 --> 00:07:40,200 Right below that is operating system information, which we'll go over on the next slide. 78 00:07:40,380 --> 00:07:44,320 Right below that is recent documents, which we'll also be going over in the next slide. 79 00:07:44,320 --> 00:07:47,180 But that's kind of anything that's been opened up recently. 80 00:07:47,880 --> 00:07:53,400 Right below that is run programs, which are any programs that run on startup per se. 81 00:07:53,940 --> 00:07:55,220 So anything that starts up. 82 00:07:55,220 --> 00:08:04,840 Shellbag is kind of anything that uses shell or PowerShell, which so it's kind of, you know, not really useful for most cases. 83 00:08:05,240 --> 00:08:13,020 USB device attach, those are anything that's been attached via USB and the system will actually log it. 84 00:08:13,240 --> 00:08:16,220 And you can't, it's really hard to see the fact that it's been logged. 85 00:08:16,220 --> 00:08:22,240 Right below it, as you can see, there is actually web bookmarks, web cookies, and web history below that. 86 00:08:22,520 --> 00:08:23,620 And web search. 87 00:08:23,620 --> 00:08:29,080 Those are actually all built into the operating system that it is. 88 00:08:29,600 --> 00:08:32,920 This is just, those are all just default on there. 89 00:08:32,920 --> 00:08:34,180 It's kind of weird. 90 00:08:34,640 --> 00:08:37,920 Those are all just, it's just Windows. 91 00:08:38,840 --> 00:08:50,360 Normally you will have real data in there, but since it's a POS system and you don't normally go, there's very little web browsing obviously on a POS system and you actually cannot get out of the lockout system. 92 00:08:50,520 --> 00:08:53,020 Right below that is extension mismatch detection. 93 00:08:53,020 --> 00:09:00,780 So if you, let's say, change a PNG file to a video file via just changing the extension on the back of it. 94 00:09:01,040 --> 00:09:07,720 Windows isn't gonna be able to read that, but Optopsy will find it and they actually will correct it and fix it in itself. 95 00:09:07,800 --> 00:09:10,460 And they actually will show you it on that list. 96 00:09:10,980 --> 00:09:17,220 Right below that is keyword hits, which is the tool I use to get my forensic analysis done of the food. 97 00:09:17,980 --> 00:09:23,540 And then right below that's also OS accounts, which is another interesting one we'll go over. 98 00:09:24,100 --> 00:09:25,740 So what OS is it? 99 00:09:25,740 --> 00:09:29,420 It is Windows XP Service Pack 3 Embedded Edition. 100 00:09:29,420 --> 00:09:33,560 It was actually created by Sonoya Retail Systems. 101 00:09:33,640 --> 00:09:38,380 IBM has four other options for the system. 102 00:09:38,640 --> 00:09:40,840 It has PC DOS 2000. 103 00:09:40,840 --> 00:09:45,120 It has Microsoft Windows 2000 Professional Edition and XP Professional. 104 00:09:45,200 --> 00:09:51,480 And then last but not least it has IBM Retail Environment for SUSE Linux version 1.0. 105 00:09:51,480 --> 00:09:58,720 Now if anyone has the ISO for that version, please contact me on my email. 106 00:09:58,960 --> 00:09:59,880 That'd be really cool to get. 107 00:09:59,880 --> 00:10:00,960 Obviously don't send it. 108 00:10:00,960 --> 00:10:10,360 If you're going to send me anything other than the image, the ISO file, I will not respond to it because I will not open it with my main system. 109 00:10:11,500 --> 00:10:17,740 As we know, Windows XP is dead and all those other systems that OS has ever listed are dead. 110 00:10:17,740 --> 00:10:27,060 So that means any exploits or anything like that that applies to any of those OS's are very much still involved in these systems, in these POS systems. 111 00:10:27,060 --> 00:10:30,920 So if you have a POS system that's running XP, have fun. 112 00:10:32,080 --> 00:10:37,040 The Linux one can technically still receive updates, but you're basically rolling those yourself. 113 00:10:37,100 --> 00:10:44,620 So anyone in the open source community who wants to make IBM Retail Edition Linux updates, have fun with that. 114 00:10:46,340 --> 00:10:48,300 Recent documents that have been opened. 115 00:10:48,300 --> 00:10:57,880 So ncuser.dat, which is basically just user permissions and stuff I believe, that was actually opened by me whenever I turned on the system initially in my VM. 116 00:10:58,160 --> 00:11:02,320 So that actually does create a little bit of tampering on systems. 117 00:11:02,320 --> 00:11:09,220 So if this was an actual forensic investigation, this whole entire analysis would be just thrown out the window and in the courtroom. 118 00:11:09,340 --> 00:11:18,980 Because the hash value of the system that I am analyzing is not the same as the actual system when it was imaged. 119 00:11:20,580 --> 00:11:22,740 So run programs is another interesting one. 120 00:11:22,740 --> 00:11:28,060 All these programs I have in this red box over here, those are all from Sonoi Retailing. 121 00:11:29,220 --> 00:11:37,200 So they have one for offline credit card processing, they have one for routing services, things like that. 122 00:11:37,200 --> 00:11:40,140 Those all will run on startup and be controllable. 123 00:11:40,580 --> 00:11:47,180 So at some point I was trying to reverse engineer those types of programs, but sadly I had no luck. 124 00:11:48,600 --> 00:11:55,060 But everything else listed on there below that is actually just normal Windows XP programs, so that's kind of cool. 125 00:11:56,280 --> 00:12:02,780 Here's a list of all the USB devices that have ever been attached to the system. 126 00:12:02,920 --> 00:12:04,120 There's a list of them. 127 00:12:04,120 --> 00:12:08,800 I actually have cherry picked a few of them to actually go over here. 128 00:12:08,800 --> 00:12:22,400 So if you're the person who owns an iPhone 3GS back in 2012, and you plugged your phone into a cash register to charge it, I have that on the log for you. 129 00:12:22,400 --> 00:12:32,380 And then I also have an LG that was also charging on it, an iPhone 4S, an HTC phone, and a Huawei phone as well, and a Samsung phone of course. 130 00:12:32,500 --> 00:12:41,760 So all these devices at some point were plugged into the system for charging or whatever, and that's all logged in the system. 131 00:12:41,880 --> 00:12:58,680 Also, I have a log of all the flash drives that were ever plugged into the system, and I don't know why you would want to plug in a flash drive into a POS system other than to be malicious, but about a few flash drives or someone was doing admin work with it. 132 00:12:58,680 --> 00:13:04,160 Um, yeah, so also you can also see another evidence of my tampering. 133 00:13:04,580 --> 00:13:09,420 You can see my virtual box is also logged in the log. 134 00:13:09,920 --> 00:13:11,100 Um, what else we got? 135 00:13:11,100 --> 00:13:12,580 Yeah, OS accounts. 136 00:13:12,580 --> 00:13:14,620 So here's all the default. 137 00:13:14,620 --> 00:13:20,520 So the cash administrator actually is the default administrator account that comes with Windows, but it has password changed. 138 00:13:20,680 --> 00:13:25,040 Um, they had a cash, there's a cashier account, and then there's a few other normal account. 139 00:13:25,180 --> 00:13:29,360 Um, the guest account on the system actually was disabled, thankfully. 140 00:13:29,360 --> 00:13:32,120 So they actually were doing a little bit of security there. 141 00:13:32,160 --> 00:13:34,540 Um, but there was a few other things a little bit wrong. 142 00:13:34,540 --> 00:13:40,480 So the passwords on the systems, the password on the system actually was never set to actually expire. 143 00:13:40,480 --> 00:13:42,480 So it would always be the same password. 144 00:13:42,480 --> 00:13:45,680 So once you had the password, you're out of luck. 145 00:13:45,840 --> 00:13:50,520 Um, but the register was set to auto log in for the cashier account. 146 00:13:50,960 --> 00:13:56,900 And then the cashier account has been logged in 425 times. 147 00:13:56,900 --> 00:14:00,220 And then the administrator account was only logged into 70 times. 148 00:14:00,400 --> 00:14:03,580 And then the last fell log in was 2018. 149 00:14:03,900 --> 00:14:06,380 So for the administrator account. 150 00:14:07,060 --> 00:14:11,720 Okay, let's get into what everyone wants to talk about the food stats. 151 00:14:11,860 --> 00:14:18,380 So the most bought food from this POS system was Papa John's one topping pizza. 152 00:14:18,380 --> 00:14:20,540 And this also just one slice, by the way. 153 00:14:20,540 --> 00:14:27,860 So just one slice of pizza was the most commonly bought thing at 28,080 pizza slices. 154 00:14:28,120 --> 00:14:33,220 And this is also just the only the one topping and only the, um, one slice. 155 00:14:33,220 --> 00:14:35,940 So if you combine all the pizzas, it actually is more than that. 156 00:14:35,980 --> 00:14:44,500 Um, the least bought food was turkey and stuffing wrap, which sounds disgusting at only four people ever have purchased it. 157 00:14:44,520 --> 00:14:46,140 Um, remember this is a college. 158 00:14:46,140 --> 00:14:49,940 So of course, healthy food was also pretty low on the list there. 159 00:14:50,420 --> 00:14:58,980 An honorable mention for food was the, um, roast beef and asparagus baguette at zero per people have ever purchased it. 160 00:14:58,980 --> 00:15:07,340 It was mentioned only once in the files, and it was only item for a little bit on the menu, but no one ever bought it on this system. 161 00:15:08,060 --> 00:15:10,720 Here's the full list of things that were bought. 162 00:15:10,720 --> 00:15:21,840 So the top five, um, includes waffle fries from Chick-fil-A, fountain drinks, chicken sandwiches also from Chick-fil-A, um, and garlic Parmesan breadsticks. 163 00:15:21,860 --> 00:15:25,540 And then as you can see, there's a few other pizza slices and other things right below all that. 164 00:15:26,460 --> 00:15:29,140 And then some, here's some notable meals that were on the system. 165 00:15:29,140 --> 00:15:42,220 So the very first meal of the system that anyone's ever bought from this register was three pizza slices, three one topping pizza slices for a total of $7.77 from Ash. 166 00:15:42,680 --> 00:15:44,880 Um, and this was back in 2010. 167 00:15:44,880 --> 00:15:51,040 Now, 10 years later, the very last meal I could find on the system, sadly, I did not know what the person ate. 168 00:15:51,040 --> 00:15:56,140 I just knew the person bought a meal plan or use their meal plan to buy it. 169 00:15:56,220 --> 00:16:02,180 So whenever the system was first around, it was actually part of a different restaurant than what it ended up being. 170 00:16:02,660 --> 00:16:06,740 Um, that's why the welcome to is different for both of those receipts. 171 00:16:07,520 --> 00:16:13,360 And so they started taking meal plans and then I stopped having good logs of what people were actually eating, sadly. 172 00:16:13,800 --> 00:16:16,780 Um, and that's about all. 173 00:16:16,780 --> 00:16:18,540 Um, thank you all for listening. 174 00:16:18,600 --> 00:16:22,240 I hope you all enjoy my talk about digital forensics on a POS system. 175 00:16:22,240 --> 00:16:29,460 I hope you all, at some point, find a mystery system and do some forensic analysis on it using autopsy or some of the other things I mentioned below. 176 00:16:29,540 --> 00:16:34,120 I would like to make a special thanks to the Retail Hacking Village for letting me speak today. 177 00:16:34,580 --> 00:16:44,600 And then I'd also like to thank Little Bear and Victor for helping me do some live review and some editing of, not editing, um, um, helping me with my speaking and stuff. 178 00:16:44,620 --> 00:16:49,880 And I'd also like to thank my IT professors at the college for teaching me so well. 179 00:16:50,020 --> 00:16:57,700 My social media accounts are, well, I have my email, so if you need any, have any questions or need anything, well, there's my email. 180 00:16:57,700 --> 00:16:59,920 Then I have my Instagram tag and that's about it. 181 00:17:00,160 --> 00:17:06,340 Um, there should be a Q &A after this, I believe, and I hope all of you have a wonderful Sunday. 182 00:17:06,520 --> 00:17:08,340 Um, and that's it. 183 00:17:08,340 --> 00:17:09,080 Thank you so much.