General repository for experimenting with different coding languages
ww.asm - "Hello World" example which prints "wakeward"
rs.asm - reverse shell in assembly Thx Xre0uS
nasm -f elf32 ww.asm -o ww.o
ld -m elf_i386 ww.o -o ww
./wwSetup nc listener
nc -nlvp 4444Build and Execute
nasm -f elf64 rs.asm -o rs.o
ld rs.o -o rs
./rsFrom rs.asm
CDQ- Covert Doubleword to Quadword is an instruction that extends the sign bit ofEAXinto theEDXregister.syscall- is default way of entering kernel mode on x86-64. This instruction is not available in 32 bit modes of operation on Intel processors.XCHG- Exchanges (swaps) the value of 2 registersJNS- Jump if not signSIL- General purpose register (64-bit, the least significant bit 8 bits is assessible)
Testing
go run main.goBuild for Linux (current environment)
go build -o rs main.goBuild
gcc rs.c -o rs