start	end	text
820	5820	Okay, coming up, we have Willis Van De Wanter.
6080	12140	He works as a Senior Staff Security Researcher at SP Rocket Security.
12860	19200	Willis is very passionate about speaking in conferences and had presented at Hack Miami recently.
19460	25640	He and his team contributed towards additional checks for Burp Suite's bchecks plugin.
25640	32940	His topic this time is bypassing Whois rate limiting and alerting on fresh enterprise domains.
32940	41700	We all know what Whois is, if in case we wanted to get information with respect to an IP address or with respect to a domain name, we'd simply go ahead and do a Whois.
42000	51800	So, with Whois, Whois data is prime resource for identifying APEX domains owned by some specific company.
51800	60700	Unfortunately, that data is typically locked up behind rate limiting systems, third party APIs, or expensive purchases.
61120	70940	What Willis did is that Willis made use of a cloud environment, serverless cloud environment, and had random IP addresses to go ahead and bypass such kind of a scenario.
71300	77280	So, Willis is going to go ahead and give us a demo of what he did and how he was able to bypass such kind of a situation.
77280	78500	Give it up for Willis.
82320	83560	All right.
83760	85100	Everybody hear me okay?
85100	85900	Good?
85900	86700	All right.
86700	88220	So, this is a tools demo.
88220	91280	It's a little shorter than the average 25-minute presentation.
91640	94180	The title of the tool is Whois Watcher.
94780	97240	And to get started, this is the GitHub link for it.
97240	99000	It'll be throughout the presentation.
99940	106360	I feel like I should lay a foundation real quick as to why we would care about doing reverse Whois.
106360	110540	So, I think probably most people in this room have registered a domain before.
110700	113800	And when you register a domain, you provide ownership information.
113800	119040	So, first name, last name, phone number, email address, that sort of thing.
119060	123520	Most modern registrars, you can enable privacy as part of the feature set.
123700	126140	And that's optional.
126180	132580	If you choose not to enable that, then if somebody does a Whois lookup on the domain, they get back this information.
132580	134680	So, they get back the ownership information.
134680	139440	If you do enable it, it should usually get back, like, redacted for privacy.
139440	144120	And there's a URL, you fill out a captcha, and you can get that ownership information back.
146640	151080	This is really often used as part of the reconnaissance process in offensive security.
151080	155100	And again, I'm sure you guys are familiar with this, but just to sort of level set a little bit.
155600	163320	So, for example, you go to your terminal right now, you type in whoisbankofamerica.com, and you'll get back the ownership information.
163320	166280	So, the name, the address, that sort of thing.
166460	169500	At the bottom, I've highlighted the email address.
169500	173040	So, it's very common to use, like, one piece of information.
173040	177220	Usually the email address or the name, and do a reverse lookup.
177220	187340	So, we're saying, what other domains have been registered by domain.administrativebankofamerica.com or whatever the focused APEX domain is.
187340	192940	So , if you do this in, like, Woxie, which is up here, you'll get back 400,000 domains.
193020	196020	So, that's quite a lot, but there's a couple things to keep in mind.
196220	198420	One, that's a historic record.
198420	204020	So, that's any domain ever registered with that email address going back as far as they have the data.
204380	207440	And two, as a pen tester, we'll need to do some validation.
207600	214040	So, we'll need to pick out domains from here that we think are really owned by Bank of America, and then we go after those.
214040	221620	And as a red team or as a pen tester, those are often domains that maybe not quite as taken care of, depending on the company.
221880	225480	But either way, it really quickly expands the attack surface map.
225480	231860	So, we're going from one single APEX domain to other APEX domains and kicking off subdomain brute forcing, right?
231860	235000	The pipeline of reconnaissance is sort of going off after that.
235000	239000	I mean, to use an example, in the past six months, we had an assessment.
239000	250180	They gave us one APEX domain, did reverse whois, found additional APEX domains, performed scanning, brute forcing, identified an environment JSON file that had been left by DevOps.
250180	259300	That had Azure creds in it, and that got us into the environment because the other APEX domains are often hosted within either the same cloud or the same environment.
259300	265980	So, hopefully that lays it down a little bit as to why you might care about reverse whois when it comes to recon.
268080	269540	I like this quote a lot.
269540	270820	I think it sums it up super well.
270820	272500	I think Jason is around right now.
272600	277720	For every new APEX domain we find, we 4X our chance of hacking a target.
277720	281740	So, we get a multiplicative effect by adding an APEX domain.
281740	284980	And in my mind, it's almost like a tree, right?
284980	290060	Like, we find another APEX domain, and all of these things branch out from that APEX domain.
290060	294740	It's this additional ability to keep on testing against the customer.
294740	299620	So, again, the full pipeline of subdomain brute forcing, port scanning, services.
300420	304740	All right, everybody following along so long, and most people have heard of this before, right?
304740	306140	If you have, yeah.
306160	307060	All right, cool.
307900	315310	So, there's a lot of tools around doing reverse whois lookups, but we had kind of a need.
315860	321160	Like, 50,000 to 400,000 domains are registered every 24 hours.
321160	327740	So, if we're using API keys to look up historic records, we're essentially missing out on almost every single day.
327740	331140	That's a lot of potential domains that we could be missing out on.
331140	338020	So, the idea was, like, all right, how do we focus on not just historic domains, but how do we continuously test for reverse whois?
338020	343840	And that was part of the background for this, along with we built out a recon platform around whois.
345500	351380	So, we needed a tool that can process whois lookups up to 400 domains every 24 hours.
351380	353540	You can't just use, like, a residential IP.
353540	355780	There's IP rate limiting in place.
355780	357700	There's various reasons you can't do that.
357700	362080	We need machine-readable data, and I'll come back to this point in a minute.
362240	364300	So, we really wanted JSON as output.
364540	370740	And we wanted to be alerted if a potential domain owned by a target is recently registered.
370800	374800	So, again, I'll come back to this in a little bit, but it plays back into the reverse whois lookup.
377120	384200	I don't know if you guys are familiar with whoisds.com, but they will provide newly registered domains for the past 24 hours.
384200	385660	So, you can sign up for the service.
385660	386680	You can download it.
386680	393280	And every 24 hours, you get a zip file with a text that has all the domains that were registered in the past 24 hours.
393660	396320	So, one of the first things they did was built into the tool.
396340	404300	So, if you are running whois watcher and you do dash dash nrd, every day it will download all of the previous day's domains.
404340	409220	So, you set it on a cron job, and you wake up to fresh domains essentially every day.
409480	412100	So, that's one of the first features put in place.
414220	420000	That might be kind of hard to read, but I guess who's worked with whois a little bit?
420000	421560	Who's played around with whois?
422300	426340	Alright, you'll notice sort of quickly that it's human readable.
426340	432600	You type in whois for a domain, and it's delimited by new lines, and it's actually completely up to the registrar.
432600	437920	So, here's four different domains, and they all look completely different in their output.
438200	440680	That's really hard to work with if you're doing it at scale.
441560	442940	It's too much.
444280	449980	So, another thing whois watcher does is whenever you do a whois lookup, it'll return as json.
449980	453840	Because then... am I like yelling into the mic?
453840	454780	Shit.
456680	457980	There we go.
458980	463620	So, it'll return as json, and then you can parse based off of that.
463620	464860	It's pretty helpful.
464900	469940	It uses a standard whois library... excuse me, standard Go library to do that.
472040	472880	Okay.
473120	475900	So, we're pulling in domains every 24 hours.
475900	477700	We are getting json output.
477760	481920	Now we need a way to look up domains at large scales.
481920	484660	So, there's two ways that whois watcher will do that.
484660	487320	The first is through ipv6 proxying.
487420	497220	And I wasn't aware of this until about a year ago, but if you create a VPS and you enable ipv6 in it, you'll get more than one ipv6 address.
497220	499940	So, you actually get a net block of ipv6 addresses.
500020	502460	So, for like DigitalOcean, you'll get about 15.
502460	513620	If you do Linode's $5 a month VPS, you'll get a slash 64, which is a sextillion number of addresses that you can use on your single device.
514700	521040	So, there's a great tool called TrevorProxy, and I think... I saw Tegramancer earlier.
521180	524540	He wrote that, and it sets up a local SOCKS proxy.
524540	536020	So, every request you make into the SOCKS proxy, it modifies your source ipv6 address, essentially to bypass rate limiting, because you come out with a new ipv6 address with every single request.
536320	541760	So, if you're doing it this way, you'll complete about 100,000 to 200,000 whois lookups for 24 hours.
541960	543780	I still think that number can be tweaked.
543780	550620	I think we could do a little bit better with that, but the big downside is not all registrars support ipv6.
550620	557780	So, for many of them, you'll be able to do it, but you're going to occasionally have domains that you just can't look up with ipv6 proxy.
559780	560720	Everybody follow?
560720	562180	Is that making sense?
562760	563420	Cool.
564780	565520	All right.
565820	569220	So, the best way I've seen to do this is with serverless cloud.
569340	574500	So, whois watchers go is go, so you can cross-compile it, push it into Lambda.
574760	576860	You can use AWS CDK to do it.
576860	578580	That's how I did it for a long time.
578580	580820	But recently, Lemma came out.
580820	583560	So, I guess, how many people have heard of Lemma before?
583560	584620	Raise your hand.
584720	585820	A couple there.
585920	587160	It's a great utility.
587160	588720	It's written by Def Per Am.
588720	593500	And the idea is you can take a Go binary and push it into a Lambda function.
593500	600140	It'll give you a Lambda function URL, and you can just call that to distribute workloads at scale really well.
600900	609220	So, if you add whois watcher, the link from GitHub, into tools-install-tools.sh, it'll just push it into Lambda.
609220	610920	So, there's no other work to be done.
610920	612560	It's now completely in Lambda.
614300	615700	And so, here would be an example.
615700	617060	You could do cat domains.
617060	618140	You pipe it to Lemma.
618740	622260	With 400 concurrent invocations, which is not a lot.
622260	630140	Like , most people's accounts have about 1,000.
630140	632140	Holy shit.
632500	633600	Is it me?
635320	638620	So, I should just push through this feedback?
638620	639340	Just keep talking?
639340	639880	Okay.
641440	642400	All right.
642480	643080	So, yeah.
643080	644640	Most people's accounts have about 1,000.
644640	646720	So, 400 is a very small number.
646720	648100	It's a single region.
648500	654520	And with 400 concurrent invocations, you'll finish about 1,000,000 to 1,500,000 per 24 hours.
654520	665780	So, if you want to go beyond just the last 24 hours, you can build out an entire recon platform, and we did it, just by pulling in lots of domains and running them through Lambda functions.
666540	668840	One thing I would call out...
668840	671380	Oh, so, whois watcher does respect IP limits.
671380	679080	So, if a registrar says, hey, you need to back off, you've made too many requests, it'll drop off as to not violate terms of service.
679380	682640	Second one, a guy on our team has called this out.
682640	684260	Great finding.
684580	701740	If you use AWS EventBridge to make a modification to the function URL, so you can set it on a crontab for every single minute, and it doesn't need to do much, you can just make a slight modification to the function, AWS will redeploy you into Lambda, so you'll get a new IP address every minute.
701780	710560	So, every single minute, you get a new IP address with 400 concurrent invocations, so you get this massive scale to pull down the data itself.
712640	713860	Any questions so far?
713860	716020	I feel like I'm ripping through this.
716200	719060	I have a question section at the end, but... makes sense?
719740	720620	Is that cool?
720700	721380	Useful?
721380	722100	Hopefully?
722360	723040	All right.
724620	735140	All right, so, now we have domains every 24 hours, we're getting it in JSON, we're doing large, large lookups to a million to a million and a half every 24 hours.
735560	744920	Now we need to do what we really came here to do, which is, if a new domain registered by a company we care about is registered, we want to know about that.
744920	747730	That could be red teaming, continuous, bug bounty.
748340	752460	So, WhoisWatcher has a YAML file that you can set things of interest.
752960	758080	So, I have, like, an email contains bankofamerica.com, that's in my watch list.
758820	769860	And if I take in the domains, the results from the domains, run it through WhoisWatcher, it'll identify, from those results, any domains, and we get alerted on it.
769860	771400	Does that make sense?
771860	772580	Cool.
775380	777160	So, I put a video in here.
777860	779560	Try and walk through this real quick.
780740	783040	So, we have a list of domains.
783040	786640	I think there's going to be, yeah, there's 400 domains in here, so it's not a big list.
787260	789620	We're going to run it through Lemma, like I was talking about.
789620	792020	We'll use 400 concurrent invocations.
792480	800300	So, in this step, it's just going to push all of those domains out to Lambda function URLs, pull in the results, and store them as a file.
801340	804020	It should take around 10 seconds to run these.
804020	809060	You can get much better scale by modifying your timeouts and doing small tweaks.
810460	812760	So, it's all pushing them out, doing it live.
813000	816280	Right, so, sorry, 13 seconds to get all of the results.
818480	820780	Sort of verify that all the results are in there.
820780	822140	They're now in there as JSON.
822540	824820	We can do whatever we want with it.
824920	827940	In this case, we're going to run a watch list to identify another domain.
827960	831580	Owned by Bank of America that was in that domain set of 400.
832180	835660	So, our watch list is for an email that contains Bank of America.
839880	845480	So, again, we're providing the watch list and using the results.json that we got in the previous step.
846020	852900	And there we go, there's a minpaychange.com that we now found out about that was from that domain set.
852900	857180	So , that would be an example of using the tool, sort of beginning to end.
859540	860340	Right.
863360	872040	Another thing that's in there, and I've never seen this in a data broker before, is you can look up multiple reverse lookup points.
872080	875300	So, typically, when you do a reverse whois, you pick out one data point.
875300	879860	So, I want to reverse whois on the email, or I want to reverse whois on the company name.
880580	883440	When you own the data, you can do it on multiple points, right?
883440	890580	So, in this case, the watch list contains a combination of Tesla and a registrar of DNS Station.
890680	896960	And the reason we would do that, and it's kind of hard to see on the left, but Tesla redacts all their whois information.
897660	901360	But they often use the same registrar, because most enterprises do that.
901360	903580	They don't want multiple registrars.
903580	907860	You don't want AWS and then also DNS Station or Namecheap.
907880	912820	So, we can sort of filter on the idea that they're likely to register with the same registrar.
913980	918420	So, here would be an example of two domains found that I haven't seen before.
919460	920900	teslanunionfree.com.
920900	924260	And basically, all that is, is we're looking at a massive set.
924260	929320	We're saying anything with the word Tesla in it, and a registrar of DNS Station alert me.
929480	943240	And I can give an example in the past six months of using this technique to discover a domain that we didn't know about before, simply by focusing on the registrar, even with redaction in place, because the customer always kept using the same registrar.
943440	944980	It was sort of easy to predict.
946540	947820	Make sense?
951220	952980	So, I mentioned this a second ago.
952980	958360	I would highly recommend to store the results in a JSON file and then analyze them later.
958440	963480	So, you can run it through Lemma, store it as a JSON file, come back later.
963480	968300	And the other reason you might want to do this is you can modify your watch list as time goes on.
968620	972840	So, you can, let's say you have a new customer or you're in bug bounty, you have a new domain.
973440	974380	You're updating your watch list.
974380	978440	You're still analyzing from your previous results at sort of no cost.
978440	980680	You're not burning an API key to do it.
984240	987000	All right, I'm getting pretty close to closing up here.
987920	992380	One thing I want to add in is some sort of like an almost in a domain.
992620	1004720	So, like for domain typosquatting or cases where a customer does a domain that's almost their name, I would love to have like the Levenstein distance as part of the watch list in order to get alerted on domains in that way.
1005760	1007820	Probably needs better error response handling.
1007820	1012640	Like , one of the worst problems with Whois is it completely depends on the registrar.
1012640	1020760	So, you can look up a .de and get a completely different error than if you look up a .bank or some other specific TLD.
1020800	1027320	So, that probably needs to be worked on and then better international TLD support, again, due to registrar constraints.
1030310	1037210	All right, so, I added like a, as I've been going along through the research, as I mentioned, we did an entire platform around this.
1037230	1040890	I added some examples into awesome Whois resources.
1040910	1042490	Probably add a few more.
1042970	1044730	That's the tool there.
1046090	1048550	So, yeah, I mean, that's all I have.
1048550	1051130	Hopefully, anybody have any questions?
1054640	1055920	Appreciate it.
1058240	1059340	All right.
1059340	1060760	Thank you so much, everyone.
