PwnTools

Leer AWS-hacking vanaf nul tot held met htARTE (HackTricks AWS Red Team Expert)!

Ander maniere om HackTricks te ondersteun:

``` pip3 install pwntools ``` ## Hack asm

Kry opcodes van lyn of lêer.

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

Kan kies:

  • uitvoertipe (raw, hex, string, elf)

  • uitvoerlêerkonteks (16, 32, 64, linux, windows...)

  • vermyt byte (nuwe lyne, nul, 'n lys)

  • kies 'n enkoder 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

Kan kies:

  • Die gebruikte alfabet (klein letters standaard)

  • Lengte van unieke patroon (standaard 4)

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

  • Neem die offset (-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

Ontas hex-opcodes

pwn disasm ffe4

Kan kies:

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

  • basis adres

  • 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 die 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 stelseloproepe

  • 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

Vanaf heks na string

pwn unhex 686f6c61

Pwn opdatering

Om pwntools te update

pwn update
Leer AWS-hacking vanaf nul tot held met htARTE (HackTricks AWS Red Team Expert)!

Ander maniere om HackTricks te ondersteun:

Last updated