Table of Contents:

Overview:

After releasing the first version of my PWK/OSCP guide, Offsec released an update to the PWK/OSCP and included a key classification system to help students understand how course designation work. The PWK/OSCP is classified as PEN-200 and after spending some time reviewing the course I decided that I wanted to create an update version to help future students out there prepare for the new PEN-200. For those of you that have read my previous version you will notice there may be some sections that still have the same resources but you will also notice new resources for each section. I have taken to time to make sure that the information and my advice will help prepare for your adventure to take the PEN-200 PWK/OSCP!

For those of you that would like to know about my journey when I took the course and exam, you can find my earlier post here: https://www.netsecfocus.com/oscp/review/2019/01/29/An_Adventure_to_Try_Harder_Tjnulls_OSCP_Journey.html

If you are still going through the old labs and course material, you find the first guide here: https://www.netsecfocus.com/oscp/2019/03/29/The_Journey_to_Try_Harder-_TJNulls_Preparation_Guide_for_PWK_OSCP.html

Dedication:

As always a big shout out goes to abatchy! Without his guide I would have never started exploring for other resources. Thank you for creating your original guide: https://www.abatchy.com/2017/03/how-to-prepare-for-pwkoscp-noob

I also want to thank the following people for taking the time to read and provide feedback for the updated version of this guide:

This guide has been approved by Offensive Security for PEN-200!

A Word of Warning!:

Do not expect these resources to be the main thing you use for obtaining OSCP. When you are ready to take the course, you should expect the following:

  1. Spending a lot of time researching.
  2. Do not expect the student admins or even other students to give you answers easily; put in the effort to research your questions.
  3. Plan to make a commitment to this and have an open mindset to learning new things.
  4. Everyone prepares differently and mentally. Learn to build your own strategy/methodology that works for you when you are improving your practical skills.
  5. Know your tools! There are certain tools that you cannot use for the exam. However, that does not mean you should skip over them. Take some time to understand them because you may have to use them on an actual engagement or in the field.
  6. Be careful when using Automated Tools: Automated tools can improve your performance and reduce the time taken in your methodology when assessing a target. However, the automated tools created by these developers have certain features or create scripts that combine common tools to automate their findings. These tools can miss services or findings that you should be looking for. It would be best if you take the time to understand how things work manually.
  7. Remember Offensive Security motto: TRY HARDER https://www.offensive-security.com/offsec/what-it-means-to-try-harder/

As of now Offensive Security has restricted the following tools:

  • Commercial tools or services (Metasploit Pro, Burp Pro, etc.)
  • Automatic exploitation tools. (e.g. db_autopwn, browser_autopwn, SQLmap, SQLninja etc.)
  • Mass vulnerability scanners (e.g. Nessus, NeXpose, OpenVAS, Canvas, Core Impact, SAINT, etc.)
  • Features in other tools that utilize either forbidden or restricted exam limitations
  • Any tools that perform similar functions as those above are also prohibited. You are ultimately responsible for knowing what features or external utilities any chosen tool is using. The primary objective of the OSCP exam is to evaluate your skills in identifying and exploiting vulnerabilities, not in automating the process.

  • Use Case for Understanding the Tools/Scripts you use in a Pentest: https://www.offensive-security.com/offsec/understanding-pentest-tools-scripts/

Reference: https://support.offensive-security.com/oscp-exam-guide/

Most importantly: Have fun! You will learn a lot from this course, take your time to understand the material and this guide. Do not forget to take breaks and spend time away from the electronics. Trust me you do not want to burn yourself out.

Course Syllabus

The 2nd most important resource that I used to help me prepare for the course: https://www.offensive-security.com/documentation/penetration-testing-with-kali.pdf

From the syllabus I will breakdown each section by providing you the resources I used to prepare for the course. Once I finish going through the syllabus, I will also be providing some extra resources that came in handy. You don’t need to use this guide in order; feel free to jump around as it suits you.

  • General Course Information
  • Getting Comfortable with Kali Linux
  • Linux Command Line Kung-Fu
  • Essential Tools in Kali
  • Getting Started with Bash Scripting
  • Passive Reconnaissance
  • Active Reconnaissance
  • Vulnerability Scanning
  • Web Application Attacks
  • Windows/Linux Buffer Overflows
  • Client-Side Attacks
  • Working with Public Exploits
  • File Transfer
  • Antivirus Bypassing
  • Privilege Escalation
  • Password Attacks
  • Tunnelling/Pivoting
  • Active Directory Attacks
  • Introduction to the Metasploit Framework
  • PowerShell Empire

Section 1: General Course Information

This section provides an overview of what you should expect on the course. The PDF guide you will receive with your course materials contains a list of resources and how you should approach the material and lab environment. I highly recommend to you read the restrictions carefully and the OffSec perception of how a report is created. Those sections are really going to help you understand how you should be taking your notes, writing your report, what to expect when your are testing the lab environment, and also what you should be careful of doing when you are going through the course.

When it comes to report writing and note taking you should be documenting EVERYTHING that you identify. This includes output from scans, screenshots from key findings, your assumptions, and much more. Organizing these notes will pay off in the long term when it comes to writing the report. Remember you can always choose to not include information in the report if you don’t need it. But re-tracing your steps to grab screenshots, tool output, etc. will take valuable time.

Keep in mind that everyone takes notes and builds their reports differently. It is up to you to build your format and layout when you are creating these notes that fits your workflow. You’ll develop and hone this as you go through the exercises and labs. This is a very important lesson.

Here are some resources that can give you an idea of note taking tools, what templates people use for note taking, and how corporations create their pentest reports:

Reporting Tools:

Note/Reporting Pentest Templates:

Pentest Reports:

Screenshot Tools:

Tools to record your terminal input/output:

Script: The script command records a shell session for you so that you can look at the output that you saw at the time and you can even record with timing so that you can have a real-time playback.

Section 2: Getting Comfortable with Kali Linux

Kali Linux Revealed and Online Course: A good foundational course that helped me understand more about Kali Linux and it has a nice Linux Fundamentals section.

Issues or Requests that you think should be added in Kali:

For troubleshooting and support issues:

Other Resources for Kali Linux:

Section 3 Linux Command Line Kung-Fu:

Linux Journey: A huge guide to learn about a variety of different things in Linux. All the lessons are free.

EDX Introduction to Linux:

Explainshell: Awesome resource that parses a variety of man pages from Ubuntu Manage Repository. It breaks down the commands you are using, but it is best to refer to the man pages if you have any questions: .

alt-text

Hands on challenge to get comfortable with Linux:

Books:

Section 4: Essential Tools in Kali

Netcat: The TCP/IP Swiss Army tool. Experiment with this tool and understand what it does because you will be using this almost every day during your course and beyond.

Ncat: A better version of netcat in my opinion. Supports SSL communication and it is part of Nmap.

Socat: A command line based utility that establishes two bidirectional byte streams and transfers data between them. However, it has the ability to to allow multiple clients listen on a port and to reuse connections.

PowerShell is a cross-platform scripting language built by Microsoft that can is used for task automation and configuration management. PowerShell consists of running in a shell or a command-line environment. Unlike most shells, which accept and return text, PowerShell is built on top of the .NET Common Language Runtime (CLR), and accepts and returns .NET objects. PowerShell is a very powerful tool that pentesters use as it is installed Default on Windows and it can also be installed on Linux systems as well.

Resources to learn more about PowerShell:

Books:

Hands on Challenges for learning PowerShell:

PowerCat: A powershell version of netcat. The script can be downloaded onto a Windows target to transfer files, return a shell, or create payloads that we can call back from our target. https://github.com/besimorhino/powercat

TCPDump: Command line base Network Analysis Tool. Very useful and good to know if you are on a system that does not have a GUI. Here is a good cheat sheet I used for tcpdump when I needed to troubleshoot my exploits: https://www.andreafortuna.org/technology/networking/tcpdump-a-simple-cheatsheet/

Wireshark: GUI based Network Analysis tool. There a lot of free PCAP samples online that you can use to understand how Wireshark works. Be careful with downloading some of these PCAP files because they may have malware in them; make sure you read where the PCAP is from before playing :D

PCAP Samples:

Section 5: Getting Started with Bash Scripting

The bash Guide: A good guide to get you into the bash scripting

Resources to learn more about Bash Scripting:

Example Templates for writing your own Bash Scripts:

Section 6: Passive Reconnaissance

Take some time to learn about these tricks and techniques. They will certainly come in handy!

Google Dorks: Using various google searches that you can find that may expose sensitive information about a target.

Shodan: Shodan is a search engine that lets a user find specific types of computers, network devices, webcams, etc that are connected to the internet using a set of filters for there results.

Reviewing Security Headers on Websites:

Email Harvesting:

Additional Resources: Tools I did not use in the lab but I used them for preparation and they have come in handy for other tests.

Section 7: Active Reconnaissance

Introduction to DNS: If you do not know what DNS is or how it works, here is a great guide that I used to better understand it from Digital Ocean: https://www.digitalocean.com/community/tutorials/an-introduction-to-dns-terminology-components-and-concepts

If you think you have a good understanding of what DNS is then you will also need to understand how to perform forward and reverse lookups. In addition, you should also know how zone transfers work and how to perform them. Performing these tests will certainly help you better understand what your targets are in the lab. For more information about these techniques check out this article here: https://resources.infosecinstitute.com/dns-enumeration-techniques-in-linux/

Tools for DNS Enumeration:

Network Scanning:

Nmap: A tool that you should 100% totally learn about. You will probably use this everyday (If not most of the time while you are in the lab). I highly recommend you take some time to learn what the tool does, how each command switch works, each scanning technique you can run, and any other capabilities. Nmap is a powerful tool that has the ability to determine what hosts are online, what services they are running, what operating system is running on that host, and dozens of characteristics. In addition, one of the most powerful features that you should also learn is the Nmap Scripting Engine (NSE). With NSE scripts you have the ability automate a wide variety of networking tasks for your scans including vulnerability detection and exploitation. Here are my resources that I used to learn more about Nmap:

Masscan: A powerful tool that can be used to scan a set of requested ports against your targets. As Robert Graham says “this can be done in less than 6 minutes at around 10 million packets per second”.

Daniel Miessler guide to using Masscan: https://danielmiessler.com/study/masscan/

Service Enumeration:

There are a variety of services running on so many systems…take the time to understand them! Do not just scan them and move on. Take some time to look at each of them because they could be a key for you to obtain shell access on a system!

Abatchy provided a link from 0day security that gave me a lot of ideas and things to look for that I may have missed when I skipped some the of the services in the lab. The original link is dead but you can find copies of it on the wayback machine: https://web.archive.org/web/20200309204648/http://0daysecurity.com/penetration-testing/enumeration.html

Section 8: Vulnerability Scanning

I did not spend too much time in this section for preparation because vulnerability scanners are simple and easy to configure. In addition, the purpose of a vulnerability scanner is to identify security holes in services or in a operating system. These scanners rely on a database that contains the necessary information needed to conduct a scan. A word of caution! Be careful when you use vulnerability scanners on your targets because there is a chance that some of the plugins or features can cause an impact to your target such as taking down that service, locking out user accounts, and even crash the system.

The update replaces OpenVAS and students will learn how to use use Nessus. Nessus is more stable on Kali Linux and it has a simple straightforward interface. I also was able to use the Nessus Essential key for most of my testing and to help me get familiar with how these vulnerability scanners work. Nessus is a real popular tool for vulnerability scanning in the infosec world and I certainly encourage you to play with it!

For instructions on how to install Nessus on Kali Linux you can find it here: https://www.tenable.com/blog/getting-started-with-nessus-on-kali-linux

For obtaining a Nessus key you can grab one here: https://www.tenable.com/products/nessus/nessus-essentials

Section 9: Web Application Attacks

I went back to this section and I really enjoyed how OffSec took the time to go more in-depth on how you should build your web assessment methodology. After all web apps are starting to become more popular to see on pentests.

As a pentester you need to gather information about the web application. For instance you should ask yourself these questions:

  • What is the purpose of the application?
  • What language is the web application written in?
  • What version is the web application running?
  • How is the web application being hosted?
  • Does the web application connect to a database? If yes; what is software the database is using and what version is it?

Identifying the components of the web application will allow you to proceed to the next phase by enumerating the components/issues you identified instead of running an exploit blindly against the web application. As always enumeration is something that pentesters must continue to do when reviewing all possible attack avenues that could compromise the web application.

Things to check for when you are enumerating a web application:

Reviewing URLs:

  • File Extensions
  • routes
  • hidden web directories (sitemaps like robot.txt or sitemap.xml)
  • non-standard ports

Reviewing the content of the web page:

  • Always review the source code of the web page!
  • Inspect every element to see how the web app works
  • Review the request and response headers to understand how the web application behaves when you make certain actions to it.
  • Check for admin consoles (Ex: Wordpress applications will have a directory /admin that can be used to access the Wordpress Admin Console)

Tools for finding Web Vulnerabilities and conducting Web Attacks:

Web Directory Scanners:

These tools are designed to brute force site structure including directories and files in websites. These tools can be able to identify hidden directory structures or webpages that can come in handy when you are in the labs or during your assessment. Each tool listed has there own set of advantages/disadvantages depending on what you are trying to use them for.

BurpSuite:

A popular web application vulnerability scanner that contains a variety of features and plugins to identify web vulnerabilities on certain web applications. The tool uses an interception proxy that connects to your browser to route traffic through the Burp Suite proxy client. Once the interception proxy is configured you can start capturing and analyzing each request to and from the target web application. With theses’ captured requests a penetration tester can analyze, manipulate, and fuzz individual HTTP requests in order to identify potential parameters or injection points manually.

BurpSuite Resources:

Nikto (Created by Chris Sullo & tautology0):

A web server scanner which performs comprehensive tests against web servers for multiple items. This tool can be able to scan for vulnerabilities on the web application, checks for server configuration that include multiple index files, HTTP server options, and will attempt to identify installed the version of the web server, and any plugins/software that is running on it. Please keep this in mind that this tool is can be very noisy when scanning a targets web server.

Link: https://cirt.net/Nikto2

HTTPIe https://httpie.io/:

A tool that is designed for testing, debugging, and generally interacting with APIs & HTTP servers. The http & https commands allow for creating and sending arbitrary HTTP requests.

Exploiting common Web-based Vulnerabilities:
Exploiting Admin Consoles:

When an administrative login panel is left exposed it can make it significantly easier for attackers to compromise that site, depending on the security and permissions that web developer/application have implemented. As pentesters we can execute techniques such as brute forcing, signing in with compromised credentials/obtaining credentials, or in the case of unpatched systems, access by exploiting the administration login page.

In case you would like to see some examples you can find many of these whitepapers on the Exploit Database: https://www.exploit-db.com/search?q=Authentication+Bypass

Exploit Examples:

OWASP:https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)

  • Directory Traversal Vulnerabilities:

OWASP: https://owasp.org/www-community/attacks/Path_Traversal

SQL Injection Tools: I would not recommend using these tools until you have a clear understanding about SQL Databases and how a SQL Injection works. These tools below make it easy to automate the process for conducting a SQL Injection but it is possible that they can causes issues to a targets SQL Database. Here are a list of tools that I have played with to get a better understanding of how you can automate SQL Injections:

Hands on areas to improve your web attack skills:

Link to download the machine: https://metasploit.help.rapid7.com/docs/metasploitable-2

Backup Link: https://www.vulnhub.com/entry/metasploitable-2,29/

Section 10: Buffer Overflows for Windows and Linux

My favorite section to learn about! The material provided in the PWK was fantastic and really straightforward. Throughout the internet you will probably find a variety of different resources to help you understand how buffer overflows work. With that being said I will provide some of my notes and resources that helped me understand how buffer overflows.

Corelan Team: A huge shout out to these guys because their articles from information security to exploit development are absolutely incredible! They have an article they posted about Stack Based Overflows that gave me a better understanding of identifying a buffer overflow in an application:

Once I finished reading the articles I decided to start going through write-ups and forums where people manually identified buffer overflows in certain applications. With these walkthroughs I used Exploit-DB to check if they had the vulnerable application in many cases. I won’t provide any of these walkthroughs but I will at least provide the binaries that you can use to manually identify buffer overflows.

Linux Binaries:

Vulnerable Boxes:

Other Resources:

Section 11: Client-Side Attacks

Running Client-Side Attacks usually require client interaction so it’s good to have an understanding of how this works and also how you can set one up. For instance, check out the Client Side Attack Section in Metasploit Unleashed: https://www.offensive-security.com/metasploit-unleashed/client-side-attacks/

Social Engineering is one of the most common tactic that can be used to execute a proper client side attack. Depending on the tactic you use and the information you have gathered to plan this attack, you will have a better chance of success for the client to click on it. Here are some client side attacks that are commonly used:

HTML Applications:

Tools to use for HTA Attacks:

Microsoft Office Macros (Maldoc):

Tools to help you build your own Macros:

I would use these tools to learn how to make your own. Be creative when you are building your own Macros as using tools like this will be flagged by AV

Section 12: Handling Public Exploits

There will come a time that you will need to use a public exploit on your target to see if you can obtain a shell on it. With that exploit you may need to modify shellcode or even parts of the exploit to match with your system to obtain a connection from your target. A word of advice: Be aware of the exploits you download from the public! Although these exploits can endanger any system they could also endanger yours. Make sure you review the source code and test the exploits in an contained environment before running them on your actual system.

Before you download a public exploit I would consider you take some time to review the code and understand what the exploit is suppose to actually too. If you do not understand how the code works…do some research!!! I am absolutely positive you can find proof of concepts online and walkthroughs that will explain how the exploit actually works. Not all exploits are going to work right out of the box you will need to configure them to make sure they can reach back to your attacking system. If you do not review the exploit code or make any modifications, then you are running risk that the exploit will fail, crash your target system/service, or it may allow other users to connect into the system.

Places to find exploits:

Tools for finding exploits:

  • Searchsploit: a command line search tool for Exploit-DB

Command Examples:

searchsploit MS-17-010 finds all cases/exploits linked to MS17-010

root@kali:~# searchsploit ms17-010
--------------------------------------------------------------------------------------------------- ----------------------------------------
 Exploit Title                                                                                     |  Path
                                                                                                   | (/usr/share/exploitdb/)
--------------------------------------------------------------------------------------------------- ----------------------------------------
Microsoft Windows - 'EternalRomance'/'EternalSynergy'/'EternalChampion' SMB Remote Code Execution  | exploits/windows/remote/43970.rb
Microsoft Windows - SMB Remote Code Execution Scanner (MS17-010) (Metasploit)                      | exploits/windows/dos/41891.rb
Microsoft Windows Server 2008 R2 (x64) - 'SrvOs2FeaToNt' SMB Remote Code Execution (MS17-010)      | exploits/windows_x86-64/remote/41987.py
Microsoft Windows Windows 7/2008 R2 - 'EternalBlue' SMB Remote Code Execution (MS17-010)           | exploits/windows/remote/42031.py
Microsoft Windows Windows 7/8.1/2008 R2/2012 R2/2016 R2 - 'EternalBlue' SMB Remote Code Execution  | exploits/windows/remote/42315.py
Microsoft Windows Windows 8/8.1/2012 R2 (x64) - 'EternalBlue' SMB Remote Code Execution (MS17-010) | exploits/windows_x86-64/remote/42030.py
--------------------------------------------------------------------------------------------------- ----------------------------------------

Shellcodes: No Result

searchsploit -x /usr/share/exploitdb/exploits/windows/remote/43970.rb: The -x command switch allows you to examine the exploit code or information about the exploit. You can also upload nmap xml files to Searchsploit so it can find available exploits that match your target.

root@kali:~# searchsploit -x /usr/share/exploitdb/exploits/windows/remote/43970.rb

Snippet of the exploit: 
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

# Windows XP systems that are not part of a domain default to treating all
# network logons as if they were Guest. This prevents SMB relay attacks from
# gaining administrative access to these systems. This setting can be found
# under:
#
#  Local Security Settings >
#   Local Policies >
#    Security Options >
#     Network Access: Sharing and security model for local accounts

class MetasploitModule < Msf::Exploit::Remote
  Rank = NormalRanking

  include Msf::Exploit::Remote::SMB::Client::Psexec_MS17_010
  include Msf::Exploit::Powershell
  include Msf::Exploit::EXE
  include Msf::Exploit::WbemExec
  include Msf::Auxiliary::Report

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Code Execution',
      'Description'    => %q{
        This module will exploit SMB with vulnerabilities in MS17-010 to achieve a write-what-where
        primitive. This will then be used to overwrite the connection session information with as an
        Administrator session. From there, the normal psexec payload code execution is done.

        Exploits a type confusion between Transaction and WriteAndX requests and a race condition in
        Transaction requests, as seen in the EternalRomance, EternalChampion, and EternalSynergy
        exploits. This exploit chain is more reliable than the EternalBlue exploit, but requires a
        named pipe.
        

Play with some of the other command switches that Searchsploit has because it will make it much easier for you to find exploits on your kali box.

Section 13: Transferring Files to your target:

Depending on the target system you obtain access too you may not have the ability to transfer exploits or other tools you need to that system. With this being said you will need to figure out some techniques to transfer files to and from your target system. Here are a few guides I used to get a better understanding of how to transfer files onto Windows and Linux systems:

Python Modules to run services to transfer files:

  • python2 -m SimpleHTTPServer 80 Spins up a webserver in the directory you are located on port 80.
  • python3 -m http.server 80 Spins up a python version 3.X web server in the directory you are located on port 80.
  • python2 -m pyftpdlib -p 21 -w spins up a FTP server in the directory you are located on port 21 and it allows anonymous login access.
  • python3 -m pyftpdlib -p 21 -w spins up a Python 3.X FTP server in the directory you are located on port 21 and it allows anonymous login access.

  • Simple HTTP Server with Upload capabilities: https://github.com/tjnull/OSCP-Stuff/blob/master/Transferring-Files/HTTPServerWithUpload.py

Tools to transfer files on Windows:

For Windows 10, Server 2016/2019:

wget:

  • wget http://127.0.0.1/file.exe
  • wget -O msi-install.exe http://127.0.0.1/file.exe
  • wget -b http://127.0.0.1/file.exe
  • wget --ftp-user=User --ftp-password=ftp://127.0.0.1/file.exe -o msi-install.exe

Other Tools/Resources:

Section 14: Antivirus Bypassing

I did not spend too much time learning about this section since Metasploit encodes it payloads to bypass most anti-virus (well older versions at least). The course is pretty straight forward in this section.

Tools to play with Anti-Virus evasion:

Tools to play with for Obfuscation:

PowerShell:

Python:

C#:

Testing Payloads Publicly. (Keep in mind that submitting your samples to online scanners may be distributed to other AV engines):

Section 15: Privilege Escalation

In this section you will a range of techniques from getting administrative access from a kernel exploit or through a misconfigured service. The possibilities are endless, and make sure you find the ones that will work for you. In order to get an understanding of this section I recommend applying your knowledge through Vulnhub or Hackthebox to improve your skills in this area. I know there are scripts for automating this process but at some points those scripts can miss something very important on your target that you need to escalate your privileges. Something you should keep in mind :D.
For this section I am going to break into two parts: Windows and Linux Privilege Escalation Techniques.

Windows Privilege Escalation Guides:

Windows Privilege Escalation Tools:

Token Manipulation:

Other Resources for Windows Privilege Escalation Techniques: https://medium.com/@rahmatnurfauzi/windows-privilege-escalation-scripts-techniques-30fa37bd194

Linux Privilege Escalation Guides: The only guide I probably ever used to help me understand privilege escalation techniques in Linux systems was from g0tmi1k post. This blog is a must that everyone should have for preparing for the OSCP in my opinion. You can find his guide here: https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/

GTFOBins (I have to thank Ippsec for sharing this with me): Contains a curated list of Unix binaries that that have the ability to be exploited by an attacker to bypass local security restrictions on a Linux system. https://gtfobins.github.io/

PayloadsAllTheThings Linux Priv Esc Guide: https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Linux%20-%20Privilege%20Escalation.md

Linux Privilege Escalation Tools:

LinEnum: A great Linux privilege escalation checker that is still maintained by the guys at rebootuser.com. You can find there tool here: https://github.com/rebootuser/LinEnum

One thing that I will mention is if you want to practice your Linux privilege escalation, I highly recommend you take a look at Lin.Security vulnerable box created by in.security! The box was designed to help people understand how certain applications and service that are misconfigured can be easily abused by an attacker. This box really helped me improved my privilege escalation skills and techniques on Linux systems.

Section 16: Password Cracking

In this section you need to understand the basics of password attacks. Identify the differences between Windows (NTLM) hashes and Linux hashes. In addition, you will also need to understand the different tools that you can use to conduct online and offline password attacks. Typically online password cracking involves sending attempts to the authentication service; like a web form or terminal service. In offline attacks you will carry out the cracking locally, like using John The Ripper to crack a zip file on your local machine. Here is a list of resources that I have used that helped me better understand how password cracking works:

Introduction to Password Cracking: https://alexandreborgesbrazil.files.wordpress.com/2013/08/introduction_to_password_cracking_part_1.pdf

Offline Tools for Password Cracking:

Online Tools for Password Cracking:

Wordlist generators:

Tools to check the hash type:

Hash-Identifier: https://github.com/psypanda/hashID

Tools to dump for hashes:

Mimikatz: https://github.com/gentilkiwi/mimikatz

Mimipenguin: https://github.com/huntergregal/mimipenguin

Pypykatz: https://github.com/skelsec/pypykatz

Wordlists:

Xajkep Wordlists: https://github.com/xajkep/wordlists

Online Password Crackers:

Confusingly these are also online crackers but these are collections of pre-broken hashes (e.g. wordlists that have been hashed) or computing services that you can use to break hashes. I usually went for these first to see if they had the hash cracked in their database. However, don’t use these online crackers as your main tools for everything. Uploading a hash from an engagement can be a huge risk so make sure you use your offline tools to crack those types of hashes. Here is a list of online hash crackers that I found online that you can use to crack hashes:

Other Resources for Password Cracking:

Section 17: Port Redirection and Pivoting

Depending on your scope, some of the machines may not be directly accessible. There are systems out there that are dual homed, which allow you to connect into an internal network. You will need to know some of these techniques in order to obtain access into there non-public networks:

Tools to help you with Port Forwarding and Pivoting:

Online Tunnelling Services:

Vulnerable systems to practice pivoting:

Section 18: Active Directory Attacks:

This was a new section that I was really looking forward to learning about when the new update was released! Active Directory is a popular service that we see running in the real world because it helps system administrators manage their systems, users, services, and much more depending on the size of their organisation.

Active Directory Domain Services can be installed on Windows Server (2000-2019). I highly encourage you to make some time to learn how to install Active Directory on a Windows Server (version of your liking). This will help you get an understanding how to setup your own Active Directory Environment as well.

I have provided some resources to help you get started:

Setting up Active Directory:

Note: Make sure when you are setting up the Active Directory Server that you assign a static IP address to it and also a workstation that you will be joining the server to for further testing. I recommend that you set up a Windows 10 Workstation if you plan to use Windows Server 2016/2019.

Tools to help you automate the installation for Active Directory:

Enumerating Active Directory:

Understanding Authentication protocols that Active Directory Utilizes:

Lateral Movement in Active Directory:

Active Directory Persistence:

Tools for Active Directory Lateral Movement and Persistence:

Other Resources:

Section 19: Metasploit Framework

The only guide that I used to learn more about Metasploit is Offensive Security Metasploit Unleashed course…which is free! https://www.offensive-security.com/metasploit-unleashed/

alt-text

Other Resources: Metasploit The Penetration Tester’s Guide (A super awesome book to read): https://nostarch.com/metasploit

Metasploit Documentation: https://docs.rapid7.com/metasploit/getting-started/

Msfvenom Cheat Sheets:

Section 20: Powershell Empire:

PowerShell Empire is a post-exploitation framework that includes a pure-PowerShell Windows agent that is compatible with Python 3.x Linux/OS X agents. It is the merger of the previous PowerShell Empire and Python EmPyre projects. Recently the Kali Linux team is partnering with BC Security to sponsor PowerShell Empire. This sponsorship provides Kali users with 30-day exclusive early access to Empire and Starkiller before the updates are publicly released to the official repository.

Originally created by harmj0y, sixdub, and enigma0x3. On July 31, 2019 the project was no longer supported and the team at BC Security is now maintaining the most active fork of Empire https://github.com/BC-SECURITY/Empire.

The course does a great job explaining how to use the tool and how can you use it. Here are some resources that you can look into to get an understanding of how PowerShell Empire works:

Other Resources:

Extra Resources

This concludes the resources I have used that helped me understand the course syllabus. Now I will share with you some tips and extra resources that I used to prepare for the PEN200 PWK/OSCP.

Setting up your Pentesting Environment:

The course recommends that you are using VMware products to run the custom Kali Linux image that they have created. Windows users can purchase VMware Workstation or use their free program VMware Player. As for MAC Users you will need to use VMware Fusion. If you would like to download the custom Kali Linux System for the PWK you can find it here:

Keep in mind that the virtual machines hosted on Offensive Security are updated by the Kali Linux Team. The new PWK does not require you to use a custom Kali system they have made. You can use the latest version that the Kali Linux team maintains to complete the labs/course exercises.

Another virtual machine I created was a Windows 7 32-bit system to spin up any vulnerable applications I needed to debug or to check if I could obtain a shell from them. You could also create a Windows 7 64-bit system as well but some of 32-bit applications may not work properly as they would on an actual 32-bit system. This practice is great to implement in case you are stuck on a windows system that is running a service that for some reason you cannot obtain a shell on.

For Active Directory preparation I created a Windows Server 2019 and a Windows 10 Pro virtual machine to join to the AD environment I created. There are a few good guides on setting up AD environments in your own lab:

If you are interested in expanding your enviroment and wondering how you can do that I wrote a guide to help you get started on building your own homelab:

Wargames/Hands-on Challenges:

I know I stated theses before but I am going to reiterate this:

OverTheWire Bandit: A good set of fun Linux challenges to get yourself familiarizes with bash and Linux. Abatchys walkthrough really helped me here:

OverTheWire Natas: A good set of simple web application challenges. These challenges will help you understand the basics you need to identify issues in web applications. Check out this walkthrough here: https://infamoussyn.wordpress.com/2014/02/05/overthewire-natas-level-0-16-writeup-updated/

UndertheWire: Probably my favorite place for challenges because they contain a huge set of PowerShell challenges. You can find their challenges here: http://www.underthewire.tech/wargames.htm

Root-me.org A huge place that has challenges for almost everything in cybersecurity. For instance, you will see challenges in the following areas:

  • Network Forensics (Packet Analysis, Captured Traffic, Network Services)
  • Programming (C, PHP, Java, Shell-coding)
  • Reverse Engineering (disassemble applications)
  • Web Applications and Client Challenges.
  • Forensic Challenges.

Spend a few minutes going through some of these!

SANS Holiday Hack Challenges: https://www.holidayhackchallenge.com/past-challenges/

Capture the Flag Competitions (CTFs)/Cyber Competitions:

I know some of you are reading this are probably skeptical on why I added this…well to be honest the cybersecurity careers that we are in are not a normal 7am-3pm job…it is a lifestyle. I understand for many of us that it is hard to set some time to do all of the things in this field and that is totally OK! If you have the time or if you already can, set some time out of your busy schedule to do a CTF. Go ahead and hack all of the things that many of these CTFs provide as challenges. Trust me you will learn some cool things in a CTF that not even a class may be able to teach you. Personally, competing in CTFs did help me in this course and also it gave me a better understanding of what things I should be looking for instead of jumping into rabbit holes!

Also do not be scared to compete in a CTF if it is your first time! Everyone has to start somewhere in their journey you just have to keep pushing forward. So, go out there and find some CTFs whether they are local to you or online make some time and have confidence in doing them.

If you cannot find any local CTFs check out CTFTime for online competitions that you can participate in. A lot of the cyber competitions in the past few years really helped me build my skills and I still go out once in awhile to find a CTF to compete in for fun 😊. You may also find CTF’s that Offsec sponsors where you can be able to win a PWK voucher!

Vulnerable Machines:

Boot-to-Root Vulnerable Machines! These machines are excellent to help you build your skills for pentesting. There are places where you can download them and run them on your system to begin practice or places where you can connect to their range and start hacking into the targets they have. Most of them result in obtaining root or Administrative/System level access in the end. Personally, my three favorite places are Proving Grounds, Hackthebox and Vulnhub.

Keep in mind that the boxes that you assess on these platforms should be used as a way to get started, to build your practical skills, or brush up on any weak points that you may have in your pentesting methodology.

When you are comfortable to take the course, It is encouraged that you try to go through every system that is in the PWK/OSCP lab environment, as they will provide better insight for when you attempt to the exam itself.

Proving Grounds:

Offensive Security has released their own private lab environment where you can practice your pentest skills with the boxes they provide online. The platform offers two tiers PG Play and PG Practice. PG Play brings the boxes from Vulnhub to life and provides dedicated access by connecting to their environment through a VPN or you can use the in base Kali Linux browser system. Keep in mind that PG Play only allows you three hours per day to assess a system in the Play environment. They only provide Linux boxes as well but this could change in the future.

PG Practice includes all of the features and removes the three hour time limit but Practice also offers Linux and Windows boxes that you can use to improve your pentesting skills as these boxes are created by Offsec Experts. Some of the systems you may notice were old Offsec Exam machines that you can assess to sharpen your hacking skills.

With the approval from Offsec I have created a list of boxes that I have gone through that I believe were OSCP Like. You can find the list here and check for updates that I will add to the list in the future:

alt-text

HackTheBox:

An online penetration testing platform that contains a variety of machines to help you improve your penetration testing skills. For those who have not gone through the registration you will need to pass a challenge to generate yourself an activation code. Once you have generated your activation code, then you will have the ability to access their range. In the free tier you are allowed to play with the 20 active machines they have and they cycle a new system in the range every week and retire an old one there as well. If you want to access to their retired machines you will have to get VIP access. It is a very affordable in my opinion, and worth it to invest in. If you do not have the funds to invest into Hackthebox, do not worry because you can certainly find these walkthroughs online (once the boxes are retired). One place I would definitely recommend to look at is IppSec Hackthebox Walkthroughs on YouTube! I love watching his videos because he goes through step by step on how to obtain access onto the target and how to escalate your privileges to obtain root access. Each box has a different scenario and IppSec always has something extra to throw in when he is doing his walkthroughs.

With that being said I created a list of all of boxes that I did in Hackthebox that I thought were OSCP Like. You can find them here and also check out IppSec playlist he created from the list I recommended to start watching!

alt-text

I will continue to be updating this list in the future, and if you would like to keep it around you can find it here and on NetSecFocus: https://docs.google.com/spreadsheets/d/1dwSMIAPIam0PuRBkCiDI88pU3yzrqqHkDtBngUHNCw8/edit#gid=1839402159

HTB Boxes to Prepare for OSCP (Youtube Playlist): https://www.youtube.com/playlist?list=PLidcsTyj9JXK-fnabFLVEvHinQ14Jy5tf

Ippsec Rocks: https://ippsec.rocks/?#

Vulnhub:

Just like Hackthebox, except you have to download the vulnerable machines and run them on your local system. You will need VMware or VirtualBox (I recommend VMware workstation) to run these vulnerable systems. Please make sure that you are running these vulnerable systems on an isolated network and not on a public network.
Thanks to g0tmi1k and his team for hosting this site and to the creators who submit these vulnerable machines. I have also created a list of vulnhub machines that I have found to be OSCP-Like as well. You can find them here and on NetSecFocus:

alt-text

I will continue to update this list and if you would like a copy for review you can certainly find it here: https://docs.google.com/spreadsheets/d/1dwSMIAPIam0PuRBkCiDI88pU3yzrqqHkDtBngUHNCw8/edit#gid=0

Rooting Vulnerable Machines is extremely important when you are preparing for PWK/OSCP because you can’t depend on theoretical knowledge to pass. Improving your hands-on skills will play a huge key role when you are tackling these machines.

Tips to participate in the Proctored OSCP exam:

As of August 15th, 2018, all OSCP exams have a proctored exam. This means that a student will be monitored by an Offensive Security staff member through a screen sharing and webcam service. If you would like to learn more about this new proctoring process you can find it here: https://www.offensive-security.com/offsec/proctoring/ Before I took my exam, I had to go through a variety of things to make sure I was prepared to take my 1st attempt. Even with my preparation, I lost 30 mins of my actual exam time due to troubleshooting the applications for the proctor on my end. With that being said, here are my tips to help you guys prepare for the proctoring section when you are ready to take the exam:

  1. Make sure your system is able to meet the software/hardware requirements that offensive security provides in order to run these services. You can find that information here: https://support.offensive-security.com/proctoring-faq/
  2. Test your webcam to make sure it works. you cannot use a spare laptop that has a webcam and connect the webcam session onto that system.
  3. The Screen Sharing application needs to be running on your main system that you will be using to connect to your exam.
  4. You can use multiple monitors for the exam. Keep in mind that the proctor must be able to see them and that they are connected to your system. The proctor will notify you about how many screens they see and you will need to confirm them with the number monitors you are using. If you use a system that has a monitor and it is not connected to the ScreenConnect application, then you will not be able to use that monitor for the exam.
  5. Be prepared and log into your webcam and ScreenConnect sessions 30 mins before your exam.
  6. Proctors cannot provide any assistance during the exam.
  7. You can take breaks, a nap, or grab a cup of coffee during your exam. Just make sure you notify the proctor when you leave and when you return for your exam.
  8. Students are not allowed to record their screens while interacting with any of the exam machines.
  9. Also be dressed for your exam. I think that is pretty simple to understand why.

For any other questions you may have you can check out Offensive Security FAQ for Proctored Exams here: https://www.offensive-security.com/faq/

Other Resources:

NetSecFocus Learning Resources:

Offsec Introduction Guide to the OSCP: https://help.offensive-security.com/hc/en-us/articles/360059535932

PWK Learning Path: A very useful resource to help get started on what boxes you should go through in the PWK lab. Some of the boxes they provide also contain hints for the boxes as well:

Books:

Courses that can help you prepare for OSCP:

eLearnSecurity/INE:

eLearnSecurity use to be a great place to learn more about pentesting with the courses they offered. Now that they are owned by INE you now have to buy training from there subscription based platform to learn from the material they offer to be able to obtain the certifications Elearnsecurity offers.

INE Cybersecurity Training: https://ine.com/pages/cybersecurity

eLearnSecurity Certs:

TryHackMe:

A platform to help people grow there skills and learn more about cybersecurity. They have a variety of different rooms you can choose from and they do a good job explaining fundamental concepts in some of these rooms. They also having learning paths that you can complete as well but you may have to pay for them or purchase a subscription to access them.

https://tryhackme.com/

SANS:

SANS provides a wide variety of information security courses. Each of their courses are taught by very smart instructors who have been in this field for a very long time. However, these courses can be expensive if you are unable to get someone to pay for them. You can also try to apply for the SANS workforce training as well to be able to take their courses at a discount. I have taken most of the SANS course and I feel that the following courses below really helped me get a better understanding of what Pentesting is like in the actual field. Here are the courses that I would recommend if you are looking to prepare for OSCP.

Pentesterlabs: A lot of web app pentesting material in this course: https://pentesterlab.com/

Pentester Academy: https://www.pentesteracademy.com/topics

Web Security Academy: https://portswigger.net/web-security

Other OSCP guides:

Other Links:

Conclusion:

Well then! It seems you have made it to the end of this journey (well not your OSCP journey if you decide to pursue it!). If you read this entire guide, I certainly give you props for doing so. If you read only parts of it, then I still give you props because the main thing that is important to me is that you learned something from it!

I hope you are able to use my guide in your OSCP journey and are able to learn some new things, just like I did when I started mine. If this guide was able to help you let me know I want your feedback for sure. I thanked a lot of people for helping me with my journey in this guide and I want to thank them again for their time and contributions for helping me learn and grow in the cyber-security field.

If anyone has any questions about this guide or feedback please let me know as you can reach out to me on twitter, discord, or on NetSecFocus!

TJ Null

P.S: Considering this journey as an extra mile, I am going to have to insist at this point for you to…… Try Harder! -Offensive Security