Security operations

What Is Hacking? Types, How Attacks Work, and How to Protect Yourself

Hacking is not one thing: it ranges from phishing and stolen passwords to exploiting software flaws. Here is how attacks actually work, what the numbers say, and the defenses that matter.

Cysoro Security TeamPublished · 8 min read
$ nmap --scan target 443/tcp open https 22/tcp open ssh ! weak password found $ access denied_ ACCESS DENIED SECURITY OPERATIONS What ishacking? How attacks work — and how to stop them.
Quick answer

Hacking is gaining unauthorized access to a computer system, network or account, usually to steal data, money or computing power. Common methods include phishing, stolen or weak passwords, exploiting unpatched software flaws, and malware. The same skills used legally, with permission, are called ethical hacking or penetration testing, and the dividing line is authorization.

Key takeaways

  • Hacking means unauthorized access; the same techniques done with permission are ethical hacking.
  • Most attacks start with people, not code: phishing, stolen passwords and unpatched flaws cause most breaches.
  • Strong unique passwords, MFA, patching and backups stop the majority of common hacking attempts.

When people say "hacking", they usually picture a hooded figure typing furiously at a glowing screen. Real hacking is far less dramatic — and far more effective. Most of the time it looks like a convincing email, a reused password, or a piece of software that was never updated.

What is hacking?

Hacking is gaining access to a computer system, network, phone or account without permission. The goal is usually to steal data or money, spy on the victim, disrupt a service, or use the compromised machine to attack someone else.

The word has two meanings. In its original sense, a hacker was simply someone who was skilled at understanding and modifying computer systems — the term comes from MIT in the 1960s, where "hacking" meant clever, creative problem-solving. In everyday use today, hacking means breaking into systems without authorization, and that is the meaning this article uses unless it says otherwise.

Hacking is not one technique. MITRE ATT&CK, the framework security teams use to describe attacker behavior, lists hundreds of techniques, from phishing and credential theft to exploiting software flaws and moving sideways through a network. Most real attacks combine several of them.

What are the main types of hacking?

Hackers are usually grouped by intent, using the hat colors. The skills overlap heavily — what changes is the permission and the goal.

TypeIntentPermissionExample
Black hatCrime or disruptionNoneRansomware, data theft, fraud
White hatDefense, with consentWritten permissionPenetration testing, bug bounties
Grey hatMixed, often to show offNone, but no harm intendedFinding a flaw and telling the owner
Red teamTesting defensesAuthorized by the organizationSimulated attacks on a company
HacktivistPolitical or social messageNoneWebsite defacement, leaks
State-sponsoredEspionage or sabotageNoneTargeting governments and industry

Grey hat hacking sits in a legal grey area: even well-meaning unauthorized access can break the law. The safe version is coordinated vulnerability disclosure, where you report a flaw through the vendor's published process instead of testing it yourself.

How a typical hack unfolds 1 Get inphishing, stolenpassword, unpatched flaw 2 Get more powerescalate to adminor root privileges 3 Move sidewaysreach other machinesand valuable data 4 Cash outsteal data, encryptfiles, demand ransom Attackers move fast: CrowdStrike measured an average breakout time of 29 minutes in 2025. Stopping step 1 is far cheaper than stopping step 4.
The four stages of a typical intrusion. Illustration by Cysoro.

How does hacking work in practice?

Almost every attack follows the same four stages: get in, get more power, move sideways, and cash out. Defenders focus on the first stage because it is the cheapest to block.

Initial access

The attacker needs one foothold. The most common routes are a phishing email that steals a password, a password bought from a breach and reused on another site, a public-facing server with an unpatched flaw, or a malicious attachment. Verizon's 2025 Data Breach Investigations Report found about 20% of breaches began with vulnerability exploitation, close to the 22% that began with stolen credentials.

Privilege escalation and persistence

Once inside, the attacker tries to gain administrator rights and to stay in. That can mean exploiting a local flaw, stealing a more powerful credential, or installing a backdoor that survives a reboot. Attackers increasingly use legitimate tools and valid credentials, which makes them harder to spot.

Lateral movement and discovery

The attacker maps the network, finds valuable data and other machines, and moves between them. CrowdStrike's 2026 Global Threat Report measured an average "breakout time" — the gap between landing on one host and reaching a second — of 29 minutes in 2025, with the fastest observed at 27 seconds.

Impact

The final stage is the payoff: data theft, ransomware encryption, fraud, or silent spying. Mandiant's M-Trends 2026 report put the global median "dwell time" — how long attackers stay undetected — at 14 days in 2025, so many victims are breached for weeks before they notice.

What are the most common hacking methods?

These are the methods behind most real attacks, and each one has a specific defense.

  • Phishing: fake emails, texts or calls that trick you into handing over a password or opening malware. It was the most-reported internet crime in the FBI's 2025 figures, with 191,561 phishing and spoofing complaints.
  • Credential stuffing: trying passwords leaked in one breach against many other sites. It works because people reuse passwords.
  • Password spraying: trying a few common passwords against many accounts, which avoids lockouts. Microsoft has reported thousands of password attacks per second against its customers.
  • Exploiting unpatched flaws: attacking software with a known vulnerability before the owner patches it. This is why updates matter.
  • Malware: malicious software delivered by attachment, download or infected website, including ransomware, spyware and remote-access tools.
  • Man-in-the-middle attacks: intercepting traffic on an insecure network, for example public Wi-Fi without a VPN.
  • SQL injection and cross-site scripting: classic web flaws that let an attacker run commands on a website or steal data from its database. OWASP lists injection among its top web risks.
  • Social engineering: manipulating people rather than machines — pretexting, impersonation and baiting. Our guide to spear phishing shows how targeted versions of this work.

How common is hacking? Key statistics

Hacking is not rare or exotic: it is a daily, industrial-scale activity. The FBI's Internet Crime Complaint Center received 1,008,597 complaints in 2025, with reported losses of about $20.9 billion — an average of roughly $20,700 per complaint.

  • 1,008,597 complaints were filed with the FBI IC3 in 2025, averaging almost 3,000 a day.
  • $20.9 billion in reported losses in 2025, up 26% from 2024.
  • 29 minutes was the average time for an attacker to move from one compromised host to a second in 2025, according to CrowdStrike.
  • 14 days was the global median time attackers stayed undetected in 2025, according to Mandiant.
  • 82% of detections CrowdStrike investigated in 2025 were malware-free, relying on valid credentials and trusted tools instead.
  • $81 million was paid to ethical hackers through HackerOne bug bounty programs in a recent 12-month period.

These figures count reported cases and observed activity, not every crime. Real totals are higher, because many victims never report.

What is ethical hacking?

Ethical hacking is the same set of skills used legally: a tester with the owner's written permission tries to break into a system to find weaknesses before criminals do. NIST describes penetration testing as assessors working under specific constraints, attempting to circumvent or defeat the security features of a system.

Typical ethical hacking work includes penetration tests, vulnerability assessments, red-team exercises and bug bounties, where companies pay researchers for responsibly reported flaws. HackerOne reported $81 million paid out to ethical hackers through its bug bounty programs in a recent 12-month period.

The dividing line is authorization. A penetration tester works under a written agreement that defines exactly what may be tested, when, and how findings are reported. Without that agreement, the same actions are a crime.

Is hacking illegal?

Yes. In the United States, the Computer Fraud and Abuse Act makes it a federal crime to intentionally access a computer without authorization, or to exceed authorized access, and obtain information. Most US states have their own computer-crime laws too, and other countries have equivalents such as the UK Computer Misuse Act.

There is an important nuance for security researchers. US Department of Justice policy tells federal prosecutors to decline charges when the evidence shows the conduct was good-faith security research. That is a charging policy, not immunity, and it does not protect testing done without permission or for personal gain.

Penalties can be severe: prison time, fines and civil lawsuits. High-profile cases have ended in multi-year prison sentences, and companies routinely sue attackers for the cost of the breach.

How do you protect yourself from hacking?

Most hacking succeeds through a small number of weak points, and the defenses are well known. CISA's best-practice guidance centers on the same short list.

Five defenses that stop most hacking 1 Unique passwords, kept in a password managerone password per account, so one breach cannot unlock the rest 2 Multi-factor authentication everywherepasskeys or an authenticator app beat SMS codes 3 Install updates promptlymost exploited flaws already have a patch when attackers use them 4 Back up important data offlinebackups are the only reliable answer to ransomware 5 Treat unexpected links with suspicionverify requests for money or logins through a channel you trust
Five defenses that stop most common hacking attempts. Illustration by Cysoro.

You can test your own awareness with our free phishing quiz.

  1. Use a password manager and give every account its own long, random password. Check whether any of yours have leaked with our pwned password checker.
  2. Turn on MFA everywhere, especially email, banking and cloud accounts. Prefer passkeys or authenticator apps over SMS codes.
  3. Update promptly. Turn on automatic updates for your operating system, browser and apps.
  4. Back up offline. Keep a copy of important files somewhere ransomware cannot reach.
  5. Be suspicious of links and attachments. Go to a site from a bookmark instead of clicking a link in a message.

For businesses, the same list applies at scale, plus network segmentation, logging and an incident response plan. Our small business cybersecurity checklist covers the full set in one place.

How do you know if you have been hacked?

Look for passwords that suddenly stop working, logins from places you have never been, password-reset emails you did not request, new mail-forwarding rules, contacts receiving strange messages from you, or money and files going missing. On a phone, watch for battery drain and apps you did not install — our guide to how to know if your phone is hacked walks through the mobile signs.

Do not assume a slow computer means a hack: most performance problems are not security incidents. But an unexplained login or a changed password is a real signal, and you should act on it the same day.

What should you do if you have been hacked?

Act quickly and in the right order: contain the damage first, then recover, then report. Speed matters because attackers move in minutes, not days.

  1. Change the affected password from a device you trust, and sign out of all sessions.
  2. Turn on MFA or replace the MFA method if the attacker may have seen it.
  3. Check for changes the attacker made: email forwarding rules, new recovery addresses, unknown devices and new payment methods.
  4. Change any password you reused elsewhere, starting with email and banking.
  5. Scan the device with up-to-date antivirus software and update everything.
  6. Report it: tell your bank if money moved, tell your IT team at work, and file a report at ic3.gov if you lost money.
Do not pay a ransom quietlyIf ransomware encrypted your files, do not pay before talking to your IT team or law enforcement. Payment does not guarantee recovery, and it marks you as a payer for the next attack.

The bottom line

Hacking is unauthorized access, and most of it succeeds through ordinary weaknesses: reused passwords, phishing and unpatched software. The fix is equally ordinary — unique passwords, MFA, prompt updates and backups — and it stops the large majority of attacks aimed at individuals and small businesses.

If you want to go further, learn the attacker's view legally: practice on training platforms, study MITRE ATT&CK, and consider ethical hacking as a career. Start by checking whether your own passwords have already leaked, with our free pwned password checker.

Frequently asked questions

What is hacking in simple terms?

Hacking is getting into a computer, phone, network or account without permission. The hacker might steal data or money, install malware, spy on the victim, or use the machine to attack others.

Is hacking illegal?

Yes, unauthorized hacking is illegal in the US under the Computer Fraud and Abuse Act, and similar laws exist in most countries. Hacking with the owner's written permission, such as a penetration test, is legal.

What is the difference between a hacker and a cracker?

In everyday language the words are used interchangeably. Traditionally, a hacker was anyone skilled with computers, while a cracker specifically broke into systems illegally. Today, white hat, black hat and grey hat are the terms most people use.

What is ethical hacking?

Ethical hacking is testing a system's security with the owner's permission, to find and fix weaknesses before criminals exploit them. Ethical hackers are usually called penetration testers and work under a written agreement that defines what they may test.

How do hackers get into systems most often?

The most common routes are phishing emails that trick people into giving up passwords, stolen or reused passwords, exploiting software that has not been patched, and malware delivered through malicious links or attachments.

Can hacking be done without any technical skill?

Yes. Phishing kits, stolen password lists and ransomware-as-a-service let people with little skill launch attacks. Social engineering, which means tricking people rather than breaking code, is often the easiest way in.

How can I tell if I have been hacked?

Warning signs include passwords that no longer work, logins from places you have never been, unexpected password-reset emails, new forwarding rules in your email, and money or data going missing. Our guide to knowing if your phone is hacked covers mobile signs in detail.

How do I become an ethical hacker?

Learn networking, operating systems and web security, practice legally on platforms such as Hack The Box or TryHackMe, and earn certifications such as CompTIA Security+ or CEH. Never practice on systems you do not own or have written permission to test.

Sources

  1. FBI Internet Crime Complaint Center — 2025 Internet Crime Report
  2. NIST — SP 800-115 Technical Guide to Information Security Testing and Assessment
  3. MITRE ATT&CK — Enterprise Matrix
  4. CISA — Cybersecurity Best Practices
  5. Verizon — 2025 Data Breach Investigations Report
  6. Swif — Hacking Statistics for 2026: Intrusion Tradecraft, Dwell Time, and the New Speed of Attack
  7. US Department of Justice — CFAA and good-faith security research policy
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against the FBI IC3 2025 report, NIST SP 800-115, MITRE ATT&CK and CISA best-practice guidance.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free