That wouldn't really be magic. Even if you somehow use magic to power the attacks, it still wouldn't really count. The closest thing to what you're thinking of that I can think of is takeover magic, but that's pretty different to what you have in mind.