GithubHelp home page GithubHelp logo

linux-binary-exploitation's Introduction

Linux-Binary-Exploitation

C Compilation Process & ASM Tutorial Made By Myself For Binary Exploitation (Reverse Engineering)

How CPU works

(32-bit (IA-32) - 64-bit (x86-64))
  1. CPU-Registers
  2. Arithmetic Instructions (Intel syntax)
  3. Examples of Control-Flow Instructions(if-while-for)
  4. Little-Endian Format
  5. Function prologue and epilogue
  6. Memory Layout of an ELF
  7. Useful Tools For Static Binary Analysis
  8. Stack Buffer Overflow
  9. Binary-Protection-Flags
  10. Static-Binary-Analyze-Tools

Program Build Flow

Program-Build-Flow

Useful Compile Commands

Compile Assembly using NASM
----------------------------
nasm -f elf32 <file.asm> -o <file.o> && ld -m elf_i386 <file.o> -o <file>


Compile C to 64bit ELF using gcc
--------------------------------
gcc <file.c> -o <file>


Compile C to 32bit ELF using gcc
--------------------------------
sudo apt install libc6-dev-i386
gcc <file.c> -m32 -o <file>


Compile C to 32bit (all protection disabled) ELF using gcc
-------------------------------------------
sudo bash -c 'echo 0 > /proc/sys/kernel/randomize_va_space'
gcc -fno-stack-protector -z execstack -fno-pie -m32 -O0 <file.c> -o <file>

linux-binary-exploitation's People

Stargazers

AVA avatar The Silitonix avatar  avatar

Watchers

Lil Endian 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.