Fur-rubbing, or anointing, has been recorded repeatedly in capuchins on Barro Colorado Island in Panama and elsewhere. The monkeys select specific items, including certain millipedes, citrus fruit and some pungent leaves, work the material into their pelage, and frequently do so communally, several individuals passing the same millipede between them while wrapped together.
Chemical analysis of the millipedes used has identified benzoquinones, compounds with documented insect-repellent activity. The behaviour peaks in the wet season, when biting flies and mosquitoes are most abundant, which fits a parasite-defence explanation. Botfly larvae, which develop under primate skin from eggs carried by flies, are a plausible target.
The repellent account is well supported but not the only one on offer. Anointing is intensely social, involving huddling and contact between individuals that otherwise squabble, so a role in social bonding, or a simple pleasurable effect of the compounds, has not been excluded.

