-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First crack at Samba CVE-2017-7494 #8450
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0520d7c
First crack at Samba CVE-2017-7494
hdm b1514fc
docs
h00die 98ad754
updated OJ info and wvu ubuntu box
h00die cf7cfa9
Add check() implementation based on bcoles notes
hdm e8a34c5
updates to docs
h00die 18a871d
Delete the .so, add PID bruteforce option, cleanup
hdm 2ad3869
Small cosmetic typo
hdm 1474faf
Remove ARMLE for now, will re-PR once functional
hdm 4ec5831
Merge pull request #15 from h00die/sambapwn
hdm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
; build with: | ||
; nasm elf_dll_armle_template.s -f bin -o template_armle_linux_dll.bin | ||
|
||
BITS 32 | ||
org 0 | ||
ehdr: | ||
db 0x7f, "ELF", 1, 1, 1, 0 ; e_ident | ||
db 0, 0, 0, 0, 0, 0, 0, 0 | ||
dw 3 ; e_type = ET_DYN | ||
dw 40 ; e_machine = EM_ARMLE | ||
dd 1 ; e_version = EV_CURRENT | ||
dd _start ; e_entry = _start | ||
dd phdr - $$ ; e_phoff | ||
dd shdr - $$ ; e_shoff | ||
dd 0 ; e_flags | ||
dw ehdrsize ; e_ehsize | ||
dw phdrsize ; e_phentsize | ||
dw 2 ; e_phnum | ||
dw shentsize ; e_shentsize | ||
dw 2 ; e_shnum | ||
dw 1 ; e_shstrndx | ||
ehdrsize equ $ - ehdr | ||
|
||
phdr: | ||
dd 1 ; p_type = PT_LOAD | ||
dd 0 ; p_offset | ||
dd $$ ; p_vaddr | ||
dd $$ ; p_paddr | ||
dd 0xDEADBEEF ; p_filesz | ||
dd 0xDEADBEEF ; p_memsz | ||
dd 7 ; p_flags = rwx | ||
dd 0x1000 ; p_align | ||
|
||
phdrsize equ $ - phdr | ||
dd 2 ; p_type = PT_DYNAMIC | ||
dd 7 ; p_flags = rwx | ||
dd dynsection ; p_offset | ||
dd dynsection ; p_vaddr | ||
dd dynsection ; p_vaddr | ||
dd dynsz ; p_filesz | ||
dd dynsz ; p_memsz | ||
dd 0x1000 ; p_align | ||
|
||
shdr: | ||
dd 1 ; sh_name | ||
dd 6 ; sh_type = SHT_DYNAMIC | ||
dd 0 ; sh_flags | ||
dd dynsection ; sh_addr | ||
dd dynsection ; sh_offset | ||
dd dynsz ; sh_size | ||
dd 0 ; sh_link | ||
dd 0 ; sh_info | ||
dd 8 ; sh_addralign | ||
dd 7 ; sh_entsize | ||
shentsize equ $ - shdr | ||
dd 0 ; sh_name | ||
dd 3 ; sh_type = SHT_STRTAB | ||
dd 0 ; sh_flags | ||
dd strtab ; sh_addr | ||
dd strtab ; sh_offset | ||
dd strtabsz ; sh_size | ||
dd 0 ; sh_link | ||
dd 0 ; sh_info | ||
dd 0 ; sh_addralign | ||
dd 0 ; sh_entsize | ||
dynsection: | ||
; DT_INIT | ||
dd 0x0c | ||
dd _start | ||
; DT_STRTAB | ||
dd 0x05 | ||
dd strtab | ||
; DT_SYMTAB | ||
dd 0x06 | ||
dd strtab | ||
; DT_STRSZ | ||
dd 0x0a | ||
dd 0 | ||
; DT_SYMENT | ||
dd 0x0b | ||
dd 0 | ||
; DT_NULL | ||
dd 0x00 | ||
dd 0 | ||
dynsz equ $ - dynsection | ||
|
||
strtab: | ||
db 0 | ||
db 0 | ||
strtabsz equ $ - strtab | ||
global _start | ||
_start: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
; build with: | ||
; nasm elf_dll_x86_template.s -f bin -o template_x86_linux_dll.bin | ||
|
||
BITS 32 | ||
org 0 | ||
ehdr: | ||
db 0x7f, "ELF", 1, 1, 1, 0 ; e_ident | ||
db 0, 0, 0, 0, 0, 0, 0, 0 | ||
dw 3 ; e_type = ET_DYN | ||
dw 3 ; e_machine = EM_386 | ||
dd 1 ; e_version = EV_CURRENT | ||
dd _start ; e_entry = _start | ||
dd phdr - $$ ; e_phoff | ||
dd shdr - $$ ; e_shoff | ||
dd 0 ; e_flags | ||
dw ehdrsize ; e_ehsize | ||
dw phdrsize ; e_phentsize | ||
dw 2 ; e_phnum | ||
dw shentsize ; e_shentsize | ||
dw 2 ; e_shnum | ||
dw 1 ; e_shstrndx | ||
ehdrsize equ $ - ehdr | ||
|
||
phdr: | ||
dd 1 ; p_type = PT_LOAD | ||
dd 0 ; p_offset | ||
dd $$ ; p_vaddr | ||
dd $$ ; p_paddr | ||
dd 0xDEADBEEF ; p_filesz | ||
dd 0xDEADBEEF ; p_memsz | ||
dd 7 ; p_flags = rwx | ||
dd 0x1000 ; p_align | ||
|
||
phdrsize equ $ - phdr | ||
dd 2 ; p_type = PT_DYNAMIC | ||
dd 7 ; p_flags = rwx | ||
dd dynsection ; p_offset | ||
dd dynsection ; p_vaddr | ||
dd dynsection ; p_vaddr | ||
dd dynsz ; p_filesz | ||
dd dynsz ; p_memsz | ||
dd 0x1000 ; p_align | ||
|
||
shdr: | ||
dd 1 ; sh_name | ||
dd 6 ; sh_type = SHT_DYNAMIC | ||
dd 0 ; sh_flags | ||
dd dynsection ; sh_addr | ||
dd dynsection ; sh_offset | ||
dd dynsz ; sh_size | ||
dd 0 ; sh_link | ||
dd 0 ; sh_info | ||
dd 8 ; sh_addralign | ||
dd 7 ; sh_entsize | ||
shentsize equ $ - shdr | ||
dd 0 ; sh_name | ||
dd 3 ; sh_type = SHT_STRTAB | ||
dd 0 ; sh_flags | ||
dd strtab ; sh_addr | ||
dd strtab ; sh_offset | ||
dd strtabsz ; sh_size | ||
dd 0 ; sh_link | ||
dd 0 ; sh_info | ||
dd 0 ; sh_addralign | ||
dd 0 ; sh_entsize | ||
dynsection: | ||
; DT_INIT | ||
dd 0x0c | ||
dd _start | ||
; DT_STRTAB | ||
dd 0x05 | ||
dd strtab | ||
; DT_SYMTAB | ||
dd 0x06 | ||
dd strtab | ||
; DT_STRSZ | ||
dd 0x0a | ||
dd 0 | ||
; DT_SYMENT | ||
dd 0x0b | ||
dd 0 | ||
; DT_NULL | ||
dd 0x00 | ||
dd 0 | ||
dynsz equ $ - dynsection | ||
|
||
strtab: | ||
db 0 | ||
db 0 | ||
strtabsz equ $ - strtab | ||
global _start | ||
_start: |
Binary file not shown.
Binary file not shown.
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p_flags needs to move to after p_memsz (like in the PT_LOAD section)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested with this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm struggling to get a decent test environment set up. I can test with LD_PRELOAD on Android and
Linux debian-armel 3.2.0-4-versatile #1 Debian 3.2.51-1 armv5tejl GNU/Linux
. Neither are working for me (even after this change).