You may be looking for the entity from The Eye of Torment.

Umbra was a telepathic lifeform that evolved on an asteroid.

A comet passed by an asteroid in the L4 point between Arden and its sun. The asteroid was tidal locked afterward, and the comet deposited carbon and other trace elements on its surface. An electric current was generated between the light and dark sides due to the thermocouple effect. Eventually a neural cell equivalent was created and Umbra achieved awareness.

It mentally reached out to Arden and influenced the Shenn to build kilns and burn trees, to make more carbon so it could grow. Then it created duplicates of humans using hypergems as links. They went to Tairngire, where Umbra planned to take over the government and expand even further.

When the duplicates were discovered, the starship CSS Broadsword was sent to investigate. They learned about Umbra and tried to stop it. Umbra retaliated, taking over most of the minds on the starship. However, the Seventh Doctor was able to resist and got Bernice Summerfield to release the Broadsword's solar sail. This blocked the light from the sun on Umbra's asteroid, depriving it of power and destroying it. (PROSE: Shadowmind)