If you have a gen 5 game, people shouldn't be able to offer hacked Pokemon on the GTS. But, there are ways to tell.
1: If the Pokemon is a legendary and it's in a normal pokeball, it could be hacked.
2: Impossible levels, such as a Reshiram level 1 or a Serperior level 1
3: The location of the Pokemon in the description is wrong.
4: Wrong pokeball, such as an Arceus that's not in a cherish ball.
5: The Pokemon doesn't have a location met.
6: It's EV stats are over 510, then it's definitely hacked.
Hope this helps :P