Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
302 views
in Technique[技术] by (71.8m points)

assembly - I want to convert x86 Linux shellcode with system calls to ARM Linux system calls

I want to convert Intel x86 assembly code to ARM. I do not know how to use the stack.

I wrote a call to execve using an int 0x80 system call for 32-bit x86 Linux.
However, ARM uses svc or swi.

But I do not know how to use something like this:
push 0x0068732f and push 0x6e69622f

.globl main
main:

push 0x0068732f
push 0x6e69622f

mov edx, 0
mov ecx, 0
mov ebx, esp
mov eax, 11
int 0x80

mov ebx, 0
mov eax, 1
int 0x80

The syscall on arm expects to use the swi to look like this:

.global _start

_start:
    ?????
    mov r7, #11
    swi #0

_exit:
    mov r7, #1
    swi #0

I want to use the stack push method rather than the .ascii method.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...