Categories: Kali Linux

Capsulecorp Pentest : Vagrant VirtualBox Environment For Conducting An Internal Network Penetration Test

The Capsulecorp Pentest is a small virtual network managed by vagrant and ansible. It contains five virtual machines, including one Linux attacking system running xubuntu and 4 Windows 2019 servers configured with various vulnerable services.

This project can be used to learn network penetration testing as a stand-alone environment but is ultimatly designed to compliment my book The Art of Network Penetration Testing

Why is this cool?

Setting up a virtual network to learn penetration testing can be tedious as well as time/resource consuming. Everything in the capsulecorp environment is pretty much done for you already. Once you get Vagrant, Ansible and VirtualBox installed on your machine you only need to run a couple of vagrant commands to have a fully functioning Active Directory domain that you can use for hacking/learning/pentesting etc.

Current Functionality

  • Active directory domain with one DC and 3 server members
    • Domain Controler: goku.capsulecorp.local
    • Server 01: vegeta.capsulecorp.local
    • Server 02: gohan.capsulecorp.local
    • Server 03: trunks.capsulecorp.local
    • Wrkstn 01: tien.capsulecorp.local
  • Vulnerable Jenkins server on vegeta
  • Vulnerable Apache Tomcat server on trunks
  • Vulnerable MSSQL server on gohan
  • Vulnerable MS17-010 on tien
  • Xubuntu pentest system running XRDP.
    • Metasploit
    • CrackMapExec
    • Nmap
    • Remmina RDP client
    • RVM
    • Python/Pip/Pipenv
    • Impacket

Requirements

In order to use the Capsulecorp Pentest network you must have the following:

OSX Configuration

In order to manage Windows hosts you’ll have to install pywinrm with pip inside the ansible virtual environment

source ~/ansible/bin/activate
pip install pywinrm
deactivate

Installation

For a detailed installation walkthrough check out the MacOS Setup Guide

Configure Windows Hosts

The first thing you should do is bring up and provision Goku the domain controller. This system will likely take the longest to bring up because the dcpromo stuff just takes a while.

  • Bring up the VM

vagrant up goku

  • Provision the VM

vagrant provision goku

Repeat the above two commands for gohan, vageta and trunks.

…WARNING…

This section of the provision is expected to take a while because after a dcpromo it takes a long time for the system to reboot.

TASK [promotedc : Set a static address to 172.28.128.100] **********************
changed: [goku]

TASK [promotedc : Change hostname to goku] *************************************
ok: [goku]

TASK [promotedc : Install Active Directory Services] ***************************
ok: [goku]

TASK [promotedc : Promote goku to domain controller] ***************************
changed: [goku]

TASK [promotedc : Reboot after promotion] **************************************

Configure Your Pentest Platform

Bring up the virtual machines using vagrant. First cd into the project directory, for example: cd ~/capsulecorp-pentes. Take note of the RDP port that gets forwarded to your localhost.

vagrant up pentest

Provision the pentest machine.

vagrant provision pentest

You can access your penitent machine either using your preferred RDP client to connect to the xrdp listener or via SSH with.

vagrant ssh pentest

R K

Recent Posts

Cybersecurity – Tools And Their Function

Cybersecurity tools play a critical role in safeguarding digital assets, systems, and networks from malicious…

10 hours ago

MODeflattener – Miasm’s OLLVM Deflattener

MODeflattener is a specialized tool designed to reverse OLLVM's control flow flattening obfuscation through static…

10 hours ago

My Awesome List : Tools And Their Functions

"My Awesome List" is a curated collection of tools, libraries, and resources spanning various domains…

10 hours ago

Chrome Browser Exploitation, Part 3 : Analyzing And Exploiting CVE-2018-17463

CVE-2018-17463, a type confusion vulnerability in Chrome’s V8 JavaScript engine, allowed attackers to execute arbitrary…

10 hours ago

Chrome Browser Exploitation, Part 1 : Introduction To V8 And JavaScript Internals

The blog post "Chrome Browser Exploitation, Part 1: Introduction to V8 and JavaScript Internals" provides…

10 hours ago

Chrome Browser Exploitation, Part 3: Analyzing and Exploiting CVE-2018-17463

The exploitation of CVE-2018-17463, a type confusion vulnerability in Chrome’s V8 JavaScript engine, relies on…

13 hours ago