Federal police have issued arrest warrants for two Sydney men accused of fighting with terrorist groups in Iraq and Syria.

Khaled Sharrouf and Mohamed Elomar recently posted images from Iraq on Twitter, showing them posing with the heads of executed fighters, holding guns and standing over bloodied bodies.

Police have issued an arrest warrant for Khaled Sharrouf.

In other online posts, they threatened to kill Australian soldiers and all non-Muslims.

Attorney-General George Brandis described the Australians who have joined ISIL as the biggest threat to Australian national security.