Giter Club home page Giter Club logo

elfwizard's Introduction

ElfWizard

A simple tool to inject shellcode into an ELF binary.

Requirements

  • gcc
  • A ELF binary (no PIE)

Installation

How to install
git clone https://github.com/njord0/elfwizard
cd elfwizard
gcc -o elfwizard src/* -Iincludes/

Examples

Code injection on 64 bits binary

I will use test/test.c for this example,
first we need to compile the binary:

gcc -o test.bin test/test.c -fno-pie -no-pie

We are now ready to inject the shellcode, I wrote a simple shellcode that prints "Hello world". (Here)

./elfwizard --inject 4831c050b8726c640a5048b848656c6c6f20776f50b801000000bf010000004889e6ba0d0000000f05 test.bin

Now we can execute the binary :

$ ./test.bin
Hello world
A simple program that display his name and PID
test.bin : 49686

Code injection on 32 bits binary

I will use test/test.c for this example,
first we need to compile the binary:

gcc -o test.bin test/test.c -fno-pie -no-pie -m32

We are now ready to inject the shellcode, I wrote a simple shellcode that prints "Hello world". (Here)

./elfwizard --inject 31c05068726c640a686f20776f6848656c6c89e1b804000000bb01000000ba0c000000cd80 test.bin

Now we can execute the binary :

$ ./test.bin
Hello world
A simple program that display his name and PID
test.bin : 51237

elfwizard's People

Contributors

njord0 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.