Electric power systems are subject to failures, due to both deliberate and fortuitous events. This paper addresses the first case in which a disruptive agent aims at maximizing the damage to the network (expressed through the total cost of operation), while the system operator takes the necessary measures to mitigate the effects of this attack. The interaction between these two agents is modeled by means of a bi-level optimization problem. On one hand, the disruptive agent is positioned in the upper-level optimization problem and must decide which elements to render out of service (lines and generators), given a limited destructive budget. On the other hand, the system operator, located in a lower-level optimization problem, reacts to the attack by deploying mitigation measures in order to minimize cost overruns in system operation. Based on the aforementioned dynamic, this paper proposes a novel approach to maximize the resiliency of the power system under intentional attacks through the implementation of distributed energy resources (DERs), namely, distributed generation (DG) and demand response (DR). Three metrics are proposed to assess resilience by assigning DERs in islands generated by the destruction of lines and generators. The results obtained in a didactic 5-bus test system and the IEEE RTS-24 bus test system demonstrate the applicability and effectiveness of the proposed methodology.