Chances are that there is a black market. Or, the terrorists smuggled them in from wherever it is they came, at least the parts anyways.
There are dozens of shops in Sydney where you can legally buy a handgun. It’s not the time to go into American misunderstandings about Australian gun laws, but while they are bad, they are nowhere near a total ban.
An Australian gun owner.