By chance a neighbour of mine was cutting down a large Acacia and was burning the ground below it and had stumbled upon these. He asked me whether they were an insect and I recognised them pretty quickly as being a Cordyceps species.
These fungi lie dormant in the ground where the grubs of certain moths develop and infect these grubs so that when they reach a certain development level the fungi kills the grub and turns it into food for its fruit body. In the photo the white part at the bottom is the mummified grub and the rest of it is the fruit body.
People say these are edible and that they may even contain similar active health-promoting constituents to the Chinese and Tibetan variety but it kind of creeped us out and had a weird texture in the hand so we weren't game.