Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

a friend challenged me to find out the ip from the new web server he uses. Is there a rainbow table or something similar with all possible adresses or are 4 billion numbers to much for a normal consumer pc ?

Is there another way to find out the right ip ? Is there any possibility to find it out if i know the webhoster where he is hosting ?

For anyone wondering the md5 hash is "f39d1e9bce27c0f31f536a272e544a16"

Greetings Tim

share|improve this question

closed as off-topic by Noordung, Xander, Rory Alsop Aug 4 at 8:14

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about Information security within the scope defined in the help center." – Noordung, Rory Alsop
If this question can be reworded to fit the rules in the help center, please edit the question.

    
If you have a url it's easy, if you just know the hoster, that will not help. But cracking the hash should be easy, you don't need a rainbow table. In case your computer is really slow, you might want to exclude reserved ip ranges as well as the assigned class A blocks. –  tim Aug 3 at 21:37

2 Answers 2

up vote 7 down vote accepted

It won't be as fast as a GPU, but a simple brute force script like the following python code:

import hashlib
import time

def ipv4_md5_search(hash, range_start=0, range_end=256):
    for a in range(range_start, range_end):
        print a, time.ctime() # show progress every time new value of a is done.
        for b in range(256):
            for c in range(256):
                for d in range(256):
                    h = hashlib.md5('%s.%s.%s.%s' % (a,b,c,d)).hexdigest()
                    if h == hash:
                        print a,b,c,d
                        return True
    print "No match found"
ipv4_md5_search('f39d1e9bce27c0f31f536a272e544a16')

will find the answer in about an hour (worst case) and will be significantly quicker if you parallelize it. E.g., on a hyperthreaded quad-core CPU, just launch 8 processes doing:

ipv4_md5_search('f39d1e9bce27c0f31f536a272e544a16',0,32)
ipv4_md5_search('f39d1e9bce27c0f31f536a272e544a16',32,64)
ipv4_md5_search('f39d1e9bce27c0f31f536a272e544a16',64,96)
ipv4_md5_search('f39d1e9bce27c0f31f536a272e544a16',96,128)
ipv4_md5_search('f39d1e9bce27c0f31f536a272e544a16',128,160)
ipv4_md5_search('f39d1e9bce27c0f31f536a272e544a16',160,192)
ipv4_md5_search('f39d1e9bce27c0f31f536a272e544a16',192,224)
ipv4_md5_search('f39d1e9bce27c0f31f536a272e544a16',224,256)

and it will speed it up by a factor of 8. I won't post the whole thing, but will say an IPv4 address in dotted decimal notation matches your MD5 hash and the correct match starts with 84.200 (in the format x.x.x.x - no newlines or spaces or anything else). Took me about ~15 minutes to find including time to script up and launch the tasks.

share|improve this answer

This should be easy to brute-force. This tool promises 500 million hashes per second on an average consumer-grade GPU, so it should hash all 2^32 IPv4 addresses in under 10 seconds.

It might be easier, though. When you can reach the webserver, you can also do a simple nslookup in the console (UNIX or Windows) to see the IP address of a hostname. But note that you might just get the IP of a reverse proxy with this method when your friends webserver is behind one.

share|improve this answer
    
A little more than ten seconds, I'd say. You may need to try more than the traditional dotted-quad form: the address could be in decimal form or binary form. –  Mark Aug 3 at 22:12
    
@Mark - In this case, it is in the common dotted decimal form of 192.168.0.1. –  dr jimbob Aug 3 at 22:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.