If the hand rail is moving it needs to be secured
first. Chances are that the source of the wobble
is starting at a loose top and/or bottom post
attachment to the hand rail. If this so, securing
the spindles (what you call rails) will not help
to stabilize things overall.