In the 1970s, the United States government used groups of experts called red teams to hack its own computer systems.
Today, many companies hire ethical hackers to safeguard their vital computer systems.
Here's a look at the world's most famous hackers...
1. Gary McKinnon
Gary McKinnon, a Scottish systems administrator has been accused of the biggest military computer hacking exercise of all times by the US government.
McKinnon is also accused of copying data, account files and passwords into his own computer.
US authorities pegged the cost of tracking and rectifying the problems caused by his hacking at over $700,000.
Robert Tappan Morris is an American computer scientist, known for creating the first computer worm on the Internet called the Morris Worm in 1988.
He became the first person convicted under the Computer Fraud and Abuse Act.
He is a professor in the department of Electrical Engineering and Computer Science at the Massachusetts Institute of Technology.
Kevin David Mitnick is a computer security consultant, author, and hacker. In the late 20th century, he was convicted of various computer-related crimes.
When he was 12 years old, Mitnick used social engineering to bypass the punchcard system used in the Los Angeles bus system.
Kevin Lee Poulsen, a former black hat cracker, works as senior editor at Wired News.
He is well known for hacking all the telephone lines for Los Angeles radio station KIIS-FM, to make sure that he would be the 102nd caller and win the prize of a Porsche 944 S2.
Jonathan Joseph James who passed away in May 2008, was an American hacker.
He was the first juvenile to be imprisoned for cybercrime in the United States. He died as a result of a self-inflicted gunshot wound.
Adrian Lamo a threat analyst gained popularity by hacking into several high-profile computer networks, including those of The New York Times, Yahoo!, and Microsoft. He was arrested in 2003.
Vladimir Levin, a businessman is known for his involvement in attempting to fraudulently transfer $10.7 million via Citibank's computers.
Currently, he does business in Lithuania.
Raphael Gray was just 19 when he hacked computer systems around the world in 1999 as part of a multi-million pound credit card mission.
He published credit card details of over 6,500 cards to point out the weak security in consumer web sites.
A 20-year-old man from California was suspected of being a hacker and called himself, 'the Deceptive Duo'.
He faces several charges on hacking into government computers and defacing government websites.
In April 2002, the Deceptive Duo claimed to be a hacking group working to expose the lack of security within the US government's networks and other private-sector computer systems.
Also known as MafiaBoy, Michael Calce, a high school student from West Island, Quebec launched a series of highly publicised denial-of-service attacks in February 2000 against large commercial websites including Yahoo!, Amazon.com, Dell, Inc, eBay, and CNN.