If you are being attacked in your dreams, this suggests you are feeling threatened in some way, perhaps by your own impulses, or perhaps by other people and their attitude or remarks to you.
If you are the attacker in the dream, who or what are you attacking? Attack is almost always a form of defense, so may also suggest defensiveness about some issue in, or aspect of, your life.
There is also a positive side to attack, as new ideas and positive changes can threaten our old way of life and habitual way of thinking about things.
If you are attacked by an animal in your dream, this suggests anxiety about aggression in yourself or other people.
If you are attacked by a shadowy or frightening figure, this may depict feelings of fear and pain associated with the past. How you deal with the attack is important.
If you run from it, the trauma is not being dealt with in waking life.
[1]