China is prepared to hack major Australian communications networks and could likely turn them off if it wanted to, the chief spy says.