In the early days of personal computing, when computers were still largely confined to offices, universities and technology enthusiasts, two brothers in Lahore unknowingly helped write one of the earliest chapters of cybersecurity history. In 1986, Pakistani brothers Basit Farooq Alvi and Amjad Farooq Alvi created what is widely recognized as the world’s first PC virus, known as Brain.
The brothers were running a computer business in Lahore and developing software for the rapidly growing market of IBM-compatible personal computers. At the time, software piracy was becoming a problem. Their response was unconventional: they developed a program that could identify unauthorized copies of their software.
That program became Brain.
Unlike the destructive malware that would emerge in later decades, Brain was relatively restrained. It infected the boot sector of floppy disks and could spread when an infected disk was used on another computer. Instead of simply destroying files, however, it displayed a message identifying the creators and providing contact information for their business in Lahore. The message included the brothers’ names and address, effectively leaving a digital calling card inside infected computers around the world.
What began as an attempt to discourage software piracy quickly became something much bigger. As floppy disks were exchanged between users, Brain travelled beyond Pakistan, reaching computers in other countries. For many users, it was an early encounter with a phenomenon that would eventually become a defining challenge of the digital age: malicious or unwanted software capable of spreading from one computer to another.
The significance of Brain lies not only in its place in computing history but also in the unlikely setting from which it emerged. Silicon Valley was becoming synonymous with technological innovation, yet one of the earliest milestones in computer-virus history came from two brothers working in Lahore.
The Alvi brothers later explained that Brain was not intended to destroy computers or steal information. Their original objective was to protect their software from piracy. The program’s ability to replicate, however, demonstrated a fundamental vulnerability in personal computers: software could move from machine to machine without the user fully understanding what was happening.
That vulnerability would become the foundation of an entirely new field.
Today, computer viruses have evolved into sophisticated forms of malware capable of disrupting businesses, targeting governments and costing billions of dollars. Cybersecurity has become a critical component of national security and the global economy.
But decades before ransomware, cyber warfare and digital espionage became household terms, two brothers in Lahore had already demonstrated how quickly software could cross borders.
Brain was not designed to make Pakistan a cybersecurity pioneer. Yet in 1986, two Pakistani brothers inadvertently became part of the story of how the digital world learned to defend itself.

