• Stars
    star
    352
  • Rank 117,378 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created about 9 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Repository to train/learn memory corruption on the ARM platform.

ARMPwn

Repository to train/learn memory corruption exploitation on the ARM platform. This is the material of a workshop I prepared for my CTF Team.

Quick Setup

Either upload the binary to some ARM device (I used a Raspberry Pi) or use qemu locally as described here. Also copy the webroot/ folder and the led script to the device. The binary expects both to be in the current working directory.

The binary needs to be run as root or (preferably) have CAP_NET_BIND_SERVICE enabled (sudo setcap 'cap_net_bind_service=+ep' websrv).

How to use this Repository

In general the goal is to get code execution on the target system. There are 4 different ways to benefit from this repository:

Total Pwn

Deploy the binary and go pwn it without reversing the binary first. Assume no prior knowlege of the binary.

Full Pwn

You're given access to the binary as well (in bin/).

Medium Pwn

You're given access to the binary and it's source code in src/. You'll miss out on some reversing fun though.

Lesser Pwn

Refer to the exploit and explanations in exploit/ as you go along.

RPI Configuration

The RPI used during the workshop was configured as follows:

  • kernel boot messages were written to /dev/ttyAMA0 (the default)
  • /etc/inittab was modified to not spawn getty on /dev/ttyAMA0
  • syslog-ng was modified to enable output on /dev/ttyAMA0 by adding the following line to /etc/syslog-ng/syslog-ng.conf: destination d_console_all { file("/dev/ttyAMA0"); };
  • verbose crash messages were enabled by setting "sysctl kernel.print-fatal-signals=1" during boot, e.g. through /etc/init.d/rc.local (sadly the ARM kernel does not by default print a crash summary to the kernel ring buffer as opposed to e.g. an x86 kernel)
  • An LED was connected to GPIO pin 17 on the Pi

Using these, we developed our exploits by connecting a serial cable to the Pi and getting the crash dumps this way. No gdb or similar.

Feedback is always welcome! Enjoy :)

@5aelo

More Repositories

1

pwn2own2018

A Pwn2Own exploit chain
C
752
star
2

cve-2014-0038

Linux local root exploit for CVE-2014-0038
C
190
star
3

cve-2018-4233

Exploit for CVE-2018-4233, a WebKit JIT optimization bug used during Pwn2Own 2018
JavaScript
174
star
4

ios-kern-utils

iOS Kernel utilities
C
156
star
5

35c3ctf

Source code and exploits for some 35c3ctf challenges.
C
136
star
6

jscpwn

PoC exploit for CVE-2016-4622
JavaScript
104
star
7

v9

Files for the "v9" challenge of 34C3 CTF. See the greeting message in server.go for more information about the challenge
JavaScript
84
star
8

foxpwn

Exploit code for CVE-2016-9066
JavaScript
42
star
9

ida_scripts

Collection of IDA scripts
Python
40
star
10

feuerfuchs

Files for the "feuerfuchs" challenge of 33C3 CTF. See the greeting message in server.py for more information about the challenge
JavaScript
37
star
11

33c3ctf-repl

Code and exploit for the "read-eval-pwn loop" challenge of 33C3 CTF
Python
33
star
12

iCrashalyzer

Tool to analyze iOS crash reports
Python
28
star
13

dnsrebinder

Go tool to perform DNS rebinding
Go
26
star
14

ctfcode

Dumping CTF related code here
Python
16
star
15

deeplearn

OpenCL deep learning toolkit
C++
15
star
16

saelo.github.io

GitHub Pages
SCSS
12
star
17

algopy

Python implementation of various (graph) algorithms
Python
10
star
18

game-of-life

Simple Game of Life implementation using C++ and openGL
C++
6
star
19

splaytree

Splay Tree Animations
JavaScript
5
star
20

capman

Simple Investment tool based on Interactive Brokers' API.
Swift
5
star
21

hash-tools

Some simple scripts for hash recovery
Python
3
star
22

dotfiles

Various dotfiles
Shell
3
star
23

smarttrim.vim

Vim plugin to remove newly created trailing whitespace
Vim Script
2
star
24

weesleep

WeeChat plugin to disconnect weechat when the system is being suspended
C
1
star