National security agencies are continuing to scour the Parliament's computer network for threats to MPs' data after what is being described as a "sophisticated" hack attack that could be the work of a foreign government.

Alastair MacGibbon, head of the Australian Cyber Security Centre, said the government's cyber experts would work over coming days and weeks to make sure all the breaches had been detected and the hackers' presence removed.

The hacking comes just three months ahead of the federal election, prompting fears that if MPs emails or data were stolen they could be used to cause political interference of the style Russia perpetrated against the United States in the 2016 presidential campaign.

Sources said the fact that Parliament had significantly upgraded its cyber defences since an attack by Chinese intelligence agencies in 2011 suggested the latest hackers were highly skilled, potentially pointing to a foreign government.