iTranslated by AI
Web Server Information Leakage: Files You Should Check (If You Are Lucky)
Background
This might be a bit sudden, but you know how sometimes you really want to know more about a site? (Like when you're doing TryHackMe, right?)
It’s the same in the human world. When you want to get to know someone special, you usually start with a light jab, right?
Like, "What do you do on your days off?"
You wouldn’t start throwing reckless uppercuts or hooks like:
- "Do you have a boyfriend?"
- "Can I have your address?"
- "What color is your underwear?"
...You wouldn’t lead with those, right? (Though opinions may vary.)
Anyway, after you use nmap to see which ports are wide open, let's say the result looks like this:
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
When you realize the target is likely a web server, your next action might be, "Time to explore the directories with ffuf ♪"
But before that, it's worth checking a few files quickly with tools like curl. You never know—it might just lead to a plot twist.
Think of it as looking for a critical hit, even with a light jab.
# Web operations and SEO related
curl http://<target_ip>/robots.txt
curl http://<target_ip>/sitemap.xml
curl http://<target_ip>/.well-known/security.txt
curl http://<target_ip>/security.txt
curl http://<target_ip>/humans.txt
# Accidental self-disclosure
curl http://<target_ip>/.env
curl http://<target_ip>/.git/HEAD
In conclusion, these are the seven. The first five are files intentionally placed for web operations and SEO, while the last two are bonuses—files that developers accidentally exposed. I found it fascinating how their purposes differ entirely, so I decided to organize them.
★★★ robots.txt — Traffic Control for Crawlers
What is this?
A file used to tell search engine crawlers like Googlebot which parts of the site they are allowed to visit and which they should avoid.
When I first learned about this, I thought it would be great if NHK solicitors checked for something like a "robots.txt" before ringing my doorbell. If only there were a law where you couldn't visit houses that have "Disallow" written on them. (Just kidding, of course. Those folks aren't crawlers. Yeah.)
User-agent: *
Allow: /public/
Disallow: /admin/
Disallow: /backup/

A Common Misconception
At first, I thought of it as a "stay away list," but it includes "Allow" as well, so it’s not just about disallowing. More accurately, I’d call it crawling traffic control.
Another thing I misunderstood was that it was a "file for hiding secrets." Its primary purpose is actually SEO (Search Engine Optimization) management—specifying pages you don't want in search results or preventing unnecessary crawling to reduce server load. For example, it’s meant for pages like an e-commerce shopping cart that provide no value when indexed in search results.
If you mess up its usage, you end up exposing hidden directories you never wanted anyone to see.
Does it exist by default?
It depends on the framework. If you are serving plain HTML via Apache, the administrator needs to place it manually.
If there is no robots.txt, crawlers assume they have free rein over the site. * ref
If a server status code indicates that the robots.txt file is unavailable to the crawler, then the crawler MAY access any resources on the server.
★★ sitemap.xml — A Map of All Pages
What is this?
A file that lists all pages on a site in XML format.
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2026-01-15</lastmod>
</url>
<url>
<loc>https://example.com/about</loc>
<lastmod>2026-01-10</lastmod>
</url>
</urlset>
Confusion with robots.txt
I initially thought, "Can't you do the same thing with 'Allow' in robots.txt?" but they are completely different.
Allow: /products/ in robots.txt just says "you're allowed to visit /products/," but it doesn't tell you what pages are inside. sitemap.xml provides the exact list of every URL and their last modification dates.
If robots.txt is saying "you can go to the second floor," sitemap.xml is saying "there is room 201, 202, and 203 on the second floor."
Basically Generated Dynamically
Platforms like Zenn generate these dynamically, so even if you find one, it often doesn't contain much "valuable" info. Information is only meaningful if the site has a manually created sitemap.xml and other specific conditions are met.
As the title suggests, the "(if you're lucky)" part refers to exactly this. In short, it's a "lucky punch" at best.
If you rely on that, you won't turn the head of a "Mayweather-class" target. You'll just get your guard shattered and be knocked out. (What does that even mean?)
★ security.txt — Guide to Vulnerability Reporting
What is this?
A file containing information on where to contact the site owner if you discover a vulnerability.
Contact: mailto:security@example.com
Expires: 2027-01-01T00:00:00.000Z
Encryption: https://example.com/pgp-key.txt
Acknowledgments: https://example.com/hall-of-fame
Policy: https://example.com/security-policy
Hiring: https://example.com/security-jobs
Why is it needed?
To solve the problem where security researchers find a vulnerability but can't find a proper way to report it.
However, sometimes it's misconfigured, accidentally leaving behind resources useful to attackers or providing information that can be used for social engineering.
By the way, what is "Encryption"?
It means "When reporting a vulnerability, encrypt it with this key before sending." It’s to ensure the report isn't intercepted.
Placement is different from the others
curl https://example.com/.well-known/security.txt # Recommended
curl https://example.com/security.txt # Fallback
★ humans.txt — Credits for Creators
What is this?
A file listing the people who built the website. Think of it like the ending credits of a movie.
I think it's quite useful for OSINT (Open Source Intelligence).
My fingers are getting tired of typing, so let's move to the summary.
Summary
| File | Original Purpose | Security Concern |
|---|---|---|
| robots.txt | Crawling traffic control | Contains paths you want to hide |
| sitemap.xml | SEO promotion | Reveals the entire site structure |
| security.txt | Vulnerability reporting info | Reveals security posture/policies |
| humans.txt | Creator credits | Individual OSINT for developers |
| .env | App environment variables | DB/API credentials fully exposed |
| .git/HEAD | Git internal management | Entire source code can be restored |
The first four are "intentionally exposed files," while the last two are "files that should never be exposed but are visible due to mistakes." They have very different natures, but they all take only seconds to check with curl.
Before you start brute-forcing with ffuf, take a few seconds to check these with curl. The cost is almost zero, and you might find information that isn't in any wordlist. In particular, finding .env or .git/HEAD can have a huge impact, so it never hurts to check.
Discussion