Dungeon Spirit

A Dungeon Spirit is a small Hardmode flying enemy that can go through walls and drops Ectoplasm. They will not spawn until you have defeated the hardmode Jungle boss, Plantera.

After defeating Plantera, whenever you kill an enemy with more than 100 health points in the hardmode Dungeon there is a 6.67% chance of a Dungeon Spirit spawning.

They are immune to the Confused debuff.

In Multiplayer they sometimes spawn without having killed Plantera, but less frequently.

Tips

 * An easy way to farm Dungeon Spirits is to make a mob farm using a Shark Statue or a Chest Statue, as Sharks and Mimics have 300 and 500 max health respectively, making them eligible to spawn a dungeon spirit when in the dungeon. During Halloween the Skeleton statue will spawn one third of the skeletons with more than 100 HP as well.
 * Another easy way to farm Dungeon Spirits is to find or place a water candle in a large room that has many tunnels leading into it, and use the Piranha Gun on enemies, because when an enemy is killed and a Dungeon Spirit spawns,the piranha will bounce onto it.

History
던전의 정령