- Kali Linux Web Penetration Testing Cookbook
- Gilberto Nájera Gutiérrez
- 307字
- 2021-07-16 12:53:48
Taking advantage of robots.txt
One step further into reconnaissance, we need to figure out if there is any page or directory in the site that is not linked to what is shown to the common user. For example, a login page to the intranet or to the content management systems (CMS) administration. Finding a site similar to this will expand our testing surface considerably and can give us some important clues about the application and its infrastructure.
In this recipe, we will use the robots.txt
file to discover some files and directories that may not be linked to anywhere in the main application.
How to do it...
- Browse to
http://192.168.56.102/vicnum/
. - Now we add
robots.txt
to the URL and we will see the following screnshot:This file tells search engines that the indexing of the directories
jotto
andcgi-bin
is not allowed for every browser (user agent). However, this doesn't mean that we cannot browse them. - Let's browse to
http:
//192.168.56.102/vicnum/cgi-bin/
:We can click and navigate directly to any of the Perl scripts in this directory.
- Let's browse to
htt
p://192.168.56.102/vicnum/jotto/
: - Click on the file named
jotto
:. You will see something similar to the following screenshot:Jotto is a game about guessing five-character words; could this be the list of possible answers? Check it by playing the game; if it is, we have already hacked the game!
How it works...
robots.txt
is a file used by web servers to tell search engines about the directories or files that they should index and what they are not allowed to look into. Taking the perspective of an attacker, this tells us if there is a directory in the server that is accessible but hidden to the public using what is called "security through obscurity" (that is, assuming that users won't discover the existence of something, if they are not told about it).
- 程序員數(shù)學(xué):用Python學(xué)透線性代數(shù)和微積分
- 基于差分進(jìn)化的優(yōu)化方法及應(yīng)用
- AppInventor實(shí)踐教程:Android智能應(yīng)用開發(fā)前傳
- Python項(xiàng)目實(shí)戰(zhàn)從入門到精通
- 新印象:解構(gòu)UI界面設(shè)計(jì)
- Learning Nessus for Penetration Testing
- 寫給大家看的Midjourney設(shè)計(jì)書
- Docker:容器與容器云(第2版)
- SQL Server 2012 數(shù)據(jù)庫應(yīng)用教程(第3版)
- Java高手是怎樣煉成的:原理、方法與實(shí)踐
- C語言王者歸來
- HTML5程序設(shè)計(jì)基礎(chǔ)教程
- Spring Boot 2+Thymeleaf企業(yè)應(yīng)用實(shí)戰(zhàn)
- ASP.NET jQuery Cookbook(Second Edition)
- Mastering Machine Learning with scikit-learn