Haha, funny that I found this thread because I’m also trying to write my own website blocker in Unity. Did you ever find a solution?
edit:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "sudo";
p.StartInfo.Arguments = "chmod 757 /etc/hosts";
p.Start();
Seems like something that could be abused, but this seems to work for me (changes permission, then you can write – could set it back to 755 when you’re done) – I’m only making this app for myself anyway.