You are on page 1of 10

HowToHack Template BinaryTENSHi

How To Hack
Setup PentestLab







Topic:
In this Paper, well go through the steps of creating a pentesting lab utilizing virtual ma-
chines and Oracles VirtualBox


Author: BinaryTENSHi
Last modified: 4/20/2013

HowToHack Template BinaryTENSHi
- 2 / 10 -
Contents
0x00 About me ........................................................................................................................................ 3
0x01 What is a pentesting lab? ............................................................................................................... 4
0x02 Prerequisites for a pentesting lab................................................................................................... 5
0x03 Setting up the pentesting lab ......................................................................................................... 6
0x04 Using the pentesting lab ................................................................................................................. 9


HowToHack Template BinaryTENSHi
- 3 / 10 -
0x00 About me
First of all, I would like to say, Im NOT a native English speaker. I live in Switzerland, so my first lan-
guage is German. Although I do my best in writing correct and logical sentences, there may be mis-
takes which I just didnt see or didnt know about. I appreciate every (constructive) feedback, which
you can either post in the HowToHack subreddit (where I usually post my stuff), the HowToHack IRC-
server or via email.
That aside lets start with the real about me:
As of this writing, Im a software developer apprentice mainly coding in C# and Java. If you google my
username you immediately find my steam profile, twitter account and more. Its a unique name
which has its origin deep inside me. Binary because of the whole computer stuff, with which I basical-
ly grew up and learned to read and write even before I went to school. TENSHi on the other hand is a
bit special. It translates from Japanese () into angel. Its Japanese, because I love the Japanese
culture, Anime, Manga, which you can clearly see of all my backgrounds and avatars Im using, and Ill
eventually move to Japan after I finished my apprenticeship here in Switzerland. Why angel? Its a
quote from an anime called Angel Beats. Watch it. Its amazing.
About my skill:
Im not a netsec-specialist, I dont have any certifications whatsoever and I dont work for a security
company. I do this whole netsec, hacking stuff for fun. Its my hobby. All of the things I learned over a
few years are self-taught with the help of the internet, online papers, various experiences and the
HowToHack subreddit.
Why am I doing this?
Because I think, its fun. I like researching about IT stuff and like to help the community. So I though
writing a tutorial series would benefit both, the community and me.
[Insert question here]?
This paper isnt about me. If you have any question regarding me, contact me via email, reddit, the
HowToHack IRC-server or Steam.

HowToHack Template BinaryTENSHi
- 4 / 10 -
0x01 What is a pentesting lab?
If you have read my previous Tutorial on how to setup a Backtrack machine, then I think youre
pumped up to hack some stuff. Maybe you think, 'Hey! Let's get out in the wild internet and hack
every server on our way'.
Well, here's the problem: The law.
While you could go out into the wild and search for targets, it is not recommended. If you get caught
(and you will, if you don't know how to hide yourself), that'll be probably the end of your career.
So let's not do that, ok? But how can we train our hacking skills you might ask? That's where a pen-
testing lab comes into play. It's essentially a network built by you, with computers of all OS and ver-
sions in it, so you can mess with them in a safe environment without breaking the law. Sounds good?
Alright, let's setup one!

HowToHack Template BinaryTENSHi
- 5 / 10 -
0x02 Prerequisites for a pentesting lab
Before we can setup a nice pentesting lab, we'll need some programs and other stuff, which is listed
below:
Virtual pentesting lab:
1. VirtualBox / VMware Player
2. Images / DVDs from different operating systems
3. A good computer to handle multiple virtual machines

Physical pentesting lab:
1. Physical computers (duh!)
2. Images / DVDs from different operating systems
3. A physical network (meaning: switch, LAN-cables, etc.)

If you haven't followed my previous tutorial on how to setup BT5 in VirtualBox, you'll probably need
to install it first.


HowToHack Template BinaryTENSHi
- 6 / 10 -
0x03 Setting up the pentesting lab
Setting up the lab isn't as hard as it may sound. It's just a collection of some virtual machines hooked
together via a virtual network or over your physical connection.
To get you a small overview how it could look after, here's a screenshot of my (very rarely used) pen-
testing lab.

Image 1 - My pentesting lab
As you can see, I have 3 virtual machines set up. BT5, which I'm obviously use to pentest my lab, a
Ubuntu x64 server and a Windows 7 x64 machine.
If you take a quick look in the "Network" section, you'll see that I use a bridged connection, meaning:
the machines all use my physical network adapter. This is because:

A: I'm too lazy to setup a virtual network, because that's a pain to configure a DHCP for it (I could to
static IPs, but eh I'm not using it much anyways)
B: I'm the only user on my network anyway, so it doesn't really matter

HowToHack Template BinaryTENSHi
- 7 / 10 -
If you don't want your pentesting lab hooked up to your real network, you can either check
http://www.virtualbox.org/manual/ch06.html#network_internal for a guide on how to set it up or
switch to VMware Player / Workstation, in which, if I correctly remember, setting up a virtual net-
work with a DHCP is much easier.
Now comes the tedious part: setting every virtual machine up.
It's not hard but very repetitive:
1. Create a new virtual machine
2. Configure the virtual machine to your likings
3. Mount the OS image / DVD
4. Boot it and install the OS as usual
5. Check if it got an IP and try to ping another machine
And that's basically it. If you can ping every machine from every other machine, congratulations!
Youve made your very own pentesting lab and can learn on without having to fear consequences.

Creating a physical pentesting lab is not much different. It's just much harder to get the required
resources and doesn't give an overly huge benefit.

Image 2 - Create a new virtual machine


HowToHack Template BinaryTENSHi
- 8 / 10 -

Image 3 - Pinging one way

Image 4 - Pinging the other way
HowToHack Template BinaryTENSHi
- 9 / 10 -
0x04 Using the pentesting lab
Now that we took so much time to set this lab up, let's use it. How you ask? Well, that depends. If
you already are an experienced pentester or know what you're doing, you can setup a service (web-
site, ftp-server, whatever) on one of the machines and try to exploit it without fearing consequenc-
es.
But since you're probably a newbie (otherwise this tutorial probably wouldn't have appealed to you)
there are probably not a lot of things you can do right now.
I suggest you pick a subject which interests you and start researching on it. I've put up a small list
down below with some ideas. If you have any questions, don't forget to get onto the IRC-Server.
There are always people to help you. Just be a bit patient.

Subject What to do?
General Learn the basics of Linux:
- Use the command line interface
- Memorize the most used commands
- Know where you can find additional in-
formation to these commands
- Explore the file system

Networking Learn the basics of networking:
- Understand the OSI-Model
- Look at TCP / UDP / ports
- Learn the basics of Nmap

Exploitation Learn how to code:
- C / C++ or Python
- Write basic programs
- Find projects for yourself or online to
program
(games are always fun to program ^^)

Web Exploitation Learn "Websites" and their behind:
- Learn HTML, PHP
- Learn SQL, SQL-Injection
- Look at the HTTP protocol, post / get,
HTTP headers,



HowToHack Template BinaryTENSHi
- 10 / 10 -
Image 1 - My pentesting lab .................................................................................................................... 6
Image 2 - Create a new virtual machine .................................................................................................. 7
Image 3 - Pinging one way ....................................................................................................................... 8
Image 4 - Pinging the other way.............................................................................................................. 8

Thanks for reading!


BinaryTENSHi
binarytenshi(at)gmail(dot)com

Like what Im doing?
Donate to me via Bitcoin:
1Mqsc61X8hVmidsVPT9wCq4PrfJYSSsnr5
If youd like to donate me via other methods, please contact me.

You might also like