FOXALIVE is designed to be inserted into and destroy GW, one of the Patriots' AIs used to maintain their control. Snake successfully introduces the virus to GW within Outer Haven during MGS4's fifth act, Old Sun.
The basic structure of the program was created by Naomi. However, she gave the virus to Sunny to complete during her time on the Nomad. Sunny used Emma Emmerich's original code discussed in MGS2 to complete the program. Emma's code was engineered for the same reason - to destroy GW.
However, the FOXALIVE was also designed to use GW as a launching point to attack all five of the Patriots' AIs, unobeknowst to Snake and Otacon. Naomi hoped to destroy the Patriots completely by doing so, but the destruction of the AIs would also absolutely cripple the United States. This was avoided by additions of Sunny's that protected specific essential economic systems from FOXALIVE's destructive path.