The thing with illegal sites is that they will publish anime shows that they do not have permission to do so. If they do so, they infringe copyright law. You can protect yourself from such websites, though you might not be the one in trouble. But you will be breaking the law if you watch anime from these sites.