To dream that you attack someone represents pent-up frustration and anger. You feel that you have been wronged. Your dream serves as an easy and safe way to express your anger.
To dream that you are being attacked by someone indicates your character is being questioned. You feel the need to defend yourself. You are feeling stressed, vulnerable and helpless. You may also be facing difficult changes in your waking life. Dreaming of an attack provides a way for you to confront these situations that you may be avoiding in real life.
To dream that you are being attacked by an animal is a warning to be careful with those around you. Take notice of who you know in your waking like that shares and exhibits the same qualities of the animal that attacked you in your dream.
To dream that you kill an attacking animal suggests that you are going against your instincts or gut feeling.