It was possible to legitimately obtain it by completing a mission in Pokémon Ranger and then connecting to a Gen 4 game, but I’m pretty sure that mission isn’t available anymore, so it’s impossible to obtain one legitimately now.