Reverse/decode cloaked hostname

These are old archives. They are kept for historic purposes only.
Post Reply
nigazo
Posts: 3
Joined: Wed Feb 11, 2009 2:30 pm

Reverse/decode cloaked hostname

Post by nigazo »

Is there a way to reverse/decode/decrypt a cloaked/hidden hostname (with access to the cloak-keys from the unrealircd.conf)?

I would like to have an Perl/PHP/.. script turn (for example): hidden-B25FE6D5.isp.com into the real hostname. And F4BB43DB.2959657.4DCC310A.IP into an IP-address.
digi198816
Posts: 33
Joined: Sat Apr 12, 2008 7:02 pm
Location: Brampton, Ontario

Re: Reverse/decode cloaked hostname

Post by digi198816 »

Yes you can decrypt if you have the cloak keys available. Unreal uses md5 hashing to cloak the ip's, so theres a hint on how you can go about it...probably happened to have a config of another network? :P
nigazo
Posts: 3
Joined: Wed Feb 11, 2009 2:30 pm

Re: Reverse/decode cloaked hostname

Post by nigazo »

digi198816 wrote:Yes you can decrypt if you have the cloak keys available. Unreal uses md5 hashing to cloak the ip's, so theres a hint on how you can go about it...
I'snt md5 a one-way hash? :roll: How am I'm suppose to reverse that?

I was looking for an algorithm or something to implement.
digi198816 wrote:probably happened to have a config of another network? :P
And no, it's my own network. I want to make an web service that deals with host names and hidden hosts.
Stealth
Head of Support
Posts: 2085
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Re: Reverse/decode cloaked hostname

Post by Stealth »

There is no way to decode them, as they are not encoded or encrypted - they are hashed.

Hashing something means it only goes 1-way, not the other. An example would be taking the word "hash", obtaining the ASCII values of those letters (104, 97, 115, 104), then adding them all together (420), then for the hell of it making the number a hex value (1A4). There's no way to turn 1A4 back into the word "hash" while every time you perform this operation you'll end up with the same number.

Because it'd be pretty useless if everyone's IP was hashed to the exact same formula, we implemented "cloak-keys" which is used as a salt to the hash (the secret ingredient to make it tasty). Cloak keys are NOT a key to reverse encryption, because there is no encryption to be reversed.In the example above, say my cloak key is 635247, I would simply throw that onto the end of 420, making my result 1912626F. Because 635247 would be kept secret, no one could make a Rainbow Table to try and collect hashes and just look them up. (A Rainbow Table is just that: a list of hashes and their beginning value).

(note: these examples are extremely basic. Hashing data is much more complex, but the principles are the same.)

If you wish to learn more about hashing and why they cannot be reversed, check out this page.
nigazo
Posts: 3
Joined: Wed Feb 11, 2009 2:30 pm

Re: Reverse/decode cloaked hostname

Post by nigazo »

Stealth wrote:There is no way to decode them, as they are not encoded or encrypted - they are hashed.
Thanks for the answer!

I will have to find another solution then! (I've got a few.. so no need for any tips) 8)
Post Reply