From the Super Mario Wiki
A Boo Buddy Snake is an enemy appearing only in Super Mario World. It is comprised of six to seven Boos that bounce and rebound diagonally off walls and ceilings, making it a very dangerous obstacle for Mario and Luigi. Although usually harmful to touch from any side, it is possible to rebound off a Boo Buddy Snake safely by Spin Jumping on the frontmost Boo in the line.
Boo Buddy Snakes are only found in two Ghost Houses: Choco Ghost House and Valley Ghost House. This enemy can only be defeated with Starman or Hammer Mario.
Another similar Boo formation is the Circling Boo Buddies.
Names in Other Languages