Season 4 Episode 20 - Entity
The SGC is infected by an alien probe that downloads itself into the base computers, accessing sensitive data on the SGC and its personnel. It is detected and apparently deleted from the mainframe. Unbeknownst to all however, the entity has managed to download itself into the MALP room where it continues to thrive, building itself a new body in order to contain the immense data it has obtained. SG-1 eventually discovers the entity. O'Neill wants to destroy it, but Sam and Daniel feel they should attempt to communicate with it first. Sam tries - only to be overcome by a blast of energy. She is rushed to safety while O'Neill shuts down the entity, presumably killing it for good this time. However, the rest of SG-1 soon learns that it is far from dead. In fact, it now exists in a new vessel - one capable of storing endless bytes of data. The entity has taken over Carter's body. With the base under siege and the alien entity poised to overwhelm them all, O'Neill and company are confronted with a dire prospect: in order to save the SGC, they may well have to sacrifice one of their own.