A firewall wouldn't work, because you are already downloading the infected file... from what I understand, it attaches itself to whatever you are downloading (which your firewall wouldn't catch).
It may technically be illegal, but when has that ever stopped the government?