2022-04-28 16:01:33 +00:00
< details >
2023-08-03 19:12:22 +00:00
< summary > < a href = "https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology" > < strong > ☁️ HackTricks 云 ☁️< / strong > < / a > -< a href = "https://twitter.com/hacktricks_live" > < strong > 🐦 推特 🐦< / strong > < / a > - < a href = "https://www.twitch.tv/hacktricks_live/schedule" > < strong > 🎙️ Twitch 🎙️< / strong > < / a > - < a href = "https://www.youtube.com/@hacktricks_LIVE" > < strong > 🎥 YouTube 🎥< / strong > < / a > < / summary >
2022-04-28 16:01:33 +00:00
2023-08-03 19:12:22 +00:00
- 你在一家**网络安全公司**工作吗?想要在 HackTricks 中**宣传你的公司**吗?或者你想要**获取最新版本的 PEASS 或下载 HackTricks 的 PDF**吗?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
2022-04-28 16:01:33 +00:00
2023-08-03 19:12:22 +00:00
- 发现我们的独家 NFT 收藏品[**The PEASS Family**](https://opensea.io/collection/the-peass-family)
2022-04-28 16:01:33 +00:00
2023-08-03 19:12:22 +00:00
- 获取[**官方 PEASS & HackTricks 商品**](https://peass.creator-spring.com)
2022-04-28 16:01:33 +00:00
2023-08-03 19:12:22 +00:00
- **加入** [**💬** ](https://emojipedia.org/speech-balloon/ ) [**Discord 群组** ](https://discord.gg/hRep4RUj7f ) 或 [**Telegram 群组** ](https://t.me/peass ),或者**关注**我在**推特**上的[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
2022-04-28 16:01:33 +00:00
2023-08-03 19:12:22 +00:00
- **通过向 [hacktricks 仓库 ](https://github.com/carlospolop/hacktricks ) 和 [hacktricks-cloud 仓库 ](https://github.com/carlospolop/hacktricks-cloud ) 提交 PR 来分享你的黑客技巧**。
2022-04-28 16:01:33 +00:00
< / details >
2023-08-03 19:12:22 +00:00
# 基本信息
2020-07-15 15:43:14 +00:00
2023-08-03 19:12:22 +00:00
**WHOIS**(发音为 "who is") 是一种查询和响应协议, 广泛用于查询存储互联网资源的注册用户或受让人的数据库, 例如域名、IP 地址块或自治系统,但也用于更广泛的其他信息。(来自[这里](https://en.wikipedia.org/wiki/WHOIS))
2020-07-15 15:43:14 +00:00
2023-08-03 19:12:22 +00:00
**默认端口:**43
2021-10-18 11:21:18 +00:00
```
2020-07-15 15:43:14 +00:00
PORT STATE SERVICE
43/tcp open whois?
```
2023-08-03 19:12:22 +00:00
# 枚举
2020-07-15 15:43:14 +00:00
2023-08-03 19:12:22 +00:00
获取whois服务对于一个域名的所有信息:
2020-07-15 15:43:14 +00:00
```bash
whois -h < HOST > -p < PORT > "domain.tld"
echo "domain.ltd" | nc -vn < HOST > < PORT >
```
2023-08-03 19:12:22 +00:00
请注意, 有时在向WHOIS服务请求某些信息时, 响应中会出现正在使用的数据库:
2020-07-15 15:43:14 +00:00
2021-10-18 11:21:18 +00:00
![](< .. / . gitbook / assets / image ( 147 ) . png > )
2020-07-15 15:43:14 +00:00
2023-08-03 19:12:22 +00:00
此外, WHOIS服务始终需要使用**数据库**来存储和提取信息。因此,当从用户提供的某些信息查询数据库时,可能存在**SQL注入**的风险。例如,通过执行以下命令:`whois -h 10.10.10.155 -p 43 "a') or 1=1#"`,您可以提取数据库中保存的**所有信息**。
2020-07-15 15:43:14 +00:00
2022-05-01 12:49:36 +00:00
# Shodan
2020-09-24 19:59:49 +00:00
* `port:43 whois`
2023-08-03 19:12:22 +00:00
# HackTricks自动命令
2021-10-18 11:21:18 +00:00
```
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:
2023-08-03 19:12:22 +00:00
Name: Notes
Description: Notes for WHOIS
Note: |
WHOIS (pronounced as the phrase "who is") is a query and response protocol that is widely used for querying databases that store the registered users or assignees of an Internet resource, such as a domain name, an IP address block or an autonomous system, but is also used for a wider range of other information.
2021-08-15 17:57:28 +00:00
2023-08-03 19:12:22 +00:00
https://book.hacktricks.xyz/pentesting/pentesting-smtp
2021-08-15 17:57:28 +00:00
Entry_2:
2023-08-03 19:12:22 +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
```
2022-04-28 16:01:33 +00:00
< details >
2023-08-03 19:12:22 +00:00
< summary > < a href = "https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology" > < strong > ☁️ HackTricks云 ☁️< / strong > < / a > -< a href = "https://twitter.com/hacktricks_live" > < strong > 🐦 推特 🐦< / strong > < / a > - < a href = "https://www.twitch.tv/hacktricks_live/schedule" > < strong > 🎙️ Twitch 🎙️< / strong > < / a > - < a href = "https://www.youtube.com/@hacktricks_LIVE" > < strong > 🎥 Youtube 🎥< / strong > < / a > < / summary >
2022-04-28 16:01:33 +00:00
2023-08-03 19:12:22 +00:00
- 你在一家**网络安全公司**工作吗? 想要在HackTricks中看到你的**公司广告**吗?或者你想要**获取PEASS的最新版本或下载HackTricks的PDF**吗?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
2022-04-28 16:01:33 +00:00
2023-08-03 19:12:22 +00:00
- 发现我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品——[**The PEASS Family**](https://opensea.io/collection/the-peass-family)
2022-04-28 16:01:33 +00:00
2023-08-03 19:12:22 +00:00
- 获取[**官方PEASS和HackTricks周边产品**](https://peass.creator-spring.com)
2022-04-28 16:01:33 +00:00
2023-08-03 19:12:22 +00:00
- **加入** [**💬** ](https://emojipedia.org/speech-balloon/ ) [**Discord群组** ](https://discord.gg/hRep4RUj7f ) 或 [**Telegram群组** ](https://t.me/peass ),或者在**Twitter**上**关注**我 [**🐦** ](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md )[**@carlospolopm** ](https://twitter.com/hacktricks_live )**.**
2022-04-28 16:01:33 +00:00
2023-08-03 19:12:22 +00:00
- **通过向[hacktricks仓库](https://github.com/carlospolop/hacktricks)和[hacktricks-cloud仓库](https://github.com/carlospolop/hacktricks-cloud)提交PR来分享你的黑客技巧**。
2022-04-28 16:01:33 +00:00
< / details >