Professional Documents
Culture Documents
Running Head: BUFFER OVERFLOWS 1
Running Head: BUFFER OVERFLOWS 1
Running Head: BUFFER OVERFLOWS 1
Authors name
Institution
BUFFER OVER FLOWS 2
Buffer overflow
Buffer overflow is a region in a computers memory that contains limits in context with
In the example above, buff stands for a range of 20 b where buff [19] is the right limit and buff
Another example is
arr stands for an array 20. Taking an assumption that the integer size is 4 bytes then the total
size of the buffer arr is 20 times four which is equal to 80 bytes. Therefore, a buffer overflows
when data files past right or left limit of the buffer. In this way, the data records into a memory
portion that does not fit in the variable of the program which adjusts the buffer.
For instance:
char buff [20];
In the example above, there is an array of size 20 bytes. The 20 b of the buffer can be the same as
index 0-index 19. But, in the following line, 20 stands as a store value of a. In such a situation is
where a buffer overrun takes place as data records beyond the buffers right boundary.
Buffer overflows attacks are frequent and gives an attacker access to have a substantial
extent of control over a machine. Through exploitation of operating systems and vulnerable
application, attackers can use commands of their choice on targeted machines and take over the
computer of the victim. For instance, picture if I execute one or more commands on a valuable
server, or works station. Depending on the rights I would have to use these commands to add
BUFFER OVER FLOWS 3
accounts, control GUI remotely, and change systems configuration. Attackers like the ability to
execute commands on targeted machine. Buffer flow vulnerability takes place when attackers
send much data to a program that is more vulnerable than the first software planned for at the
time of writing the program code (Gregory, 98). The overflowed buffer is a variable employed
by a target program. The flaws are always as a result of shoddy programming, with a person who
does not create code to look for the user input size before moving it into memory. With such
mistakes, an attacker is in a position to send more data, possibly changing the target program
flow.
There are several ways to prevent buffer overflows attack. To start with, if the language
one chooses split equally between one this allows direct access to memory and the other that
does not opt for the one that does not. To be precise, choose Java, Python, Perl or Lisp over C++.
Secondly, in languages that memory can be accessed directly, where classes exist that hold
memory, for instance, std::string, employs them. Choose well worked out classes over classes
with fewer users. Thirdly, apply compiler options as DEP and ASLR. Use security linked
compiler options which your application presents (Deckard, 224). The compilers options will aid
mitigate the effect of any overflow. Fourthly, use analysis tools of static code like Veracodes or
Qualys service to find out overflows that were not meant to be in the system (Deckard, 263).
Then resolve the stuff that the developer finds. Fifthly, study how overflows operate, and how to
identify overflows in code. Sixthly, if there are resources, hire experts to evaluate your product.
They will polish your product and better it. Seventhly, ensure that your quality assurance team
BUFFER OVER FLOWS 4
knows to test for overruns and learn how they work. Lastly, do fuzzing which finds many
References
Deckard, J. (2005). Buffer Overflow Attacks: Detect, Exploit, Prevent. Syngress publishing