Actually, it's Russia who is providing high tech weaponry to Iran and DPRK.
You may have read the stories of all the many giant Russian cargo planes landing in Tehran. That's because Russia is providing Iran with their vaunted s-400 air defence systems, in preparation for the big attack that is coming from Israel.
Russia is also giving Iran Su-35 multirole fighters, Mil Mi-28 attack helicopters, and Yak-130 jet trainers.
In return, Iran is providing Russia with massive squadrons of their Shahed loitering munitions.
https://www.bbc.com/news/world-europe-67529571
It's a way for the two countries to do business together despite sanctions. Barter works.
The same with the DPRK. Russia is giving North Korea advanced missile technology.
Since both countries are under sanctions, this is also done on barter, with North Korea "paying" Russia in 152mm artillery shells.
Again, the three countries are trading with each other while all are sanctioned to the hilt, so barter is the name of the game.