On November 2, 1988, one of the first worms was distributed on the Internet. The worm was written by Robert Tappan Morris from Cornell University, and it's original intent was to survey how many computers were connected to the Internet, but something went terribly wrong.
A Tour of the Worm
The What, Why, and How of the 1988 Internet Worm
An Analysis of the Internet Virus of November 1988
The Internet Worm Program: An Analysis
Morris Worm Source Code