All posts by Paulo Matias

We are glad to announce Dragon Sector was the Pwn2Win CTF 2016 Attack Step Winner. Congratulations for keeping working on the challenge even after the main event was finished! This was a difficulty and multi-step challenge involving:

  1. Network traffic forensics Identifying a port knock to an IPv6 address in a pcap dump.
  2. Web exploitation Exploiting an upload script which allowed to insert a webshell into the server.
  3. Cryptography — Analyzing a crypto-related Python script to recover the private key which allowed to access the server via SSH as the clube user.
  4. Linux system administration skills — Once connected via SSH using the previously identified port knock, the competitor needed to analyze the /etc/lshell.conf file to find a way to run arbitrary executable files as the clube user.
  5. Kernel exploitation — Exploiting a stack overflow bug in a LKM implementing an I2C device driver in ARM architecture. The /dev/dieitalic0 device exposed by the LKM was only accessible to the clube user. The bound check failed when the I2C device was not physically connected to the server because of a wrong signed/unsigned conversion, requiring attention to the ARM instruction condition code suffixes. The kernel did not implement any ret2usr protection, but the bug was tricky to exploit because running the LKM inside a debugger was almost infeasible.

After gaining root in the server and recovering a Bitcoin private key contained inside the /root directory, the Dragon Sector team was able to transfer the special prize of 116.110 mBTC to their own Bitcoin address.

Attack Step BTC transaction

Below we have the cryptographic proof that Dragon Sector was the Attack Step Winner.

-----BEGIN BITCOIN SIGNED MESSAGE-----
Dragon Sector
-----BEGIN BITCOIN SIGNATURE-----
Version: Bitcoin-qt (1.0)
Address: 1F5Rkf6bg2XG7zKZ3cdNpQivkyLfcm3H3p
IHibYzkteTuu5PdbJO0gij2uajarNtY9tF8jIzXLW6GQeULmzIqAIvF1eOop1Q4QYNg82YXYYLcwcEkC8P2z9FE=
-----END BITCOIN SIGNATURE-----