So I tried to find the IVs from the stats and EVs you listed and it said the HP stat was invalid. Also, are you sure it's 252 in attack? With a Timid nature it seems weird that someone would go for the attack stat. Either way, without knowing the exact IVs I can't fully check it, but the other IVs looked to be relatively random with the spread being xx/4/5/31/27/31. If I can find the exact IVs I can check the PID against the ID and see if the combo is possible or not. There is no conclusive proof that it's hacked, and it looks pretty random. At the same time, it doesn't look random enough. Timid nature, and perfect IVs in speed and S.Atk? On top of being shiny? If I had to guess, I would say someone in gen 4 hacked it, then traded it away and whoever you got it from just liked the pokemon and trained it up for their own use.
There's not enough information to fully say one way or the other, but from my past experience that would be my best guess.