ReverseEngineering


ASM

Variables

x64
x32
What is ?

RAX

EAX

Return Value

RCX

ECX

Counter (or Fourth Arg)

RDX

EDX

Third Arg

RSI

ESI

Second Arg

RDI

EDI

First Arg of Function

RSP

ESP

Stack Pointer

RIP

EIP

Next Instruction

R8-R11

r8d-r11d

Scratch register

R12-R15

r12d-r15d

Preserved register

Source

Operation

Operation
Explication

MOV size dest,src

dest ← src

LEA dest,[op]

dest ← addr op

PUSH op

Increase RSP & Store op

POP op

Load op & Discrease RSP

ADD op1,op2

op1 ← op1 + op2

SUB op1,op2

op1 ← op1 - op2

NEG reg

reg ← -reg

INC reg

reg ← reg + 1

DEC reg

reg ← reg - 1

AND op1,op2

op1 ← op1 & op2

OR op1,op2

op1 ← op1

XOR op1,op2

op1 ← op1 ^ op2

CMP op1,op2

op1 - op2

TEST op1,op2

op1 & op2

JMP op

Jump to op

Source - Page 21

Overflow

Basic

Shellcode

Shellcode

Cat

Exec sh 1

Exec sh 2

GDB

Command

Print

Get env address

Peda

Install

Binary ninja

Scrap code from html

Lib Injection

  • Recreate getuid function

  • compile

  • run and inject

Decompile Python Executable

Convert executable into .pyc

Disassembly .pyc (compatible python 3.9.2)

Macro Office PPTM

Install

Decompress PPTM

Last updated