Good morning. Hey, how is everyone doing? Excited to be here, second day. So thank you all for coming to my talk today on Smission Smackdown, unraveling the threads of the United States Postal Service, Smission, SMS fishing, and fighting back. So to start off, just going to cover a little bit about who I am. So I work full time as a red team operator. I recently graduated university, first full time job, kind of lucky with that. Well in university found around $10,000 in various bug bounty programs, that's how I got started in web application testing, and various certifications, blah, blah, blah. And I also recently founded a company, Phantom Security Group, with a friend of mine. So, who here, show of hands, got one of these text messages? Okay. Okay. A little bit more than I expected. I expected a good amount, but yeah. How did this all start? Just one of those text messages that you just saw on screen, that most of you got it seemed. And that text message was just sent to the wrong man's wife. My wife, as it so happens. And she unfortunately fell victim to this scam. And then just a few days later, I got that text message. And I'm sitting there, I'm bored, we're on winter break, between semesters, and I love hacking web apps. And what did that text have in it? A link to a web app. And so, they set up the web app for me, it's good to go, it's like hack the box, come on. So I loaded up that site in my browser, looks pretty legit, I will admit, and that's actually because they load in most of the resources for the site from the actual USPS.com site. And so, most of the links, they just take you to the USPS official site, but below this screenshot, and this little red area you can see, the delivery failed, you can enter your data. And this is where they start, the scammers start collecting your data. And so, I wanted to get in the middle, I wanted to intercept that traffic, do a little bit more digging than the simple Firefox developer tools allow. So I loaded up Burp suite, community edition of course, I'm not rich. But the first thing I did, and the first thing I noticed actually, was that a lot of the traffic was going to a different domain, a similar one, but different, and I'm just going to call this the C2, or command and control domain, because for some of the kits, it was on the same server, for some of them it wasn't. And that became my new target. And so, with Burp suite loaded up, I could see those HTTP requests, and one of the first things I noticed was WebSocket traffic. And I was like, why is there WebSockets going on? Why did they set up WebSockets just to give us a static HTML page? There's no reason to do that. But, that turned out to be one of the scammers' first of many mistakes. And that's because, by doing a simple path traversal, you could grab any file on the system basically. So like, it was just as simple as dot dot slash, dot dot slash, etc. You get the point. But yeah, with this path traversal, LFI, whatever you want to call it, I was able to read basically everything, but this machine that was on this web application was just a bare image. There was the, obviously the web application itself that they were using to collect information, but nothing really else on there, so no SSH keys or other ways that you would be able to log in usually with this type of vulnerability. So, looking around, very little, as I said, but I did find the access logs for this server. Some of the other servers, later on, like their access logs so big you can't pull it, it just crashes the server. But this one, I got lucky and I was able to actually pull down the file. And before I cover that, I'm just going to show what path traversal vulnerability is, just so some people understand it, if you don't work with web apps often. But a path traversal is when a web application is configured to grab a file from the server and that file is specified through some sort of argument. So, in this example, the file name argument is used to grab gift.png on the left. But if there's not proper sanitization of user input, then an attacker can just grab any file from the system. And so, usually it's starts in the web directory and so you have to do some dot dot slashes to get up a few directories to the top and then grab an already known file just so you can test it out. So, et cetera, password in this case. So now that we're caught up on web application testing, let's get to the access logs. So in here, going to the very top, so where usually the setup process is happening for the web server, we can see that the scammers are using a tool called btpanel. Some people might be familiar with it. It's a Chinese software for server administration through a web app. And that btpanel software uses phpMyAdmin. And looking at the, you can see the IP address of the scammer accessing that phpMyAdmin endpoint. And you can tell it's not one of those web crawlers, web scanners because it's phpMyAdmin underscore a long string of characters that's so random that a scanner's not going to find that. And also it's returning a 200 okay status code to that, which means it actually exists. That endpoint is real. Yeah, I plugged that IP into IP location and some of you might already know where it's from, but we'll get to that in a little bit. After that, obviously just did an Nmap scan of the web application. Just got to get some scanning started. And two open ports. 443 obviously for HTTPS and so we need that open to access the site. And then also 21 for FTP. And that was kind of weird to me. FTP is slowly dying. 1970s I think. But I tried multiple ways to get in through here because usually FTP if it's older setup, there's various different CVEs for it. Also tried brute forcing. That didn't work out. So I had to get back to the web application. And also if you look at the scan, some interesting stuff you can find with the SSL certificates is that the subject alternate names, it contains all the domains that are linked back to that web app. So you can just collect them that way instead of having to go look online, find different scammers. But this all links back to this IP address, this web application here. But this was interesting information. It wasn't an RCE or anything I was looking for like SQL injection or something like that. I wanted to take over this app. I didn't want to get information disclosure. So I had read access to the file system. The path traversal. I had a bunch of different domain names linked back to the web app. And I had to figure out like a little bit about how the back end works with that path traversal vulnerability. But I didn't really have any admin data besides the IP's access and the access logs. And no victim data at all. I didn't know who was being scammed exactly. General guess just of who it was. But I had to dig deeper. And try harder is offset you might say. Don't kill me for saying that. Yeah, so I did just that. Try harder. And this led to a breakthrough. I'm still going to cover it up because I don't want to reveal which end point is vulnerable to this. But it was a blind unauthenticated time based SQL injection vulnerability. Which in short is a really slow dump of a database. Very, very slow. And the way I was able to find this is just simple single quotation in an argument. And it returned a 200 okay status code. Not like a 500 error. Which is what you would expect. But in the message returned it said error. Which none of the other responses did. When you insert a colon in there. Or colon single quote whatever you're testing with. So yeah. Dumped the database for that domain. Some interesting tables in there. Dumped some of the contents of those tables. And looking at those tables, config was actually surprisingly boring. Most of the data in there was just what type of credit cards are you taking in. An activation key for the kit itself. Some other things like that. User info and records were encrypted blobs. So I tried dump and dump. And no luck. It just doesn't work with time based blind injections. Very hard, very slow. And also there was a ton of data in them. And then that left us the admin table. So in the admin table there was encrypted user names. Encrypted tokens like session tokens, login tokens. Hash passwords looking like MD5. Some permission levels one through four. And unencrypted last login times and IP addresses. For those admin users. That was awesome. So can anyone guess the country? China. You're so smart. It was China. And this IP address up here happens to be from the Shanghai region of China. Yeah, this is when I went ahead and published my first blog post. So I have two blog posts on this. The first one was published. I didn't really know it was a kit. I knew it was just a scammer site that they had set up. I didn't know there was a bunch more out there. And so I started looking through some of this data because I had a bunch. But again, I wanted to access the admin portion of the site. And so looking at one of the dumps, if you noticed earlier there was a telegram link in the description of one of the users. Going to that telegram profile you see this is WangduU0. And in his bio it links to another telegram channel which has at the time of taking the screenshot a few days ago is over 3,700 subscribers. And in this telegram channel we can see some demo videos of this kit that they're selling. How to posts to set up the kit. Announcements of how secure the product is. It's super secure. No one is taking your victims, your account credentials, et cetera. And then some stuff like this. Oh, you can't hear it. There's no audio. Okay. It's got some hype up music. Yeah. Who is this? Who is posting these videos? Who is making this kit? That's that WangduU0 character that we first found a link for. And so I actually got to chatting with him on telegram. I was pretending I was a ‑‑ which country I said I was. But I was obviously using Google translate to talk to him. So I had to say I didn't speak Chinese and all that. But got out of him that he's a current computer science student in China. At least at the time of talking to him it was about January time frame of this year. And so he may have graduated now but at the time of talking to him he was a computer science undergraduate it seemed like. And along with him, there's some other members of the group that do graphic design, web developers of course. And I got that information from a company called RE security. And it turns out, so when Googling the WangduU0 character, two blog posts from RE security popped up. And they had already done a good amount of research on this USPS submission campaign along with other campaigns of this group that they dubbed the submission triad had done. And so, cool. Thank you. Yeah, the submission triad, they had found some various vulnerabilities in the USPS kit beforehand. And so they had also found a similar SQL injection vulnerability in the kit. But the author of the kit had read their blog, patched the vulnerability, started encrypting data. He also added captchas to log ins for admins, like a bunch of other security features. But we're getting into how we bypassed all that. So, the RE security hunter team had mentioned in the blog that they had acquired, purchased through some means a kit from the submission triad. So I'm broke. These kits cost $200 a month. And I'm not paying that. Like, no. So, also I can't support scammers. So, that's another thing. But yeah, so I begged them. They get back to me and they're like, hey, can we read about what you've done? Can you tell us a little bit about what you're looking into? Talked back and forth and they were kind enough to send over the kit for free. And so, unzipping the kit, one of the first things I noticed was default credentials. Admin and the password of 1, 2, 3, 4, 5, 6. And then when you log in for the first time, you don't have to change it. So, that makes it nice and easy for us. And I will mention about 20% of the kits I ended up finding still had those default credentials. The thing was the hashes. So, it looked like MD5. I presumed it was MD5. The MD5 hash for 1, 2, 3, 4, 5, 6 did not line up with what was in the pre-prepared database. So, I knew there was something going on. There was some salt being added. Maybe it was some similar algorithm that I just didn't know about. The issue was, looking at the code, it was gross. Like, not even human readable. Very highly obfuscated PHP code. Along with that PHP code, it was using introspection, so you can't add echo statements in there to echo stuff out. And also, it had multiple times it was checking where, checking to see if it was being debugged. And so, I just couldn't find a way. I spent multiple days trying to de-obfuscate the code in there. That's when a friend of mine, actually up here in the first row, suggested using a technique called eval hooking. And so, using simple echo statements, so you hook the eval function, which it has to be plain PHP, plain text PHP, to be executed by the eval function for the page to work. So if you just hook into that function, echo out what it's executing, you can slowly figure out what's going on in the code. And so, you can see some of my notes here, and the variable names are disgusting, gross. But up in the middle, there's little comments added after them. And you can see that the user names are being encrypted with AES-128-CVC. And they're using the key of WDY-666666, just the mean length requirements. And then the ID of AES-128-WANG-DU8. And so, he loves using his own name in these passwords and stuff. So now the passwords were a bit trickier though. It took a little bit longer to figure out. And the passwords were appended with a salt. So, WANG-DU-U, again, more sixes, and then special characters. And then after that, they were hashed three times using empty five. The gold standard for hashing algorithms. I know, it's 20, he wrote it in 2023, so, like, yeah. I don't know what he's learning in school, but, yeah. Then also we look at the activation. So, looking into the kit, I noticed that when I would, like, spin up the server, it would check its activation. And so, this is some basic C4 encoded, well, hex and then basic C4 encoded data. And he hardcoded his IP address for his admin server, like, right there in the code. So, that's his IP address. I haven't checked recently if it's still up, but you can go say hi to him. But also, he was double dipping. So, he's charging 200 bucks a month for this kit. He makes tons of reassurances that he's not stealing their information. No one else is stealing their information. But every time an admin logs in, it sends their login token to him. So, he can just log in as that user and take their victim data along with their 200 bucks a month. So, no honor. But, yeah. So, now we have the method for caching of the passwords. And so, I go ahead and make a go tool, a little quick go tool to crack those passwords. And you can see my command line up there. It's kind of small up here, but just using Rocky against the hashes and printing them out. So, you can see, like, 1, 2, 3, 4, 5, 6, obviously, the default. But, like, straight zeros, 1, 2, 3, 1, 2, 3, 1, 2, 3, 3, 2, 1, admin, 3, 3, admin, etc. All these really easy passwords. But, obviously, it's Rocky, so it's only going to crack the easy ones. But, the issue was, some of the larger panels I was finding, Rocky wasn't cracking any of those passwords for the users. And so, I had to add normal password cracking techniques to crack them. So, the first thing I did was rules, basically, just adding suffixes to the Rocky word list as it's going through. Just append in 1 to the end, exclamation point, dollar sign, other different symbols and number patterns that I was seeing in a lot of the passwords. And then, I also needed a new word list for this, because they're mostly Chinese based. So, I needed a word list that wasn't Rocky, because Rocky is English, obviously, for the most part. And most other word lists are, like, English, French, that sort of thing. There's not many Asian word lists out there for a lot of Asian languages. So, the one I ended up choosing was the Keonashi word list. It was one of the only word lists I could find, actually, for this. And using that word list and these rules, I was able to crack over 130 of those hashes for those admin users. So now, we have decrypted usernames, we have cracked passwords, we can just log into these panels, right? Oh, and this is, like, this is the default admin, like, login screen. But no, you can't do that. The majority of those admin panels actually have wait lists set up for IP addresses. Okay, that's pretty good. Luckily for us, though, like, some of them just didn't set it up. So, we were able to test this out on a few different panels, three to be exact. And you enter using a password and solve the CAPTCHA, and then you just log in. So, this is the inside of the panel, this is the main dashboard. They got nice statistics, numbers, everything. And who doesn't love Excel or CSV format and stuff? So, they have that and you can view the domain names that they were scamming people from. But those restrictions on access and slash admin really hampered what we were able to do, or what I was able to do, because you couldn't dump any of the kids except for those three that had the wait list not enabled. And so, to bypass that, there's these end points that it reaches out to to authenticate, to grab victim data, to grab admin data, to list those domains that we just saw on the previous slides. And those end points don't have the wait list on them. So, they're not protected at all. And so, all I had to do was just authenticate directly to those end points. So, here I'm just authenticating and getting the login token. And here, this is just access in the data for the home panel. So, overall statistics for how many phishes. So, it looks like all records, this one had like 9,200 victims, it looks like. And so, now, using this, I mean, BurstFruit's awesome, but I didn't want to have to do this every time I found the kit. So, I automated the process. And here, we'll show a little demo of it. So, the capture pops up. I couldn't really find a bypass for the capture, so I had to solve it manually, unfortunately. Enter the capture, it goes through, dumps that data for me. And so, this kit that I just dumped there had 28 victims, so really small, brand new one. And then, this one we're about to have is going to have over like 5,000 victims in it. So, here, dumps the pending victims, complete victims. So, it's going to have, if you dumped over 1,000 victims at one time in a page, it would crash the server. And so, I would have to dump like 1,000 a page and then iterate through however many pages it was. And so, there we go, that's the recording. But, like 48 pending victims and 4,900 something completed victims. But we need more targets. So, I had the automation set up. I needed a better way to get these URLs other than them just texting me, because I only got a few text messages. So, I crowd sourced. I set up a site for people to submit URLs to. And it would grab, so there's a static JavaScript config file in there. I could grab that like C2 domain from that file. And that just makes my life easier. But also, I found a bunch of URLs here. So, r slash scams on Reddit, people posted screenshots of their text messages. So, I had to hand jam those URLs in, which is unfortunate, but it was okay. But yeah, just hand jam those URLs in. And one thing I also noticed when going through our shot scams, there was a copycat campaign going on. And this copycat campaign was interesting to me. Because they had ripped the entire front end of the submission triads kit and just placed it on top of their back end. And you could tell they had done that because the site was reaching out to end points that didn't exist on this server, but would exist on the submission triads back end. So, like WebSockets, for example. There's no need to set up WebSockets, they realize this, so they didn't set up WebSockets, but it's still trying to reach out to it because they just didn't even edit the JavaScript in the site. So, that was interesting. Didn't really end up exploiting this campaign. Just targeted the submission triads one, but something of note. So now, I was gathering those URLs from different places, and this was the process that I would go through. I would extract the admin panel URL from that static JavaScript config file. I would exploit that time-based SQL injection against that domain. Dump the admin table, decrypt the usernames from that, put the hashes in the cracker tool, let that run for a little bit, took forever. Once it was done, I would hopefully have a new login that I could add to that automation script that I just showed you. So now, after doing all this, got some interesting statistics. So, this is my chat GPT generated infographic. Look at that. But total times data was entered, so this is times credit card was entered. So, 1.2 million times a credit card was entered into this site. So they went through the whole process to enter a credit card. The total unique credit cards though was 438,000. Unique IPs, 73,000. Unique emails used 54,000. And then domains used by the scammers, they used over 1,100 domains, which is crazy. The thing is, this isn't even all the data. This is the ones I was able to find. There's more, there was more out there. They go up and down all the time, getting taken down. So, the numbers are much larger than this probably. So now, looking at those admin logins, we can do a simple map of their IP addresses. You can see where they're logging in from. We've got some interesting statistics on this. You can see a lot of the publicly known proxies are coming from the United States, so they're proxying to the U.S. There are some people logging in from the U.S. that aren't from publicly known proxies. Some in Europe, and so most of them are in China, but obviously anyone can buy this kit, so admins are going to be logging in from throughout the world. But zooming in on Asia, you can see cluster in Taiwan, you can see cluster, I think that's Hong Kong and Shanghai region. And then also some down in the Philippines and those islands. Now, mapping the victims the same way. This was wild. So, yeah. I mean, it's USPS, so obviously a ton in the U.S., but also a ton throughout the world. I'm going to guess this is a combination of people testing out those random links and also tourists. So people traveling, they get those text messages and enter their data that way. Zooming in on the U.S., it's basically a population density map. So tons around the East Coast, obviously. It's a little thin throughout the Midwest and then SoCal and up in Washington, Oregon. And also cluster out in Hawaii. So yeah, a lot of IP addresses there. More infographic. Let's look at the top three states. California was number one with 141,000 victims. Texas had 119,000 and Florida had over 100,000. Top three email domains used, Gmail was way at the top with 93,000. iCloud with 15 and Yahoo with 12. And then other stats. So the average credit cards entered, out of this 1.2 million entries, on average people entered 2.48 credit cards. So almost rounding up to three. And the reason for this was when you go through this process and you enter your credit card, it would be like, oh, this card's invalid, enter a new one. And so people would just keep entering credit cards. I saw six credit cards for some of them. It was crazy. And so it's unfortunate, but that's why unique email addresses and unique credit cards, that was such a big difference. Also you can see the number of .edu emails in there. So a lot of professors, staff at universities, students obviously, so 471 there. Some people were using the .mil email addresses, which I was kind of surprised about. So 3.mils in there and 17.govs, federal employees. So what happened with all this data? I had all this 1.2 million victim records here. I started looking for some help. So no one really wanted to reach back out to me. So I reported through Internet Crime Center's online forum and the FBI reported tip or whatever. And the postal inspectors, I emailed them. And no one really reached out until the banks did. One of the major bank's threat intelligence teams had read my blog on LinkedIn or something. And they got in touch with me, set up a meeting with their team. I just walked through what I had done and shared securely the victim data with them so that they could go through and find their customers, get those credit cards canceled, make sure any false charges get handled. And then they also passed it off to their network of banks. And so just that single major bank, they were able to help over 80,000 people, which is wild. And then with that, they also got me in touch with the U.S. Postal Inspector's Office. They had a contact in their cyber crimes division there. And so working with the postal inspectors, I was able to share that admin data along with the victim data and a chat export of my conversation with Wangdu Yu because I had gotten some interesting information from him in regards to the case that they were doing. One thing that they had mentioned, so the bank along with the postal inspector's office, is that it's really hard to identify victims in this case because there's so many different ways your credit card can get stolen. And having this like hard evidence, I don't know if, it's probably not admissible in court, but having this hard link between this is where you entered your credit card and they're known for stealing your credit card. So there you go. You can just link the two together directly. Investigation seems to be ongoing. There's been no update. If any of you have read the Wired article that was posted just a few days ago, Matt Bruges from Wired, he talks to the postal inspector's office. They say the investigation is ongoing. And so how do we fix this issue? Other than manning the middle on every text message, don't do that by the way. I'm not an expert in any of these fields, so SMS, iMessage, iOS, Android. But I think some better client side filtering needs to be done. So obviously, I'm going to say the buzzword AI. AI can actually be helpful in this. Identifying, hey, why is USPS texting you in the first place? And secondly, why are they linking you to this site that's obviously not the USPS's official site? So some third party integrations are actively doing stuff like this. So one example, I don't use them, this is just something I found, is Truecaller does something similar. And you can just integrate it into your, at least iOS and I assume Android as well. And they'll just do that filtering for you. So with that, that concludes my presentation. Thank you DEF CON. It's been amazing.