DNS in

Posted on 2011-05-11
Last Modified: 2012-05-11
Hi All,

I'm trying to write a script that will enable me to read all subdomains records from a
DNS server.
e.d. should report back:

Who can help me?

Right now i use:
            Dim cn As String = ""
            Dim ip As System.Net.IPHostEntry = System.Net.Dns.Resolve(cn)
            Dim addresses As System.Net.IPAddress() = ip.AddressList
            Dim ipaddress As String = addresses(0).ToString()
Question by:vraag
    LVL 83

    Expert Comment

    You can use DIG(Domain Information Groper)

    Author Comment

    Dig is a linux command right?
    I'll keep looking for a solution
    LVL 70

    Expert Comment

    by:Chris Dent
    You mean to target MS DNS servers from a management stand-point?

    You will not get a list of delegations using the DNS protocol short of Zone Transfer.


    Author Comment

    Basically i don't care which DNS server some one has.
    I need to manage domains but they are not all hosted in 1 place so all dfferent systems.
    Therefore i like to be able, as linux has the DIG command, do retrieve alle dns records from these domains with a programm that will handle all DNS servers
    LVL 70

    Accepted Solution

    Yeah, but Dig cannot retrieve all DNS records for a domain either, except using AXFR (Zone Transfer), which must be explicitly granted on the server. This is by design.

    So, I can execute a query in Dig, or NsLookup, or I can write my own resolver, and I can request specific things (such as the NS records for But I cannot ask for a list of delegations (child / sub-domains) for any given name space, there's no way to format a query to do that (except AXFR mentioned above).

    If you want it, and you cannot transfer the zone, you have to have administrative access to the DNS server, and you have to write a management interface that will talk to the DNS server (outside of the DNS protocol). If you end up talking about admin interfaces you must care about the system type, generic is out.

    If all you really care about is the resolver, there are a number of .NET examples kicking around including this one:

    I have my own open-source resolver, it too is written in C# .NET I'm afraid.


    Author Closing Comment

    It's not what i hoped, but realistic is the word.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now