The brother of Hassan Khalif Shire Ali, who went on a stabbing spree in Melbourne CBD, has taken the stand at his own terrorism hearing, telling the court he has renounced the Islamic State (IS) group and hates them for what they did to his brother.

Key points: Before he was arrested, Ali Khalif Shire Ali told undercover police he wanted to kill as many people as possible

Before he was arrested, Ali Khalif Shire Ali told undercover police he wanted to kill as many people as possible He also dreamt about taking people hostage inside a bar at Federation Square and dying as a martyr

He also dreamt about taking people hostage inside a bar at Federation Square and dying as a martyr Ali told the court he lost all sympathy for IS when his brother was killed by police during the Bourke Street attack

Ali Khalif Shire Ali, 22, is facing a pre-sentence hearing in the Supreme Court of Victoria, where he has pleaded guilty to one charge of preparing for a terrorist incident.

The court heard that Ali had initially planned to use a truck to kill New Year's Eve revellers at Melbourne's Federation Square in 2017.

He then changed his mind and tried to source an assault rifle through undercover federal police officers.

He was arrested in November after security agencies raided his home in Werribee, in Melbourne's west.

The 22-year-old's arrest came about a year before his brother, Hassan, stabbed three people in Melbourne's Bourke Street, before being shot by police.

One of the victims, Melbourne restauranteur Sisto Malaspina, died in the attack.

Ali Khalif Shire Ali's brother Hassan was responsible for last year's Bourke Street attack. ( AAP: James Ross )

Today, Ali took the stand at his own hearing and told Victoria's highest court he detested the Islamic State terror group, also known as ISIS.

"I completely hate them," Ali told the court, which was packed with family members, friends and his imam.

"I hate them for the actions they've committed, the innocent lives they've taken," he said.

"I hate them for what they did to my brother.

"They made him.

"They confused him"

Wearing a black suit, a black shirt and a red tie, Ali told the court that in 2017, when he was planning the attack, that he hated non-Muslims.

"I was just an angry person," he said.

He began to sympathise with Islamic State but kept those views to himself, he said, because he knew his family would disagree.

He downloaded a manual written by Al Qaeda, with instructions on how to carry out an attack, start bushfires, make bombs and make poisons.

Ali Khalif Shire Ali told undercover police he was having dreams about killing people in Federation Square. ( ABC News, file photo )

The court heard that in the lead-up to his arrest, Ali met with undercover federal police officers and tried to source an assault rifle.

"I want to do something," Ali told the officers.

Asked by the officers how many people he wanted to kill, Ali responded: "Well as much as I can to be honest. As much as I can."

"I was planning to use a truck and then my license got cancelled," he said.

"The only option I had was a firearm.

"I'm 100 per cent ready bro."

He intended to attack Federation Square on New Year's Eve because it would be "more packed".

He planned to take people hostage inside a Federation Square bar and source an Islamic State flag.

"I've been having a lot of dreams about it," he said to undercover operatives.

"I see my own dead body."

The court heard he was hoping to be martyred.

When he was arrested, he told investigators that he was just testing police when he asked for an AK-47.

He said he could not remember the conversations he had with undercover agents.

Ali admitted today he had not been open and honest with police.

He told the court his view towards police and the security services had changed.

"I'm actually thankful there was an intervention before something happened," he said.

The court heard Ali's views towards Islam changed gradually and that he now viewed himself as ignorant about Islam.

He said the death of his brother played a significant role in his changing attitude.

"That was just icing on the cake," he said.

"After that day I completely lost all sympathy for ISIS."

When asked why it took him until May this year to plead guilty, Ali told the court he had not come to terms with the consequences of his actions.

But Patrick Doyle, for the prosecution, put to Ali that his sudden remorse was motivated by self-preservation.

"In the past you lied about the nature of your beliefs to avoid going to jail for a long time?" Mr Doyle put to Ali.

"Yes," he responded.

"Is that what you’ve been doing today?" Mr Doyle asked.

"No," Ali said.