happy: OSCP Guide

On December 1, 2019, I woke up for the the reckoning of my PWK/OSCP course. A week later, I received the official notification: I am an OSCP certified.

Reading posts from the beginnining of my pentesting journey like Hello World is a trip. Back then, I had to copy-paste all my bash commands. I couldn’t even use Metasploit at that first capture the flag (CTF) event; I just shift-selected targets and spammed exploits in Armitage! The first time I even installed Linux was a week before the competition. After six months of hacking boxes and slashing exercises, I’ve secured the following competencies in my IT/cybersecurity toolbet:

I also picked up a little Python, C, Perl, and Ruby – languages that made me deeply miss PowerShell and C#. Not only am I more comfortable with pentesting/CTF, I also feel more confident as a sysadmin because of the Linux, networking, and cryptography skills I learned from the course. My new skills and fancy certification are 100% worth the $1,000 pricetag. Here’s my perspective about preparing for and passing the OSCP.

Lifestyle

I’m currently reading Dr. Matthew Walker’s Why We Sleep and highly recommend his insights for anybody who values their mind or body. 7-9 hours a night is hard to do with military obligations, personal goals, and OSCP cramming; it didn’t always happen. But when I did fully recharged, I could summon the creativity and attention to detail required to bring down elusive lab boxes. In any long-term cognitive challenge but especially during OSCP prep/exam, do your best to get ample sleep.

I stayed up for 46 hours with only a three-hour nap when I took the OSCP exam. My circadian clock was obliterated: I couldn’t get a full night’s sleep for days. The aftermath impacted my body, job, and emotional health. I learned an important lesson from the experience: my mind doesn’t solve problems without sleep.

I managed to solve the three hardest boxes with good flow. I had the minimum required points to pass (70 points) and it was bed time. Instead of going to sleep, the addict/completionist in me decided to bang out the last two boxes. In the end, I couldn’t even solve the easy 10 pointer! I watched my lab time tick down to Zero through a haze of sleep deprivation before passing out for three hours.

Sleep deprivation didn’t make report-writing any easier, but the progress was at least linear. Concetration happened in bursts after involuntarily microsleep. Logical, grammatical, and formatting errors were pervasive. My only defense was obsessive double-triple-sextuple checking the report. The process was agnonizing – especially because losing one point would prevent me from passing. I don’t like caffeine but I’m sure a Monster would only have made my anxiety worse.

Everyone has their own habits and balance requirements. Personally, I will never again sacrifice sleep for so little gain.

Preparation

TJNull’s guide provides tons of technical resources for the exam. I will expand on soft skills that helped me learn the course material efficiently.

Two hours/night over six months was a comfortable amount of time for me to pass the OSCP. Invest your time wisely and you will succeed.

I started by following walkthroughs of retired machines on Hack the Box. This gave me familiarity with pentesting tools and methodology. When my course started, I paused my HTB premium account and worked solely in the labs.

The course exercises were fantastic for bootcamping the large volume of specialized pentesting knowledge. If I could redo my time investment, I would complete all the exercises ASAP instead of fucking around in the lab environment. Completing exercises is a straightforward, stress-free endeavor: just knock them out consecutively and document your answers in a massive Word document.

I HIGHLY recommend submitting a penetration test report for the lab and exercises. Writing the lab report enabled me to autopilot the exam report when I was drunk on sleep deprivation.

I also HIGHLY recommend reading the official exam rules. I didn’t read the rules before documenting my lab machines and my screenshots reflected that fact. I risked my bonus points while on the cusp of failing because of carelessness.

After losing my lab time, I prepared for the exam through Hack the Box. These months were an on-and-off struggle against other priorities. I procrastinated and didn’t boot Kali for about a month before setting a date. Having a concrete deadline forced me to squeeze out some study time for OSCP. With study time, I completed ~50% of TJNull’s boxes before the exam date hit.

In Short:

The Exam

Mental clarity is incredibly important for the exam which means that you will need:

I bought 4 Subway wraps and a pack of cigarrettes for the exam. I usually don’t smoke but it’s a great excuse to leave the room and recover some sanity.

I hit the exam with a running start, easily rooting three high-point machines for 70 points in 12 hours. I rationed my smoke breaks, took frequent walks, and fueled my body with healthy stuff. Then frustration hit on the fourth box, which quickily turned into obsession.

Do not get frustrated in the exam. Best case, you crack a box you would’ve gotten more easily after a full night’s sleep. Worst case, you spend your entire night slamming your head against the box, close to tears, with no success – kneecapping your mental clarity for other exam objectives.

Don’t obsess over a box. Accept the real and high possibility of failing. Invest your fucks wisely.

Alex, a good friend, took me to the beach to rebalance my emotions. That made all the difference for the next part of the exam.

THE REPORT

I passed the OSCP exam because my report was decent, not because I’m a great hacker. The report is arguably more difficult than the boxes, which is tragic for people who fail with more points.

Emphasis on the exam report makes complete sense: OSCP is certifying industry professionals, not 1337 hackers for the dark web. In my experience, IT and cybersecurity leaders value communication skills more than technical skills because they easily translate into business objectives.

Ensure your report is structured and coherent, logically discussing each box’s:

Also include a high (executive) and low (technical) level overview of the report. My high-level overview discussed the penetration test in broad strokes.

My low-level overview detailed the exam objectives and a list of vulnerabilities for each compromised machine.

Beautiful type setting, table of contents, and hyper-referencing don’t hurt. I used a custom LaTeX template based on this one and highly recommend LaTeX to all OSCP journeymen for its stunning document quality.

I will create a sanitized template based on my report but too much stuff is going on rn (which is why this guide took so long to publish). The template will be complete by the next blog post and the repo link will be added here.

Happy

Welp, one goal down… working on some others behind the scenes. Everything I’ve done so far would not have been possible without Reddit, YouTube, and random blog sites. I appreciate the OSINT community a lot so it’s my pleasure to drop these 2 cents into the sea.

Happy 2020 btw

*****
Written by Nibs on 04 January 2020