In a South Korean Intelligence office in central Seoul, a recent North Korean defector sits nervously.

Key points: Office 39 raises foreign currency for Kim Jong-un

Office 39 raises foreign currency for Kim Jong-un It runs both legal and illegal operations

It runs both legal and illegal operations The US and the UN accuse it of using counterfeit $US100 bills, narcotics, and arms sales to raise money

He fears assassination by North Korean agents for the secrets he keeps.

For five years he worked for the shadowy Office 39 making desperately needed cash for North Korean leader Kim Jong-un.

Now he is revealing what he knows, with permission from South Korean National Security, in a rare interview with the ABC.

"Office 39 is an organisation to get foreign currency for the leader," he explained.

"In North Korea we called it the 'revolutionary fund'.

"We exported whatever we could — gold, jewellery, farming goods — everything we sold to get money for him."

Intelligence agencies around the world are just starting to learn about Office 39 and its inner workings.

It runs a network of companies around the world involved in both illegal and legal trade and is estimated to bring between $US500 million ($639 million) to $US2 billion ($2.5 billion) a year into North Korea.

Amid a global sanctions regime designed to cripple Kim Jong-un's Government, it is absolutely critical to keeping him in power.

A kind of royal slush fund

Office 39 was set up in the 1970s by the founding father of North Korea, Kim Il-sung, as a kind of royal slush fund.

It takes its name from the office it occupied inside the Workers Party building in the capital Pyongyang, not far from the official residence of the leader.

Sorry, this video has expired North Korea's ruling family has a slush fund to pay for their lavish lifestyles

The defector the ABC interviewed claims only to have worked on the legitimate side of Office 39 as an agent in the Daesong Group, an umbrella corporation that controls much of North Korea's trade.

He was assigned to the Kumgang trading company selling ginseng, gemstones and gold, and operated in different locations across Asia.

He won't reveal full details of how the operations worked but part of his job was to help manage and sell gold from North Korea's rivers and mines.

It was smuggled into China so it could be sold on international markets as Chinese gold.

His said evading United Nations sanctions was easy and China played a central part.

"You just change company names and have branches in other countries," he said.

"It's easy to operate in China. The border is a thousand kilometres and is wide open, so it's easy to smuggle anything across."

Drugs, weapons and fake cash

Office 39 is accused by the United States and United Nations of running a large network of illicit money-making operations such as currency counterfeiting, narcotics and arms sales.

North Korea's counterfeit $US100 bills, known as "supernotes", were considered one of the world's most accurate forgeries.

They were a large source of income for Office 39 until US authorities began cracking down on the sale of the notes.

Office 39 is believed to have trained chemists to produce amphetamines and opioids which were sold in Japan and other parts of Asia.

Australian authorities stopped a North Korean shipment of about 50 kilograms of heroin in 2003.

In recent years, North Korean shipments of weapons have been impounded around the world.

In 2013, a ship with munitions and missile parts was held in Panama, while its owners Chongchongang Shipping were believed to be a front company for Office 39.

'Getting harder to carry out illegal operations'

The defector said he had no knowledge of these activities, but admitted it was "getting harder for North Korea to carry out illegal operations as the world becomes more aware".

Office 39 is becoming more desperate.

Increasingly, it is sourcing income from businesses inside North Korea — marine produce, mining and textiles — to fund its nuclear program and the lavish lifestyles of Kim Jong-un and his elite.

"Office 39 just took anything that made money in North Korea. If it made money they took it, monopolised it," the defector said.

"I'd estimate it accounted for 30 to 40 per cent of the total economy all going to the top leadership while the people lived in poverty."

New focus on cyber crime

Office 39 is also evolving and changing its focus. To keep the money flowing in it has turned to cyber crime.

In 2016, North Korean hackers almost stole $US1 billion ($1.2 billion) from the New York Federal Reserve, but only a spelling error stopped them.

They were trying to loot an account of the Bangladesh Central Bank when authorities grew suspicious about a withdrawal request that had misspelled foundation as "fandation".

But the hackers still got away with $US81 million ($103 million) before being stopped.

Also in May of the same year, North Korea's biggest cyber operation was a ransomware attack that brought down hundreds of thousands of computers across dozens of countries and briefly crippled Britain's National Health Service.

Only sheer luck enabled a 22-year-old British hacker to defuse it.

North Korea has succeeded in hacking into South Korean banks and even stole war plans from South Korea's military computer networks.

North Korean hackers almost stole $US1 billion — but a spelling error stopped them. ( Reuters )

'It's a perfect battlefield for them'

Go Myong-Hyun, from the Asian Institute for Policy Studies based in Seoul, said Office 39 had thousands of hackers and was pouring a lot of its resources into cyber.

The defector fears assassination by North Korean agents for the secrets he keeps. ( ABC News )

"It's finding new and fertile ground in cyber. They can operate on an equal playing field and compete effectively with any power," he said.

"It's harder to detect and even harder to police, so it's a perfect battlefield for them."

The defector told the ABC he fled after seeing too many of his colleagues come under suspicion and jailed.

He ultimately settled in South Korea to give his children a better life.

For him defecting was relatively easy — he and his family had a passport and they were based in an Asian capital city.

But most others remain trapped in the hermit kingdom with no freedom of movement and little means, while their leader benefits from a river of cash funnelled through Office 39.