The Australian Security Intelligence Organisation (ASIO) will soon be able to monitor every device on the internet, and copy, delete, or modify the data held on those computers with just a single warrant, under massive new powers contained in the anti-terror legislation that passed the Senate overnight.

The amended National Security Legislation Amendment Bill (No. 1) 2014 will now need to return to the House of Representatives in order to pass, but with a government majority in the House, its passage is assured.

The legislation now expands ASIO's powers to gain access to an unlimited number of computers or networks with a single computer access warrant, disrupt target computers, and use third-party computers not targeted in order to access a target computer.

Legal experts and privacy advocates have warned that the vagueness of the legislation would allow ASIO to effectively monitor the entire internet.

In a marathon Senate debate last night, Greens communications spokesperson Scott Ludlam had attempted to move a number of amendments restricting ASIO's new powers, however, the government was able to rely on votes from the opposition Labor senators to defeat the amendments.

Ludlam warned that the legislation would give ASIO the power to tap every device.

"These warrants will allow ASIO, or those working for ASIO, to modify these computers, to delete files, to install malware, to seek higher levels of user access and to impersonate people — not only on a particular specified device but, as I think we have well and truly established, on any device that it is connected to or is considered to be in a relationship with," Ludlam said.

"The physical equivalent is if ASIO served a warrant to enter a particular house for a legitimate reason that also allowed them to enter any other house in the street or any other house in the country, actually, completely arbitrarily."

Liberal Democrat Senator David Leyonhjelm was also opposed to the legislation.

"It is not just the Greens who are of the opinion that this could give access to the entire internet on a single warrant. I do too and so does the Institute of Public Affairs. They have raised this issue with me. There does need to be some sort of constraint on the scope of warrants issued under this section. It just cannot be allowed to stand. It is a licence to snoop on anybody at any time, anywhere," he said.

Greens senators, Independent MP Nick Xenophon, and Democratic Labor Party Senator John Madigan and David Leyonhjelm opposed the legislation, and put forward a number of amendments. But ultimately the legislation passed with the government's own amendments, with 44 Coalition, Labor, Family First, and Palmer United Party senators voting for the legislation, and 12 Greens, and independent senators voting against it.

Labor Senator Jacinta Collins rejected accusations from the Greens that the legislation was rushed through without any scrutiny from Labor.

"These are not extreme measures in response to an immediate crisis. The Senate will indeed be dealing with other legislation — in fact, there is legislation now before us with respect to foreign fighters — that is more immediate and pertinent to current circumstances. But to characterise these first tranche measures as extreme and in response to more immediate national security issues is simply inaccurate," she said.

In addition to the computer warrant powers, the new legislation also dramatically restricts freedom of the press, with journalists and others facing up to 10 years' imprisonment for disclosing so-called "special intelligence operations" — actions that can be designated at the whim of ASIO. The parliamentary committee that investigated the legislation opted against specifically exempting journalists from this new restriction.

They stated that in the age of social media, it would be difficult to define what a journalist actually was, and insisted that any journalist that suspected they may be revealing information about a special intelligence operation should first call ASIO's 24-hour media hotline to check.