3
I'm very new to using Terminal and anything like that and stupidly followed an article that uses Terminal with the SUDO command. The sudo command basically loaded a file which updated my /private/etc/hosts file. I opened the file and made sure it was just doing this and nothing else.
Nothing went wrong, but later on I read that this was a bit silly and that it has opened up my machine to all kinds of security attacks. First of all, I'd like this statement verified "open to security attacks". Have I really? If yes, what steps can be taken to resecure things. This is what I used in Terminal:
The Terminal Commands
sudo -s
[enter password]
sh updateOSXHostFile
The file:
echo "Do you wish to update your host file ?"
select yn in "Yes" "No"; do
case $yn in
Yes ) echo "0.0.0.0 yahoo.com" >> /etc/hosts;
echo "0.0.0.0 www.yahoo.com" >> /etc/hosts;
break;;
No ) break;;
esac
done
Which successfully updated the hosts file to block access to specific sites.
What were the contents of the script you ran? – Brian Adkins – 2014-06-14T15:28:01.370
@BrianAdkins: It was literally about 6 lines of ip addresses and url's to block access to. – PaparazzoKid – 2014-06-14T15:31:07.003
@BrianAdkins: added code from file in question – PaparazzoKid – 2014-06-14T15:37:42.047