# 43 - Pentesting WHOIS {{#include ../banners/hacktricks-training.md}} ## Basiese Inligting Die **WHOIS** protokol dien as 'n standaardmetode om **navraag te doen oor die registrante of houers van verskeie Internetbronne** deur middel van spesifieke databasisse. Hierdie bronne sluit domeinnames, blokke van IP-adresse en outonome stelsels in, onder andere. Buiten hierdie, vind die protokol toepassing in die toegang tot 'n breƫr spektrum van inligting. **Standaardpoort:** 43 ``` PORT STATE SERVICE 43/tcp open whois? ``` ## Lys Kry al die inligting wat 'n whois-diens oor 'n domein het: ```bash whois -h -p "domain.tld" echo "domain.ltd" | nc -vn ``` Let wel dat soms wanneer 'n versoek vir inligting aan 'n WHOIS-diens gemaak word, die databasis wat gebruik word in die antwoord verskyn: ![](<../images/image (301).png>) Ook, die WHOIS-diens moet altyd 'n **databasis** gebruik om die inligting te stoor en te onttrek. So, 'n moontlike **SQLInjection** kan teenwoordig wees wanneer **gevraagde** inligting uit die databasis opgevraag word wat deur die gebruiker verskaf is. Byvoorbeeld, deur te doen: `whois -h 10.10.10.155 -p 43 "a') or 1=1#"` kan jy in staat wees om **alle** die **inligting** wat in die databasis gestoor is, te **onttrek**. ## Shodan - `port:43 whois` ## HackTricks Outomatiese Opdragte ``` 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.wiki/en/network-services-pentesting/pentesting-smtp/index.html Entry_2: Name: Banner Grab Description: Grab WHOIS Banner Command: whois -h {IP} -p 43 {Domain_Name} && echo {Domain_Name} | nc -vn {IP} 43 ``` {{#include ../banners/hacktricks-training.md}}