PwnTools

Ondersteun HackTricks
pip3 install pwntools

Pwn asm

Kry opcodes van lyn of lêer.

pwn asm "jmp esp"
pwn asm -i <filepath>

Kan kies:

  • uitset tipe (rof, heks, string, elf)

  • uitset lêer konteks (16,32,64,linux,windows...)

  • vermy bytes (nuwe lyne, nul, 'n lys)

  • kies enkodeer foutopsporingskodes deur gdb te hardloop die uitset

Pwn checksec

Checksec skrip

pwn checksec <executable>

Pwn constgrep

Pwn cyclic

Kry 'n patroon

pwn cyclic 3000
pwn cyclic -l faad

Kies:

  • Die gebruikte alfabet (klein letters standaard)

  • Lengte van unieke patroon (standaard 4)

  • konteks (16,32,64,linux,windows...)

  • Neem die skuif (-l)

Pwn foutopsporing

Heg GDB aan 'n proses aan

pwn debug --exec /bin/bash
pwn debug --pid 1234
pwn debug --process bash

Kan kies:

  • Volgens uitvoerbare lêer, volgens naam of volgens pid konteks (16,32,64,linux,windows...)

  • gdbskrip om uit te voer

  • sysrootpad

Pwn disablenx

Deaktiveer nx van 'n binêre lêer

pwn disablenx <filepath>

Pwn disasm

Ontassemleer heksadesimale opcodes

pwn disasm ffe4

Kan kies:

  • konteks (16,32,64,linux,windows...)

  • basisadres

  • kleur(standaard)/geen kleur

Pwn elfdiff

Druk verskille tussen 2 lêers af

pwn elfdiff <file1> <file2>

Kry heksadesimale voorstelling

pwn hex hola #Get hex of "hola" ascii

Pwn phd

Kry heksdump

pwn phd <file>

Kan kies:

  • Aantal bytes om te wys

  • Aantal bytes per lyn om te beklemtoon

  • Oorslaan van bytes aan begin

Pwn pwnstrip

Pwn scrable

Pwn shellcraft

Kry shellkodes

pwn shellcraft -l #List shellcodes
pwn shellcraft -l amd #Shellcode with amd in the name
pwn shellcraft -f hex amd64.linux.sh #Create in C and run
pwn shellcraft -r amd64.linux.sh #Run to test. Get shell
pwn shellcraft .r amd64.linux.bindsh 9095 #Bind SH to port

Kan kies:

  • shellcode en argumente vir die shellcode

  • Uit lêer

  • uitset formaat

  • foutopsporing (heg dbg aan shellcode)

  • voor (foutopsporing val voor kode)

  • na

  • vermy om opcodes te gebruik (verstek: nie nul en nuwe lyn)

  • Voer die shellcode uit

  • Kleur/geen kleur

  • lys stelsoproepe

  • lys moontlike shellkodes

  • Genereer ELF as 'n gedeelde biblioteek

Pwn sjabloon

Kry 'n Python-sjabloon

pwn template

Kan kies: gasheer, poort, gebruiker, wagwoord, pad en stil

Pwn unhex

Van heks na string

pwn unhex 686f6c61

Pwn opdatering

Om pwntools te update

pwn update
Ondersteun HackTricks

Last updated