mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-26 22:52:06 +00:00
91 lines
4.4 KiB
Markdown
91 lines
4.4 KiB
Markdown
# 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)
|
||
|
||
<details>
|
||
|
||
<summary>Support HackTricks</summary>
|
||
|
||
* 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.
|
||
|
||
</details>
|
||
{% endhint %}
|
||
|
||
**Try Hard Security Group**
|
||
|
||
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||
|
||
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||
|
||
***
|
||
|
||
## 基本信息
|
||
|
||
**WHOIS** 协议作为一种标准方法,用于 **查询各种互联网资源的注册人或持有者**,通过特定的数据库。这些资源包括域名、IP地址块和自治系统等。除此之外,该协议还可用于访问更广泛的信息。
|
||
|
||
**默认端口:** 43
|
||
```
|
||
PORT STATE SERVICE
|
||
43/tcp open whois?
|
||
```
|
||
## Enumerate
|
||
|
||
获取whois服务关于域名的所有信息:
|
||
```bash
|
||
whois -h <HOST> -p <PORT> "domain.tld"
|
||
echo "domain.ltd" | nc -vn <HOST> <PORT>
|
||
```
|
||
注意,有时在向WHOIS服务请求某些信息时,所使用的数据库会出现在响应中:
|
||
|
||
![](<../.gitbook/assets/image (301).png>)
|
||
|
||
此外,WHOIS服务始终需要使用一个**数据库**来存储和提取信息。因此,在**查询**用户提供的某些信息时,可能会存在**SQLInjection**。例如,执行:`whois -h 10.10.10.155 -p 43 "a') or 1=1#"`,您可能能够**提取所有**存储在数据库中的**信息**。
|
||
|
||
## Shodan
|
||
|
||
* `port:43 whois`
|
||
|
||
**Try Hard Security Group**
|
||
|
||
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||
|
||
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||
|
||
## HackTricks 自动命令
|
||
```
|
||
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
|
||
|
||
Entry_1:
|
||
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.
|
||
|
||
|
||
https://book.hacktricks.xyz/pentesting/pentesting-smtp
|
||
|
||
Entry_2:
|
||
Name: Banner Grab
|
||
Description: Grab WHOIS Banner
|
||
Command: whois -h {IP} -p 43 {Domain_Name} && echo {Domain_Name} | nc -vn {IP} 43
|
||
```
|
||
{% hint style="success" %}
|
||
学习与实践 AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks 培训 AWS 红队专家 (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
||
学习与实践 GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks 培训 GCP 红队专家 (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||
|
||
<details>
|
||
|
||
<summary>支持 HackTricks</summary>
|
||
|
||
* 查看 [**订阅计划**](https://github.com/sponsors/carlospolop)!
|
||
* **加入** 💬 [**Discord 群组**](https://discord.gg/hRep4RUj7f) 或 [**Telegram 群组**](https://t.me/peass) 或 **关注** 我们的 **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||
* **通过向** [**HackTricks**](https://github.com/carlospolop/hacktricks) 和 [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github 仓库提交 PR 来分享黑客技巧。
|
||
|
||
</details>
|
||
{% endhint %}
|