(A buffer is a contiguous block of machine memory that holds data of a given type while a program is running, and problems arise with dynamic allocation of variables. Most of the time, in order not to take up too much memory, a program with dynamically allocated variables decides how much memory to allocate to them when the program runs. If you think about it this way, if you want to put extra-long data in the dynamically allocated buffer for the program, it will overflow. A buffer overflow program uses the overflowed data to place assembly language code in the machine's memory, usually where root privileges are generated, which is not a good picture. As far as a single buffer overflow is concerned, it's not the biggest problem at the bottom. But if the overflow is sent to an area where commands can be run with root privileges, once those commands are run, it is tantamount to handing over the machine. This document includes the following attachments:
buffer overflow.doc
Including multiple files, please download and test by yourself!)