I'm not talking about a virus. People running the program would know what it did. I also don't think it's illegal to write virus or denial of service software. Maybe it's different in your jurisdiction - but I'd be surprised. I've written load test tools that could have been easily repurposed for denial of service. Would that be a crime where you live?
Even if it were illegal, which, I don't think it is, that might only be a reason against going it. Many protests involve illegal actions.