humiliating iis servers for fun and jail time humiliating iis servers for fun and jail time A friend of mine once told me: If you ever spot an IIS blue screen, don't stop there; there must be something. Yep, he was right. That IIS splash page is not a dead end. Behind that blue window sits one of the most consistently misconfigured web servers on the www, and it's begging you to look deeper. So let me walk you through how I approach IIS targets during bug bounty: psst, psst, IIS servers, where are you? active tech fingerprinting ok, I found an IIS server. now what? pwn time the HTTPAPI 2.0 dead end that isn't IIS tilde enumeration: the gift that keeps giving github dorks to resolve shortnames using BigQuery to resolve shortnames bruteforcing the rest with crunch fuzzing: the IIS-specific wordlist matters web.config: the keys to the kingdom bin directory DLL exposure via cookieless sessions reverse proxy path confusion authentication bypass via NTFS hacks bypassing WAFs via HPP psst, psst, IIS servers, where are you? Here are some techniques I use to find IIS servers. Before you even touch a target, go see what Shodan already knows: ssl:"target.com" http.title:"IIS" These sample queries will list IIS boxes tied to the target's org or SSL certificates. You'll sometimes find staging servers, forgotten admin panels, and internal tools that nobody realized were internet-facing. Feel free to replace or combine shodan with other platforms like fofa, censys, netlas, odin, etc. They all index different slices of the internet. ๐ Google can find IIS servers for you before you even fire up a scanner. These dorks are all about locating IIS targets within a scope: site:target.com intitle:"IIS Windows Server" The aspnet_client folder and _vti_bin (FrontPage extensions) are dead giveaways for IIS; if Google has indexed them, you've got a target. The ext:aspx dork catches any indexed ASP.NET pages, which means IIS is underneath. Also, expand your scope with stacked wildcards to catch nested subdomains that basic enumeration misses: site:*.target.com intitle:"IIS" That second one has surfaced dev/staging boxes for me more than once. active tech fingerprinting The easiest way to know you're staring at IIS is the response headers. Hit it with a raw request: openssl s_client -connect target.com:443 What you're looking for something like this in the response headers: Server: Microsoft-IIS/10.0 But probably you want to do this at scale. Then just keep calm and use httpx (or nuclei): httpx -l targets.txt -td | grep IIS | tee iis-targets.txt ok, I found an IIS server. now what? First off, let's confirm what we're dealing with and grab as much information as the server is willing to give away for free. internal IP disclosure Here's a freebie most people miss. Send an HTTP/1.0 request to certain IIS setups (especially Exchange or OWA fronts) and the server will sometimes hand you an internal IP in the Location header: curl -v --http1.0 http://example.com You might get back something like: HTTP/1.1 302 Moved Temporarily That internal IP and that X-FEServer header just told you the internal hostname of the Exchange server. File that away. It's information disclosure that we could leverage in the following steps. Enough recon by now, let's get to the juicy parts. nuclei templates: automate the boring stuff Once you've got your list of IIS targets, blast them with nuclei using relevant tags: nuclei -l iis-targets.txt \ I like to fire this in the background while I'm doing manual recon. the HTTPAPI 2.0 dead end that isn't You'll hit a lot of IIS boxes that respond with a generic HTTPAPI 2.0 404 error. Most people see this and think "nothing here." Wrong. What this actually means is the server didn't receive the right domain name in the Host header. The IIS instance is there, it's running something, but it's bound to a specific virtual host. You need to figure out which one. check the SSL certificate. The subject or SAN field often contains the hostname you need. Just hit it in a browser and inspect the cert. Links
Browse another page: |