Pakistani Inventions Codexery

Brain (computer virus)

First IBM PC virus, written by two Pakistani brothers.

Brain (computer virus)

Brain is the industry standard name for a computer virus that was released in its first form on 19 January 1986. It is considered to be the first computer virus for the IBM Personal Computer (IBM PC) and compatibles. The virus was written by Basit Farooq Alvi and Amjad Farooq Alvi, who at the time lived in Chah Miran, near Lahore Railway Station, in Lahore, Pakistan.

Quick Facts

Other Names
Ashar (older variant)
Released
19 January 1986
Genre
Boot sector computer virus
Author
Amjad Farooq Alvi and Basit Farooq Alvi
Platform
IBM Personal Computer, IBM PC compatibles

Facts from the source article.

Lore & Background

Brain affects the PC by replacing the boot sector of a floppy disk with a copy of the virus. The real boot sector is moved to another sector and marked as bad. Infected disks usually have five kilobytes of bad sectors, and the disk label is often changed to ©Brain. The virus slows down the floppy disk drive and makes seven kilobytes of memory unavailable to DOS. Brain lacks code for dealing with hard disk partitioning and avoids infecting hard disks by checking the most significant bit of the BIOS drive number; it does not infect if the bit is set, unlike other viruses at the time that destroyed hard disk data.

Reader's Guide

Brain is historically significant as the first computer virus for the IBM PC, marking the beginning of the PC virus era. Its authors, the Alvi brothers, stated they wrote it to protect their medical software from illegal copying, targeting copyright infringement only. The virus often went undetected due to its deliberate non-destructiveness, especially when users paid little attention to slow floppy disk access. The brothers included their address and phone numbers, inviting users to call for inoculation, but were stunned when they received many outraged calls from the UK, US, and elsewhere. In 2011, 25 years after Brain's release, Mikko Hyppönen of F-Secure interviewed the brothers for a documentary, inspiring further interviews by Pakistani bloggers. Brain's legacy lies in its role as a pioneering, relatively benign virus that nonetheless foreshadowed the security challenges of personal computing.

Origins and the Brothers' Stated Purpose

Brain, recognized as the inaugural virus targeting the IBM PC and its compatibles, first appeared on 19 January 1986. It was crafted by Basit Farooq Alvi and Amjad Farooq Alvi, two brothers residing in Chah Miran, a neighborhood close to Lahore Railway Station in Pakistan. In conversations with Time magazine, the pair explained that their motivation was defensive rather than destructive: they had developed a tracking mechanism to guard a heart-monitoring application they had written for the IBM PC. Illicit copies of their software disks were circulating, and the program was intended to halt and log unauthorized duplication. However, the tool had a side effect—it would occasionally claim the final five kilobytes of space on Apple floppy disks, preventing other programs from saving to those media. The brothers insisted the code was never meant to spread beyond the scope of copyright enforcement, yet its behavior as a self-replicating boot-sector infection placed it squarely in the category of what the industry would come to call a virus.

Technical Design and Deliberate Restraint

Brain operates by overwriting the boot sector of a floppy disk with its own code, then relocating the genuine boot sector to a different location on the disk and flagging it as defective. This process typically renders five kilobytes of sectors unusable and rewrites the disk label to read ©Brain. Beyond the structural alteration, the infection introduces a noticeable slowdown in floppy drive performance and seizes seven kilobytes of conventional memory that would otherwise be available to DOS. A particularly noteworthy design choice is the virus's explicit avoidance of hard disks. By examining the most significant bit of the BIOS drive number, Brain can distinguish a floppy from a hard disk and simply skips the latter. This was a deliberate departure from other contemporary viruses that treated all storage media identically and frequently corrupted hard-disk data. The combination of this restraint and the modest performance degradation meant that many users never noticed the infection, particularly if they were not paying close attention to the sluggishness of their floppy operations.

The Cryptic Message and BBS Heritage

One of Brain's most memorable features is the text string embedded in the infected boot sector. The original version reads "Welcome to the Dungeon," followed by a copyright line for Amjads (pvt) Ltd, a product designation of VIRUS_SHOE RECORD V9.0, and a tongue-in-cheek dedication to "the dynamic memories of millions of viruses who are no longer with us today." The passage closes with an exclamation of "Thanks GOODNESS!!!" and a warning about the virus, punctuated by a string of expletives. Numerous minor and major textual variants exist across different copies. The "Dungeon" reference is a nod to Dungeon BBS, an early programming forum, and the message only appeared roughly a year after the initial release because the Alvi brothers had licensed out a beta version of the code and could not be reached to deliver the final build. Infected disks also carried a full Lahore address, three telephone numbers, and an invitation for users to call for "vaccination," branding the operation as BRAIN COMPUTER SERVICES.

Unintended Fame and Lasting Legacy

The Alvi brothers were completely unprepared for the global reaction Brain provoked. Once the infection spread beyond Pakistan, phone calls poured in from the United Kingdom, the United States, and other countries, with callers demanding that the brothers clean their machines. The lines at their Lahore office were overwhelmed, and the pair spent their days trying to convince furious callers that their original intent had been purely protective. Despite the chaos, the family continued in the technology sector: together with a third sibling, Shahid Farooq Alvi, they operated Brain Telecommunication Limited, an Internet service provider in Pakistan. In 2011, exactly twenty-five years after the virus first appeared, security researcher Mikko Hyppönen of F-Secure traveled to Pakistan to interview Basit and Amjad for a documentary. The film's wide popularity prompted a group of Pakistani bloggers, operating under the name Bloggerine, to conduct their own interviews with the brothers, keeping the story of Brain alive in public memory decades after its release.

Frequently Asked Questions

Who created Brain (computer virus)?

The virus was authored by two Pakistani brothers, Basit Farooq Alvi and Amjad Farooq Alvi, who were based in the Chah Miran area of Lahore at the time.

What is Brain (computer virus)?

Brain is a boot sector virus that infects IBM Personal Computers and compatible machines. It is historically recognized as the very first virus written for the IBM PC ecosystem.

When was Brain (computer virus) first released?

The initial version of the virus appeared on 19 January 1986, establishing it as one of the earliest PC threats on record.

Why is Brain (computer virus) important?

It holds the distinction of being the first computer virus ever targeted at the IBM PC platform, marking a landmark moment in personal computing security. Its creation by two brothers in Lahore also cemented Pakistan's place in early cybersecurity history.

Where was Brain (computer virus) developed?

The Alvi brothers wrote the virus while living in Chah Miran, a locality near Lahore Railway Station in Lahore, Pakistan.

More in Pakistani inventions 1-20

Spotted an error? Know more?

Reader corrections go straight into our review queue. Suggest an edit · How this site is sourced

Comments

Loading…
Open in the interactive codex →