Syria's interior ministry has said the Islamic State gunman was a member of the security forces who had been set to be fired for extremism.