The best websites to learn hacking ethically are TryHackMe for guided beginners, Hack The Box for realistic machines, PortSwigger Web Security Academy for free web hacking, PicoCTF for capture-the-flag challenges, and OverTheWire for Linux and command-line skills. All of them teach on systems built for practice, with permission, so you learn real techniques without breaking the law. Start with TryHackMe, then move to Hack The Box once the basics feel easy.
Key takeaways
- Learn hacking only on legal labs, CTFs and intentionally vulnerable systems — never on real systems without written permission.
- TryHackMe is the best starting point; Hack The Box is the best next step once you can work without step-by-step guidance.
- PortSwigger Web Security Academy is completely free and is the best site for learning web vulnerabilities.
Learning to hack legally means learning on systems built for it. The sites below give you vulnerable machines, guided labs and capture-the-flag challenges — all with permission, all designed to teach. That is the whole point: real skills, no real victims.
How did we choose these websites?
We chose sites that are legal, hands-on, actively maintained, and used by working penetration testers. Reading about hacking is not enough; every site here lets you practise on a real target.
Our criteria were: a free tier worth using, guided content for beginners, realistic challenges for intermediates, and a community or walkthroughs when you get stuck. We also favoured sites that map to real skills — Linux, networking, web attacks, Active Directory — rather than sites that only offer videos.
One warning applies to the whole list. These sites teach techniques that are illegal on real systems without permission. Practise only inside their labs, on your own home lab, or on systems with written permission. If you are unsure whether you have permission, you do not have it.
Which website should you start with?
Start with TryHackMe if you are new, PortSwigger Academy if you want web hacking, and PicoCTF if you like puzzles. Move to Hack The Box when guided rooms start to feel too easy.
| Website | Best for | Free tier | Starting price | Level |
|---|---|---|---|---|
| TryHackMe | Guided beginners | Hundreds of rooms, 1 hour AttackBox daily | Free; paid from about $14 per month | Beginner to intermediate |
| Hack The Box | Realistic machines | Starting Point and rotating machines | Free; VIP from about $14 per month | Intermediate to advanced |
| PortSwigger Academy | Web hacking | Entirely free | Free | Beginner to expert |
| PicoCTF | CTF challenges | Entirely free | Free | Beginner to intermediate |
| OverTheWire | Linux and command line | Entirely free | Free | Beginner |
| PentesterLab | Web and code review | Limited free content | Free tier; paid plans available | Beginner to intermediate |
| VulnHub | Downloadable machines | Entirely free | Free | Intermediate |
| Root-Me | Varied challenges | Free with account | Free | Beginner to advanced |
| HackThisSite | Classic challenges | Free | Free | Beginner |
| OWASP Juice Shop | Vulnerable web app | Entirely free | Free | Beginner to intermediate |
| HackerOne | Bug bounties | Free to join | Free | Intermediate to advanced |
| OffSec Proving Grounds | OSCP preparation | Free tier available | Free tier; paid labs available | Intermediate to advanced |
Prices for TryHackMe and Hack The Box paid tiers are about $14 per month, based on the platforms' own pricing and the guides cited here. Check the site before subscribing, because prices change.
What are the best websites to learn hacking?
Twelve sites, in the order most learners should try them. Start at the top, and move down as your skills grow.
1. TryHackMe — best for beginners
TryHackMe is the most beginner-friendly hacking lab platform, as TryHackMe's own guide to free labs shows. Its guided rooms walk you through each task, and its learning paths take you from Linux and networking basics to web attacks, privilege escalation and more.
- Hundreds of free rooms covering Linux, networking, web vulnerabilities, OSINT and cryptography
- One hour of daily AttackBox time on the free tier, so no local setup is needed
- Structured paths, including a complete beginner path and a SOC path
Pros: the gentlest start in ethical hacking; a public profile that shows progress. Cons: advanced content needs a paid subscription. Pricing: free tier available; paid from about $14 per month. Pick it if: you are starting from zero.
2. Hack The Box — best for realistic practice
Hack The Box is the platform most working penetration testers use for practice. Its machines are realistic, mostly unguided, and regularly updated. Retired machines come with official walkthroughs, which are the most valuable learning resource on the platform.
- Active machines with no official walkthroughs, plus retired machines with full write-ups
- HTB Academy, a structured training product with free introductory modules
- Pro Labs that simulate full corporate networks
Pros: strong reputation with hiring managers; realistic infrastructure. Cons: a steeper learning curve and a limited free tier. Pricing: free tier available; VIP from about $14 per month. Pick it if: you have the basics and want unguided, realistic challenges.
3. PortSwigger Web Security Academy — best free web hacking site
PortSwigger, the company behind Burp Suite, runs a completely free Web Security Academy. It covers the OWASP Top 10 and much more, with interactive labs for each vulnerability class.
- Labs for SQL injection, cross-site scripting, CSRF, SSRF, XXE, deserialization, OAuth and JWT flaws
- Clear explanations before each lab, so you understand the flaw first
- No paywall of any kind
Pros: entirely free and the best resource for web security. Cons: web-focused only; it does not teach network or Active Directory testing. Pricing: free. Pick it if: you want to learn web hacking properly.
4. PicoCTF — best free CTF for beginners
PicoCTF is run by Carnegie Mellon University and is entirely free. It offers hundreds of capture-the-flag challenges by difficulty and category, covering web exploitation, cryptography, forensics, binary exploitation and general skills.
- Hundreds of challenges with clear difficulty levels
- An annual competition plus year-round practice
- Good for building problem-solving habits
Pros: free, well designed, and friendly to newcomers. Cons: CTF skills do not always map directly to penetration testing work. Pricing: free. Pick it if: you learn best by solving puzzles.
5. OverTheWire — best for Linux skills
OverTheWire is a classic series of wargames that teach Linux command-line skills, networking and basic exploitation. The Bandit wargame is the usual starting point for complete beginners.
- Bandit teaches Linux commands one level at a time
- Later wargames cover networking, cryptography and exploitation
- Free, with no account needed for the early levels
Pros: the fastest way to get comfortable on the command line. Cons: text-based and old-fashioned in style. Pricing: free. Pick it if: Linux still feels unfamiliar.
6. PentesterLab — best for web and code review
PentesterLab focuses on web vulnerabilities and code review, with exercises that show both the attack and the vulnerable code behind it. It suits learners who want to understand why a flaw exists, not just how to exploit it.
- Exercises on web flaws, with code-level explanations
- Certificates for completed tracks
- Useful preparation for bug bounty and AppSec work
Pros: teaches the code behind the vulnerability. Cons: much of the content is paid. Pricing: limited free content; paid plans available. Pick it if: you want to move into AppSec or bug bounties.
7. VulnHub — best downloadable machines
VulnHub offers intentionally vulnerable virtual machines you can download for free and run locally. It is the classic way to practise full-machine penetration testing offline.
- Free virtual machines for VirtualBox and VMware
- Machines range from beginner to advanced
- Good for building a home lab
Pros: free and offline; full machines, not single challenges. Cons: you must set up the virtual machines yourself. Pricing: free. Pick it if: you want a home lab.
8. Root-Me — best for varied challenges
Root-Me is a long-running platform with hundreds of challenges across web, network, cryptography, forensics and programming. It suits learners who want variety after finishing the guided platforms.
- Challenges across many categories and difficulties
- Community write-ups and hints
- Free with an account
Pros: huge variety; good for filling gaps. Cons: less structured than TryHackMe. Pricing: free. Pick it if: you want breadth after the basics.
9. HackThisSite — best classic starter
HackThisSite is one of the oldest hacking challenge sites. Its basic missions teach web fundamentals, and its community has been active for many years.
- Basic, realistic and application missions
- Forums and articles from the community
- Free to use
Pros: a gentle, classic introduction. Cons: dated in places; less polished than newer platforms. Pricing: free. Pick it if: you want a low-pressure first challenge site.
10. OWASP Juice Shop — best vulnerable web app
OWASP Juice Shop is an intentionally vulnerable web application you can run locally or in a container. It is one of the most popular targets for practising web attacks, and it maps its challenges to the OWASP Top 10.
- A full, modern web shop with dozens of planted flaws
- Challenges ranked by difficulty, with hints
- Free and open source
Pros: a realistic app to attack, not a single-page challenge. Cons: you must run it yourself. Pricing: free. Pick it if: you want a web app to practise on at home.
11. HackerOne — best for bug bounties
HackerOne is a bug bounty platform where companies invite researchers to find and report vulnerabilities for rewards. It is not a learning site in itself, but its Hacktivity feed and public reports are a rich source of real-world technique.
- Public bug bounty programmes from real companies
- Public disclosed reports showing how flaws were found
- A path from learning to earning, once your skills are ready
Pros: real targets, real rewards, real reports to learn from. Cons: not for beginners; you need solid skills before you start. Pricing: free to join. Pick it if: your skills are ready for real programmes.
12. OffSec Proving Grounds — best for OSCP preparation
OffSec Proving Grounds is the lab platform from the company behind the OSCP certification. It offers practice machines in the style of the OSCP exam, which makes it the most direct preparation for that certificate.
- Practice machines and full lab networks
- A free tier with a rotating selection
- Directly relevant to OSCP preparation
Pros: the closest practice to the OSCP exam. Cons: best used after the basics, not as a first lab. Pricing: free tier available; paid labs available. Pick it if: you are preparing for the OSCP.
How do you choose the right site?
Choose by level, not by reputation. If you are new, a guided site such as TryHackMe will teach you faster than an unguided one, because you will not spend hours stuck on the first step.
Choose by goal as well. Web hacking means PortSwigger Academy and Juice Shop. Linux means OverTheWire. A penetration testing career means Hack The Box and Proving Grounds. A bug bounty career means PentesterLab, then HackerOne.
Try two or three free tiers before paying for anything. The free content on TryHackMe, Hack The Box and PortSwigger Academy is enough for the first few months, and it will tell you which style suits you. For a full timeline, see our guide to how long it takes to learn cybersecurity.
Free vs paid: what do you actually get?
Free tiers give you real learning. TryHackMe's free tier includes hundreds of rooms and an hour of AttackBox a day. Hack The Box's free tier includes the Starting Point track and rotating machines. PortSwigger Academy, PicoCTF, OverTheWire and VulnHub are entirely free.
Paid subscriptions add more machines, more paths, and faster access to new content. They are worth it once you have finished the free material and want to keep going at the same pace. They are not needed to start.
Do not pay for several subscriptions at once. Pick one, finish its beginner path, then decide whether to renew or switch. Your time is the scarce resource, not the subscription fee.
How do you stay legal while learning hacking?
Only attack systems you have permission to attack. That means the labs on these sites, your own home lab, and systems covered by a written agreement or a bug bounty programme's scope.
Never scan or test a real website, network or account because you are curious, even if you mean no harm. Unauthorised access is illegal in most countries, and a bug bounty programme only covers the targets and rules it lists.
Keep notes as you learn. Write down what you tried, what worked, and what you would do differently. Those notes become your portfolio, and they are what employers and bounty programmes actually want to see. Test your defensive instincts too with our free phishing quiz.
The bottom line
The best websites to learn hacking are TryHackMe for beginners, Hack The Box for realistic practice, and PortSwigger Web Security Academy for free web hacking. Add PicoCTF, OverTheWire and VulnHub for variety, and save bug bounties for later.
Start with one site, finish its beginner path, and do a lab every week. That steady practice is what turns reading into skill. You can see how long the full journey takes in our guide to how long it takes to learn cybersecurity.
Frequently asked questions
What is the best website to learn hacking for beginners?
TryHackMe is the best starting point for most beginners. Its guided rooms explain each step, its free tier includes hundreds of rooms, and its learning paths take you from Linux basics to web attacks in order.
Can I learn hacking for free?
Yes. TryHackMe, Hack The Box, PortSwigger Web Security Academy, PicoCTF, OverTheWire, VulnHub and OWASP Juice Shop all have substantial free content. Paid subscriptions add more machines and paths, but the free tiers are enough to learn the fundamentals.
Is it legal to learn hacking on these websites?
Yes, when you use the labs, machines and challenges the sites provide. They are built for practice and you have permission to attack them. Hacking real websites, networks or accounts without permission is illegal.
TryHackMe or Hack The Box: which is better?
TryHackMe is better for beginners because it guides you through each task. Hack The Box is better once you have foundations, because its machines are realistic and mostly unguided, which is closer to real penetration testing.
What is the best website to learn web hacking?
PortSwigger Web Security Academy is the best free site for web hacking. It covers the OWASP Top 10 and more, with interactive labs for SQL injection, cross-site scripting, SSRF and authentication flaws.
Do I need to know coding to learn hacking?
Not at first. You need basic Linux and networking first. Scripting in Python becomes useful later, for automation and for writing your own tools, but you can complete many beginner labs without writing code.
How long does it take to learn ethical hacking?
Expect 6 to 12 months of regular practice to reach entry-level competence, longer if you study part-time. Guided labs speed this up; aim for a few hours of hands-on practice each week rather than only reading.
Sources
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.
Checked against TryHackMe's own lab guides, PortSwigger and the Nmap reference guide.
How we write and fact-check →