Following the incident, a heavy contingent of police and Pakistan Army troops reached the site and cordoned off the area, besides sealing all roads leading to the directorate.
Bomb Disposal Squad Additional Inspector General Malik Shafqat said that the terrorists were wearing suicide jackets with ball bearings in them. All bombs on the premises were defused. He condemned the attack.
A report in Dawn said three burqa-clad men entered the directorate and started firing.
Generally, there are around 400 students at the hostel, but because of the holiday there were only 150 present.
"These terrorists have no religion as they attacked on a day which is very sacred and the nation was celebrating it", he said. The terror group's spokesman, Mohammad Khorasani, said they had targeted a safe house of the military's Inter-Services Intelligence (ISI) agency, Reuters reported.
The compound includes a hostel facility for diploma students and there were around 100 people there at the time of attack, police said.
Rakitic ready to rumble with Messi in Croatia v Argentina
Lionel Messi and company laboured till the final day of the South American qualifiers to book their flight to Russian Federation 2018.
Reports said Tehreek-e-Taliban Pakistan claimed responsibility for the attack.
Police officers said that five people were rushed to hospital with injuries.
According to Hayatabad Medical Complex Director Shahzad Akbar, six dead and 18 injured were brought to the hospital. In 2014, a total of 147 people, including 132 schoolchildren, were massacred in one of the deadliest terrorist attacks in the country's history when terrorists stormed the Army Public School in Peshawar Cantonment and opened indiscriminate fire.
The Pakistani Taliban are fighting to topple the government and install a strict interpretation of Islamic law.
Peshawar has been the scene of some of the worst violence during the years of an insurgency by the Pakistani Taliban.