Keller Machine

The Keller Machine was a device created by the Master under the alias of Emil Keller. In the machine's core was a living organism, a psychic parasite. It was designed to extract from humanbrains the negative impulses that caused anti-social behavior, and was therefore a more humane alternative to executing criminals. It could also be used to kill by turning the victim's worst fears against them.

Returning to Stangmoor Prison, the Doctor was captured by the Master and subjected to the machine until one of his hearts gave out. By this time however, the machine was starting to grow out of the Master's control, at one point taunting him with a vision of the Doctor, and began teleporting itself around the prison to feed on the inmates' minds. The Doctor created a device to temporarily immobilise the machine, but it was not until later that he discovered that Barnham, due to not having any negative impulses, acted as a natural dampener on it. The machine was destroyed in the detonation of the Thunderbolt missile. (TV: The Mind of Evil)

The Seventh Doctor encountered a device which was heavily implied to be a parasite similar to the Keller Machine. (PROSE: Legacy)