The wasp slips her stinger through the roach's exoskeleton and directly into its brain. She apparently use ssensors along the sides of the stinger to guide it through the brain, a bit like a surgeon snaking his way to an appendix with a laparoscope. She continues to probe the roach's brain until she reaches one particular spot that appears to control the escape reflex. She injects a second venom that influences these neurons in such a way that the escape reflex disappears.
From the outside, the effect is surreal. The wasp does not paralyze the cockroach. In fact, the roach is able to lift up its front legs again and walk. But now it cannot move of its own accord. The wasp takes hold of one of the roach's antennae and leads it--in the words of Israeli scientists who study Ampulex--like a dog on a leash.