Think of the DNS exploit as a way to access old event Pokemon. These event Pokemon were perfectly legal at the time, and they still are -- the method of obtaining them is simply more unorthodox. I've performed the DNS exploit dozens of times, and I've had no issues using them in-game, transferring them through Bank and HOME, or trading them to other people.
In short, DNS Pokemon are perfectly safe, as they're just old events that can be reaccessed. They won't damage your game and they pass the hack checks on Pokemon Bank.