The OSCP and Me
Why the OSCP? Â
Iâve been doing software development, but I felt like making a switch to security.  Since I didnât have any experience, I thought the OSCP would help me get my foot in the door.  Itâs widely respected because the exam is hands-on.  Youâre required to break into several machines in 24 hours.  Most of the other certs are multiple-choice.
Background
Iâve done work in iOS and Python. Â Iâve also done some web development (MySQL, JavaScript, PHP, etc.). Â That experience came in handy when I had to modify exploit code and automate grunt work. Â Iâve set up VPS servers as backends, which gave me exposure to Linux. You donât need to be a sysadmin or a developer to pass this course, but you should know the basics.
Course
How much lab time should you sign up for? Â That depends on your background and your schedule. Â If you have a lot of pentesting experience and free time, itâs possible to do it in 30 days. Â If you have solid sysadmin skills and you can code, try 60 days. Â For everyone else, Iâd recommend 90 days.
I signed up for 90 days, and then I extended that by another 30 days. You get a free exam attempt for signing up. Â If you buy more time, they give you another free exam attempt, but they donât stack up. So if you buy 60 days, donât take the exam, and then buy another 30 days, you only get one attempt.
After you sign up, you get a connection pack that gives you access to the lab via VPN. Â They also email you links to the course manual and lecture videos. Â Download those ASAP, since these links expire. Â Also, store backup copies on a USB. Â If you request another, theyâll charge you $100.
Labs
In the lab, there are 50 machines you can break into. Â Â You donât have to do all of them. Some boxes are dual-homed so check every machineâs ifconfig or ipconfig output. Â If itâs dual-homed, there will probably be a network-secret.txt file you can use to unlock the other networks.
The machines are there for you to develop your process. Â This is the single most important thing you can do to prepare for the exam. Â Whenever I got a shell or root, I updated my process to check for that vector. Â
Look for the low hanging fruit. This will help in the exam, as well. Â If youâre stuck, and youâve already done a lot of enumeration, move on the next host, then circle back. Some of the machines rely on an obscure detail thatâs easy to miss. Â Others hosts rely on clues found in another machine, so do your post-exploitation. After a while, youâre going to run out of easy machines, and then youâll hit a wall. Â If youâve never experienced it before, thereâs nothing quite like grinding away, hour after hour, trying one attack vector after another, and getting that sinking feeling that youâve wandered down into a rabbit hole. Â This is when youâll learn the true meaning of the Offsec motto: âTry Harder.â
The forums are your friend
If youâve done your enumeration and youâre still stuck on a machine, check the forums. Â The admins will remove any obvious spoilers. Â Whatâs left is a collection of vague references that will only make sense to someone whoâs done the enumeration.
The forums also cover the course modules as well. Â Sometimes, youâll run into instances where the examples in the manual donât work on your machine. Â When that happens, itâs helpful to ask if it worked for anyone else. Â
I didnât use the IRC channel, but from what Iâve heard, the admins are always going to err on the side of telling you to try harder. Â If youâve shown them youâve done all the enumeration, they might give you a clue.
Scripting
Learn how to script everything with Python, Perl, or bash. Â This applies to both enumeration and post-exploitation. Â There are a number of scripts that do enumeration for you, but you should also look around manually as well. Â Check the userâs home directories, desktop, /etc/, and anything that looks interesting.
Backups
If youâre running Kali in a VM, take frequent snapshots. Â Try to take one daily, or after youâve made progress on a host.
Metasploit
Learn to use Metasploit, but donât rely on it. Â In the exam, they only let you use the post and exploit modules on one host. Â You can use multi/handler, meterpreter, and msfvenom on any host, so familiarize yourself with them. Â Lastly, donât give up if a payload doesnât work. Sometimes, you just need to try a different one.
Before the exam
Offsec will give you a link to the exam instructions ahead of time. Â Be sure to read ALL the directions. Â In particular, read the part about how to do proper screenshots for the proofs. Â If your monitor canât fit all the lines in one screenshot, try temporarily decreasing the font size of the terminal app. Â Also, make sure you have your shells, privesc exploits, and other files organized into folders, for quick access.
Exam
For the exam, there are five hosts, each of which is worth 10-25 points. You need at least 70 points to pass. Â To get full points, you need to get root on a machine. Â Getting a limited shell only gives you partial credit. Â
At 2 PM, they emailed me the connection files. Â I logged in and started scanning the network. Â The first scan found some interesting ports, so I worked on those, while the other scans completed. I also started brute-forcing the directory names and logins. Â Â At 8 PM, I got a limited shell on a 20-point machine. Â At 2 AM, I got admin access on the machine. Â I hadnât been working on just that one machine the whole time. I had been doing research on all the services I found on the other machines, so I had promising leads on most of them.
Around 5 AM, I got a shell on a 25-point machine. Â Two and half hours later, I got the privilege escalation working. Â After a nap, I worked on the buffer overflow machine. Â If youâve done the homework, you shouldnât have a problem writing the exploit. Â I had 70 points, which was enough to pass, but I wanted some more just in case. Â At 12:30 PM, I knocked over the 10-point machine, giving me 80 points. Â For the last 20-point machine, I had a pretty good idea of what I had to do to get a shell. Â I had done something similar in the labs, but this one had a different feature. Â After you pass the exam, they give you access to a âgraduateâ forum, so I found out I had been on the right track. Â Anyways, at that point, I had been up for 22 hours, so I called it a day.
Overall, I thought the exam machines were more straightforward than some of the lab machines. If you do your enumeration properly, you should be able to pass. Â
Report
After staying up all night for the exam, I crashed and slept in. Â I then relaxed for a few hours before starting the report. Â Mistake! Â Start your report ASAP after you wake up. Â Better yet, start setting it up before the exam. Â If youâre not a MS Word guru, you donât want to fiddle with the formatting while youâre in a rush. Â Before you start the exam, open up the report template and look at the vulnerabilities section. Â There are two sample entries (IP address, severity, remediation, etc.) Â Due to the formatting, copy and paste doesnât work as well as you think it would. Â Have multiple blank entries ready to go, each with the same formatting as the sample ones. Make sure each item has a source code section. Â You can always delete that if you donât need it. Â Â
Other tips:
Make sure you save multiple copies while youâre writing the report. Â
Fill in the report directly. Â I wrote mine in Keepnote first, and then transferred it, which took longer than I expected.
If you donât know what a vulnerabilityâs severity rating is, look it up on cvedetails.com.
Pay attention to the directions for submitting your report. Use the web app to submit your report. Â Their server rejected my email because of the pdf attachment.
After the exam
After the exam, Offsec emails you the result within 3 business days. Â I got an email a day later:
I received my certificate a month after the exam. Printed on the folder were the words, âI tried harder.â
Whatâs next?
Getting a job.  In the meantime, Iâm working on appsec.  The course covered it, but not in depth.  Iâm working through this book and also learning how to use Burp Suite. Â













