You do not say whether she is bad at all times, i.e. tacking up outside or collecting from her paddock or just in the stable.
Stable manners are so important.
If she is, as you say, 'lashing out' it sounds as if she is moving towards you aggressively and invading your space, presumably with bared teeth and flattened ears. When she does this you MUST insist that she shows you respect and 'backs off'. Giving her something to bite o is only going along with the problem by allowing her to continue biting. She should move back and look surprised. If she ignores this and still tries to attack you then you must smack her again.