System Overlord

A blog about security engineering, research, and general hacking.

Another Milestone: Offensive Security Certified Expert

This weekend, I attempted what might possibly be my hardest academic feat ever: to pass the Offensive Security Certified Expert exam, the culmination of OffSec’s Cracking the Perimeter course. 48 hours of being pushed to my limits, followed by 24 hours of time to write a report detailing my exploits. I expected quite a challenge, but it really pushed me to my limits. The worst part of all, however, was the 50 hours or so that passed between the time I submitted my exam report and the time I got my response.


For obvious reasons (and to comply with their student code of conduct), I can’t reveal details of the exam nor the exact contents of the course, but I did want to review a few things about it.

The Course

The course covers a variety of topics ranging from web exploitation to bypassing anti-virus to custom shellcoding with egghunters and restricted character sets. The combination of different techniques to exploit services is also covered. While there are web topics that will obviously apply to all operating systems, all of the memory corruption exploits and anti-virus bypass are targeting Windows systems, though the techniques discussed mostly apply to any operating system. (There is discussion of SEH exploits, which is obviously Windows-specific.)

Compared to PWK, there’s a number of differences. PWK focuses mostly on identifying, assessing, and exploiting publicly-known vulnerabilities in a network in the setting of a penetration test. CTP focuses on identifying and exploiting newly-discovered vulnerabilties (i.e., 0-days) as well as bypassing limited protections. While PWK has a massive lab environment for you to compromise, the CTP lab environment is much smaller and you have access to all the systems in there. The CTP lab, rather than being a target environment, is essentially a lab for creating proofs-of-concept.

My biggest disappointment with the CTP lab is the lack of novel targets or exercises compared to the material presented in the coursebook and videos. For the most part, you’re recreating the coursebook material and experiencing it for yourself, but I almost felt a bit spoonfed by the availability of information from the coursebook when performing the labs. I would have liked more exercises to practice the described techniques on targets that were not described in the course materials.

Depending on how many hours a day you can spend on it and your previous experience, you may only need 30 days of lab time. I bought 60, but I think I would’ve been fine with 30. (On the other hand, I appreciated having 60 days for the PWK lab.)

The Exam

If you’ve successfully completed (and understood) all of the lab material, you’ll be well-prepared for the exam. The course material prepares you well, and the exam focuses on the core concepts from the course.

The exam has a total of 90 points of challenges, and 75 points are required to pass. I don’t know if everyone’s exam has the same number and point value of challenges (though I suspect they do), but I’ll point out that more than one of my challenges on the exam was worth more than the 15 points you’re allowed to miss. Put another way, some of the challenges are mandatory to complete on the exam.

The exam is difficult, but not overly so if you’re well prepared. I began at about 0800 on Friday, and went until 0100 Saturday morning, then slept for about 5 hours, then put in another 3 or 4 hours of effort. At that point, I had managed the core of all of the objectives and felt I had refined my techniques and exploits as far as I could. Though there was a point or two where it could have gotten better, I wasn’t sure I could do that in even 24 hours, so I moved on to the report – I figured I’d rather get a good report and have access to the lab to get any last minute data, screenshots, or fix anything I realized I screwed up. About noon, I had my report done and emailed, and began waiting for results. The fact that my F5 key is now worn down is purely coincidence. :)


  • Be well rested when you begin.
  • Don’t think you’ll power through the full 48 hours. At a certain energy level, you’ve hit a point of diminishing returns and will start even working backwards by making more mistakes than you can make headway.
  • You’ll want caffeine, but moderate your intake. Jumpy and jittery isn’t clear-headed either.
  • Take good notes. You’ll thank yourself when you write the report.


The Cracking the Perimeter class is totally worth the experience. Before this class, I’d never implemented an egghunter, and I’d barely even touched Win32 exploitation. Though some people have complained that the material is dated, I believe it’s a case of “you have to walk before you can run”, and I definitely feel the material is still relevant. (That’s not to say it couldn’t use a bit of an update, but it’s definitely useful.) Now I have to find my next course. (Too bad AWE and AWAE are always all full-up at Black Hat!)

Finding My Inspiration

I’ve been having a lot of trouble lately, feeling like I’m not doing the things I need to do to move towards my personal goals or ensure that I continue to do interesting work. As one of several things I’m trying to do, I’m trying to catalog things that have inspired me recently, or whose work I aspire to imitate. This is a no-particular-order list of classes, presentations, videos, papers, and other that remind me why I love working in Information Security, in hopes that it will help me find my mojo and enthusiasm for what I do again.

Banning Encryption Will Fail... And It's a Bad Idea, Too

There’s a lot of debate going on right now about banning encryption. Now, some people might refer to this as a backdoor or “providing government access” or whatever term they’d like to use to discuss it, but as a security professional, I see only one thing as encryption: the kind that’s completely unbreakable, even by the FBI or the NSA or the Chinese government or anyone else. Anything else is simply not encryption, as it does not guarantee your confidentiality. So, I’m going to talk about banning encryption as equivalent to providing a government backdoor or any of the other clever ways it’s being spun.

First, I want to talk about why banning encryption will fail. Encryption software is a Pandora’s Box, and it’s already open. Attempting to ban all encryption would work about as well as banning nuclear weapons, banning guns, or banning drugs. The war on drugs alone is enough evidence that government bans do not have meaningful impact, and that the people who are affected the most are the innocent bystanders. Strong cryptosystems already exist, and attempting to ban them will result in insecurity for the masses, but criminals will continue to use the existing systems, resulting in no improvement in the ability to fight crime.

Further, so long as any government supports liberty and freedom, there will be other places to get their strong crypto. Even if companies in the United States and the United Kingdom are prohibited from distributing strong cryptography, there are nearly 200 other countries in the world where such software might come from. So, we can assume that criminals will continue to have access to these tools, while the legitimate users are deprived of their use.

So, if the US demands a back door in a previously-secure system, and the author complies, then China comes along and demands a back door, we end up with a swiss cheese of backdoors waiting to fall over. We know that governments can’t secure their own data, so what makes us think they’ll be able to secure their keys for these systems?

America’s constitution is based on foundations of freedom and liberty, and it seems we’ve been scared by our own politicans into giving up these freedoms. Anonymity and privacy are critical to democracy – they allow minorities to express their viewpoint without fear of retribution, they allow groups to organize, and they allow whistleblowers to do so safely. Cases like the breach of the Democrat donor database show how strong encryption could have protected privacy in the political process.

According to Human Rights Watch, “Strong encryption and anonymity are critical for protecting human rights defenders, journalists, and ordinary users in the digital age,” and the United Nations Commission on Human Rights states:

Encryption and anonymity, and the security concepts behind them, provide the privacy and security necessary for the exercise of the right to freedom of opinion and expression in the digital age. Such security may be essential for the exercise of other rights, including economic rights, privacy, due process, freedom of peaceful assembly and association, and the right to life and bodily integrity. Because of their importance to the rights to freedom of opinion and expression, restrictions on encryption and anonymity must be strictly limited according to principles of legality, necessity, proportionality and legitimacy in objective.

We’ve hit upon a critical era for society, and it’s important we don’t lose sight of the freedoms and liberties that have built what we have and have made America great. It’s because I believe in personal liberties that I support the EFF and the ACLU, and consider privacy my single most important issue in the 2016 election cycle.

(Tiny) Tool Release: Pwnpattern

Just a quick note to go with something I dropped on Github recently: pwnpattern is a python library and stand-alone script that replicates most of the functionality of Metasploit Framework’s pattern_create.rb and pattern_offset.rb. The patterns created are identical to those from Metasploit, so you can even mix and match tools.

There are several reasons I wrote this:

  • You don’t need a full copy of metasploit installed for creating patterns for e.g., wargames, CTFs, etc.
  • It loads much more quickly: on my machine, Metasploit’s pattern_create.rb takes 2.29s, my script takes 0.01s. This is due, of course, to dependencies (MSF’s requires the entire Rex library to be loaded) but it is kind of nice to not wait for things.
  • It can be embedded in python scripts (just like Rex can be embedded in Ruby scripts).

BSides SF: Saturday

Much like my notes from BSides Seattle, this will just be a quick dump of notes from the talks I attended today. (Almost) all talks are also being recorded by Irongeek, so this only serves to highlight what I considered key points of the talks I attended. Tomorrow, I’ll be doing my workshop (stop by and say hi) so my notes are likely to be considerably lighter.

Keynote: A Declaration of the Independence of Cyberspace

John Perry Barlow, co-founder, EFF

While not at all a technical talk, John Perry Barlow is an inspiring speaker and an amazing visionary. His appreciation of the politics involved in “cyberspace” is on point, and it really made me think.

While he first related the story of the events leading up to the founding of the EFF, including the writing of the Declaration of the Independence of Cyberspace, but to my mind, the most interesting part of his keynote was the Q&A.

  • What does it mean to be patriotic in cyberspace?
    • First have to define patriotism in general.
      • JPB defines as “allegiance to a common belief system”
    • The biggest threat is dismantling the common belief system under the guise of patriotism: as in the erosion of the bill of rights, etc.
    • The government is currently fighting for cultural dominance
      • It’s a battle that’s beeen going since the mid-60s, government powers are stuck in the 50s, the cold war, etc.
      • Government doesn’t adapt to times well
      • 60s culture is slowly winning, but still not certain
  • How can we create more awareness of the EFF in young professionals & CS students?
    • That’s a really tough question, and if I [JPB] had the answer, the EFF would already be doing it.
    • However, informed individuals sharing the information helps.
    • EFF will continue defending the open network end-to-end.

Scan, Pwn, Next! – exploiting service accounts in Windows networks

Andrey Dulkin, Matan Hart, CyberArk Labs

  • Service Accounts have a variety of properties that make them interesting to an attacker
    • May not have password complexity/expiration
    • Often overprivileged as privileges may be granted to try to fix a problem, even if not needed
    • Account may be used on multiple machines, exposing the credentials more
  • Account types
    • Out accounts: automated processes, reach out to others
    • In accounts: listening services
    • Mixing an account into both types makes lateral movement trivial (compromise service, use to move to other box)
  • Service principal name (SPN)
    • Created Automatically
    • Password hash used as shared secret
  • Any user can request a ticket to any SPN
    • Encrypted with unsalted RC4 by default, key is NTLM hash of SPN password
    • Can be configured to use AES-128 or AES-256
    • Hashcat can offline crack the ticket to recover plaintext password
      • 7 mixed case alphanumerics takes about 10 hours on single GPU

Breaking Honeypots for Fun and Profit

Itamar Sher, Cymmetria

  • Can be used to introduce the “fog of war” aspect
  • OODA loop: Observe, Orient, Detect, Act
  • Honeypots also serve as a decoy
  • Several general types
    • Low interaction
      • Useful mainly for malware & scanning detection
      • Can be easily fingerprinted
    • High Interaction
      • Real machine
      • Heavily instrumented
  • Only thing worse than an ambush that fails is an ambush that is detected by the adversary
    • Can be used to distract incident responders
    • Can be used to send malicious/misleading data
    • Constants are easily detected (e.g., conpot)
  • Artillery Honeypot
    • low interaction
    • Blocks IP
    • Spoofing leads to DoS
  • Kippo
    • Medium interaction
    • Allows some simulated commands
    • Team is good at fixing issues
    • wget allowed now
      • Could be used for DDoS
      • or portscanning/host enumeration
  • Dronaea
    • Low interaction
    • Goal is to gain copy of malware
  • General Problems
    • Fixed values
      • Build dates
      • Sizes
      • Names
      • Serial numbers
      • etc.
    • Partially implemented services
      • missing implementations of most commands
    • Users that respond to multiple passwords

IoT on Easy Mode (Reversing Embedded Devices)

Elvis Collado

30 minute speed talk on reverse engineering & exploiting vulnerabilities in embedded devices.

  • Useful things:
    • Binwalk
    • IDA
    • Radare2
  • Use Qemu, build basic source in C, disassemble to understand assembly of architecture
    • Use breakpoints to understand what particular instructions do (break, before/after comparison)
  • GPL to see plain source
  • Beginning kit
    • FT232H adapter
    • Multimeter
    • Soldering Iron
      • Solder
      • Wick
      • Desoldering pump
    • Header pins
    • wire
  • Intermediate kit
    • (Beginning +)
    • Shikra
    • JTAGulator
    • Logic Analyzer
    • USB Microscope
  • Find UART
    • Use FCC ID to find high-res photos to find pinouts, etc.
    • Find Ground First
      • Multimeter with sounds help
    • TX/RX swapped
  • DVRF (Damn Vulnerable Router Firmware) project
    • Inspired by DVL, DVWA
    • MIPS 32 LE
    • E1550 router based