start	end	text
0	4920	Okay, so I'm going to quickly introduce Master Chen while he is having a drink or maybe two.
5300	9400	This is a comprehensive talk that we've got going on now. The title is on the screen,
9480	12620	a URL shortened by any other name. If you do not know Master Chen,
12620	19280	even though the front two rows apparently do, he was here at DEF CON in 2015 doing a Sky Talk,
19280	24720	which basically taught people how to automate stalking. He then came back to Recon Village
24720	29620	last year to tell people how not to do that because of what he did the first time.
29620	33860	And now he's back again. So he kind of loves coming back to our village, and we're really
33860	38180	pleased to have him. And without further ado, I'm going to hand over and enjoy. Perfect.
38180	47440	Thank you, guys. Thank you, everybody. And I just want to say, you know, speaking at a smaller
47440	52420	village, not that this is a small village, but speaking at a smaller village, it's really
52420	56380	intimate. It's really awesome. And I like to see my audience, even though I brought, like,
56380	61680	half you guys here. So I just want to say thank you guys very much. You can follow me on Twitter
61680	68080	at the handle that you see there. That's also, like, all of my social media pretty much. So
68080	73700	there you go for doxing myself. All right. And actually, here we go, starting with who I am or
73700	78120	who am I. I know that's a funny little tagline there. But this is actually my favorite slide
78120	86240	because it reminds me of Mooshu the dragon from Mulan. Who am I? Who am I? I am the gray noise
86240	93040	co-founder and co-host, which is a podcast, if you don't know. I'm a B-side speaker. I'm a
93040	98100	Def Con speaker. I'm a Recon Village speaker. I'm a Telefreaker. I'm a 2600 writer. And I'm a
98100	103980	board member of the Synth Shop locally here in Las Vegas. I try. I try to be a comedian. Maybe
103980	110680	it's good. Maybe it's not. I don't know. Who was there? Was anybody there? You don't count.
110680	115940	I'm kidding. I'm kidding, muffins. Okay. So I want to know who you guys are. And that's probably
115940	122540	for my own OSINT. But any first time Def Conners here? Okay. Cool. Any old timers here? I'll use
122540	129880	the same joke. Any egg timers? No. Okay. Kitchen timers. No. Okay. All right. Do we have any people
129880	133800	in the audience who are like private investigators or just people who do this professionally,
133800	139940	OSINT, this type of investigation? Okay. Awesome. Awesome. I got people to prove myself to.
140660	145760	Any data scientists out there? Okay. Awesome. I'm recently getting into that space. That's cool.
146500	152200	Any reporters besides myself as press for Def Con this year? No? No reporters? Okay. Awesome.
153660	158080	All right. So these are standard disclaimers. I don't want to hurt anybody in my research.
158460	163120	This is all open source. Try not to be an asshole if you're going to replicate my work.
163460	168860	I'm doing this for educational purposes only, right? And here they are, actually. So I anal,
168860	174100	I anus. That's been a joke for the past couple years. I am not a lawyer. I am not a stalker.
174100	180360	I anal, I anus. Sounds better that way, I guess. So again, I'm not here to make life difficult for
180360	184980	anybody. So use whatever you learn today wisely. And of course, again, this is for informational
184980	190160	purposes only. All right. So some caveats before we get started with the actual meat and potatoes.
190520	195320	I went into this research not knowing what I would find. I wasn't, like, looking for something
195320	201240	specific. I just kind of aimed my code cannons at it and I wanted to see what was going to happen.
201240	205040	So yeah, there was no particular target. I'm not trying to target anybody specific,
205040	209880	no stalking this year. And this is just, there is much more to do in this space. This is just
209880	214900	scratching the surface. So hopefully with the help of you guys, we get something done.
216160	221540	But after the research, what can I tell you that we can expect here? Well, there is porn.
221700	226640	There's porn, obviously. There is username enumeration, password enumeration, and we'll
226640	232720	get into that a little bit. Sensitive docs and so on and so forth. And thousands and thousands
232720	238780	of various media files. That's kind of the fun part. Just fun to watch. Okay. So let's define
238900	243700	a URL shortener. So a URL shortener, of course, you're taking a very big, long, descriptive URL
243700	248740	and you're shortening it into something that is shareable. So you can share it among, let's say,
248740	254060	Twitter or text messages or just something very quick and easy. Something that's memorable or at
254060	260260	least easier to remember. But all it really is is a 301 redirect for your HTTP codes. These are
260260	267160	just a 301 redirect to a different URL. So knowing that, we can follow it back. We can follow it
267160	273860	back to where the original link went to. Now, I chose is good as my target. That's is.gd as the
273860	279700	URL shortener for a couple of reasons. There's no membership required in order to shorten a URL.
280420	284700	There's a consistent slug length. So what I mean by that is a lot of URL shorteners, maybe
285180	290760	their slug length varies in size. So you have a URL shortener that only used five characters,
290760	297300	maybe some that used eight. Is good only uses six. No more, no less. I feel like there's a
297300	303860	Monty Python joke in there somewhere. I won't attempt it. But so a six-character slug length.
303860	308460	It's always going to be six characters. And so there's also advanced shortening features,
308460	315780	which makes this easy and low-hanging fruit. So things to consider, of course, rate limits.
315780	321220	I did check the terms of service for is good. And you can scrape all you want as long as it's
321220	331680	only one link per second. Per machine. So yes, every hour, then you're basically able to scrape
331680	338900	3,600 links and so on and so forth. What is that? 8,400 per day? Something like that. But yes,
338900	345140	3,600 an hour. So in terms of service, of course, if you're going to use is good as a URL shortening
345140	351940	service, they have some things that you'd want to mind, of course. No spam. No child pornography,
351940	358680	of course, thankfully. No malicious content. So you can't URL shorten malware. If they detect it,
358680	365200	they'll disable it, et cetera, et cetera. So basically, don't be a dick. All right. The
365200	369260	maths, because there's always maths. Now, no, I'm not British, but I do love the area. I've never
369260	375020	been there, but maybe I love the culture. So, okay. Like I said earlier, all of the slugs are
375020	379040	six characters in length, which means if you... and they don't use special characters either. So
379040	383840	no plus sign, no parentheses, nothing of that nature. So you're looking at capital letters,
383840	388740	lowercase letters, and then zero through nine as your numbers. So if you take a look at all that,
388740	395420	that's 62 character possibilities in each space. So it's 62 to the sixth power, which gives you
395420	403480	about 56 billion links. Closer to 57 billion links, actually. Now, no, not all of these URL
403480	407640	shortened links are actually being used, and we'll get into that in a second, but this is the
407640	413200	entire space. This is exactly what can be shortened. And, of course, if you have a lower
413840	420640	case word, like A through Z, zero through nine, it shortens that to about two billion, okay? So
420640	425260	we're kind of whittling away the possibilities, or we're trying to whittle away from population
425260	434860	size to a sample size. Now, is good actually has some advanced URL shortening features,
434860	441620	such as lowercase word pronounceable. What exactly does that mean? Lowercase word pronounceable is
442540	447020	consonant-vowel-consonant-vowel-consonant-vowel. It's not actually a word, it's just what they
447020	452040	consider word-pronounceable. So ba-ba-ba-ba, ba-ba-ba-bee, ba-ba-ba-bay, ba-ba-ba-bo,
452040	456880	ba-ba-ba-you. Uh, sounds like, uh, assault that hog for a $35 bid. I wish I could, uh,
456880	463680	do auctioneering better, but it'd make the joke better. Uh, so the word, so the lowercase word
463680	467160	pronounceable character set is either you're starting with a vowel or you're starting with
467260	471600	a consonant and going from there. So it's either A-B-A-B-A-B, B-A-B-A-B-A.
471620	477560	And so with that, uh, this actually whittles down our, uh, space to about 2.3 million links.
477580	479740	Something that's just a little bit more manageable.
481120	484880	Now, so how do we do that? On the right side of the screen, you're gonna see a list of the
484880	491200	slugs that I generated, and then I'm just gonna plug that back, uh, into a curl request, uh, to,
491200	496680	to grab that data and see where that link is going to. Uh, so the top, uh, code snippet is just,
496680	501280	uh, how I generated the links. The bottom code, uh, snippet is just taking that,
501280	506180	putting it into a curl, uh, request, and then seeing what comes back. That, that's very simple.
506180	510900	That's all it is. The cool thing about this is that it's all, uh, native Linux tools. A little
510900	516920	bit of Python, but it's nothing that's not on a computer already. Um, so here's an example of the
516920	521780	scrape as it's going on. I just took a screenshot. Um, I let this go on for about a month and a half
522300	528880	on three computers. Could I have done it quicker? Yes, but it was kind of cool to watch it as it
529360	533360	computed, right? The cool thing is like you go to a coffee, you come back, oh, I found something
533360	537820	else. You go take a nap for about eight hours, you come back and it's still running. So for a
537820	542580	month and a half, it was better than watching a screensaver at least, right? So what you'll see
542580	548320	here is that if the link is resolvable, it'll show you the new URL, the URL that it actually
548320	553320	points to. If it is not resolvable, it'll just kick back your original request, which is the
554160	561120	HTTPS, uh, you know, is.gd slash whatever the slug is. And so that's exactly, that's exactly
561120	567420	how that works. So there were a couple of errors along the way. Um, so bad requests, um, hosts
567420	573280	that no longer exist, we get for like a 404 error. Um, also things that would hold up the script,
573280	578080	uh, would be something like streaming media, right? Because the curl request just constantly
578080	583600	grabs data and it actually hung up my server a little bit or the, uh, the script. So I would
583600	588940	have to stop it, move that URL, and then continue on with the scrape. Uh, because imagine like,
588940	594760	uh, a URL being shortened to like so my FM or whatever, the curl request is just constantly
594760	600460	pulling, uh, for that next media, that next piece of information. So that was a, that was a problem,
600460	606600	but that's why it was a good idea to keep a, keep an eye on it. Um, so here are some of the
606600	611000	statistics. Now this is, uh, actually pretty interesting. Uh, so again, uh, just to kind of
611000	616660	refresh your memory, uh, you have 2.3 million links in this lowercase word-pronounceable, uh,
616660	623600	space. Now of that, only about 230, or sorry, 228,000 links were resolved. So that's about
623600	632920	nine, almost 10%. And of the original 1.3 billion links that are actually, um, resolved on,
632920	636380	not LinkedIn, sorry, that's the, uh, whiskey talking, on Isgood,
636380	641540	only about 0.01% was resolved, if we're looking at that statistic.
644160	647800	All right, now that I've kind of explained exactly what I was doing to scrape, let's
647800	650900	look a little bit at the data, which I'm sure is, is the interesting part, right?
651900	656580	So, uh, what you're seeing here on the absolute right side of the white text is the entire,
656580	662300	uh, count for how many of particular links were, were there. So what I mean by that is,
662300	672540	at the very top, you see 141,444. Those are 100,000, sorry, 141,444 unique links that are
672540	677140	referenced in this scrape. At the very bottom, you're gonna see one link, but that's referenced
677920	683300	66,000 times. So maybe that's a, maybe that's an interesting point of, uh, point of data to
683300	687460	take a look at. And it actually is. Uh, we'll get into that in just a second. And it varies
687460	692180	from the top all the way down. So you have two links that are 35,000, et cetera, et cetera, et
692180	698040	cetera. And that's how that data goes. I tried to graph it, didn't work so well, gotta work on
698040	703820	that. Now here's our media analysis on, uh, the, the stuff that we've scraped. So we have, uh,
703820	712920	JPEG, APKs, ZIPS, MP3s, uh, C, that's, that's C source code, uh, PNG files, PDFs, uh, EXEs,
712920	716700	uh, we found a lot of stuff here. When, when I say we, I mean, I mean me and the voices in my
716700	721640	head. But yeah, so this is like a media analysis of exactly what we found. Again, the text on the
721640	726700	right side is the, uh, the actual data accounts. Now I've, again, I've only used native Linux
726700	732920	tools. So we're talking like, uh, cut, sort, unique, uh, stuff that you'd normally find on a
732920	739960	Linux computer or a Unix. Now what we can do though with this data, cause I've saved it into
739960	745120	a text file. So every, every URL that was, uh, resolvable, I saved into its own URL or sorry,
745120	750200	its own, uh, text file. So now we can make that searchable. Now what do we search for? We can
750200	757320	search for keywords like username equals, password equals, invoice, and you'll, you'll find
758080	764620	exactly what you're looking for, really. So, um, and also of course, at the very end of the
764620	770320	file, you can search for, uh, Excel type of, uh, file endings, uh, dot doc. Uh, you can find
770320	775980	anything specific that you're looking for, uh, as far as like, you know, uh, the PDF file format,
775980	781080	the, those types of file formats. And, uh, there's the screenshot of, uh, this is an invoice
782000	787700	from February 12th, 2018. Um, of course the username, uh, the email was kind of blocked,
787700	790980	kind of blocked out, at least, you know, it's from Gmail. Uh, but they did, that did have an
790980	799740	address along with first and last name. So it's a good starting point. Now what does this actually
799740	803940	infer for us? Like, what does that, what does this tell us? Okay, well, is there stocking potential?
804140	809120	Probably, of course. We're, we could, we could potentially uncover, um, people of interest. And I
809120	813660	could talk about that in just a second with that screenshot at the bottom. And of course, the, the
813660	821820	link on the right side is why was this particular address or block, uh, referenced 46 unique times?
821820	828700	Now, do we remember that one link that was referenced 65,000 times earlier? That's the map.
828700	833960	That's the map address that was linked 65,000 times. Now why? Well, it's not a particular house. I've already
833960	839780	checked. It's not one house. It's actually that block. So why would that particular block be
839780	845460	referenced so many times? Now we could explain it away, such as like a, a realtor using is good,
845460	850980	or it could be something else. It's just very interesting to see, uh, that kind of data there.
851140	854820	Uh, but let's talk a little bit about the, the person of interest on the bottom.
854820	861260	First name is Natasha. Uh, last name of course blocked out, but it's referenced five unique
861260	867240	times. And that's because it's five unique, uh, Natasha's with that same last name.
867560	873000	Is this a person of interest? Who is this? Is this a celebrity? Is this an unwanted celebrity
873000	877160	or somebody who doesn't actually want to be in the space? This is the stuff that I found kind
877160	881340	of just as I was going through the data. This is the, this is the interesting part. It's almost
881340	887460	like OSINT by accident, right? I'm not exactly looking for somebody specific, but there it is.
887500	891520	Right? So this is just some of the interesting data points that I found.
893240	897560	So what are the next steps in what we're doing here or what I'm doing here? And when I say we,
897560	903440	now I'm including everybody here. Um, we could scrape the entire character set of is good.
903440	908400	We can also scrape, we could apply this methodology, uh, to other URL shorteners,
908400	914100	such as a tiny URL, Bitly, you know, all these other things. The only thing that I would say is,
914100	918840	um, these other services use memberships or they, they ask you to kind of sign up.
918860	924980	Uh, and so I didn't get to see exactly as far as, uh, do you have to use their API? Could you just
924980	929220	use, uh, other means, et cetera, et cetera. But that's something that I'd like to explore.
929220	940840	Okay. So, uh, any questions on this so far? Goddamn, that was quick. Uh, yes, question.
949030	953410	On the map data? Map data specifically? Yes. There's actually a lot of map data, like
953990	959130	incredible amounts of map data. So, uh, is good. Well, specifically is good is used, uh, for a lot
959130	965650	of, uh, map references. Uh, there was a lot of one-offs though. So it's just one link that referenced
965650	971630	an address. Um, but to answer that question, yes, they were pointing to houses, houses that you
971630	977410	can easily then pivot to, um, like an assessor's office search to see first and last name of that
977410	982510	address. Uh, and so we can go from there. Now I didn't go down that rabbit hole, but I see that
982510	987690	there's that potential there. Also kind of funny thing here. Uh, there's a lot of map data that
987690	992850	references secret beaches, like beaches that nobody wants to know about except among their
992850	997190	friends. Uh, but that's actually shared quite a bit of time or, uh, quite a bit, quite a few times.
997190	1002590	Um, also another piece of interesting data, um, there was about 388 references to porn. That's
1002590	1010590	like X hamster, XXX, uh, X and XX, uh, Pornhub. And that's just because I searched it, not because
1010590	1015490	I was told to. Uh, so there's, there's that. I mean, there's, there's a treasure trove of
1015490	1019290	information here. Um, the most interesting thing I found though, actually, I thought I had a better
1019290	1025770	screenshot of it, um, was the invoices. So the invoices that I saw there, you had first and last
1025770	1031370	name, you had how much they paid for said service, you had their email address, and you had pretty
1031370	1035670	much every piece of information you would need, uh, to maybe start some sort of, uh, campaign
1035670	1039310	against that particular person. But again, the problem is, not the problem, but the issue here
1039310	1043990	is that I wasn't targeting anybody specific. So it kind of just, this is kind of just information
1043990	1056400	that I happened upon. So take that as you will, but that is there. So, yes. Yes, I found it once.
1056500	1061640	Absolutely. So I found it once by accident. Um, I found a password reset link, um, and I was trying
1061640	1065640	to find it again, but it seemed like it was going to work. Now I'm not going to be an asshole and
1065640	1071460	actually change their password for them, but yes, absolutely yes, that was linked. I'm sorry, uh, for
1071460	1078280	the people who are watching on TV. Uh, the question was, did you ever see, uh, a URL that was, uh,
1078280	1083020	posted to a password reset link or something that logged you directly into an account? And the
1083020	1087820	answer is yes, that was, that was there. Uh, not directly to the account per se, but to a password
1087820	1093200	reset for that account. That's something that I found, uh, one time going through, um, and I know
1093200	1103470	I can find it again. I just haven't yet, but it is there. So, uh, another question? Oh, yes.
1103690	1121030	Mr. Muffins. Oh, absolutely. Well, so actually in the, in the URL shortening service, in Isgud's
1121030	1126750	terms of service, they warn you, they tell you straight up, look, this is going to be public
1126750	1132070	information. They tell you, do not share your personal information, do not share anything of
1132070	1138860	that nature. Obviously we all read the terms of service. So Isgud already knows that that's an
1138860	1143700	issue. Uh, but it is, it is there. It's in their terms of servicing. Don't do that. It's still
1143700	1149480	being done, right? Um, also, uh, one thing that I did include on the slides here, but I wrote an
1149480	1155280	image loader. So what I did was I took all the URLs that had JPEG, uh, PNG, all these different
1155280	1160460	types of media files. And if you run it, it'll load a new picture every second. Um, some of the
1160460	1167620	images are not safe for work. So I will make that available to you guys. Do that on your own
1167620	1175380	time and have fun. Just, you've been warned. All right. Uh, I love answering questions so we can
1175380	1182780	keep going with this. Mr. Muffins. Uh, yes, absolutely. I just made it public a couple of
1182780	1186640	minutes before the talk. So if you want to take pictures there, there you go. That's the, uh,
1186640	1193680	that's the URL, uh, for GitHub and, uh, my other stuff. In fact, I'm starting a new campaign,
1193720	1200040	a new Twitter campaign, hashtag roast my code. Go ahead and do that, please. I sincerely mean it
1200040	1204920	because I, I'm not a coder by, by profession. I just kind of throw code together and see if it
1204920	1218390	works. So please hashtag roast my code. Uh, questions? The final slide is as far as link count or...
1220810	1226230	Yes, I do. So, uh, this is funny. So when I generated the links, I actually generated 56
1226230	1232850	billion links. And just that text file alone was about, uh, 15 gigs of just six characters
1233450	1239450	every line. And that was the entire space. So I was like, ah, that's a lot. So I cut it down
1239450	1245830	to the 2.3 million. So, um, and as far as size, again, uh, earlier we had a statistic about only
1246290	1252530	228,000 links, uh, were actually resolvable or were resolved. Uh, and so I did save that data.
1252530	1257830	Uh, and so actually, uh, thank you for this. But another interesting piece of information here
1257830	1264170	with OSINT is we can see which companies are using these URL shorteners because I did see a lot of,
1264170	1271750	uh, URL shorteners or URLs shortened from the same company. For instance, postimg.cc as an example,
1271750	1275930	they use it to show, um, video games that they have for sale on their, on their website
1275930	1280230	as a shortened URL. Uh, so that's, that was an interesting piece of information.
1282840	1297690	Mr. Code. So it spits back the unshortened URL and then I would go in and just categorize the
1297690	1308090	data by what it found. It was just checking where it left. Yeah. So it was only checking the
1308090	1313050	headers to answer that question. So yes, I didn't download all the information. I just saw where it
1313050	1317010	went to and then I, it was up to me to, to take a look at that data and then look at that, you
1317010	1320830	know, but Oh, I know the cool thing about this too, is that I found a whole bunch of PDFs. So
1320830	1327330	you guys want to play like slide karaoke later. Uh, I have a whole bunch now, right? Or at least
1327330	1335450	I can get them pretty quickly. So, all right. Uh, let's keep going. Questions? Oh yeah, we can
1335450	1345890	keep going. Yes, over there. Oh, this is another, thank you guys. I love this discussion. So, uh,
1345890	1351190	the ransomware again, if, if is good actually detects on their, on their end that a link is
1351190	1356650	malicious, they'll, they'll block it. And so when I go to the URL, it has this big, you know, uh,
1356650	1361230	warning, warning, uh, malicious, malicious. And so I didn't actually see that, uh, by the way, all
1361230	1367210	this was resolved in a VM. So I was okay with going to these URLs. Um, but yeah, so by the time I
1367210	1371470	got to it, um, it's not like I was downloading ransomware or malware or anything of the sort,
1371470	1378210	including viruses and whatnot. Uh, so I hope that answers your question. So, uh,
1378750	1382410	I wanted to say something off that point, but the whiskey made me forget. Question?
1387790	1393350	Not that I've seen, but I mean, I didn't go through every single link. Um, this information
1393350	1398390	will be available to you, uh, upon request actually. So the code is there for you. Um,
1398390	1402870	but if you want to talk, we can talk, uh, further, uh, about exactly what I found. Uh,
1402870	1410970	I mean, with specifics, I'm not trying to burn any sources here or, or whatnot. So, uh, yeah.
1412730	1422210	Any further questions? All right. So, um, if there are any further questions, I will be down
1422210	1427590	at the heart bar, uh, for however long you guys want to talk to me. I like to talk to people.
1427590	1430970	That's my favorite part of the conference. Uh, so if you want to keep continuing this
1430970	1434170	conversation, we definitely can. And I'll get off stage now.
