The little chick isn't going to be able to hurt you even if it wanted to, so there's no need to withdraw your hand, and to further put your mind at ease, know that I have many, many chicks who "challenged" my hand when they were young, and they grew up to be perfectly sweet adults. Males and females alike will posture, and it's not an indicator of gender.
When a chick rushes at my hand, either aggressively or out of curiosity, I take the opportunity to rub its tummy. Before you know it, my chicks are lining up for tummy rubs.