A counterattack, also known as a zap, is event that causes an Agent to lose XM when he or she hacks or attacks a hostile portal. The maximum counterattack distance and the amount of XM drained depends on the portal level. Counterattacks can be strengthened by Force Amps or made more likely by Turrets. Agents can prevent counterattacks by moving away from the portal so that the portal is outside his or her Action Radius before the action is completed.
Critical counterattacks may occasionally occur and are three times more powerful than regular counterattacks.
Counterattacks show up on the Scanner as multiple red beams coming from the top of the portal to the Agent's avatar. Red text in the format of -nr% (or !-nr% if the counterattack was critical) appearing above the Agent's avatar and a chat alert in the form of "You've been hit and lost ### XM!" indicate how much XM was drained from his or her XM reserves.