Hosts File - Need access

Soldato
Joined
18 Jan 2003
Posts
5,995
Location
Expat in the USA
Hi a virus has managed to add a load of entries into the hosts file for a machine i'm working on..

All I'm getting is an access denied when i try and edit it. It's hidden this file in a strange way.

Even using this command is giving me an access denied. (XP Machine)

cacls "c:\windows\system32\drivers\etc\hosts" /G everyone:f
attrib -s -h -r c:\windows\system32\drivers\etc\hosts"

Even tried taking the drive out to install into a different machine, but its one of those micro SSD ones with a different interface... ugh...

Tried going into safe mode, I'm lost on what to do, this is a 12hr job ahead of me and a drive into work to join to a domain if I can't get access to this &^%&%^ hosts file..

Any idea's please?
 
Yes I think that's my only options at the moment booting into a boot disk of some kind and gaining access that way .


OR !!!!! I say with some excitement in my voice... File Assasin in Malware Bytes... I think i may have my solution here !! ha...
 
This is going to sound really insulting but are you running the program you are trying to edit it in with admin rights? as in right click and run as admin
 
This is going to sound really insulting but are you running the program you are trying to edit it in with admin rights? as in right click and run as admin

Yeah it's possible you would need to do this, but you shouldn't have to if you have security rights on the hosts file itself as well.
 
Can't you take ownership of the "etc" folder and apply to contents rather than firing permissions etc directly at the file? Sometimes works better that, just be careful to set permissions up properly afterwards if you do alter them. If you are a local admin account you can always take ownership then change permissions to suit yourself.
 
Back
Top Bottom