Okay, coming up, we have Willis Van De Wanter. He works as a Senior Staff Security Researcher at SP Rocket Security. Willis is very passionate about speaking in conferences and had presented at Hack Miami recently. He and his team contributed towards additional checks for Burp Suite's bchecks plugin. His topic this time is bypassing Whois rate limiting and alerting on fresh enterprise domains. 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. So, with Whois, Whois data is prime resource for identifying APEX domains owned by some specific company. Unfortunately, that data is typically locked up behind rate limiting systems, third party APIs, or expensive purchases. 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. 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. Give it up for Willis. All right. Everybody hear me okay? Good? All right. So, this is a tools demo. It's a little shorter than the average 25-minute presentation. The title of the tool is Whois Watcher. And to get started, this is the GitHub link for it. It'll be throughout the presentation. I feel like I should lay a foundation real quick as to why we would care about doing reverse Whois. So, I think probably most people in this room have registered a domain before. And when you register a domain, you provide ownership information. So, first name, last name, phone number, email address, that sort of thing. Most modern registrars, you can enable privacy as part of the feature set. And that's optional. If you choose not to enable that, then if somebody does a Whois lookup on the domain, they get back this information. So, they get back the ownership information. If you do enable it, it should usually get back, like, redacted for privacy. And there's a URL, you fill out a captcha, and you can get that ownership information back. This is really often used as part of the reconnaissance process in offensive security. And again, I'm sure you guys are familiar with this, but just to sort of level set a little bit. So, for example, you go to your terminal right now, you type in whoisbankofamerica.com, and you'll get back the ownership information. So, the name, the address, that sort of thing. At the bottom, I've highlighted the email address. So, it's very common to use, like, one piece of information. Usually the email address or the name, and do a reverse lookup. So, we're saying, what other domains have been registered by domain.administrativebankofamerica.com or whatever the focused APEX domain is. So , if you do this in, like, Woxie, which is up here, you'll get back 400,000 domains. So, that's quite a lot, but there's a couple things to keep in mind. One, that's a historic record. So, that's any domain ever registered with that email address going back as far as they have the data. And two, as a pen tester, we'll need to do some validation. 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. 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. But either way, it really quickly expands the attack surface map. So, we're going from one single APEX domain to other APEX domains and kicking off subdomain brute forcing, right? The pipeline of reconnaissance is sort of going off after that. I mean, to use an example, in the past six months, we had an assessment. 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. 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. So, hopefully that lays it down a little bit as to why you might care about reverse whois when it comes to recon. I like this quote a lot. I think it sums it up super well. I think Jason is around right now. For every new APEX domain we find, we 4X our chance of hacking a target. So, we get a multiplicative effect by adding an APEX domain. And in my mind, it's almost like a tree, right? Like, we find another APEX domain, and all of these things branch out from that APEX domain. It's this additional ability to keep on testing against the customer. So, again, the full pipeline of subdomain brute forcing, port scanning, services. All right, everybody following along so long, and most people have heard of this before, right? If you have, yeah. All right, cool. So, there's a lot of tools around doing reverse whois lookups, but we had kind of a need. Like, 50,000 to 400,000 domains are registered every 24 hours. So, if we're using API keys to look up historic records, we're essentially missing out on almost every single day. That's a lot of potential domains that we could be missing out on. 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? And that was part of the background for this, along with we built out a recon platform around whois. So, we needed a tool that can process whois lookups up to 400 domains every 24 hours. You can't just use, like, a residential IP. There's IP rate limiting in place. There's various reasons you can't do that. We need machine-readable data, and I'll come back to this point in a minute. So, we really wanted JSON as output. And we wanted to be alerted if a potential domain owned by a target is recently registered. So, again, I'll come back to this in a little bit, but it plays back into the reverse whois lookup. I don't know if you guys are familiar with whoisds.com, but they will provide newly registered domains for the past 24 hours. So, you can sign up for the service. You can download it. 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. So, one of the first things they did was built into the tool. 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. So, you set it on a cron job, and you wake up to fresh domains essentially every day. So, that's one of the first features put in place. That might be kind of hard to read, but I guess who's worked with whois a little bit? Who's played around with whois? Alright, you'll notice sort of quickly that it's human readable. You type in whois for a domain, and it's delimited by new lines, and it's actually completely up to the registrar. So, here's four different domains, and they all look completely different in their output. That's really hard to work with if you're doing it at scale. It's too much. So, another thing whois watcher does is whenever you do a whois lookup, it'll return as json. Because then... am I like yelling into the mic? Shit. There we go. So, it'll return as json, and then you can parse based off of that. It's pretty helpful. It uses a standard whois library... excuse me, standard Go library to do that. Okay. So, we're pulling in domains every 24 hours. We are getting json output. Now we need a way to look up domains at large scales. So, there's two ways that whois watcher will do that. The first is through ipv6 proxying. 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. So, you actually get a net block of ipv6 addresses. So, for like DigitalOcean, you'll get about 15. 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. So, there's a great tool called TrevorProxy, and I think... I saw Tegramancer earlier. He wrote that, and it sets up a local SOCKS proxy. 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. So, if you're doing it this way, you'll complete about 100,000 to 200,000 whois lookups for 24 hours. I still think that number can be tweaked. I think we could do a little bit better with that, but the big downside is not all registrars support ipv6. 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. Everybody follow? Is that making sense? Cool. All right. So, the best way I've seen to do this is with serverless cloud. So, whois watchers go is go, so you can cross-compile it, push it into Lambda. You can use AWS CDK to do it. That's how I did it for a long time. But recently, Lemma came out. So, I guess, how many people have heard of Lemma before? Raise your hand. A couple there. It's a great utility. It's written by Def Per Am. And the idea is you can take a Go binary and push it into a Lambda function. It'll give you a Lambda function URL, and you can just call that to distribute workloads at scale really well. So, if you add whois watcher, the link from GitHub, into tools-install-tools.sh, it'll just push it into Lambda. So, there's no other work to be done. It's now completely in Lambda. And so, here would be an example. You could do cat domains. You pipe it to Lemma. With 400 concurrent invocations, which is not a lot. Like , most people's accounts have about 1,000. Holy shit. Is it me? So, I should just push through this feedback? Just keep talking? Okay. All right. So, yeah. Most people's accounts have about 1,000. So, 400 is a very small number. It's a single region. And with 400 concurrent invocations, you'll finish about 1,000,000 to 1,500,000 per 24 hours. 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. One thing I would call out... Oh, so, whois watcher does respect IP limits. 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. Second one, a guy on our team has called this out. Great finding. 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. 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. Any questions so far? I feel like I'm ripping through this. I have a question section at the end, but... makes sense? Is that cool? Useful? Hopefully? All right. 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. 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. That could be red teaming, continuous, bug bounty. So, WhoisWatcher has a YAML file that you can set things of interest. So, I have, like, an email contains bankofamerica.com, that's in my watch list. 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. Does that make sense? Cool. So, I put a video in here. Try and walk through this real quick. So, we have a list of domains. I think there's going to be, yeah, there's 400 domains in here, so it's not a big list. We're going to run it through Lemma, like I was talking about. We'll use 400 concurrent invocations. 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. It should take around 10 seconds to run these. You can get much better scale by modifying your timeouts and doing small tweaks. So, it's all pushing them out, doing it live. Right, so, sorry, 13 seconds to get all of the results. Sort of verify that all the results are in there. They're now in there as JSON. We can do whatever we want with it. In this case, we're going to run a watch list to identify another domain. Owned by Bank of America that was in that domain set of 400. So, our watch list is for an email that contains Bank of America. So, again, we're providing the watch list and using the results.json that we got in the previous step. And there we go, there's a minpaychange.com that we now found out about that was from that domain set. So , that would be an example of using the tool, sort of beginning to end. Right. 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. So, typically, when you do a reverse whois, you pick out one data point. So, I want to reverse whois on the email, or I want to reverse whois on the company name. When you own the data, you can do it on multiple points, right? So, in this case, the watch list contains a combination of Tesla and a registrar of DNS Station. 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. But they often use the same registrar, because most enterprises do that. They don't want multiple registrars. You don't want AWS and then also DNS Station or Namecheap. So, we can sort of filter on the idea that they're likely to register with the same registrar. So, here would be an example of two domains found that I haven't seen before. teslanunionfree.com. And basically, all that is, is we're looking at a massive set. We're saying anything with the word Tesla in it, and a registrar of DNS Station alert me. 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. It was sort of easy to predict. Make sense? So, I mentioned this a second ago. I would highly recommend to store the results in a JSON file and then analyze them later. So, you can run it through Lemma, store it as a JSON file, come back later. And the other reason you might want to do this is you can modify your watch list as time goes on. So, you can, let's say you have a new customer or you're in bug bounty, you have a new domain. You're updating your watch list. You're still analyzing from your previous results at sort of no cost. You're not burning an API key to do it. All right, I'm getting pretty close to closing up here. One thing I want to add in is some sort of like an almost in a domain. 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. Probably needs better error response handling. Like , one of the worst problems with Whois is it completely depends on the registrar. 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. So, that probably needs to be worked on and then better international TLD support, again, due to registrar constraints. 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. I added some examples into awesome Whois resources. Probably add a few more. That's the tool there. So, yeah, I mean, that's all I have. Hopefully, anybody have any questions? Appreciate it. All right. Thank you so much, everyone.