Most difficult program

From the translator: I found a question on Quora: What is the most complex program or code ever written? The answer of one of the participants was so good that it is quite drawn to the article.

Fasten your seat belts.

The most complex program in history was written by a team of people whose names we do not know.

This program is a computer worm. The worm was apparently written between 2005 and 2010. Because this worm is so complex, I can only give a general description of what it does.

The worm first appears on a USB drive. Someone could find a disc lying on the ground, receive it in the mail and be interested in its content. As soon as the disk was inserted into a Windows PC, without the knowledge of the user, the worm automatically launched itself and copied to this computer. There were at least three ways in which he could launch himself. If one didn't work, he tried another. At least two of these launch methods were completely new, and both used two independent, secret bugs in Windows that no one knew about until this worm appeared.

As soon as the worm starts on the computer, it tries to gain administrator rights. He doesn't care much about installed anti-virus software - he can ignore most of them. Then, depending on which version of Windows it's running on, the worm will try one of two previously unknown methods to gain administrator rights on the computer. As before, before the appearance of this worm, no one knew about these hidden vulnerabilities.

After that, the worm is able to hide traces of its presence in the depths of the OS, so that no anti-virus program can detect it. It hides so well that even if you search the disk for the location where the worm is supposed to be, you won't see anything. This worm hid so well that it managed to surf the Internet for a year and no security company didn't even acknowledge its existence..

The worm then checks to see if it can access the Internet. If he can, he tries to visit sites www.mypremierfutbol.com or www.todaysfutbol.com. At that time these servers were Malaysia and Denmark. It opens an encrypted communication channel and tells these servers that the new computer has been successfully captured. Why does the worm automatically update itself to the newest version.

After that, the worm copies itself to any other USB device that you had to insert. It does this by installing a carefully crafted bogus disk driver. This driver was digitally signed by Realtek. This means that the authors of the worm were somehow able to break into the most secure location of a large Taiwanese company and steal the company's most secret key without the company itself knowing about it.

Later, the authors of this driver began signing it with a private key from JMicron, another major Taiwanese company. And again, the authors were able to break into the most secure place in this company and steal the most secret key that this company without them knowing anything about it.

The worm we're talking about very complicated. And we even didn't start.

After that, the worm starts exploiting two recently discovered bugs in Windows. One bug is related to network printers, and the other is related to network files. The worm uses these bugs to install itself over the local network to all other computers in the office.

The worm then looks for specific software developed by Siemens to automate large industrial machines. Once he finds it, he (you guessed it) uses another previously unknown bug to copy himself the industrial controller's programmable logic. Once a worm has settled in that computer, it stays there forever. No amount of replacement or "disinfection" of the computer will help get rid of it.

The worm looks for attached industrial electric motors from two specific companies. One of these companies is in Iran and the other is in Finland. The motors he is looking for are called "Variable Frequency Drives". They are used to control industrial centrifuges. Centrifuges can be used to purify many chemical elements.

For example, uranium.

Now that the worm has full control over the centrifuges, it can do whatever it wants with them. He can turn them all off. He can immediately destroy them all - just spin them at maximum speed until they scatter like bombs, killing everyone who happens to be nearby.

But no. This complicated worm. And the worm has other plans.

Once it's taken over all the centrifuges in your plant... the worm just goes to sleep.

Days pass. Or weeks. Or seconds.

When the worm decides that the time has come, it quickly wakes up. He randomly selects several centrifuges as they refine the uranium. The worm blocks them so that if someone notices that something is strange, he will not be able to turn off these centrifuges.

And then, slowly, the worm begins to spin these centrifuges ... a little wrong. Not much at all. Just, you know just a little too fast. Or little bit too slow. Only slightly outside of safe parameters.

At the same time, it increases the gas pressure in these centrifuges. This gas is called UF6. A very harmful thing. The worm changes the pressure of this gas just a little outside of safe limits. Exactly so that when gas enters the centrifuges during operation, there is a small chance that he will turn to stone.

Centrifuges don't like to run too fast or too slow. And they don't like rocks either.

But the worm has one last trick left. And he's brilliant.

In addition to all its actions, the worm would start playing a record of the last 21 seconds of operation it had recorded when the centrifuges were running normally.
The worm played the recording over and over, in a loop.

As a result, data on all human centrifuges looked quite normal. But these were only false entries created by the worm.

Now imagine that you are responsible for the purification of uranium using this large industrial plant. And everything seems to be working well. The motors may sound a little strange, but the numbers on the computer show that the centrifuge motors are working as they should.

Then the centrifuges start to break down. Randomly, one after the other. They usually die quietly. However, in some cases, they suit the present representation. And uranium production starts to drop sharply. Uranus must be clean. Your uranium is not pure enough to do anything useful with it.

What would you do if you ran this uranium enrichment plant? You would check everything again and again and again, not understanding what the problem is. You could change all the computers in the factory if you wanted to.

But the centrifuges would still break. And you didn't even know why.

Over time, under your supervision, about 1000 centrifuges break down or turn off. You go crazy trying to figure out why things aren't working as planned.

This is exactly what happened

You would never expect that all these problems were created by a computer worm, the most cunning and intelligent computer worm in history written by some incredibly secret team with unlimited money and time. The worm was designed for only one purpose: go through all known digital defenses and destroy your country's nuclear program without being caught.
To create a program that could do ONE of these things is a small miracle in itself. Create a program that can do ALL of this and more...

… for this the Stuxnet worm had to become the most complex program ever written.

Source: habr.com

Add a comment