Mimicry is not unusual among insects. Of those that have evolved to look like something else — a leaf, a twig, a similar insect — some use the camouflage predatorily to lure in or hide themselves from potential prey. Many others use disguise as defense, allowing the insect either to blend in to the background or to look like something unappetizing to predators.
One of the latter was recently spotted on dogwood shrubs near the Hunnewell Visitor Center. What looked from a distance like large blobs of whitish bird poop on the leaves turned out to be the artfully arranged larvae of dogwood sawfly (Macremphytus tarsatus). The bird poop disguise presumably makes them look unappealing to birds and any other predator who might make a meal of them. Only younger larvae sport the powdery white covering; older larvae molt this layer to reveal a pattern of green, yellow, and black that will help camouflage them on the ground as they seek overwinter pupation sites in dead wood.
Dogwood sawfly is a native North American insect that feeds on dogwoods (Cornus spp.). Shrub dogwoods seem to be targeted more frequently than tree-form dogwoods like flowering dogwood (C. florida), with gray dogwood (C. racemosa) and redosier dogwood (C. sericea) being at the top of the menu. These dogwood sawfly larvae were found on C. sanguinea ‘Wisley Form’ (accessions 108-2012 B, C, and D), a selection of bloodtwig dogwood (native to Eurasia) notable for its bright red winter stems. The larvae can be quite voracious, leaving nothing but the mid rib of leaves. However, since the damage usually occurs late in the growing season the loss of foliage is unlikely to harm otherwise healthy plants. While sawfly larvae look a lot like caterpillars (the larvae of butterflies and moths, order Lepidoptera), they are actually in order Hymenoptera (which includes bees and wasps).
This means that the insecticidal bacteria Bt (Bacillus thuringiensis), which is used to kill caterpillars such as those of cabbage white butterflies, is not effective against sawflies. If you really need to get rid of dogwood sawfly larvae, perhaps on a young or previously damaged plant, you can knock or scrape them into a bucket of soapy water.