It's easy to say, but ethics isn´t always so black and white. What about yourself. Do you drive a car? Then you are guilty of contributing to the air pollution that kills 200,000 in the US ever year, and you also endanger others' life by participating in traffic and making it more dangerous. You are also contributing to sponsoring the salaries of the car industry overall, which means you are indirectly sponsoring the development of more lethal machines, which also by the way enables murderers to transport themselves more rapidly to their victims.
Did you post a helpful comment on HN or stackoverflow, and this comment helped a programmer in North Korea to develop their nuclear weapons just a little bit further, is that ethical?
You have to consider ethics, but an "unethical task" depends so much on context.