Years of underfunding, recruitment and IT issues have left the country at 'critical risk' of cyber attack, senior officials warn