Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (4)

Powered by Vanilla. Made with Bootstrap.
Another wargame
  • chroniccommand
    Posts: 1,389
    So I just whipped up another wargame in ASM. All the user has to do is open the wargame in gdb and examine the memory address of the variable "Password"

    Here is the source of wargame.s:

    # Wargame for iExploit
    # Coded by Chroniccommand

    .data
    Password:
    .ascii \"welikeasm\"

    OneByte:
    .byte 15
    Message:
    .ascii \"This is not the password....\"

    .text
    .globl _start

    _start:
    movl $1, %eax
    movl $0, %ebx
    int $0x80

    To compile:

    as -o wargame.o wargame.s

    Then link it:

    ld -o wargame wargame.o


    Solution:

    [chronic@vandal tmp]$ gdb -q wargame
    Reading symbols from /tmp/wargame...(no debugging symbols found)...done.
    (gdb) info variables
    All defined variables:

    Non-debugging symbols:
    0x08049080 Password
    0x08049089 OneByte
    0x0804908a Message
    (gdb) x/12cb 0x08049080
    0x8049080 <Password>: 119 'w' 101 'e' 108 'l' 105 'i' 101 'e' 107 'k' 97 'a' 115 's'
    0x8049088 <Password+8>: 109 'm' 15 '\017' 84 'T' 104 'h'
    (gdb) q
  • Sh3llc0d3
    Posts: 1,910
    I was going to say this program just exits but thats obviously the point.

    Edit: interesting choice in assembler syntax too, not many people follow my line and go for it, most use NASM.