Breaking Sec

Full Version: [NASM]Changing string lolcakes to lolcats
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
section .data
    msg1: db 'lolcakes',0xa ;Our String
section .text
    global _start
_start:
    mov eax, 4 ;sys_write
    mov ebx,1  ;1 = STDOUT
    mov edx,9  ;Length of our string
    mov ecx,msg1 ;Put our string in ecx
    mov dword [ecx+3],0x73746163 ;Change cakes to cats
    mov dword [ecx+7],$0 ;Null out the extra s
    int 0x80  ;invoke the kernel
    mov eax,1 ;sys_exit
    mov ebx,0 ;exit with code of 1;
    int 0x80  ;invoke the kernel
nice little code snippit. perhaps you should explain its practical uses
Reference URL's