You’ve probably seen the viral satellite images of South Korea lit up like the cosmos at night and North Korea looking like a big black hole. But here’s something you probably haven’t heard: In 2016, North Korean programming students won 28th place in the ACM International Collegiate Programming competition — an intense, problem-solving battle of over 100 teams.

That may not sound impressive, but they beat Stanford University — a school that has been ranked as one of the top 10 computer science schools on multiple occasions. They also tied with Cornell and one of South Korea’s most revered tech schools — the Korea Advanced Institute of Science and Technology.

These international competitions are one of the only ways we can see North Korea’s tech skills compete on the world stage. The takeway: North Korean students are a decent match against those studying in the U.S. and South Korea — both countries with high-ranking computer science schools (St. Petersburg University in Russia, Shanghai Jiao Tong University in China and Harvard University took the top three slots at the 2016 ACM-ICP competition).

In the 13 years the Democratic People’s Republic of Korea has competed in the International Mathematics Olympiad — literally the Olympics for math — North Korean students took home 19 gold medals, 33 silver and nine bronze medals. The lowest they ever ranked was 19th place and the highest they ranked was fourth. More than 100 countries have participated over the years.

There’s a reason for all of this: The Kim Jong Un regime needs top-notch computer scientists and hackers, and so far they’ve succeeded. Their cyber arsenal starts with scouting out elementary school-aged children who show an affinity for computers. Eventually, the gifted are funneled into specialized secondary schools. Then the regime uses domestic and international competitions to find the best of the best.

“It’s actually much like the way a country like South Korea or the U.K. will cultivate students [for] their Olympic teams,” Martyn Williams, a contributor for 38 North and the journalist behind a blog called North Korea Tech, said on Nov. 23. Williams and a number of other North Korea and cybersecurity experts spoke from the podium at the “North Korea’s Cyberattacks: Current Capabilities and Countermeasures” in Seoul that day.

“Children that show potential in sport will go on to more practice and will go on to get more help from the state,” he said.

Take Mun So Min, a student at North Korea’s Kim Chaek University of Technology, for example. He has competed in North Korea’s regional competitions for the ACM Intercollegiate Programming competition and the International Mathematics Olympiad. And in an April 2017 competition on Codeforces — a Russian competitive coding site with contestants from around the world — a user with his name beat out employees listed on DropBox and Google’s team. Williams called him a “programming star” who is known to have originally studied at Pyongyang Secondary School No. 1, where many tech-savvy students are sent.

An account with Mun So Min’s name, university and country (the DPRK) is online on the Russian coding competition website, Codeforces, on Wednesday. Mic/Codeforces

A registration page on the International Mathematical Olympiad’s official site shows Mun So Min and his competition history. Mic/International Mathematical Olympiad

This screenshot of Hackerrank.com user page matches Mun So Min’s name, university affiliation and country. The user page also linked to Mun’s registration page on the International Mathematics Olympiad official site. Mun’s username, @kut_msm1993, likely indicates that Mun was born in 1993. Mic/Hackerrank.com

“Schools like this exist around the country,” he said. “At these schools, the class sizes are smaller, children have more access to the resources they need and their gift for computing is cultivated and it matures.”

The investment makes sense. Compared to intercontinental ballistic missiles and nuclear weapons, raising hackers is quite inexpensive — and quieter.

“The cyberspace is a low-cost, high-efficiency space. All you need is a computer, a mouse and an internet network,” Yu Dong Yeol, director of the Korea Institute of Liberal Democracy, said in a separate presentation at the conference. “As long as you have this, you can attack freely.”

An executive decision

In October 2000, Kim Jong Il shocked the world: The now-deceased North Korean leader offered to exchange email addresses with Secretary of State Madeleine Albright, who was making a diplomatic visit to Pyongyang.

But there are signs that he was aware of computers’ power years before that. Kim allegedly told his troops that “all wars in the future will be computer wars” in 1996 (several translations of this quote exist).

“That was a pretty bold prediction to make in 1996. I bet, back then, in 1996, most of us didn’t have email addresses,” Williams said. “It demonstrates that, from 20 years ago, Kim Jong Il saw the possibility that computers would have for developing the domestic economy but also the military fields.”

North Korean men and women use computer terminals at the Sci-Tech Complex in Pyongyang, North Korea, on June 16. Wong Maye-E/AP

Now, we live in a world where North Korean hackers are thought to be responsible for a $81 million virtual heist at a Bangladeshi bank — or a malware attack that temporarily shut down hospitals and extorted bitcoins. It may only get worse as more coding gurus are reared north of the Demilitarized Zone.

Building cyber arsenals

Only a small portion of them will work for the Reconnaissance General Bureau — a government body established around 2009 known for North Korea’s cyberwar efforts. The others will likely continue to develop North Korea’s intranet — which is vastly different from the World Wide Web more commonly accessed in other countries, but is still thought to have the basics, like an internet shopping site.

But in the DPRK, gifted children will still compete for the jobs that will win them recognition and higher-status lives. The world is allowed to see students from Kim Il Sung University and Kim Chaek University of Technology — older institutions that have been around since the 1940s and 1950s. But those from newer schools with hacking and cyber warfare specializations remain largely hidden. These students often study at Moranbong University (founded in 1997) and Mirim College (founded in 1986) — and it’s safe to assume “they’re even better” than the world-ranking math and computer gurus seen in international competitions, Williams said.

“It sort of makes you think how good the hackers we don’t see are,” he said. “At these universities, there’s much more emphasis on hacking. It’s not developing software that will help develop factories or writing software for email that will go on North Korean smartphones.”

North Korean students use computers in a classroom with portraits of the country’s leaders Kim Il Sung (left) and his son Kim Jong Il hanging on the wall, at the Kim Chaek University of Technology in Pyongyang, North Korea, on Sept. 20, 2012. Vincent Yu/AP

About 30 students are thought to go through Moranbong University each year, according to Williams. He also said that some hacking students in North Korea are thought to study abroad toward the end of their college careers — but really, this means that they test their hacking skills from the Chilbosan Hotel in Shenyang, China.

“There’s only so much you can do from the safety of Pyongyang,” Williams said. Practicing in China also allows students to avoid a North Korean IP address. Plus, their identity is more or less obscured by the thousands of other Chinese hackers in the area.

In North Korea, the only way to learn these skills is through the government. It’s still a nation where most people are poor and don’t have access to a computer. But so long as the government is willing to invest, the rest of the world can expect an increasingly sophisticated cyber arsenal on its virtual doorstep.

“In many countries, hackers are self-trained. They spend their evenings after school playing on computers. They practice programming and breaking into a few websites,” Williams said. “In North Korea, none of that is possible. Very few people have computers in their homes and very few have access to the internet. The only way North Korea does it is through the educational system.”