CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/data/templates/src/elf/exe/elf_armle_template.s
Views: 11705
1
; build with:
2
; nasm elf_armle_template.s -f bin -o template_armle_linux.bin
3
4
BITS 32
5
6
org 0x8000
7
8
ehdr: ; Elf32_Ehdr
9
db 0x7F, "ELF", 1, 1, 1, 0 ; e_ident
10
db 0, 0, 0, 0, 0, 0, 0, 0 ;
11
dw 2 ; e_type = ET_EXEC for an executable
12
dw 0x28 ; e_machine = ARM
13
dd 1 ; e_version
14
dd _start ; e_entry
15
dd phdr - $$ ; e_phoff
16
dd 0 ; e_shoff
17
dd 0 ; e_flags
18
dw ehdrsize ; e_ehsize
19
dw phdrsize ; e_phentsize
20
dw 1 ; e_phnum
21
dw 0 ; e_shentsize
22
dw 0 ; e_shnum
23
dw 0 ; e_shstrndx
24
25
ehdrsize equ $ - ehdr
26
27
phdr: ; Elf32_Phdr
28
dd 1 ; p_type = PT_LOAD
29
dd 0 ; p_offset
30
dd $$ ; p_vaddr
31
dd $$ ; p_paddr
32
dd 0xDEADBEEF ; p_filesz
33
dd 0xDEADBEEF ; p_memsz
34
dd 7 ; p_flags = rwx
35
dd 0x1000 ; p_align
36
37
phdrsize equ $ - phdr
38
39
_start:
40
41
42