Resilient distributed optimization under Adversarial Attacks