Zaid Sabih

If you are interested in cybersecurity or IT, you may be excited at the idea of learning how to hack into computer systems. 

In film and television, we mostly see computer hacking through a character furiously typing away at a keyboard to illegally “break into” a computer system and gain some top-secret information.

While Hollywood nearly always portrays hacking as a crime, in the real world, hacking can also be a valid professional career path. You can take courses to learn hacking and even land a job at a reputable organization as a professional hacker — also called a penetration tester or pen tester. Hacking is a strong skill to have on your resume in the cybersecurity industry and can make you a sought-after candidate for jobs in IT.

So, what is hacking? And is it legal or not?

Learn Python & Ethical Hacking From Scratch

Last Updated January 2023

  • 183 lectures
  • All Levels
4.6 (17,130)

Start from 0 & learn both topics simultaneously from scratch by writing 20+ hacking programs | By Zaid Sabih, z Security

Explore Course

Hacking explained

The term ‘hacking’ simply refers to accessing a system or computer that you’re not supposed to have access to. 

For example, logging into an email account that you’re not authorized to access is considered hacking that account. Gaining access to a remote computer that you’re not supposed to use (or even see) is considered hacking that computer. Reading information from a computer or database that you’re not supposed to have access to, let alone read, is also regarded as hacking.

Hacking methods can vary from finding weaknesses in a system’s security to emailing an attachment that will install malware, to gain access to a target system.

Hacking can refer to a wide range of digital activities, but the main concept remains the same: it always refers to gaining access to systems that you aren’t authorized to access.

Is hacking illegal?

Hacking is not necessarily legal or illegal. On its own, Hacking is a skill — like coding, or writing, or martial arts. And just like any other skill, you can use hacking for good or bad reasons. 

Whether it is legal or not depends on the hacker and their intentions. We often break up hackers into three main types, based on their reasons for hacking:

  1. Black Hat Hackers
  2. White Hat Hackers
  3. Grey Hat Hackers

Black hat hackers 

The term black hat hackers (or black hats) refers to criminals that hack systems without permission, to steal money or data, compromise an organization, commit identity theft, or for other personal gains. 

In these cases, hacking is illegal. Black hat hackers are working with malicious intent — sometimes to harm others or to gain money and resources through an illegal avenue. Sometimes, black hat hacking is a means for hackers to commit identity theft by breaking into a computer system or database that holds users’ personal information. By accessing the system of a large organization that collects a wealth of user data, black hats may be able to find names, addresses, social security numbers, and other personally-identifying information.

Black hats are known for writing malware and ransomware, two types of software designed to break into computers and steal or damage data. They also frequently employ psychology tactics, such as phishing, to con people into giving away sensitive or private information such as passwords or the answers to security questions.

White hat hackers

This is us! The term white hat hackers (or white hats) refers to people who use the same techniques that black hats use to hack systems. The main difference is unlike black hat hackers, white hat hackers only hack systems they have permission to hack. White hats are also called ethical hackers, penetration testers, or pen testers.

Organizations hire professional ethical hackers to attempt to break into their computers on purpose. They do this to test the security of these systems, this helps to combat black hat hackers and prevent them from gaining access. Think of it like hiring a lock-picking expert to test the strength of the locks on your building by trying to pick those locks and break in. A penetration tester attempts to break into the network or device in order to reveal vulnerabilities and strengthen any weaknesses in the computer’s security system.

Working as a white hat hacker is great because you get to hack systems legally. You employ the same techniques used by black hat hackers and experience the thrill of trying to break into a computer system, but you do all of this legally. Not only that, but you can also get paid very well for it.

Gray hat hackers

The term gray hat hackers (or gray hats) refers to people who walk the line between ethical hacking and criminal hacking, usually with good intentions. These people may hack into any system, even if they don’t have permission to test that system’s security. They don’t steal money or cause damage — in many cases, gray hat hackers actually notify the administrator of that system of the weaknesses they discover. 

Nevertheless, what they do is illegal because they test the security of systems they do not own or do not have permission to test. This is similar to a vigilante who breaks into a car or home to help catch a criminal — they may be trying to do a good deed or even assist the police, but they are still committing illegal actions (such as breaking and entering) without authorization. 

Common Threats

Black hats, white hats, and gray hats can hack a security system in many different ways. Here are some of the most common threats people in general and especially people working from home face:


Many hackers use malware (malicious software), which is an umbrella term that refers to computer viruses, worms, ransomware, trojan horses, and other harmful software. Malware may access and steal data, damage data records, block access to data, or slow down a computer to the point that it becomes unusable. Malware may be able to cause damage to an individual device or an entire computer network. 

Black hat hackers often write their own malware in an attempt to bypass or slip through a security system. As cybersecurity experts continue to develop new security methods to prevent malware, criminal hackers are continually designing new types of malware to overcome or break existing security measures.

Two main types of malware are computer viruses and worms. A virus is a piece of code that connects itself into the code of another program and then forces that program to do something malicious or harmful — usually harming the device while also spreading the virus to other programs on the device or in the network. 

A worm is a malicious software program that is designed to reproduce itself quickly and spread from computer to computer, usually with the goal to “infect” an entire network of computers. The worm software may intend to access data on those devices or simply to bog down the processors so that the devices become unusable.

Of course, in order to work, the malware must first be placed on the intended device. To get their malware onto the target device, hackers may send an email that asks users to click a link, which then installs the malware. They may also use pop-up windows, which appear on certain websites, encouraging users to click the window, which then installs the malware. Social engineering is usually used to trick people into installing software that seems harmless but is actually malicious.


Ransomware is a particular type of malware specifically designed to encrypt data on a device to lock this data and hold it for financial ransom. The goal of ransomware is to block an organization (or an individual) from accessing proprietary, sensitive, or otherwise necessary data until they pay a ransom to the criminal hacker.

Trojan horse

Trojan horses could be viruses, worms, or other malware within a program that appears harmless or helpful. Criminal hackers use trojans to make their malware more appealing to users, encouraging them to install it on their device. When a user downloads and installs the trojan software, the virus or malware hidden inside it will be installed on the device as well. 

This is why it’s extremely important to only download software from sources that you trust. Most companies have policies in place that prevent employees from installing software without permission from the IT department. This helps to reduce the risk of an employee accidentally installing trojan horse malware that then infects the entire network.


When hackers fail to exploit a system through the installed software they rely on human error. These hackers employ social engineering strategies in an attempt to trick or con employees into taking actions that would compromise their security or share information or access to a company network.

One of the most popular social engineering tactics is called phishing. Phishing is a process by which a hacker tries to coax a person into willingly sharing sensitive information. The hacker may set up a fake email account and send an email to employees, posing as an executive from the organization or as a person of authority such as a professional from a bank, the IRS, or another government department. The email will usually indicate a potential problem or urgent request, asking the recipient to share certain information or input information through a link (this link generally is designed to look authentic but actually sends the information to the hacker).

Phishing aims to deceive the recipient into giving away crucial information such as a password, VPN login information, or credentials to access a system. This way, the hacker can simply input the password or pose as an authorized employee to bypass the security system and access the network.

Why learn hacking?

Now, the biggest question that people always ask is: Why teach or learn hacking?

The answer is quite simple: It’s a lucrative and exciting career path. Cybersecurity is a growing industry, with a lot of job opportunities for ethical hackers to test security systems of large organizations to ensure they are less vulnerable to black hat hackers. According to Glassdoor, ethical hackers in the U.S. make an average of about $70,000 annually, with salaries rising over $100,000 for many penetration testing roles.

There is a huge demand for ethical hackers these days because of the increased amount of cyberattacks. Hackers breaching huge systems and large companies has become a daily news story at this point. In May of 2020, the airline EasyJet was hacked, which resulted in the exposure of more than 9 million users’ personal information. Earlier the same year, criminal hackers attacked the point-of-sale system for Landry’s (the parent company of over 60 restaurants and entertainment brands) and accessed users’ payment card data.

Technology companies like Facebook and Google hire ethical hackers to test their systems and make sure they are not vulnerable. These big companies also have bug bounty programs, in which they make a public request to hackers around the world to try to hack into their systems, with the promise to pay them for any weaknesses they discover.

The coronavirus pandemic has forced many companies to start providing services online, even if they didn’t have a digital presence before. It has also pushed organizations to ask their employees to work from home and build or reorganize their systems to allow for remote working. As a result, the year 2020 brought thousands of new online platforms that store user data, handle payments, and manage other aspects of the business. All of these platforms need strong security systems, and organizations must test these systems constantly to ensure black hat hackers can’t get their hands on this data. More and more organizations are in need of cybersecurity experts and penetration testers to manage systems, especially under the pressure to set up online business systems quickly.

Employees working from home must also know how to work remotely without compromising cybersecurity. Being away from the office, employees aren’t able to access their pre-configured computers within a secured work network. This increases risk, as employees at home must access their employer’s networks remotely, putting more strain on the network system and opening new opportunities for vulnerabilities.

All of this increases the demand for ethical hackers and cybersecurity experts to help test and strengthen the security of business platforms and networks, implement proper security measurements, patch bugs, educate employees on cyber safety methods and tactics, and more.

How to pursue a career in hacking

Want to pursue a career as a professional ethical hacker? You can start by taking courses that would teach you hacking from scratch! Alternatively, you can start by learning more about operating systems (such as Windows and Linux) and computer networking to gain a strong understanding of how computers work in general and how computers interact with each other. You’ll also need to learn about programming languages basics, website applications, and database management systems (DBMS). All of these are important to the cybersecurity field, as organizations need to protect not only their physical devices but also their networks, websites, and databases. 

Many online courses are available to teach you necessary skills in programming, operating systems, web applications, and more.

In addition to technology and programming skills, you’ll also need to learn about psychology and social engineering. This will help you understand the social scams that criminal hackers use to con people into giving away information. As a professional penetration tester, you may find yourself teaching courses or giving seminars to organizations’ employees about how to keep their information safe, create secure passwords, and look for signs of suspicious emails, websites, and software programs.

A career in ethical hacking, or penetration testing, is exciting, challenging, and constantly growing and changing. Ethical hackers need to be excellent problem solvers who can come up with innovative solutions and ideas for bypassing security measures and securing systems. If you enjoy working with computer programs, love problem solving, and want the thrill of a fast-paced field, ethical hacking may be a great career choice for you. Find out more about how to become a hacker in my next article.

Top courses in Ethical Hacking

Learn Ethical Hacking From Scratch
Zaid Sabih, z Security
4.6 (112,059)
Website Hacking / Penetration Testing
Zaid Sabih, z Security
4.5 (16,774)
Complete Ethical Hacking Bootcamp 2023: Zero to Mastery
Andrei Neagoie, Aleksa Tamburkovski, Zero To Mastery
4.6 (11,044)
Ethical Hacking with Metasploit: Exploit & Post Exploit
Muharrem AYDIN, Fatih YILMAZ
4.4 (716)
TOTAL: CompTIA PenTest+ (Ethical Hacking) + 2 FREE Tests
Total Seminars • Over 1 Million Enrollments, Michael Solomon
4.7 (1,708)
Penetration Testing and Ethical Hacking Complete Hands-on
Muharrem AYDIN, Fatih YILMAZ
4.5 (1,709)
Complete Ethical Hacking & Cyber Security Masterclass Course
Joe Parys, Aleksa Tamburkovski, Joe Parys Support
4.4 (1,872)

More Ethical Hacking Courses

Ethical Hacking students also learn

Empower your team. Lead the industry.

Get a subscription to a library of online courses and digital learning tools for your organization with Udemy Business.

Request a demo

Courses by Zaid Sabih

Learn Python & Ethical Hacking From Scratch
Zaid Sabih, z Security
4.6 (17,130)
Learn Social Engineering From Scratch
Zaid Sabih, z Security
4.6 (5,143)
Website Hacking / Penetration Testing
Zaid Sabih, z Security
4.5 (16,774)
The Ultimate Dark Web, Anonymity, Privacy & Security Course
Zaid Sabih, z Security
4.8 (6,794)
Learn Ethical Hacking From Scratch
Zaid Sabih, z Security
4.6 (112,059)
Learn Wi-Fi Password Penetration Testing (WEP/WPA/WPA2)
Zaid Sabih, z Security
4.6 (1,283)
ARP spoofing &Man In The Middle Attacks Execution &Detection
Zaid Sabih, z Security
4.7 (635)
Learn Bug Bounty Hunting & Web Security Testing From Scratch
Zaid Sabih, z Security
4.7 (443)
Learn Network Hacking From Scratch (WiFi & Wired)
Zaid Sabih, z Security
4.7 (5,189)

Courses by Zaid Sabih