1 of 35

Making the Mountain

A guide to creating challenging, educational, and enjoyable vulnerable virtual machines.

2 of 35

Introducing vulnerabilities into computers and knowing exactly how to give your sysadmin(s) a heart attack.

3 of 35

whoami

  • Pentester @ State Farm
  • Content Director and Community Manager @ TryHackMe
  • InfoSecLib Lead

4 of 35

Original Article

5 of 35

The heck is a ‘TryHackMe’

6 of 35

Intro

7 of 35

Why should I do this?

  • Learn a ton
    • Setup
    • Testing
    • Exploitation
    • Failure
  • Make a name for yourself
    • Vulnhub is a great example here
    • Boxes are resume items
  • Earn some cash
    • CTF Events
    • TryHackMe Creators Program

8 of 35

Drawing up the Treasure Map

9 of 35

Core Concepts

  • Know your Audience
    • Who is this for?
    • Difficulty
  • Tell a story

10 of 35

Who is your Audience

  • Educational
    • Students
  • Capture the Flag
    • Intermediate to Advanced
  • Competitive/King of the Hill
    • Competitive people, advanced

11 of 35

Difficulty

  • Abstraction
    • How many rabbit holes are there
    • How much is there to do in front of each step
  • Guidance
    • How much wiggle room do you give your users
      • Two open ports versus fifteen ports
  • Timeframe
    • Competitive and Restricted vs. Education Environment
  • Tools in Use
    • Metasploit or No Metasploit/Custom Exploitation
    • Just how many tools are in use

12 of 35

Tell a Story

  • Creation of a skeleton outline
    • Entry point
    • Privesc
  • Give yourself and your audience a roadmap

13 of 35

Warning!

Spoilers ahead!

14 of 35

Blue (Educational)

15 of 35

Killchain

  • Goal: Introduction to Exploitation
  • Recon
    • Open ports and services
  • Gain Access
    • ms17-010

16 of 35

Going Up & Crackalackin

  • Escalation
    • Unnecessary, demonstration of migration
  • Cracking
    • Hashdump > John/Hashcat
  • Flags!
    • Non-standard but in common loot locations

17 of 35

Ignite (CTF)

18 of 35

Killchain

  • Goal: Boot to root
  • Enumeration
    • Discovery of FuelCMS
    • Enumeration of running version
  • Expanded Discovery
    • FuelCMS RCE Exploit via ExploitDB

19 of 35

The root part

  • Exploitation
    • User flag from Exploit DB RCE
  • Privilege Escalation
    • Shared root password with db root user in config

20 of 35

Core Structure

  • Enumeration/Discovery
  • Foothold/User
  • Local Enumeration
  • Privilege Escalation
  • Root

21 of 35

Competitive

  • King of the Hill
    • One box, many users attacking it within a set timeframe
    • Initial start as a red focus with attacking
    • Blue team and defending once you’ve secured ‘king’
  • Essentially just a CTF box with many routes
    • One route per user
    • Separation of users appropriately

22 of 35

Defining and Hitting your Target

23 of 35

The Differences

  • Toolset
    • Exploit DB vs Metasploit
  • Detail
    • Narrowing the path
    • Being a sherpa
  • Expanded Scope
    • Waste not want not

24 of 35

Design Highlights

  • Manage your difficulty level
    • Keeping the ‘path’ narrow
  • Research what you’re using
    • Find the ‘gotchas’ before they find you
      • Kernel flaws
  • Patching!
    • Keeping the box ‘current’

25 of 35

More Design Highlights

  • Make your killchain
    • Having the write-up first
      • Giving yourself a guide
  • Well it was a normal installation until...
  • ‘Connect the Dots’
  • Reward your advanced users

26 of 35

Putting it All Together

27 of 35

Tools of the Trade

  • Hypervisor
    • ESXi vSphere
    • Virtual Box
    • VMware Player/Workstation
  • Exploit DB
    • “Shopping for exploits”
    • Looks for applications which are downloadable

28 of 35

Finishing Up

29 of 35

Checking every box (Literally and Figuratively)

  • history | /dev/null
  • Remove the fluff
  • Patch the rest
  • Avoid password escalation
  • Easter eggs

30 of 35

Tolerances

  • CTF
    • Unpredictability
    • Path of least resistance
  • Educational
    • Guided
    • Detail of material matters significantly
      • Tolerances shifted in this aspect
  • Maintenance Considerations

31 of 35

Polishing Up

  • Testing
    • Issue documentation
    • Remediation vs Annotation
  • Conversion to OVA
  • Upload and Release

32 of 35

Extras

  • Offline Releases/Availability
  • Worksheets
  • Supporting Material
  • How Users Get Help
    • Discord
    • Email
    • Twitter

33 of 35

“Pro-Tips”

  • Use examples
    • Learn from established boxes
    • All of my rooms are cloneable, use them as a starting point if need be
    • Understand how and why these are put together
  • Start at your hardest step
    • I.E. Entrypoint is a web application which is really tricky to set-up
  • Get feedback
    • Have your friends test it
  • Don’t be afraid to mess up

34 of 35

Common Questions

  • How long does it take to make a box?
    • Taking good notes can help here immensely
  • How do I start?
    • Defining a killchain
  • Networked/Multipart Boxes
    • Good documentation
    • Docker is awesome

35 of 35

Questions?

Twitter @darkstar7471

Slides available at https://darkstar7471.com