A 13-year-old student admitted carrying out the attack at the public school Instituto Sao Jose in Rio Branco, officials said.