How Two Brothers Created the World’s First Computer Virus
In a small shop in Lahore, Pakistan, two brothers wrote a piece of code meant to stop people from stealing their software. Instead, they wrote history โ and, without meaning to, launched an industry now worth hundreds of billions of dollars.
This is the story of Basit and Amjad Farooq Alvi, and the virus that carried their home address to computers around the world.
Two Brothers, One Small Shop
Amjad Farooq Alvi was the tinkerer of the family โ the kind of teenager who built radios from library books instead of flying kites on Lahore’s rooftops.
Born in 1962, he was the second-youngest of six children, encouraged by his doctor father to read and experiment from an early age.

By the mid-1980s, Amjad and his younger brother, Basit, were running a small computer business called Brain Computer Services out of Lahore. The store sold both original software the brothers had written themselves and pirated copies of popular programs like Lotus 1-2-3 and WordStar.

Among their original creations was a piece of medical software โ heart-monitoring software built for a small hospital, designed to help track patients’ vitals. It was exactly this software that would trigger everything that followed.
When Customers Became the Problem
The brothers soon noticed something frustrating: hospitals and clients were buying a single legitimate copy of their software โ and then quietly copying and reselling it, cutting the Alvis out of the profits they’d earned through months of work.

Most software companies of the era responded with lawsuits or crude copy-protection locks. Basit and Amjad chose something stranger and far more creative.

They wrote a small program that would sit quietly inside their original software โ inert, harmless, doing nothing at all, as long as the disk stayed the one they had sold.
But the moment someone copied that disk onto another computer, the hidden code woke up. It didn’t erase files or crash the system. Instead, it took over a small portion of the disk’s boot sector and displayed a message that named its own creators.
Welcome to the Dungeon
Anyone who ran a pirated copy of the Alvis’ software eventually saw this text appear on their screen:
“Welcome to the Dungeon… ยฉ 1986 Basit & Amjad (pvt) Ltd. BRAIN COMPUTER SERVICES. 730 NIZAM BLOCK ALLAMA IQBAL TOWN LAHORE-PAKISTAN” โ followed by the brothers’ actual phone numbers, and an invitation to contact them “for vaccination.”

It wasn’t a threat. It was, in the brothers’ own telling, a message meant to explain the importance of protecting people’s work โ and an offer: contact us, and we’ll give you a clean, working copy in exchange for fair payment.

Once someone with a pirated, “infected” copy showed up at their shop, the brothers would collect proper payment for the software and hand over an original, virus-free version in return.
A Phone Call From Florida
Neither brother expected the code to travel beyond Lahore. There was no internet in the way we understand it today โ computer connections were mostly limited to research institutions in the US, Europe, and Japan. Software moved from machine to machine the slow way: on 5.25-inch floppy disks, passed hand to hand.
Then, a phone call changed everything.
One evening in 1986, a young woman with an American accent called the Alvi household asking for “Amjad or Basit Alvi.” Amjad, half asleep, struggled to follow her at first.
She was a student at a university in Florida โ and she’d found something strange on her floppy disk: a program signed with two names and a Lahore phone number.
The pirated software โ cheap knockoffs of programs like Lotus 1-2-3 and WordStar, sold for as little as $1.50 to American tourists and backpackers passing through Lahore between 1986 and 1987 โ had carried the code with it all the way to the United States.
Every time someone lent an infected disk to a friend, or ran it on a shared computer, the code copied itself onto that machine too.

By the time anyone had a name for it, the Brain virus had already reached at least 100,000 floppy disks worldwide.
The World’s First PC Virus
Brain wasn’t just an unusual piece of code โ it was a genuine first. Created in January 1986, it’s recognized as the first computer virus to target the MS-DOS operating system running on IBM-compatible PCs. By hiding itself within the boot sector of a floppy disk, it also became the first “stealth” virus โ designed to avoid easy detection.
It’s worth being precise here, since accounts vary slightly on the brothers’ exact ages at the time โ most place Amjad in his mid-twenties and Basit as a teenager, still years younger than his brother.
What’s consistent across every account is the core of the story: two self-taught programmers from Lahore, reacting to piracy with code instead of court papers, ended up making technology history.
The Sikander Incident: The Day One Armed Man Paralyzed Pakistanโs Capital
No Charges, and an Unlikely Legacy
Despite the global spread of their code, Basit and Amjad never faced criminal charges. They say they stopped distributing infected software by 1987, once it became clear how far it had traveled.
The brothers didn’t fade into obscurity either. They went on to become significant figures in Pakistan’s technology industry, eventually founding Brain NET โ now one of the country’s largest internet service providers, with operations in hundreds of cities. In the early 1990s, alongside their elder brother Shahid, they also helped introduce Pakistan’s first email service.
Meanwhile, the virus they’d written almost as a warning label had opened a door nobody could close. Security researchers began studying self-replicating code seriously for the first time. What started as one shop’s anti-piracy experiment is now credited as the starting point of a cybersecurity industry worth billions of dollars.
What makes the Brain virus genuinely strange, even by the standards of computer history, isn’t that it existed โ it’s how openly its creators signed their work.
In an age when hackers hide behind proxies, VPNs, and anonymous handles, two brothers in Lahore put their real names, real phone numbers, and real home address inside code they knew would spread around the world.
They weren’t trying to disappear. They were trying to be found.






