North Korea has surprisingly managed to draw on global resources to develop its nuclear weapons program, despite being a tiny country that's isolated from most the world.
North Korea's economic clout is small — South Korea 's central bank estimates its neighbor had a gross national income in 2015 of 34.5 trillion South Korean won ($30 billion), just 2.2 percent that of South Korea. But North Korea spends an estimated 25 percent of its gross domestic product on weapons.
"This is basically a brutal dictator who doesn't really put a lot of stock in the safety, health, education of his people. It wouldn't surprise me at all he would pour resources into nuclear weapons that I hope will never be used," said Sharon Squassoni, director of the Proliferation Prevention Program at the Center for Strategic and International Studies.
Here are five sources of North Korea's funding, according to analysts:
About three-fourths of North Korea's trade is with its communist neighbor China , according to the U.S. Central Intelligence Agency. Other estimates put the percentage even higher.
"China has enormous leverage to influence stability in North Korea, but most of it they feel they cannot use because of adverse consequences for China interests in North Korea," said Scott Snyder, director of the Program on U.S.-Korea policy at the Council on Foreign Relations. Beijing has the ability to shut down food and energy supply for North Korea, he said.
However, a North Korean collapse would likely send refugees flooding over the border into the economically weak northeastern region of China, a situation Beijing wants to avoid.
2. Overseas slave labor
Forced North Korean laborers in China and Russia give Pyongyang desperately needed cash, said Robert Manning, senior fellow at the Atlantic Council. Other exports such as coal and minerals also bring in hard currency, in the form of Chinese yuan, U.S. dollars and euros.
"I think a lot of this fuels their nuclear missile companies," he said.
North Korean dictator Kim Jong Un can also use those funds to buy the support of other leaders in North Korea, Manning said. "If we can take away his hard currency, his hard cash, I think that will create a new political dynamic in North Korea. He can't buy off the political elites," Manning said.
3. Weapons sales
"The North Korean economy is basically being run by its arms deals," said Anwita Basu, The Economist Intelligence Unit's lead analyst for Indonesia, the Philippines and North Korea.
She pointed to export deals North Korea has made with African countries ; other political analysts have speculated that there is cooperation between North Korea and Iran on nuclear weapons development.
North Korea "continues to trade in arms and related materiel, exploiting markets and procurement services in Asia, Africa and the Middle East," said a February report from the U.N. Security Council's Panel of Experts.
The report added that North Korea uses its construction companies in Africa to build arms-related, military and security facilities. Last summer, Egypt intercepted a ship from North Korea carrying 30,000 PG-7 rocket-propelled grenades and other weapons parts, the study said.
North Korea has "a large illicit drug industry," the Atlantic Council's Manning said. "I've seen samples of North Korean pirated Viagra that looks very authentic. It has been a significant source of hard currency."
North Korea was reportedly behind a $81 million cybertheft of funds from Bangladesh's account at the New York Federal Reserve last year. Prosecutors believe Chinese middlemen helped North Korea with the theft, The Wall Street Journal said, citing people familiar with the matter.
Some Chinese financial firms also appear to serve as channels for funds to North Korea.
In February, six U.S. senators — including former presidential candidates Ted Cruz and Marco Rubio — sent a letter to U.S. Treasury Secretary Steven Mnuchin that urged him to restrict North Korean banks' access to Chinese banks.
United Nations sanctions against North Korea "have been very modest compared to what we do vis-a-vis Iran or Cuba," Manning said. "The degree to which China is prepared to cooperate will determine how successful we are in imposing pressure on North Korea."
Correction: Egypt intercepted a ship from North Korea carrying rocket-propelled grenades and other weapons parts in 2016. An earlier version misstated the timing.
More From CNBC