Back to Top

Wednesday, September 02, 2009

Ethical Hacker challenge “Prison Break” solution

As I usually do, I’ll publish my entry for the Ethical Hacker challenge after the deadline passed:

Challenge Question 1: What is the most probable reason Michael could not get network connectivity from the desk Ethernet jack?  What actions should the team take to determine exactly what is going on, collect full traffic captures, and gain full access to the network?

Most probably the switch to which the given port is connected has MAC address filtering turned on. To circumvent this, they must clone the MAC address of the VOIP phone.

The easiest way to do this is to start capturing the traffic on the network interface of the laptop and then plug the VOIP phone into it. The initial packets (most probably DHCP requests) will reveal the phone MAC address. Sidenote: most ethernet ports these days are auto-sensing (ie. no crossover cable is required). But just to make sure, one should use a crossover cable or an intermediate switch (not hub!) is one is available. After the MAC address has been determined, the host OS should be instructed to use the given MAC address for the laptop network card. You can find instructions for Linux here: and for Windows here:

Sidenote: given that the packet captures show two distinct networks ( and, it is clear that the administrators have tried to separate the computer networks from the VOIP one. However, relying only on different (sub-)nets is extremely weak and at least VLAN level separation should have been implemented (then again, maybe the available switches don't have VLAN features). most probably is the VOIP network, since we see SIP packets on it and the computer network.

If only MAC filtering is implemented, after changing the MAC address, it is possible to join any of the two available networks, meaning that they can interact with the "computer" network, even if the given port was originally assigned to a VOIP phone.

Challenge Question 2: What tool should Lincoln download, if any, to be able to capture traffic on the desktop computer? contains a nice list of available packet sniffers ( ). Given the constraints, my tool of choice would be WinDump, the Windows port of tcpdump ( )

Challenge Question 3: Starting with the reverse connection from the desktop computer, describe a step-by-step approach that could be applied prior to 09:00 the next day in order to capture the network traffic on the remote network and get a capture file for further in-depth analysis. Make sure your approach follows Michael's advice to avoid detection.

  • download WinDump ( ) and WinPcap to the laptop
  • use the instructions provided at the following link to construct a portable version of WinPcap:
  • you can package up all the files (WinDump and the WinPcap DLLs + driver) into a single file using the SFX functionality from 7zip. To make sure that you don't get under the 0.5 meg limit, use Zip with the Store algorithm
  • upload the resulting file to the general's desktop (this part of the challenge is a little forced IMHO, since the IDS should have detected the reverse connection if it is sensible to long-lived, low traffic connections...)
  • launch the SFX, wait until all the files are extracted and copy npf.sys into c:\Windows\System32\drivers
  • before 9:00 AM (at 8:55 for example) launch WinDump (this will capture at most 5 MB of data):
    WinDump -i 1 -w capture.pcap -C 5
  • after WinDump has stopped, retrieve the capture file and clean up (delete the driver, the SFX file, etc)

Challenge Question 4: Help the team complete this aspect of their mission by analyzing the packet capture file collected on the desktop computer and provide detailed information about the environment. Your response should at least include the type of network traffic collected, details about the General’s laptop computer, details about the Scylla Codes server plus any other server available, and provide the names and contents of the files stored on the server the input passphrase is based on.

The collected traffic consists of 6 requests made to the Scylla server ( using HTTPS. To decode them, first convert the provided key file into PEM format with OpenSSL:

openssl rsa -in server.key -out server_key.pem 

Then use the resulting PEM file as described here for example to let Wireshark decode the traffic:

Now you can use the "Follow SSL stream" functionality from Wireshark to analyze each request. From the headers it seems that the general's laptop is running Windows Vista Media Center (tablet? edition), while the Scylla server is running Linux/Apache:

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506) 
Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8g DAV/2 PHP/5.2.9 

Challenge Question 5: What are the validation code and input passphrase used by the General to generate the Scylla validation code for this week?

The validation code is "6189db841f01413a05a53b7135137a17"

BONUS QUESTION: Briefly describe your recommendations about how The Company could have detected and defended against the tactics you described in your answer to Question 3.

The attack could have been prevented by using a whitelisting product which doesn't let unknown executables be started. Other mitigating measures would be:

One could work around many of these restrictions (for example: finding a vulnerability in an installed software, running meterpreter in-process, killing the whitelisting software, masking the outbound connection as a HTTP one, using ARP spoofing to get around the switched network, etc), but it raises the bar considerably.


  1. Anonymous7:05 PM

    Interesting read. =) I think trying to work around all those five mitigating measures you identified would be an unpractically large task for the attacker.

    An unrelated comment: I've read your bloggings about software restriction policies and how to bypass them. It would be really cool if you took a look at AppLocker and SRP in Windows 7 to see if they work differently and if they are maybe harder to bypass than before. That's something I'd be looking forward to reading lol ;)

  2. @Anonymous: thanks, I'm already looking into AppLocker. Unfortunately, due to time, I wasn't able to finalize my research yet.

  3. Anonymous10:12 PM

    I'm sure it will interesting reading when you get it done! Looking forward to it. Thanks for a great blog! =)