It's semi-legit. It appears that the person who gave it to you, had to cheat to get it. As long it doesn't have moves it can't learn(examples: Spacial rend, Roar of time, Sacred fire, etc...), or have overly modified stats. It should be legit. Hacking to get a pokemon isn't wrong.