Microgastrinae

While most species are solitary, many are gregarious, meaning multiple wasp eggs develop within the same caterpillar.

When the eggs hatch the wasp larvae feed on the hemolymph and organs of their host.

Once fully developed, the larvae exit the dying caterpillar and immediately spin silken cocoons where they pupate.

How it is exactly done is by injecting eggs with the proviral genome plus virions into the host's cavity.

The virions then infect and discharge their DNA into the host's cells, stopping it from killing the wasp's offspring and instead promoting its growth inside the host's body.