Hello World

section .text
global_start ;must be declared for linker (ld)

_syscall:
int 0x80 ;system call
	ret

_start: ;tell linker entry point

	pushdword len ;message length
	pushdword msg ;message to write
	pushdword 1 ;file descriptor (stdout)
	mov eax,0x4 ;system call number (sys_write)
	call_syscall ;call kernel

	add esp,12 ;clean stack (3 arguments * 4)

	pushdword 0 ;exit code
	mov eax,0x1 ;system call number (sys_exit)
	call_syscall ;call kernel

section .data

msg db"Hello, world!",0xa ;say something witty
len equ $ - msg ;determine the quantity of wit
Previous
Previous

Most used techniques to compromise your organizations in 2023