From the course: Learning Assembly Language

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Writing a vulnerable assembler program

Writing a vulnerable assembler program - Python Tutorial

From the course: Learning Assembly Language

Start my 1-month free trial

Writing a vulnerable assembler program

- [Instructor] A common technique for an attacker to achieve remote code execution on a target system is to send a specially crafted exploit packet to one of its services, in order to achieve what's known as a buffer overflow attack. This provides direct execution of payload code sent in with the packets. One of the best ways to protect against this is to understand how it works. Let's have a look at Buffalo, a simple Microsoft assembler program, to demonstrate buffer overflows. We have a title and have included the MASM32 RT libraries. In the data section, we have a message and a simulated packet buffer, which contains a name. In the code section at line 10, we push the addresses of the message and the name onto the stack and then call a sub-routine, called mcon, which is used to construct a message. We then display the message and exit. Starting at line 19, we begin the sub-routine by saving EBP and then storing…

Contents