Building Your Own Kickass Home Lab
echo $(whoami)
Jeff McJunkin, Founder of Rogue Valley Information Security
SANS Principal Instructor / Author (SEC580)
Architect of SANS NetWars Experience 4.0 and 5.0
Certifications: GCED, GCFA, GCIA, GXPN, GCIH, GMOB, GPEN, GPYC, GREM, GSEC, GCPT, GSE, CISSP (I may have a problem)
Career:
Desktop/sys/net admin -> web/net pen test -> Counter Hacking -> consulting
Obligatory Table of Contents for today’s talk
Why build a lab?
Hardware
Hypervisor
Software
Stuff on the Internets
Example labs
Why build a lab?
Why build a home lab?
Life is full of interesting questions. By having a home lab, we can have a safe place to find the answers to those questions.
Hardware
Don’t I need a whole lot of hardware?
Credit: reddit.com/r/CablePorn
reddit.com/r/homelab
Whaddya buyin’?
How much RAM do you need, really? 16 gigs? 32?
What if you need more VM’s for a particular exercise?
What if you want to do nested virtualization (VMware Workstation with one or more ESXi VM’s, which have their own VM’s)?
What if you don’t want to pause some VM’s to save RAM when working on others?
Okay, Whaddya Mean By “Kickass”?
Off-lease server and workstation hardware is ludicrously cheap
But what about the SOAF?
^ “Significant Other Acceptance Factor”, obviously
If we could somehow get it into a quiet desktop case, that would be great!
(Power usage is around 60 watts idle, or ~$5/month)
Let’s Talk About Specifics
tl;dr -- Check the next slide
The specifics
Pre-built desktop:
https://www.ebay.com/itm/175147646467
(HP Z440)
Or build it yourself:
https://pcpartpicker.com/list/dshDkX (AMD Zen 3, starting at ~$700 with 8 cores and 64GB memory)
https://pcpartpicker.com/user/jeffmcjunkin/saved/Yh8CrH (AMD Zen 4, starting at $1,100)
https://pcpartpicker.com/list/VTmxMC (AMD Zen 5, starting around $1,100)
Never run more than one Windows machine from a spinning disk.
In fact, in general avoid running VM's from spinning disks :)
Hypervisor
Which Hypervisor Should I Choose?
You can have a home lab without having a Type One* Hypervisor
For most folk, VMware Workstation will run just fine, as long as:
Why not VirtualBox? You can, but pre-built appliances are more often for VMware.
* e.g., VMware vSphere ESXi, Citrix Xen, or Microsoft Hyper-V
But isn’t VMware Workstation less efficient than ESXi?
Yes.
However, it doesn’t really matter.
~85-90% efficiency will suffice for a lab, as opposed to ~95-98% efficiency with ESXi
Software
Microsoft Software
You don’t need to spend a lot of money licensing Microsoft products!
Want full editions for minimal cost?
Pre-Built Linux Appliances
TurnKey Linux
Windows software
Ninite
Stuff on the Internets
Care for your own domain?
Several Top-Level Domains are available for free: http://www.freenom.com/en/index.html?lang=en
(including basic DNS records)
Low $ VPS FTW
Why?
https://www.digitalocean.com/ for $5/month is probably reasonable. Or Amazon EC2 for free, for a year, with some hassle (see slide notes)
Point your NS records (from Freenom or otherwise) at your new public IPv4 addr.
Why not build your own DNS server, too?!
Why not build your own DNS server, too?!
Why not build your own DNS server, too?!
Why not build your own DNS server, too?!
Putting together complex networks?
DO: New vmnet interfaces with Virtual Network Editor
DON’T: LAN Segments through VM Settings
pfSense is a beautiful, beautiful piece of software
A call for simplicity
Example Lab - Basic Enterprise Network, part 1
Basic VM isolation with pfSense, using three interfaces:
Why .254? Because VMware Workstation itself takes .1 and .2
Example Lab - Basic Enterprise Network, part 2
Example Lab - Basic Enterprise Network, part 3
Example Lab - Forensic and Defense Notes
(More details in notes)
Individual VM Challenges
https://www.vulnhub.com/ is a great resource here, complete with walkthroughs!
The SEED Project (https://seedsecuritylabs.org/) has both downloadable VM’s with a specific challenge, and the complete corresponding walkthroughs.
What else can I do?
I hear Counter Hack makes Holiday Hack Challenges for free every year…
They keep them online afterwards, too! Forever!
Well, now you can! Search for “2014 Holiday Hack Challenge” and try it yourself!
2014 Holiday Hack Challenge
Too long; didn’t listen --
Thanks for joining! Any questions?
Twitter: @jeffmcjunkin
Email: jeff@roguevalleyinfosec.com
Slides online at http://bit.ly/kickasslab
Recorded video on YouTube
Bonus Content
Separate email for phishing?
Sure, you can probably use a Gmail account for this.*
Yandex Mail is also free**: https://yandex.com/support/mail/
* But srsly, I’m not a lawyer
** And probably isn’t as good at spam filtering
Care for a gently-used domain name?
More defensive lab projects