# NSLookup // Dig // Whois

## nslookup

### Resources

{% embed url="<https://www.geeksforgeeks.org/nslookup-command-in-linux-with-examples/>" %}

{% embed url="<https://linux.die.net/man/1/nslookup>" %}

{% embed url="<https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/nslookup>" %}

### Usage

```bash
nslookup [-option] [name | -] [server] 
```

### Querying

```bash
# Usage
nslookup -query=OPTION SERVER

# Example
nslookup -query=hinfo google.com
nslookup -query=all google.com
```

### Types

<pre class="language-bash"><code class="lang-bash"># Usage
nslookup -type=OPTION SERVER
<strong>
</strong><strong># Name Server
</strong>nslookup -type=ns SERVER

# Options
    A: Specifies a computer's IP address.
    ANY: Specifies a computer's IP address.
    CNAME: Specifies a canonical name for an alias.
    GID Specifies a group identifier of a group name.
    HINFO: Specifies a computer's CPU and type of operating system.
    MB: Specifies a mailbox domain name.
    MG: Specifies a mail group member.
    MINFO: Specifies mailbox or mail list information.
    MR: Specifies the mail rename domain name.
    MX: Specifies the mail exchanger.
    NS: Specifies a DNS name server for the named zone.
    PTR: Specifies a computer name if the query is an IP address; otherwise, specifies the pointer to other information.
    SOA: Specifies the start-of-authority for a DNS zone.
    TXT: Specifies the text information.
    UID: Specifies the user identifier.
    UINFO: Specifies the user information.
    WKS: Describes a well-known service.

</code></pre>

### Zone Transfer

{% embed url="<https://www.youtube.com/watch?pp=ygUed2hhdCBpcyBhIHpvbmUgdHJhbnNmZXIgYXR0YWNr&v=kdYnSfzb3UA>" %}

```bash
nslookup
> server URL
> set type=any
> ls -d URL
# Find Misconfig
> host -t axfr URL NAMESERVER
```

## Dig

{% embed url="<https://www.geeksforgeeks.org/dig-command-in-linux-with-examples/>" %}

## Whois

### Website

{% embed url="<https://www.whois.com/whois/>" %}

### CLI

```bash
# Get Domain Information
whois google.com
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ceh.securescape.cc/information-gathering/nslookup-dig-whois.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
