Parasitoid wasp
The victims of parasitoids do have defences they can use. Many try to hide from the wasps. The egg shells and cuticles of the prey are thickened to prevent the wasp from penetrating them.  When the wasp arrives, prey may drop off the plant they are on, or twist and thrash to dislodge the female. Some regurgitate onto the wasp to tangle it up. The wriggling can sometimes help by causing the wasp to miss laying the egg on the host and instead place it nearby. Wriggling of pupae can cause the wasp to lose its grip on the smooth hard pupa or get trapped in the silk strands. Some caterpillars bite wasps that approach it. Some secrete poisonous compounds that kill or drive away the parasitoid. Ants that are in a symbiotic relationship with caterpillars, aphids or scale insects defend them from attack by wasps.