The document proposes NICE (Network Intrusion Detection and Countermeasure Selection), a multi-phase distributed network intrusion detection and prevention framework for virtual network systems. Existing systems lack effective vulnerability detection and response, allowing attackers to compromise vulnerable virtual machines. NICE incorporates attack graph analysis and programmable virtual networking to improve attack detection, correlate attack behaviors, and select effective countermeasures without interrupting cloud services. It was found to consume less computational overhead than proxy-based network intrusion detection solutions.