Image
 
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 29 guests and 1 member online
EH-Net Donations

Enter Amount:
$

Google Ads
EH-Net News Feeds
Latest Additions
Book Recommendations





 
Advertisement

You are here: Home arrow Forum arrow Ethical Hacking Discussions and Related Certificationsarrow Network Pen Testingarrow DNS Allocation Problem
Ethical Hacker Community Forums
December 02, 2008, 12:26:13 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: ChicagoCon 2-Day Ethical Hacking Conference with MS Blue Hats Oct 31 - Nov 1. Tickets Only $100! www.chicagocon.com/content/view/103/51/
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: DNS Allocation Problem  (Read 1978 times)
0 Members and 1 Guest are viewing this topic.
snouto
Newbie
*
Offline Offline

Posts: 7


View Profile
« on: February 22, 2008, 02:32:00 AM »

Hello My friends  , i would like to post my problem here.

 yesterday i was playing with intelligence gathering , i was trying to get the DNS of my target with this unix command

bt~# dig mytarget.com

mytarget.com                          A                   its ip address

but each time i execute this command , it returns for me each time a new ip address even when i try to extract its mail exchanger it gives each time a new domain like the following

bt~# host -t mx mytarget.com


so , does this target operates using load balancers in place HuhHuh which changes the ip address or what is the problem which changes the ip address continuousely .

NOTE: one from the ip addresses returned , i searched for it in MSN LIVE search and it points to many domains (so i think it is shared hosting).


why the ip address changes continousely HuhHuh
Logged
dean
Full Member
***
Offline Offline

Posts: 130


View Profile
« Reply #1 on: February 22, 2008, 11:22:56 AM »

Hi Snouto,

It sounds like you're running into DNS round-robin aslo known as a fast-flux service network. This allows a single domain name to have thousands of IP addresses assigned to it. Generally the TTL of the RR is set to be very short and so a look up would return a new IP address nearly every time. This is legitimately used for load-balancing web-servers.

This technique has been adopted by bot herders to maintain their botnets and make it next to impossible to take them down. The storm/cme-11 botnet uses this and other techniques to stay up.

http://www.honeynet.org/papers/ff/fast-flux.html

I'm not sure if the domain you are researching is a malicious one or not but here is a little script I wrote a while back to run continuous lookups of an domain name and show the geographic location of the IP. You will need to install the required perl modules for it to work.

Code:
#!/usr/bin/perl -w

#################################################
# Script to track fastflux dns network.
# Shows a very approximate geographical distibution
# Usage: perl lookup.pl -exec
#################################################

use strict;
use warnings;
use IO::Socket;
use Geo::IP;

my ($target, @ipaddr, $nullip, $lastip, $reverse, $geoip, $country, $hostname);
# List all domain names to be tracked here.
my @domains = qw(example1.com example2.com example3.com);
my $file = "data.txt";
my $j = 1;

if (! $ARGV[0] or $ARGV[0] ne "-exec") {
print "Usage: perl $0 -exec\n";
print "You need to explicitly tell the script to run with \'-exec\'\n";
exit;
}
print "Check of all domains is now running...Use CTRL-C to Quit.\n";
# Really bad way to make sure the initial check for dublicate IPs doesn't return an error.
$nullip = "0.0.0.0";
push(@ipaddr, $nullip); # Store in array.
while () {
foreach $hostname (@domains) {                   # Cycle through each domain.
    open (FH, ">>$file") || die "error opening or creating file:$!\n";

    $target = inet_ntoa(inet_aton($hostname) || 0.0.0.0);
    $lastip = pop(@ipaddr);                  # Store in array.
    # Perform reverse lookup. This is to see what the IP actually resolves to.
    $reverse = gethostbyaddr(inet_aton($target), AF_INET) || "Unknown";

        if ($target eq 0.0.0.0) {
           print "No IP!!!";
        }
        elsif ($target eq $lastip) {
            print "No change to A record.\nCurrent record is : $lastip\n\n";
            push(@ipaddr, $target);
            }
            elsif($target ne $lastip) {
                push(@ipaddr, $target);

                $geoip = Geo::IP->new(GEOIP_STANDARD);
                $country = $geoip->country_name_by_addr($target) || "Unknown"; # if country is undefined then print "Unkonwn!"

                open (FH, ">>$file") || die "error opening or creating file:$!\n";
    print FH "($hostname)$country | $target => $reverse\n";
    close (FH);
    }
        sleep (2); # wait 2 sec. Change lookup frequency here.
        }
    }
exit;

cheers,
dean
Logged

<script>alert('%52%54%46%4D')</script>
shawal
Jr. Member
**
Offline Offline

Posts: 86


View Profile
« Reply #2 on: March 10, 2008, 03:39:02 PM »

Snouto,
Dean's answer is very informative, what i can add is the following did you try http://www.robtex.com/dns/ ? i have found it very useful in information gathering (passive phase) when it comes to DNS and ips interogation/search

take care
Logged

RHCE, GIAC GCIH.
RoleReversal
Sr. Member
****
Offline Offline

Posts: 469


View Profile WWW
« Reply #3 on: March 11, 2008, 09:31:15 AM »

Dean,

nice script, thanks for sharing Grin
Logged

A little bit of sanity:
http://www.infosanity.co.uk
ChrisG
EH-Net Columnist
Hero Member
*****
Offline Offline

Posts: 1042


View Profile WWW
« Reply #4 on: March 11, 2008, 02:13:55 PM »

wins a prize and still contributes...thats good stuff
Logged

...tests i took go here...

http://carnal0wnage.blogspot.com/
SynJunkie
Newbie
*
Offline Offline

Posts: 24


View Profile WWW
« Reply #5 on: April 17, 2008, 03:35:45 PM »

Hi,

This post is a bit old so 'm not sure if it still relevant to you, but a nice tool to confirm your details of shared hosting is the "hostnames on IP" under Nameserver on www.serversniff.net

Regards

SynJunkie
Logged

----------------------------------
http://synjunkie.blogspot.com
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.089 seconds with 23 queries.
 
Sponsors

cwnp_moto__120x90.gif

Polls
During the most recent election, I:
 
Support EH-Net


Support EH-Net by
Buying all of your
Amazon items using
the search bar above.

cbtnuggets_logo_125.jpg
Try CBT Nuggets Free!
Recent Forum Topics
Vote For EH-Net

progenic.com
Click here to Vote!

Sadikhov.com
Top IT Cert Sites

binarica.com
Binarica Logo

Add to Technorati Favorites
technorati fave

 
         
Advertisement

© 2008 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.