Australia has been "under attack" from a group of Muslim men wanting "to kill as many unbelievers as they can" for about 15 years, a Supreme Court judge has said.

Justice Desmond Fagan made the comments while sentencing Tamim Khaja, 20, who pleaded guilty in October to planning and preparing a terrorist attack two years ago.

The then 18-year-old was arrested while preparing for a lone wolf massacre, either at the US embassy in Sydney, an Army barracks in western Sydney, or at a court complex at Parramatta.

Tamim Khaja pleaded guilty to planning a terror attack in Sydney. ( Facebook )

Counsel for the defendant, Ian Temby QC, tendered to the court a list of recent sentences handed down to other men who had been convicted of terror offences.

In response, Justice Fagan told the court that Australia had "been under attack for 15 years by about 40 Muslim men, to kill as many unbelievers as they can and impose Sharia law."

"The ideology that underlies each is Islam."

Sitting at Sydney West Trial Courts at Parramatta, Justice Fagan referred to verses in the Koran which he said described the duty of "a Muslim to wage Jihad".

He said he was not making generalisations about Islamic beliefs and that his courtroom was "not a forum for the rights and wrongs of the Islam or Christian religions".

An agreed statement of facts tendered to court revealed that Khaja had twice attempted to travel to Syria or Iraq, where he "intended to join the Islamic State terrorist organisation and engage in hostile activities".

After his passport was cancelled in March 2016, Khaja began communicating via an encrypted messaging app with an overseas police officer, who he believed to be an ISIS supporter.

On May 7, 2016, Khaja told the police officer, known as Person A, that he "wanted so badly to be on the battlefield with my brothers", but since his passport had been cancelled, he would "fulfil my obligation here".

"I am currently sourcing a glock [handgun] but I want to do big damage," Khaja told Person A.

"I am thinking more along the lines of Boston Marathon .. I know how to make a portable microwave b..b [sic]"

Even with a handgun I would be able to cause a lot of damage."

Khaja told person A that he had been considering locations for an attack, including the US Embassy in Sydney, but it was likely to be heavily guarded, court documents revealed.

He told Person A that another option was the Timor Army Barracks in Dundas, where he could "launch an attack by ramming the lot of them by car and then firing head shots when they are on the ground".

Tamim Khaja was arrested by police at Parramatta car park on May 17, 2016. ( Supplied: NSW Police )

Mr Temby argued that at the time of the arrest Khaja was only at "a preliminary stage" of planning the offence and that he "had no accomplice".

However the crown prosecutor said Khaja had accessed documents about bombs and creating suicide vests.

Justice Fagan said Khaja had spoken about "killing innocent people as many innocent people as he could, like [he was] planning a picnic".

The sentence hearing continues.