RZ_GG(1) General Commands Manual RZ_GG(1) (NAME) rz-gg - rizin RzEgg . (SYNOPSIS) rz-gg [-FOLsrxvhz] [-a arch] [-b bits] [-k os] [-f format] [-o file] [-i shellcode] [-I path] [-e encoder] [-B hexpairs] [-c k=v] [-C file] [-n dword] [-N dword] [-d off:dword] [-D off:qword] [-w off:hexpairs] [-p padding] [-P size] [-q fragment] file|f.asm|- (DESCRIPTION) Rizin . RzEgg (relocatable) . rz-gg-cc rz-gg C (shellcode) . rz-bin . shellforge4 Linux/OSX x86-32/64 . (DIRECTIVES) rrz (rz-gg) key=value '#' . -a arch (x86, mips, arm) -b bits (32, 64, ..) -B hexpairs (hexpair) -c k=v shellcode. key=value -C file -d off:dword dword ( ) -D off:qword qword ( ) -e encoder . -L -f format (raw, c, pe, elf, mach0, python, javascript) -F (osx=mach0, linux=elf, ..) -h -i shellcode shellcode . -L -I path include -k kernel (linux, bsd, osx, w32) -L (shellcode encoder) -n num32 ( ) -N num64 ( ) -o file -O ( a.out) -p padding (padding=n10s32) ntas : nop trap 'a' NTAS : -P size (debruijn) -q fragment (debruijn) -r -s -S string -v -w off:hex -x -X hexpairs ROP -z C (EXAMPLES) $ cat hi.r /* hello world in RzEgg */ write@syscall(4); //x64 write@syscall(1); exit@syscall(1); //x64 exit@syscall(60); main@global(128) { .var0 = "hi!\n"; write(1,.var0, 4); exit(0); } $ rz-gg -O -F hi.r $ ./hi hi! # C: $ cat hi.c main() { write(1, "Hello\n", 6); exit(0); } $ rz-gg -O -F hi.c $ ./hi Hello # . $ wc -c < hi 165 # $ rz-gg hi.c | tail -1 eb0748656c6c6f0a00bf01000000488d35edffffffba06000000b8010 000000f0531ffb83c0000000f0531c0c3 # xor $ rz-gg -e xor -c key=64 -B $(rz-gg hi.c | tail -1) 6a2d596a405be8ffffffffc15e4883c60d301e48ffc6e2f9ab4708252 c2c2f4a40ff4140404008cd75adbfbfbffa46404040f8414040404f45 71bff87c4040404f45718083 (SEE ALSO) rizin(1), rz-hash(1), rz-find(1), rz-bin(1), rz-find(1), rz-diff(1), rz-asm(1), (AUTHORS) pancake byteninjaa0 January 24, 2024