The flag used by the Islamic State terrorist organisation has been auctioned off at a western Sydney mosque before an audience packed with families.

Footage of the auction was shared among teenagers online, some of whom appear to espouse radical views about the use of violence carried out by IS, the Daily Telegraph reports.

One 15-year-old boy who posted the footage of the sale on Instagram has since shared photos of himself posing in front of Mohammad's black standard of Jihad with his face covered by an Arabic keffiyeh scarf.

A teenage boy poses with the Mohammad's flag of Jihad (Instagram). (Instagram)

In one of the photos the boy included a threat to the Syrian president: "going to kill Bashar al Assad now".

The mosque claimed the proceeds from the sale were for the mosque's benefit, claiming the Shahada symbol that features on the flag had been "hijacked" by Islamic extremists.

NSW Premier Mike Baird warned that it was against the law to provide any financial support for listed terror organisations adding that parents needed to protect young people from "insidious and corrosive effects of the radical ideologies".

"I note Islamic State is listed by the Commonwealth government as a terrorist organisation and that it is against the law to provide it with any support," Mr Baird said.

"We expect everyone in NSW to obey the law or face the consequences."

NSW Police said the sale would be an offence only if the proceeds were forwarded to a terror group.

Muslim community leader Keysar Trad defended the auction, saying the Islamic State had "hijacked" the flag, which flies the Shahada — an ancient Islamic credo that states: "There is no God except God and Mohammed is the messenger of God."

Internet sleuths locate ISIS training grounds with Google View Gallery