Skills Assessment

Pour valider nos compĂ©tences acquises dans ce module, nous devons rĂ©pondre Ă  une sĂ©rie de questions pratiques ci-dessous. Cette Ă©valuation nous demandera de mettre en Ɠuvre diffĂ©rentes techniques abordĂ©es tout au long du cours.

🎯 Objectif

Appliquer concrÚtement les compétences en reconnaissance web, en analysant un domaine cible à l'aide d'outils et de méthodes vus dans les sections précédentes.

🧰 CompĂ©tences Ă  mobiliser

  • Utilisation de la commande whois pour extraire des informations sur un domaine

  • Analyse du fichier robots.txt pour identifier des chemins potentiellement sensibles

  • Bruteforce de sous-domaines Ă  l’aide d’outils comme gobuster ou dnsenum

  • Utilisation de techniques de crawling (avec Burp, Scrapy, ou ReconSpider) et interprĂ©tation des rĂ©sultats

🔍 Instructions

  1. Réaliser toutes les étapes de reconnaissance nécessaires pour répondre aux questions proposées.

  2. À mesure que nous identifions de nouveaux sous-domaines, il faut penser Ă  les ajouter manuellement Ă  notre fichier /etc/hosts afin de pouvoir y accĂ©der depuis notre navigateur ou nous outils en ligne de commande.


vHosts needed for these questions:

  • inlanefreight.htb

Our IP is :

  • 94.237.55.43:31022

What is the IANA ID of the registrar of the inlanefreight.com domain?

Dans un premier temps, nous modifions le fichier /etc/hosts en y ajoutant les lignes suivantes :

94.237.55.43    inlanefreight.htb

Une fois ceci effectué, nous pouvons utiliser la commande WHOIS :

$ whois inlanefreight.com                            
   Domain Name: INLANEFREIGHT.COM
   Registry Domain ID: 2420436757_DOMAIN_COM-VRSN
   Registrar WHOIS Server: whois.registrar.amazon
   Registrar URL: http://registrar.amazon.com
   Updated Date: 2024-07-02T22:07:11Z
   Creation Date: 2019-08-05T22:43:09Z
   Registry Expiry Date: 2025-08-05T22:43:09Z
   Registrar: Amazon Registrar, Inc.
   Registrar IANA ID: 468
   [...]

Nous pouvons alors observer l'ID IANA : 468.


What http server software is powering the inlanefreight.htb site on the target system? Respond with the name of the software, not the version, e.g., Apache.

Scan de inlanefreight.htb :

$ nmap -sC -sV inlanefreight.htb  

Starting Nmap 7.93 ( https://nmap.org ) at 2025-06-29 12:01 CEST

PORT      STATE SERVICE VERSION
22/tcp    open  ssh     OpenSSH 9.2p1 Debian 2+deb12u3 (protocol 2.0)
111/tcp   open  rpcbind 2-4 (RPC #100000)
44443/tcp open  http    Apache httpd 2.4.38

Nmap done: 1 IP address (1 host up) scanned in 16.12 seconds

Ce scan ne nous retourne pas la bonne réponse. Nous utilisons alors CURL afin d'obtenir la version du serveur Web :

$ curl -I inlanefreight.htb:31022
HTTP/1.1 200 OK
Server: nginx/1.26.1
Date: Sun, 29 Jun 2025 10:14:10 GMT
Content-Type: text/html
Content-Length: 120
Last-Modified: Thu, 01 Aug 2024 09:35:23 GMT
Connection: keep-alive
ETag: "66ab56db-78"
Accept-Ranges: bytes

Le service utilisé est donc nginx.


What is the API key in the hidden admin directory that you have discovered on the target system?

Nous effectuons dans un premier temps un scan des sous-domaines possibles sur notre cible Ă  l'aide de gobuster :

$ gobuster vhost -u http://inlanefreight.htb:31022 -w /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-110000.txt --append-domain -t 200
===============================================================
Starting gobuster in VHOST enumeration mode
===============================================================
Found: web1337.inlanefreight.htb:31022 Status: 200 [Size: 104]
Progress: 114441 / 114442 (100.00%)
===============================================================
Finished
===============================================================

Nous ajoutons le nouveau sous-domaine Ă  notre fichier /etc/hosts :

94.237.55.43    web1337.inlanefreight.htb

Une fois ceci fait, nous accedons au fichier robots.txt :

Nous pouvons observer qu'un répertoire /admin_h1dd3n est disponible, on y accÚde donc :


After crawling the inlanefreight.htb domain on the target system, what is the email address you have found? Respond with the full email, e.g., mail@inlanefreight.htb.

Nous essayons d'effectuer du crawling sur les deux domaines que nous avons relevés dans résultat probant. Crawling sur inlanefreight.htb :

$ python3 ReconSpider.py http://inlanefreight.htb:51274

$ cat results.json 
{
    "emails": [],
    "links": [],
    "external_files": [],
    "js_files": [],
    "form_fields": [],
    "images": [],
    "videos": [],
    "audio": [],
    "comments": []
}#     

Crawling sur web1337.inlanefreight.htb :

$ python3 ReconSpider.py http://web1337.inlanefreight.htb:51274

$ cat results.json                                             
{
    "emails": [],
    "links": [],
    "external_files": [],
    "js_files": [],
    "form_fields": [],
    "images": [],
    "videos": [],
    "audio": [],
    "comments": []
}#

Le crawling n'ayant pas fonctionné sur les deux sous-domaines en notre possessions, nous recherchons de nouveaux sous-domaines basés sur web1337.inlanefreight.htb :

$ gobuster vhost -u http://web1337.inlanefreight.htb:51274 -w /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-110000.txt --append-domain -t 200 
===============================================================
Starting gobuster in VHOST enumeration mode
===============================================================
Found: dev.web1337.inlanefreight.htb:51274 Status: 200 [Size: 123]
Progress: 114441 / 114442 (100.00%)
===============================================================
Finished
===============================================================

Nous avons alors pu trouver un nouveau sous-domaine qu'est dev.web1337.inlanefreight.htb.

Nous pouvons alors effectuer du crawling sur ce dernier.

Ajout du nouveau sous-domaines dans /etc/hosts :

echo '94.237.54.192 dev.web1337.inlanefreight.htb' >> /etc/hosts

Utilisation de ReconSpider sur notre nouveau sous-domaines :

python3 ReconSpider.py http://dev.web1337.inlanefreight.htb:51274

Vérification des résultats remontés par le crawling :

$ cat results.json
{
    "emails": [
        "1337testing@inlanefreight.htb"
    ],
    "links": [
        "http://dev.web1337.inlanefreight.htb:51274/index-189.html",
        [...]
        "http://dev.web1337.inlanefreight.htb:51274/index-525.html"
    ],
    "external_files": [],
    "js_files": [],
    "form_fields": [],
    "images": [],
    "videos": [],
    "audio": [],
    "comments": [
        "<!-- Remember to change the API key to ba988b835be4aa97d068941dc852ff33 -->"
    ]
}#         

Nous obtenons ainsi le mail suivant : 1337testing@inlanefreight.htb.


What is the API key the inlanefreight.htb developers will be changing too?

À l'aide de ReconSpider utilisĂ© prĂ©cĂ©demment, nous pouvons voir que la clĂ© d'API va ĂȘtre changĂ©e par celle-ci : ba988b835be4aa97d068941dc852ff33.


Mis Ă  jour