Attack Direction Detection?

I wanna make an enchantment that deals more damage if you hit a mob from behind. I'm not very sure how to do this though.
Continue to help post