In practice, an AI that has the ability to replicate would typically be a computer virus. In most cases, the act of replication itself would violate TOS, and thus. That alone is not have a legal basis forcrime, but using thethird party resources without permission is.
Assuming you targeted only services that permit such software, and allow automated account creation. Then the person that has knowingly executed the program, or the one that has caused another to unknowingly execute it, will be liable for whatever the consequences are.
Whether it is a self-replicating program or a single action has no influence - programs are currently considered tools of their creator/operator, not legal entities.
If no laws were broken at any time, the entitiesparties whose resources were used might be able to bring a tort against ityou. Then it will be down to the court to hear and evaluate whatever arguments can be brought.
The AI is not a legal entity and is not responsible for anything on its own. The person or the company that launched it, is.