hacktricks/network-services-pentesting/43-pentesting-whois.md
2023-08-03 19:12:22 +00:00

4.8 KiB
Raw Blame History

☁️ HackTricks 云 ☁️ -🐦 推特 🐦 - 🎙️ Twitch 🎙️ - 🎥 YouTube 🎥

基本信息

WHOIS(发音为 "who is"是一种查询和响应协议广泛用于查询存储互联网资源的注册用户或受让人的数据库例如域名、IP 地址块或自治系统,但也用于更广泛的其他信息。(来自这里

**默认端口:**43

PORT   STATE  SERVICE
43/tcp open   whois?

枚举

获取whois服务对于一个域名的所有信息

whois -h <HOST> -p <PORT> "domain.tld"
echo "domain.ltd" | nc -vn <HOST> <PORT>

请注意有时在向WHOIS服务请求某些信息时响应中会出现正在使用的数据库

此外WHOIS服务始终需要使用数据库来存储和提取信息。因此,当从用户提供的某些信息查询数据库时,可能存在SQL注入的风险。例如,通过执行以下命令:whois -h 10.10.10.155 -p 43 "a') or 1=1#",您可以提取数据库中保存的所有信息

Shodan

  • port:43 whois

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: |
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.

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
☁️ HackTricks云 ☁️ -🐦 推特 🐦 - 🎙️ Twitch 🎙️ - 🎥 Youtube 🎥