It depends on permission to hack or not. If you don't have permission to hack, then hacking an app is an illegal task. If you take the proper written authorization from the owner of that app, then hacking an app is legal.