Both adults and nymphs have large stink glands on the underside of the thorax extending more than half-way to the edge of the metapleuron. They discharge large amounts of this foul-smelling liquid when disturbed. This liquid, dried and pulverized, was once used at industrial level to reinforce the smell of some acids. Now it's been replaced by artificial composites. - from Wikipedia
This fifth instar nymph of the green stink bug.