Forum Thread: An Intriguing Challenge

Hello everyone, I'm presented with a small challenge here.

Is there a way to tweak a Windows machine so that when is entered into a browser, instead of redirecting to the ip of "", the browser redirects to another chosen address? Thanks in advance.


22 Responses

edit the hosts file of the machine if you have administrator privileges. If you do not, then escalate privileges and edit the file

it is completely possible. in fact, it is extremely easy. just modify your hosts file.

first, go to C:\WINDOWS\System32\Drivers\etc and open the "hosts" file with notepad.

if you want to redirect to for example, you type this in your hosts file and then save it:

THE IP ADDRESS FIRST! then the domain/website name!

a reboot may be required.


EDIT Someone posted my answer just before I hit submit.

Thanks a lot for your help guys and happy hacking :D

That actually ran through my mind, but I'm in a very specific situation and I'm kinda forced to use Metasploit through an SSH connection on my phone because I'm "supposed" to be at two places at the same time and I don't have my phone rooted so.. yeah, but thanks for the help anyway :D

You can do DNS spoofing on your phone...

But I don't have it rooted (correct me if root is not required) and I also need a fast solution so I figured I'll connect my phone with metasploit on my home pc through SSH, I've got another delivery method for the payload and I have most of it set and I think modifying the hosts file once I'm in is the optimal solution in this case. Normally I would go with a MitM attack but I'm in a situation where I don't really have that many options :D

Oh, I see what you're saying. Yeah, SSH should work.

Yes, you need to root your phone, but it's easy with this app.

I'll definitely get to that, thanks a lot.

I'm not sure if I understand your question, but if you're asking for the hosts file location, Phoenix 750 already specified it, it's located in C:\WINDOWS\System32\Drivers\etc. All credit goes to him :D

My fault I didn't even read the replies. Phoenix is on his game. ;-)

"i don't talk much. but when i do, i don't talk shit." -some random person i once met 3 years ago on a game forum.

EDIT: says he doesn't talk much.... is the creator with the most comments....


That most comments thing isn't an actual thing. It's assigned to the last person to comment who aren't mods/admins.


and here i was just feeling special.....


I'm sorry to burst your bubble.


It didn't make sense to me either.

Does changing hosts file also redirect url that dont exist??

Lets say is not registered.. ie... it is not a website... so writing 192.168.x.x in hosts file will it still redirect??

I haven't tested that out, but it should work, I don't see why not, you can try to do it using the same syntax as for the existing websites. Let us know if it works.

Lol that was just a question... ill probably forget about it by morning... but you gotra clear the doubts eh?? Maybe ill get some use of it later... anyway thnx!!

PS. Might work as a great prank on a friend loll.. be creative ;);)

Share Your Thoughts

  • Hot
  • Active