hashcat Forum
A mask to match IPv4 maybe? - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Deprecated; Previous versions (https://hashcat.net/forum/forum-29.html)
+--- Forum: Old hashcat Support (https://hashcat.net/forum/forum-20.html)
+--- Thread: A mask to match IPv4 maybe? (/thread-4762.html)



A mask to match IPv4 maybe? - kekerao - 10-24-2015

What is the proper way of brute-forcing hashes using all ipv4 addresses as plain-text passwords?

With oclHashcat it can be easily done using a combination mode and two dictionaries, you can read about it here
https://www.phillips321.co.uk/2012/04/04/cracking-an-md5-of-an-ip-address/

But combination mode for cpu hashcat is different, it takes only one dictionary and attacks with combinations of words in that dictionary.

A dictionary of all ip addresses is going to eat a real lot of disk space, so it is not a good solution. 

Another approach is to use many masks to match various ip formats, like this
?d.?d.?d.?d -> x.x.x.x
...
1?d?d.?d?d.?d?d?d.?d -> 1xx.xx.xxx.x
...
...
?d.?d?d?d.?d?d?d.?d -> x.xxx.xxx.x
...
and so on. 

However, such masks may also match invalid IPs, and it will take many sessions to check all masks. 

So I wonder if there is a more elegant solution.


RE: A mask to match IPv4 maybe? - NullMode - 10-24-2015

Script the generation of valid IP addresses and pipe it into hashcat?


RE: A mask to match IPv4 maybe? - kekerao - 10-24-2015

(10-24-2015, 11:24 PM)NullMode Wrote: Script the generation of valid IP addresses and pipe it into hashcat?

How do you pipe into hashcat? It doesn't seem to support stdin input.
And isn't it a bottleneck for hashcat?


RE: A mask to match IPv4 maybe? - undeath - 10-25-2015

hcmask file for all ipv4 addresses: http://pastebin.com/4HQ6C8gG


RE: A mask to match IPv4 maybe? - atom - 10-25-2015

cool thing, thanks


RE: A mask to match IPv4 maybe? - undeath - 10-25-2015

ugh, just noticed I screwed up there. This one should only generate valid ipv4 addresses: http://pastebin.com/4HQ6C8gG


RE: A mask to match IPv4 maybe? - kekerao - 10-25-2015

(10-25-2015, 10:13 PM)undeath Wrote: ugh, just noticed I screwed up there. This one should only generate valid ipv4 addresses: http://pastebin.com/4HQ6C8gG

Great, thank you! I've checked, and it does produce exactly 4294967296 ips