NENote of Exploiting


[SC] write.s : 2006-11-22


.globl main

main:
    jmp    ONE

TWO:
    #open
    popl   %ebx
    xorl   %eax,   %eax
    movb   %al,    4(%ebx)
    movb   $0x5,   %al
    xorl   %ecx,   %ecx
    inc    %ecx
    int    $0x80

    #write
    movl   %ebx,   %esi
    movl   %eax,   %ebx
    movl   %esi,   %ecx
    xorl   %edx,   %edx
    movb   $0x4,   %dl
    xorl   %eax,   %eax
    movb   $0x4,   %al
    int    $0x80

    #close
    xorl   %eax,   %eax
    movb   $0x6,   %al
    int    $0x80

    #exit
    mov    $0x1,   %al
    xorl   %ebx,   %ebx
    int    $0x80

ONE:
    call    TWO
    .string "test"

Copyleft (C) 2007 Len. All Rights Not Reserved.