There's more...

If you just want to practice and do not want to build your own lab, you can give Hack The Box a try, go to https://www.hackthebox.eu/, and hack your way in. Hack The Box is an online platform that allows you to test your skills through a series of challenges, some simulating real-world scenarios and others using a CTF approach.

For those who still want to practice but like doing things old-school, you can go to https://www.vulnhub.com/download some vulnerable machines, and spin them up on your own hardware.

Get Metasploit Penetration Testing Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.