Yes. Attacking IT systems is illegal in a lot of countries -- independent of the target.
In Germany it's definitively illegal. The president of the Federal Office for Information Security https://en.m.wikipedia.org/wiki/Arne_Sch%C3%B6nbohm addressed that in their most current newsletter as a crime.
Also: there is a high risk of counter attacks or escalation.