Okay, so I'm going to quickly introduce Master Chen while he is having a drink or maybe two. This is a comprehensive talk that we've got going on now. The title is on the screen, a URL shortened by any other name. If you do not know Master Chen, even though the front two rows apparently do, he was here at DEF CON in 2015 doing a Sky Talk, which basically taught people how to automate stalking. He then came back to Recon Village last year to tell people how not to do that because of what he did the first time. And now he's back again. So he kind of loves coming back to our village, and we're really pleased to have him. And without further ado, I'm going to hand over and enjoy. Perfect. Thank you, guys. Thank you, everybody. And I just want to say, you know, speaking at a smaller village, not that this is a small village, but speaking at a smaller village, it's really intimate. It's really awesome. And I like to see my audience, even though I brought, like, half you guys here. So I just want to say thank you guys very much. You can follow me on Twitter at the handle that you see there. That's also, like, all of my social media pretty much. So there you go for doxing myself. All right. And actually, here we go, starting with who I am or who am I. I know that's a funny little tagline there. But this is actually my favorite slide because it reminds me of Mooshu the dragon from Mulan. Who am I? Who am I? I am the gray noise co-founder and co-host, which is a podcast, if you don't know. I'm a B-side speaker. I'm a Def Con speaker. I'm a Recon Village speaker. I'm a Telefreaker. I'm a 2600 writer. And I'm a board member of the Synth Shop locally here in Las Vegas. I try. I try to be a comedian. Maybe it's good. Maybe it's not. I don't know. Who was there? Was anybody there? You don't count. I'm kidding. I'm kidding, muffins. Okay. So I want to know who you guys are. And that's probably for my own OSINT. But any first time Def Conners here? Okay. Cool. Any old timers here? I'll use the same joke. Any egg timers? No. Okay. Kitchen timers. No. Okay. All right. Do we have any people in the audience who are like private investigators or just people who do this professionally, OSINT, this type of investigation? Okay. Awesome. Awesome. I got people to prove myself to. Any data scientists out there? Okay. Awesome. I'm recently getting into that space. That's cool. Any reporters besides myself as press for Def Con this year? No? No reporters? Okay. Awesome. All right. So these are standard disclaimers. I don't want to hurt anybody in my research. This is all open source. Try not to be an asshole if you're going to replicate my work. I'm doing this for educational purposes only, right? And here they are, actually. So I anal, I anus. That's been a joke for the past couple years. I am not a lawyer. I am not a stalker. I anal, I anus. Sounds better that way, I guess. So again, I'm not here to make life difficult for anybody. So use whatever you learn today wisely. And of course, again, this is for informational purposes only. All right. So some caveats before we get started with the actual meat and potatoes. I went into this research not knowing what I would find. I wasn't, like, looking for something specific. I just kind of aimed my code cannons at it and I wanted to see what was going to happen. So yeah, there was no particular target. I'm not trying to target anybody specific, no stalking this year. And this is just, there is much more to do in this space. This is just scratching the surface. So hopefully with the help of you guys, we get something done. But after the research, what can I tell you that we can expect here? Well, there is porn. There's porn, obviously. There is username enumeration, password enumeration, and we'll get into that a little bit. Sensitive docs and so on and so forth. And thousands and thousands of various media files. That's kind of the fun part. Just fun to watch. Okay. So let's define a URL shortener. So a URL shortener, of course, you're taking a very big, long, descriptive URL and you're shortening it into something that is shareable. So you can share it among, let's say, Twitter or text messages or just something very quick and easy. Something that's memorable or at least easier to remember. But all it really is is a 301 redirect for your HTTP codes. These are just a 301 redirect to a different URL. So knowing that, we can follow it back. We can follow it back to where the original link went to. Now, I chose is good as my target. That's is.gd as the URL shortener for a couple of reasons. There's no membership required in order to shorten a URL. There's a consistent slug length. So what I mean by that is a lot of URL shorteners, maybe their slug length varies in size. So you have a URL shortener that only used five characters, maybe some that used eight. Is good only uses six. No more, no less. I feel like there's a Monty Python joke in there somewhere. I won't attempt it. But so a six-character slug length. It's always going to be six characters. And so there's also advanced shortening features, which makes this easy and low-hanging fruit. So things to consider, of course, rate limits. I did check the terms of service for is good. And you can scrape all you want as long as it's only one link per second. Per machine. So yes, every hour, then you're basically able to scrape 3,600 links and so on and so forth. What is that? 8,400 per day? Something like that. But yes, 3,600 an hour. So in terms of service, of course, if you're going to use is good as a URL shortening service, they have some things that you'd want to mind, of course. No spam. No child pornography, of course, thankfully. No malicious content. So you can't URL shorten malware. If they detect it, they'll disable it, et cetera, et cetera. So basically, don't be a dick. All right. The maths, because there's always maths. Now, no, I'm not British, but I do love the area. I've never been there, but maybe I love the culture. So, okay. Like I said earlier, all of the slugs are six characters in length, which means if you... and they don't use special characters either. So no plus sign, no parentheses, nothing of that nature. So you're looking at capital letters, lowercase letters, and then zero through nine as your numbers. So if you take a look at all that, that's 62 character possibilities in each space. So it's 62 to the sixth power, which gives you about 56 billion links. Closer to 57 billion links, actually. Now, no, not all of these URL shortened links are actually being used, and we'll get into that in a second, but this is the entire space. This is exactly what can be shortened. And, of course, if you have a lower case word, like A through Z, zero through nine, it shortens that to about two billion, okay? So we're kind of whittling away the possibilities, or we're trying to whittle away from population size to a sample size. Now, is good actually has some advanced URL shortening features, such as lowercase word pronounceable. What exactly does that mean? Lowercase word pronounceable is consonant-vowel-consonant-vowel-consonant-vowel. It's not actually a word, it's just what they consider word-pronounceable. So ba-ba-ba-ba, ba-ba-ba-bee, ba-ba-ba-bay, ba-ba-ba-bo, ba-ba-ba-you. Uh, sounds like, uh, assault that hog for a $35 bid. I wish I could, uh, do auctioneering better, but it'd make the joke better. Uh, so the word, so the lowercase word pronounceable character set is either you're starting with a vowel or you're starting with a consonant and going from there. So it's either A-B-A-B-A-B, B-A-B-A-B-A. And so with that, uh, this actually whittles down our, uh, space to about 2.3 million links. Something that's just a little bit more manageable. Now, so how do we do that? On the right side of the screen, you're gonna see a list of the slugs that I generated, and then I'm just gonna plug that back, uh, into a curl request, uh, to, to grab that data and see where that link is going to. Uh, so the top, uh, code snippet is just, uh, how I generated the links. The bottom code, uh, snippet is just taking that, putting it into a curl, uh, request, and then seeing what comes back. That, that's very simple. That's all it is. The cool thing about this is that it's all, uh, native Linux tools. A little bit of Python, but it's nothing that's not on a computer already. Um, so here's an example of the scrape as it's going on. I just took a screenshot. Um, I let this go on for about a month and a half on three computers. Could I have done it quicker? Yes, but it was kind of cool to watch it as it computed, right? The cool thing is like you go to a coffee, you come back, oh, I found something else. You go take a nap for about eight hours, you come back and it's still running. So for a month and a half, it was better than watching a screensaver at least, right? So what you'll see here is that if the link is resolvable, it'll show you the new URL, the URL that it actually points to. If it is not resolvable, it'll just kick back your original request, which is the HTTPS, uh, you know, is.gd slash whatever the slug is. And so that's exactly, that's exactly how that works. So there were a couple of errors along the way. Um, so bad requests, um, hosts that no longer exist, we get for like a 404 error. Um, also things that would hold up the script, uh, would be something like streaming media, right? Because the curl request just constantly grabs data and it actually hung up my server a little bit or the, uh, the script. So I would have to stop it, move that URL, and then continue on with the scrape. Uh, because imagine like, uh, a URL being shortened to like so my FM or whatever, the curl request is just constantly pulling, uh, for that next media, that next piece of information. So that was a, that was a problem, but that's why it was a good idea to keep a, keep an eye on it. Um, so here are some of the statistics. Now this is, uh, actually pretty interesting. Uh, so again, uh, just to kind of refresh your memory, uh, you have 2.3 million links in this lowercase word-pronounceable, uh, space. Now of that, only about 230, or sorry, 228,000 links were resolved. So that's about nine, almost 10%. And of the original 1.3 billion links that are actually, um, resolved on, not LinkedIn, sorry, that's the, uh, whiskey talking, on Isgood, only about 0.01% was resolved, if we're looking at that statistic. All right, now that I've kind of explained exactly what I was doing to scrape, let's look a little bit at the data, which I'm sure is, is the interesting part, right? So, uh, what you're seeing here on the absolute right side of the white text is the entire, uh, count for how many of particular links were, were there. So what I mean by that is, at the very top, you see 141,444. Those are 100,000, sorry, 141,444 unique links that are referenced in this scrape. At the very bottom, you're gonna see one link, but that's referenced 66,000 times. So maybe that's a, maybe that's an interesting point of, uh, point of data to take a look at. And it actually is. Uh, we'll get into that in just a second. And it varies from the top all the way down. So you have two links that are 35,000, et cetera, et cetera, et cetera. And that's how that data goes. I tried to graph it, didn't work so well, gotta work on that. Now here's our media analysis on, uh, the, the stuff that we've scraped. So we have, uh, JPEG, APKs, ZIPS, MP3s, uh, C, that's, that's C source code, uh, PNG files, PDFs, uh, EXEs, uh, we found a lot of stuff here. When, when I say we, I mean, I mean me and the voices in my head. But yeah, so this is like a media analysis of exactly what we found. Again, the text on the right side is the, uh, the actual data accounts. Now I've, again, I've only used native Linux tools. So we're talking like, uh, cut, sort, unique, uh, stuff that you'd normally find on a Linux computer or a Unix. Now what we can do though with this data, cause I've saved it into a text file. So every, every URL that was, uh, resolvable, I saved into its own URL or sorry, its own, uh, text file. So now we can make that searchable. Now what do we search for? We can search for keywords like username equals, password equals, invoice, and you'll, you'll find exactly what you're looking for, really. So, um, and also of course, at the very end of the file, you can search for, uh, Excel type of, uh, file endings, uh, dot doc. Uh, you can find anything specific that you're looking for, uh, as far as like, you know, uh, the PDF file format, the, those types of file formats. And, uh, there's the screenshot of, uh, this is an invoice from February 12th, 2018. Um, of course the username, uh, the email was kind of blocked, kind of blocked out, at least, you know, it's from Gmail. Uh, but they did, that did have an address along with first and last name. So it's a good starting point. Now what does this actually infer for us? Like, what does that, what does this tell us? Okay, well, is there stocking potential? Probably, of course. We're, we could, we could potentially uncover, um, people of interest. And I could talk about that in just a second with that screenshot at the bottom. And of course, the, the link on the right side is why was this particular address or block, uh, referenced 46 unique times? Now, do we remember that one link that was referenced 65,000 times earlier? That's the map. That's the map address that was linked 65,000 times. Now why? Well, it's not a particular house. I've already checked. It's not one house. It's actually that block. So why would that particular block be referenced so many times? Now we could explain it away, such as like a, a realtor using is good, or it could be something else. It's just very interesting to see, uh, that kind of data there. Uh, but let's talk a little bit about the, the person of interest on the bottom. First name is Natasha. Uh, last name of course blocked out, but it's referenced five unique times. And that's because it's five unique, uh, Natasha's with that same last name. Is this a person of interest? Who is this? Is this a celebrity? Is this an unwanted celebrity or somebody who doesn't actually want to be in the space? This is the stuff that I found kind of just as I was going through the data. This is the, this is the interesting part. It's almost like OSINT by accident, right? I'm not exactly looking for somebody specific, but there it is. Right? So this is just some of the interesting data points that I found. So what are the next steps in what we're doing here or what I'm doing here? And when I say we, now I'm including everybody here. Um, we could scrape the entire character set of is good. We can also scrape, we could apply this methodology, uh, to other URL shorteners, such as a tiny URL, Bitly, you know, all these other things. The only thing that I would say is, um, these other services use memberships or they, they ask you to kind of sign up. Uh, and so I didn't get to see exactly as far as, uh, do you have to use their API? Could you just use, uh, other means, et cetera, et cetera. But that's something that I'd like to explore. Okay. So, uh, any questions on this so far? Goddamn, that was quick. Uh, yes, question. On the map data? Map data specifically? Yes. There's actually a lot of map data, like incredible amounts of map data. So, uh, is good. Well, specifically is good is used, uh, for a lot of, uh, map references. Uh, there was a lot of one-offs though. So it's just one link that referenced an address. Um, but to answer that question, yes, they were pointing to houses, houses that you can easily then pivot to, um, like an assessor's office search to see first and last name of that address. Uh, and so we can go from there. Now I didn't go down that rabbit hole, but I see that there's that potential there. Also kind of funny thing here. Uh, there's a lot of map data that references secret beaches, like beaches that nobody wants to know about except among their friends. Uh, but that's actually shared quite a bit of time or, uh, quite a bit, quite a few times. Um, also another piece of interesting data, um, there was about 388 references to porn. That's like X hamster, XXX, uh, X and XX, uh, Pornhub. And that's just because I searched it, not because I was told to. Uh, so there's, there's that. I mean, there's, there's a treasure trove of information here. Um, the most interesting thing I found though, actually, I thought I had a better screenshot of it, um, was the invoices. So the invoices that I saw there, you had first and last name, you had how much they paid for said service, you had their email address, and you had pretty much every piece of information you would need, uh, to maybe start some sort of, uh, campaign against that particular person. But again, the problem is, not the problem, but the issue here is that I wasn't targeting anybody specific. So it kind of just, this is kind of just information that I happened upon. So take that as you will, but that is there. So, yes. Yes, I found it once. Absolutely. So I found it once by accident. Um, I found a password reset link, um, and I was trying to find it again, but it seemed like it was going to work. Now I'm not going to be an asshole and actually change their password for them, but yes, absolutely yes, that was linked. I'm sorry, uh, for the people who are watching on TV. Uh, the question was, did you ever see, uh, a URL that was, uh, posted to a password reset link or something that logged you directly into an account? And the answer is yes, that was, that was there. Uh, not directly to the account per se, but to a password reset for that account. That's something that I found, uh, one time going through, um, and I know I can find it again. I just haven't yet, but it is there. So, uh, another question? Oh, yes. Mr. Muffins. Oh, absolutely. Well, so actually in the, in the URL shortening service, in Isgud's terms of service, they warn you, they tell you straight up, look, this is going to be public information. They tell you, do not share your personal information, do not share anything of that nature. Obviously we all read the terms of service. So Isgud already knows that that's an issue. Uh, but it is, it is there. It's in their terms of servicing. Don't do that. It's still being done, right? Um, also, uh, one thing that I did include on the slides here, but I wrote an image loader. So what I did was I took all the URLs that had JPEG, uh, PNG, all these different types of media files. And if you run it, it'll load a new picture every second. Um, some of the images are not safe for work. So I will make that available to you guys. Do that on your own time and have fun. Just, you've been warned. All right. Uh, I love answering questions so we can keep going with this. Mr. Muffins. Uh, yes, absolutely. I just made it public a couple of minutes before the talk. So if you want to take pictures there, there you go. That's the, uh, that's the URL, uh, for GitHub and, uh, my other stuff. In fact, I'm starting a new campaign, a new Twitter campaign, hashtag roast my code. Go ahead and do that, please. I sincerely mean it because I, I'm not a coder by, by profession. I just kind of throw code together and see if it works. So please hashtag roast my code. Uh, questions? The final slide is as far as link count or... Yes, I do. So, uh, this is funny. So when I generated the links, I actually generated 56 billion links. And just that text file alone was about, uh, 15 gigs of just six characters every line. And that was the entire space. So I was like, ah, that's a lot. So I cut it down to the 2.3 million. So, um, and as far as size, again, uh, earlier we had a statistic about only 228,000 links, uh, were actually resolvable or were resolved. Uh, and so I did save that data. Uh, and so actually, uh, thank you for this. But another interesting piece of information here with OSINT is we can see which companies are using these URL shorteners because I did see a lot of, uh, URL shorteners or URLs shortened from the same company. For instance, postimg.cc as an example, they use it to show, um, video games that they have for sale on their, on their website as a shortened URL. Uh, so that's, that was an interesting piece of information. Mr. Code. So it spits back the unshortened URL and then I would go in and just categorize the data by what it found. It was just checking where it left. Yeah. So it was only checking the headers to answer that question. So yes, I didn't download all the information. I just saw where it went to and then I, it was up to me to, to take a look at that data and then look at that, you know, but Oh, I know the cool thing about this too, is that I found a whole bunch of PDFs. So you guys want to play like slide karaoke later. Uh, I have a whole bunch now, right? Or at least I can get them pretty quickly. So, all right. Uh, let's keep going. Questions? Oh yeah, we can keep going. Yes, over there. Oh, this is another, thank you guys. I love this discussion. So, uh, the ransomware again, if, if is good actually detects on their, on their end that a link is malicious, they'll, they'll block it. And so when I go to the URL, it has this big, you know, uh, warning, warning, uh, malicious, malicious. And so I didn't actually see that, uh, by the way, all this was resolved in a VM. So I was okay with going to these URLs. Um, but yeah, so by the time I got to it, um, it's not like I was downloading ransomware or malware or anything of the sort, including viruses and whatnot. Uh, so I hope that answers your question. So, uh, I wanted to say something off that point, but the whiskey made me forget. Question? Not that I've seen, but I mean, I didn't go through every single link. Um, this information will be available to you, uh, upon request actually. So the code is there for you. Um, but if you want to talk, we can talk, uh, further, uh, about exactly what I found. Uh, I mean, with specifics, I'm not trying to burn any sources here or, or whatnot. So, uh, yeah. Any further questions? All right. So, um, if there are any further questions, I will be down at the heart bar, uh, for however long you guys want to talk to me. I like to talk to people. That's my favorite part of the conference. Uh, so if you want to keep continuing this conversation, we definitely can. And I'll get off stage now.