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

4.3 KiB
Raw Blame History

从零开始学习AWS黑客技术成为专家 htARTEHackTricks AWS Red Team Expert

支持HackTricks的其他方式

Try Hard Security Group

{% embed url="https://discord.gg/tryhardsecurity" %}


基本信息

WHOIS协议作为一种标准方法,通过特定数据库查询各种互联网资源的注册者或持有者。这些资源包括域名、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

Try Hard Security Group

{% embed url="https://discord.gg/tryhardsecurity" %}

HackTricks Automatic Commands

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
从零开始学习AWS黑客技术成为专家 htARTEHackTricks AWS红队专家

其他支持HackTricks的方式