Nobody in Ginny's family seems to cast Bat-Bogey hex in the books.
Is there a canon mention of who taught her the infamous hex?
Science Fiction & Fantasy Stack Exchange is a question and answer site for science fiction and fantasy enthusiasts. It only takes a minute to sign up.Sign up to join this community
Well, from what I know, it doesn't mention who taught her it. But like you said it was probably one of her brothers. However, the time it was revealed that she could use it was the 5th book. Percy wasn't around in that book, and he didn't even know where the Order of the Phoenix's headquarters were located due to the Fidelius Charm, so he couldn't have taught it to her.
Considering the nature of the spells, it seems to be slightly malicious and mischievous, it was most likely one of the twins who taught her. This is the best answer I could come up with.
There are lots of other places to learn hexes. They include:
That being said, her brothers could also have taught her. There's no canonical evidence of Ginny learning any spell, but she learned them, and it is assumed she learned them from teachers, although I can definitely see Fred and George using the Bat Bogey Hex in front of her, whether they meant for her to learn it or not.
The way the twins speak of it, it seems they don't know the Bat Bogey Hex or at least didn't teach it to her (you would expect a comment on the lines of "she's as/more dangerous as we are with it". But she has two other brothers who went to have pretty interesting careers, curse-breaker and dragon handler, so either Bill or Charlie are likely candidates to know that kind of hex and as big brothers, they may have felt the need to teach their little sister to defend herself.