A dream where you are being attacked implies that you are fearful, feeling threatened, being defensive or your actions are being questioned, or feeling vulnerable or helpless in some aspect of your life.
If you are attacking someone then it suggests that you need to be more positive, you have built up frustration or anger, you have experienced wrongdoing, or have sexual urges.