Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/data/templates/src/elf/exe/elf_ppce500v2_template.s
28810 views
1
; build with:
2
; nasm elf_ppce500v2_template.s -f bin -o template_ppce500v2_linux.bin
3
4
BITS 32
5
ehdr: ; Elf32_Ehdr
6
db 0x7F, "ELF", 1, 2, 1, 0 ; e_ident
7
db 0, 0, 0, 0, 0, 0, 0, 0 ;
8
dw 0x0200 ; e_type = ET_EXEC for an executable
9
dw 0x1400 ; e_machine = PPC
10
dd 0x01000000 ; e_version
11
dd 0x54100000 ; e_entry
12
dd 0x34000000 ; e_phoff
13
dd 0 ; e_shoff
14
dd 0 ; e_flags
15
dw 0x3400 ; e_ehsize
16
dw 0x2000 ; e_phentsize
17
dw 0x0100 ; e_phnum
18
dw 0 ; e_shentsize
19
dw 0 ; e_shnum
20
dw 0 ; e_shstrndx
21
22
ehdrsize equ $ - ehdr
23
24
phdr: ; Elf32_Phdr
25
26
dd 0x01000000 ; p_type = pt_load
27
dd 0 ; p_offset
28
dd 0x00100000 ; p_vaddr
29
dd 0x00100000 ; p_paddr
30
dd 0xefbeadde ; p_filesz
31
dd 0xefbeadde ; p_memsz
32
dd 0x07000000 ; p_flags = rwx
33
dd 0x00000100 ; p_align
34
35
phdrsize equ $ - phdr
36
37
_start:
38
39