hacktricks/network-services-pentesting/43-pentesting-whois.md

78 lines
4.3 KiB
Markdown
Raw Normal View History

# 43 - Pentesting WHOIS
{% hint style="success" %}
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2022-04-28 16:01:33 +00:00
<details>
2022-04-28 16:01:33 +00:00
<summary>Support HackTricks</summary>
2022-04-28 16:01:33 +00:00
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
2022-04-28 16:01:33 +00:00
</details>
{% endhint %}
2022-04-28 16:01:33 +00:00
## Informazioni di base
Il protocollo **WHOIS** serve come metodo standard per **richiedere informazioni sui registranti o detentori di varie risorse Internet** attraverso specifiche banche dati. Queste risorse comprendono nomi di dominio, blocchi di indirizzi IP e sistemi autonomi, tra gli altri. Oltre a questi, il protocollo trova applicazione nell'accesso a uno spettro più ampio di informazioni.
2024-02-10 13:03:23 +00:00
**Porta predefinita:** 43
```
PORT STATE SERVICE
43/tcp open whois?
```
## Enumerare
2024-02-10 13:03:23 +00:00
Ottieni tutte le informazioni che un servizio whois ha su un dominio:
```bash
whois -h <HOST> -p <PORT> "domain.tld"
echo "domain.ltd" | nc -vn <HOST> <PORT>
```
Nota che a volte, quando si richiede alcune informazioni a un servizio WHOIS, il database utilizzato appare nella risposta:
![](<../.gitbook/assets/image (301).png>)
Inoltre, il servizio WHOIS deve sempre utilizzare un **database** per memorizzare ed estrarre le informazioni. Quindi, una possibile **SQLInjection** potrebbe essere presente quando si **interroga** il database per alcune informazioni fornite dall'utente. Ad esempio, eseguendo: `whois -h 10.10.10.155 -p 43 "a') or 1=1#"` potresti essere in grado di **estrarre tutto** le **informazioni** salvate nel database.
## Shodan
2020-09-24 19:59:49 +00:00
* `port:43 whois`
## HackTricks Comandi Automatici
```
2021-08-12 12:49:03 +00:00
Protocol_Name: WHOIS #Protocol Abbreviation if there is one.
Port_Number: 43 #Comma separated if there is more than one.
Protocol_Description: WHOIS #Protocol Abbreviation Spelled out
2021-08-15 17:57:28 +00:00
Entry_1:
2024-02-10 13:03:23 +00:00
Name: Notes
Description: Notes for WHOIS
Note: |
The WHOIS protocol serves as a standard method for inquiring about the registrants or holders of various Internet resources through specific databases. These resources encompass domain names, blocks of IP addresses, and autonomous systems, among others. Beyond these, the protocol finds application in accessing a broader spectrum of information.
2024-02-08 03:08:28 +00:00
2021-08-15 17:57:28 +00:00
2024-02-10 13:03:23 +00:00
https://book.hacktricks.xyz/pentesting/pentesting-smtp
2021-08-15 17:57:28 +00:00
Entry_2:
2024-02-10 13:03:23 +00:00
Name: Banner Grab
Description: Grab WHOIS Banner
Command: whois -h {IP} -p 43 {Domain_Name} && echo {Domain_Name} | nc -vn {IP} 43
2021-08-12 12:49:03 +00:00
```
{% hint style="success" %}
Impara e pratica il hacking AWS:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Impara e pratica il hacking GCP: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2022-04-28 16:01:33 +00:00
<details>
2022-04-28 16:01:33 +00:00
<summary>Supporta HackTricks</summary>
2022-04-28 16:01:33 +00:00
* Controlla i [**piani di abbonamento**](https://github.com/sponsors/carlospolop)!
* **Unisciti al** 💬 [**gruppo Discord**](https://discord.gg/hRep4RUj7f) o al [**gruppo telegram**](https://t.me/peass) o **seguici** su **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Condividi trucchi di hacking inviando PR ai** [**HackTricks**](https://github.com/carlospolop/hacktricks) e [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos su github.
2022-04-28 16:01:33 +00:00
</details>
{% endhint %}