The injured have all been admitted to Khyber Teaching Hospital where an emergency has been imposed. According to Inter-Services Public Relations (ISPR), five burqa-clad terrorists stormed the building and resorted to intermittent firing.
The main Taliban militant group, Tehrik-e-Taliban Pakistan, claimed responsibility saying the place they attacked was housing a secret intelligence office. A journalist and a university security guard are said to be among the injured.
The area where the incident occurred is a hub for educational institutions including the University of Peshawar.
Ordinarily, there are around 400 students at the hostel but there were only some 150 on Friday on account of Eid Milad-un-Nabi, the birthday of Prophet Mohammad, said a student who witnessed the attack.
"Our mujahids have attacked the building, God willing our fighters will fight till the last drop of blood", he said.
The police contingent has reached the site and cordoned off the route leading to the university. He said that he is monitoring the operation and that they are trying hard to safe lives of maximum students.
Talking to media, Inspector General of Khyber Pakhtunkhwa (KP) Salahuddin Mehsud confirmed the attack and said that the terrorists will be dealt sternly.
"I immediately left the room when heard firing and saw two armed men firing on the ground floor", the 18-year-old said. Aerial surveillance of the operation was also carried out whereas armoured vehicles of security forces were also present in the Directorate. The rapid response force has also initiated the action.
The attackers shot and wounded a guard before entering the campus, Peshawar police chief Tahir Khan said.
Pakistan army on June 15, 2014 had formally launched a full scale operation "Zarb-e-Azb" against "local and foreign terrorists" in tribal areas "on the directions of the government".