Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 44 guests and 4 members online
EH-Net News Feeds
Latest Additions
 
Advertisement

You are here: Home arrow Forum arrow Ethical Hacking Discussions and Related Certificationsarrow Network Pen Testingarrow DNS Allocation Problem
EH-Net
May 24, 2012, 11:06:27 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Advertise on EH-Net!! - Reasonable Rates, Highly Targeted Audience.
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: DNS Allocation Problem  (Read 4662 times)
0 Members and 2 Guests 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
Guest
« 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
shawal
Jr. Member
**
Offline Offline

Posts: 88


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.
Andrew Waite
Hero Member
*****
Offline Offline

Posts: 857



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

Dean,

nice script, thanks for sharing Grin
Logged

LSOChris
Guest
« Reply #4 on: March 11, 2008, 02:13:55 PM »

wins a prize and still contributes...thats good stuff
Logged
SynJunkie
Jr. Member
**
Offline Offline

Posts: 71


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.16 | SMF © 2011, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.193 seconds with 22 queries.
 

gk_static-ad_feb2012.jpg
Global Knowledge: Build Security Skills to Protect & Defend

els_130x200fixed2.gif
eLearnSecurity Student Course Now Live!
5% Off with Code
ELS-EH-5

SANS Deals 4 EH-Netters
$150 OFF Any SANS Course in Any Format!
Coupon Code: EHN_Connect Including SANS Security West 2012 & SANSFIRE 2012
Recent Forum Topics

cbtnuggets_logo_125.jpg
Try CBT Nuggets Free!

Vote For EH-Net

Add to Technorati Favorites
technorati fave

 
         
Advertisement

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