A video of a first-year high school student in Niigata Prefecture being attacked by a group of schoolmates was posted online and went viral on social media, school officials said Tuesday.