• Stars
    star
    816
  • Rank 55,881 (Top 2 %)
  • Language
    C++
  • License
    MIT License
  • Created almost 7 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

Very vulnerable ARM/AARCH64 application (CTF style exploitation tutorial with 14 vulnerability techniques)

exploit_me

Very vulnerable ARM/ARM64[AARCH64] application (CTF style exploitation tutorial, portable to other platforms)

(c) B.Kerler 2018-2020

Why:

Some of my friends asked me if I could do some examples of exploitable stuff I've seen in real-world the past years for ARM/ARM64[AARCH64]/others.

So, for training purposes, I thought: Why not :)

Current vulnerabilities:

Level 1: Integer overflow
Level 2: Stack overflow
Level 3: Array overflow
Level 4: Off by one
Level 5: Stack cookie
Level 6: Format string
Level 7: Heap overflow
Level 8: Structure redirection / Type confusion
Level 9: Zero pointers
Level 10: Command injection
Level 11: Path Traversal
Level 12: Return oriented programming (ROP)
Level 13: Use-after-free
Level 14: Jump oriented programming (JOP)

Install on Debian/Ubuntu System:

Download the repo

git clone https://github.com/bkerler/exploit_me

Install needed tools on host (Ubuntu)

~$ cd exploit_me
~/exploit_me $ ./script/setup.sh

Usage hints:

  • See hints.txt for a start.

  • For trying if it works : *** 32-Bit:

    $ ./bin/exploit
    

    *** 64-Bit:

    $ ./bin/exploit64
    
  • Example debugging session:

    $ sudo ./scripts/disableaslr.sh
    

    (Disable aslr, don't run if you want more fun) (Path dir1/dir2 needed in current exploit directory for Path Traversal vulnerability)

    In first terminal:

    *** 32-Bit:

    $ ./bin/arm exploit [levelpassword] [options] &
    $ gdb-multiarch ./exploit
    pwndbg> set architecture arm
    
    instead you can also add architecture in .gdbinit as "set architecture arm"
    

    *** 64-Bit:

    $ ./arm64 exploit64 [levelpassword] [options] &
    $ gdb-multiarch ./exploit64
    pwndbg> set architecture aarch64
    

    instead you can also add architecture in .gdbinit as "set architecture aarch64"

    *** Example .gdbinit

    set endian little
    #set architecture arm
    #set architecture aarch64
    target remote :1234
    
    
  • GDB Basics:

    Use 
    "si" to step into functions or 
    "so" to step over functions, 
    "info functions" to print all functions,
    "p [function]" to print function address and information, if symbols exist
    "b [function]" (Example: "b main" to set a breakpoint and "b *0x1234" to set a breakpoint at addr 0x1234, 
    "c" to continue program, 
    "x/[dwords]x" to print offsets, for example "x/4x 0x1234" and 
    "x/[dwords]x $reg" to print register contents, for example "x/4x $sp". 
    Using pwndbg, you can use 
    "rop" to list rop gadgets, for example "rop --grep 'pop {r3'" to list gadgets which pop values from stack to r3. 
    See https://github.com/pwndbg/pwndbg/blob/dev/FEATURES.md for more details !
    
  • After you've exploited correctly, you will see the password for the next level. So if level2 password would be "Level2": *** 32-Bit:

    $ ./bin/exploit Level2
    

    *** 64-Bit:

    $ ./bin/exploit64 Level2
    
  • For cheaters or people trying to understand with less instruction knowledge :

    See solutions/solutions.txt and source code in src/exploit.cpp
    
  • There are more solutions possible, even with rop chains, not just my example solutions given

  • There are some hints printed to console (information leak), which you normally wouldn't have, but these make things easier for beginners, that's why I added it

ToDo:

  • Will add other vulnerabilities as I see them or have spare time (like multi-thread vulnerability). But if you want to add some, I'd be happy to provide !

Some referrals to ARM reversing beginners :

License:

MIT License (Share, modify and use as you like, but refer to the original author !)

More Repositories

1

edl

Inofficial Qualcomm Firehose / Sahara / Streaming / Diag Tools :)
Python
975
star
2

oppo_decrypt

Oppo .ofp Firmware decrypter and oneplus .ops de-/encrypter
Python
385
star
3

oppo_ozip_decrypt

Oppo Firmware .ozip decrypter
Python
305
star
4

Loaders

EDL Loaders
283
star
5

android_universal

Universal android boot to root
Python
216
star
6

MR

Mobile Revelator
Python
157
star
7

opencl_brute

MD5,SHA1,SHA256,SHA512,HMAC,PBKDF2,SCrypt Bruteforcing tools using OpenCL (GPU, yay!) and Python
C
134
star
8

NANDReader_FTDI

8Bit Nand universal reader for FTDI FT2323H Breakout Board, based on basic code from http://spritesmods.com/?art=ftdinand
C
113
star
9

ghidra_installer

Helper scripts to set up OpenJDK 11 and scale Ghidra for 4K on Ubuntu 18.04 / 18.10
Shell
97
star
10

SierraWirelessGen

Sierra Wireless OpenMEP Generator
76
star
11

netgear_telnet

Netgear Enable Telnet (New Crypto)
Python
74
star
12

dump_avb_signature

Dump Android Verified Boot Signature
Python
47
star
13

sboot_dump

SUC - A tool to dump RAM using Samsung S-Boot Upload Mode
Python
45
star
14

tee_research

Some tee/trustzone helper stuff
Python
44
star
15

mtkclient

Just some mtk tool
Python
39
star
16

qcpatchtools

Some stuff for doing insane qc chipset pwning.
Python
31
star
17

qc_modem_tools

Some tools for reversing QDSP hexagon
Python
30
star
18

slides_and_papers

Here be dragons. Or Slides. Or Papers. Or Nothing :)
29
star
19

OregonDecoder

Oregon Scientific V1/V2 Gnuradio Decoder
Python
29
star
20

JEB_Scripts

JEB Scripts
Java
19
star
21

edl_emulate

QC EDL Emulator based on Qiling
Python
18
star
22

gnuradio_install

Full build script for gnuradio including most oot modules (i386/i686/x86_64/arm) on linux
Shell
14
star
23

AutoSatTracker-ESP

Autonomous Satellite Tracker with ESP8266-Huzzah
C++
12
star
24

antsdr_new

Latest firmware for antsdr E310 based on PlutoSDR
Shell
11
star
25

annotate

Binary Ninja plugin for annotation of arguments for functions
Python
10
star
26

routerstuff

Some collection of router firmware tools
9
star
27

sahara_emulator

QC Sahara emulator
Python
9
star
28

sattracker

Standalone Satellite Tracker Project based on ESP32 and Micropython
Python
8
star
29

gnuradio_flowgraphs

Some example flowgraphs for gnuradio, mostly based on real-world signals, some from grcon22 ctf
6
star
30

sqlcipher_tools

Python tools for sqlcipher
Python
6
star
31

asmtools

Shellcode disasm / asm generator in ONE tool using Capstone/Keystone
Python
6
star
32

aptdec

NOAA APT decoder (WIP)
C
4
star
33

fish_settings

Shell
3
star
34

twrp_tz_fixes

Disable Kernel Security + add SVC/SCM Interface for QC TZ Testing and Debugging
3
star
35

dangerous-prototypes-open-hardware

Automatically exported from code.google.com/p/dangerous-prototypes-open-hardware
Eagle
3
star
36

gnuradio_ask_decoder

My gnuradio ASK decoder project
3
star
37

frida_server_downloader

Script to automatically install latest frida and download server binaries needed
Shell
2
star
38

appmon

JavaScript
2
star
39

teensy-demos

Teensy demos
Arduino
1
star
40

FlatbufferDecoder

Example Google Flatbuffer conversion module, converts Flatbuffer to pseudo-xml readable text
Python
1
star
41

raspicam_prusa

Raspi camera for PrusaConnect
Python
1
star
42

DroneID

OpenDrone ID sniffer/spoofer for Bluetooth + WIFI
Python
1
star