All Projects → L4ys → LazyKLEE

L4ys / LazyKLEE

Licence: other
Lazy python wrapper of KLEE for solving CTF challenges

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to LazyKLEE

Attack-Defense-Platform
A framework that help to create CTF Attack with Defense competition quickly
Stars: ✭ 23 (-61.02%)
Mutual labels:  ctf
2020
WeCTF 2020 Source Code & Organizer's Writeup
Stars: ✭ 29 (-50.85%)
Mutual labels:  ctf
blackhat-python
Black Hat Python workshop for Disobey 2019
Stars: ✭ 27 (-54.24%)
Mutual labels:  ctf
mini-kali
Docker image for hacking
Stars: ✭ 15 (-74.58%)
Mutual labels:  ctf
Flag-Capture
Solutions and write-ups from security-based competitions also known as Capture The Flag competition
Stars: ✭ 84 (+42.37%)
Mutual labels:  ctf
ctf-writeups
Writeups of CTF challenges
Stars: ✭ 19 (-67.8%)
Mutual labels:  ctf
Web-Exploitation-Workflow
Web Exploitation Workflow for CTF Challenges
Stars: ✭ 33 (-44.07%)
Mutual labels:  ctf
factordb-python
FactorDB client library with Python
Stars: ✭ 34 (-42.37%)
Mutual labels:  ctf
pwnscripts
Very simple script(s) to hasten binary exploit creation
Stars: ✭ 66 (+11.86%)
Mutual labels:  ctf
CTF-Site
介绍一些CTF训练的站点
Stars: ✭ 83 (+40.68%)
Mutual labels:  ctf
2017-quals
Tasks from CTFZone 2017 quals
Stars: ✭ 13 (-77.97%)
Mutual labels:  ctf
CTF-Challenges
Capture the flag challenges
Stars: ✭ 41 (-30.51%)
Mutual labels:  ctf
doubletap
A very loud but fast recon scan and pentest template creator for use in CTF's/OSCP/Hackthebox...
Stars: ✭ 23 (-61.02%)
Mutual labels:  ctf
Inequality Solving with CVP
CVP "trick" for CTF challenges
Stars: ✭ 74 (+25.42%)
Mutual labels:  ctf
CTF-Write-UP
澳門網絡安全暨奪旗競賽協會(Macau Cyber Security and Capture The Flag Association)MOCSCTF/MOCTF
Stars: ✭ 27 (-54.24%)
Mutual labels:  ctf
HashExploit
HashExpoit is Great Tool For Cracking Hash
Stars: ✭ 17 (-71.19%)
Mutual labels:  ctf
CTF
My CTF tools & some other stuff
Stars: ✭ 17 (-71.19%)
Mutual labels:  ctf
how-to-exploit-a-double-free
How to exploit a double free vulnerability in 2021. Use After Free for Dummies
Stars: ✭ 1,165 (+1874.58%)
Mutual labels:  ctf
obsidian
Writeups for CTF challenges.
Stars: ✭ 47 (-20.34%)
Mutual labels:  ctf
My-CTF-Challenges
🏴 🏴 🏴
Stars: ✭ 65 (+10.17%)
Mutual labels:  ctf

LazyKLEE

Lazy python wrapper of KLEE for solving CTF challenges.

Installation

  • Install Docker
  • docker pull klee/klee

Usage

usage: LazyKLEE.py [-h] [-v] [-i] [-o] [-l] [-p] [-w] [-c CLANG_ARGS]
                   [-k KLEE_ARGS] [-a ARGS]
                   src

positional arguments:
  src                   source code

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         show verbose message
  -i, --interact        interact with container after running KLEE
  -o, --optimize        run KLEE with -optimize
  -l, --libc            run KLEE with -libc=uclibc
  -p, --posix           run KLEE with -posix-runtime
  -w, --write-ints      convert 4-byte sequences to integers in ktest-tool
  -c CLANG_ARGS, --clang-args CLANG_ARGS
                        additional arguments for clang
  -k KLEE_ARGS, --klee-args KLEE_ARGS
                        additional arguments for KLEE
  -a ARGS, --args ARGS  additional arguments for target program

How

  1. Decompile binary to source code with hex-rays
  2. Include defs.h from plugins folder of IDA Pro
  3. Replace read(stdin, input, sizeof(input)); with klee_make_symbolic(input, sizeof(input), "input");
  4. Replace print_flag(); with klee_assert(0);
  5. LazyKLEE.py solve.c, add --libc if any libc functions used
$ LazyKLEE.py ~/CTF/defcon_2017/crackme1/solve.c
=== LazyKLEE ===
[+] Creating container...
[+] Compiling llvm bitcode...
    Auto include klee/klee.h
    Auto include assert.h

[+] Running KLEE...
[!] ASSERTION triggered!
    ktest file : './klee-last/test000032.ktest'
    args       : ['solve.bc']
    num objects: 1
    object    0: name: b'input'
    object    0: size: 80
    object    0: data: b'yes and his hands shook with ex\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
[+] Removing container...

Examples

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].