EvilZone
Programming and Scripting => Assembly - Embedded => : xor December 11, 2010, 05:20:48 PM
-
.section .data
.globl _start
_start:
nop
jmp loadstring
main:
xor %eax, %eax
pop %ebx # load our string
movb %al, 7(%ebx) # terminate string
movb %al, 15(%ebx)
movb %al, 23(%ebx)
mov %ebx, 24(%ebx)
loadstring:
call main
.ascii "/bin/cpS/bin/shS/tmp/shN"
First part and second part of the .ascii string are which file to be copied, and last part is where to copy it to. The S and N are just for padding and string termination.
-
Obviously no one noticed, but this ASM is incomplete. It prepares the command line arguments for moving a file, but doesn't actually execute the syscall to start the move. Lets see if any of you can complete it. :)
-
int 0x80