This ugly little creature is the larva of the leaf-eating ladybird. Stressed plants in prolonged hot, dry conditions attract these pests. The larvae become almost black as they reach pupa stage. Both adults and larvae of leaf-eating ladybirds are particularly fond of the Solanum family (tomato, potato, eggplant) and the melon or squash family where they do a lot of damage to leaves.
The adult leaf-eating ladybird has 26 or 28 spots in rows across its wing covers. They are slow moving and drop to the ground when disturbed. In summer, if you see the adults on leaves in your garden, be sure to look under the leaves for their eggs. Remove small leaves containing eggs and, on large leaves, use a knife to scrape the eggs into a container. As I dislike spraying my garden, I just squash the adults and larva with a gloved hand.
Unfortunately, the damage done by these ladybirds and their offspring have resulted in many gardeners spraying other species of ladybirds that are voracious pest predators. Both adults and larvae consume a considerable quantity of pests such as aphids, scale and mites, and one type of ladybird feeds on fungus. Peter Chew and his family have an excellent website, Brisbane Insects and Spiders, where gardeners can easily identify which creatures are beneficial to their gardens and which are pests, and includes a Ladybird Field Guide.
The photo below shows both larva and pupa stages of the 28-spotted ladybird.