Live data from Hacker News

Robots.txt as a Security Measure?

cdsrc.com

11–20 of 36 posts

Re: Robots.txt as a Security Measure?

#11
post #2

There's a running joke among web pentesters about robots.txt being the first place you look when hitting a new site.

Silly old me always starts with / in a browser. Then I click on links. Not all sites leak information like a sieve with the wire bit removed but many do. There is sometimes no need to do anything clever like look for robots.txt.

Re: Robots.txt as a Security Measure?

#13
It would even be a million times better to place the sensitive files inside /TOP_SECRET_FOLDER and disallow the entire path, avoiding to explicitly name the paths at least.

This is the only way to use robots.txt for semi-sensitive info, and obviously not for info so sensitive that it would be awful for it to get out. URLs can leak through proxy logs and shared browser history.

Re: Robots.txt as a Security Measure?

#15
post #2

There's a running joke among web pentesters about robots.txt being the first place you look when hitting a new site.

A few years ago I purposefully put a couple of "interesting" paths in the robots.txt as a honeypot to test/capture bot conformance and malicious actors. Not one hit ever.

They just found a path further up and compromised you via that instead of bothering with the rest of the robots.txt :D

Re: Robots.txt as a Security Measure?

#16
post #9

Honestly, I think it couldn't hurt, if done appropriately . If crawlers are indexing those pages, then they're publicly available anyway, and could be crawled by a determined attacker - so nothing in robots.txt ought to be truly sensitive. But if there's pages that ought to be secure, but might contain an exploitable vulnerability, putting their path in robots.txt at least limits their exposure to those determined en…

If you want that as an additional safeguard, set the noindex header on that path at your edge so you’re not calling attention to it:

https://developers.google.com/search/reference/robots_meta_t...

I’d also strongly recommend pairing this with outside monitoring which alerts if something accidentally becomes reachable since it’s really easy not to notice something working from more places than intended.

Re: Robots.txt as a Security Measure?

#17
I was hoping this would be about putting an orphan path in your robots.txt and then black-listing clients who tried to fetch it -- nobody should know about it except robots who are told not to go there, so anyone who visits the link is an adversary.

Re: Robots.txt as a Security Measure?

#18
post #2

There's a running joke among web pentesters about robots.txt being the first place you look when hitting a new site.

Meanwhile over in .gov I’ve had to explain to a pentester that it wasn’t a security problem that robots.txt was accessible without authentication, based on a very big vendor’s scanner having badly regurgitated the OWASP advice.

Re: Robots.txt as a Security Measure?

#19
post #9

Honestly, I think it couldn't hurt, if done appropriately . If crawlers are indexing those pages, then they're publicly available anyway, and could be crawled by a determined attacker - so nothing in robots.txt ought to be truly sensitive. But if there's pages that ought to be secure, but might contain an exploitable vulnerability, putting their path in robots.txt at least limits their exposure to those determined en…

But then archive.org will ignore it (but point the crawler at the directories you helpfully linked it to) and those caches will show up in Google

Re: Robots.txt as a Security Measure?

#20
post #18
post #2

There's a running joke among web pentesters about robots.txt being the first place you look when hitting a new site.

Meanwhile over in .gov I’ve had to explain to a pentester that it wasn’t a security problem that robots.txt was accessible without authentication, based on a very big vendor’s scanner having badly regurgitated the OWASP advice.

The "security" world has an unusually high level of total incompetence. It is scary.
Post reply on HN