How To Solve Buffer Overflow
How To Solve Buffer Overflow
net/publication/349880942
The Buffer Overflow Attack and How to Solve Buffer Overflow in Recent
Research
CITATION READS
1 2,649
2 authors, including:
Samah Alhusayni
Taif University
4 PUBLICATIONS 3 CITATIONS
SEE PROFILE
All content following this page was uploaded by Samah Alhusayni on 08 March 2021.
The Buffer Overflow Attack and How to Solve Buffer Overflow in Recent
Research
Abstract
Buffer overflow attacks, whether by software error or an attack, is one of the most important
security problems that represent a common vulnerability of software security and cyber risks. In
this paper, we will present simple concepts of the buffer overflow attack, its types,
vulnerabilities, and a protection mechanism from exploiting vulnerabilities. In the last, it will be
presented More than one way to detect and solve buffer overflow.
Keywords
Buffer Overflow, stack , heap , vulnerable , Recent studies, detect and solve , from templates and
k-induction, SD2-C2M2, Fuzzing , code-level model, BOVP model ,Adaptable and Automated
Static Analysis Framework.
www.ajrsp.com 1
Academic Journal of Research and Scientific Publishing | Vol 2 | Issue 19
Publication Date: 5-11-2020 ISSN: 2706-6495
1. Introduction
Buffer overflow attacks became known as one of the Morris Worm Web attack in 1988[3].Buffer
overflow are the most popular type of vulnerability over the last decade This fact written in
2000[5] . and today buffer overflow threats is the most growing and severe form of vulnerability
in software , it has become increasingly critical issues as network security[18].The buffer
overflow problem is a root in software security as it pertains to the way the low-level computer
works.
More of the buffer overflow issues are possibly the product of poor programming, and could be
detected and resolved by the suppliers before the software was released if the suppliers had
carried out basic checking or code corrections along the way.Buffer overflows[4].Buffer
overflow is an phenomenon that happens when program passes data to a buffer overruns the
buffer's space, causes in the overwriting of neighboring memory locations[2].When the program
accesses memory addresses beyond specified memory regions, are considered to reason for a
large of software vulnerabilities[6].The buffer issue classification has the largest percentage of
vulnerabilities, nearly 14.08 per cent based on distribution of bugs in the June 2017 Document of
(CNNVD) , owing to the different types of buffer overflow drawbacks, it is difficult to logically
deduce buffer overflows and owing to the vast range of application root programming and
complicated logical invock rates, several weaknesses in a time and typically detection software
weakness involves could not be easily detection of source code and Boolean analysis [18].
The remainder of this article is structured accordingly. The definition of buffer is illustrated in
section 2. In section 3 I discusses buffer overflow attack concept , types, vulnerabilities, and a
protection mechanism from exploiting vulnerabilities. Section 4 view recent research to detect
and solve the buffer overflow. The paper will be closed in Section 5.
2. Background
A buffer is a compact memory space within a device that can contain several cases of a certain
data form[18].The buffer is often in RAM, which is an area to temporarily store physical
memory of data when moved from one place to another and help improve performance, as most
modern hard disks benefit from in accessing data efficiently[2]. Some internet services are based
on buffers such as their use to prevent internet outages and changing the connection speed in the
video stream so that part of the video is stored and is streamed from the buffer that is designed to
www.ajrsp.com 2
Academic Journal of Research and Scientific Publishing | Vol 2 | Issue 19
Publication Date: 5-11-2020 ISSN: 2706-6495
accommodate a specific amount of the program, otherwise when sending more than the buffer
capacity will overflow to overwrite the neighboring memory data[2]this exceed called buffer
overflow.
www.ajrsp.com 3
Academic Journal of Research and Scientific Publishing | Vol 2 | Issue 19
Publication Date: 5-11-2020 ISSN: 2706-6495
The stack frame is the data set for a single call for a subprogram in the stack[18]. Typically, a
stack frame contains the return address, the stacked arguments, the local variables, and the stored
copies of the sub-software updated registers[18].A modern structure for a stack is formed and
placed Under a particular stack frame every time the function is called (shown in Firure1)
[18].The EBP is the basic indicator for the recent stack frame, which marks to a high address at
the top of the stack and doesn't alter while the ESP is the recent stack indicator which marks to
the next offered byte of that stack and differs with operate implementation[18].A buffer overflow
on the base of the stack happens when a program writes data that increases of the capacity that
the stack assigns to the buffer at the stack memory[18].A buffer overflow on the base of the stack
happens when a program writes data that increases of the capacity that the stack assigns to the
buffer at the stack memory[18].It is the most popular kind of buffer overflow attack which means
a buffer on the request stack is overflowed[2].
www.ajrsp.com 4
Academic Journal of Research and Scientific Publishing | Vol 2 | Issue 19
Publication Date: 5-11-2020 ISSN: 2706-6495
The problem with the code is induced by the comparison of marked integer, the process of
signed integer, and the comparison of unmarked integer and marked integer and the shortness
problem arises primarily when a large-order integer such as 64 bits is copied to a minimal-order
integer such as 32 bits[18].
3.1.3 Heap buffer overflows:
The heap is a space which is assigned as the code executes [18]. The user usually demands space
via malloc, fresh, etc. and manages the released space via the retrieved beginning address
pointer[18]. It must be considered as part of the memory after every use, by free, delete, etc. ;
otherwise it would produce a memory leak[18]. The heap blocks in the same heap are normally
memorized parallel And when code is inserted into a heap stack, code overflowing exceeds the
capacity of the heap stack, allowing the data overflow behind the heap block to protect the
peers[18].This kind of target enemies data in the distributed memory called the heap[2].
3.1.4 Unicode overflow:
Unicode Buffer Overflow appears by adding Unicode characters into an entry expecting ASCII
characters[20]. When ASCII code just includes Western language characters, Unicode can initial
a character for all languages. Setup the software in Unicode phase to delete the Unicode buffer
overflow and substitute cout, printf with wcout, wprintf alike[20].
3.1.5 Format-String Buffer Overflow:
Overflow of the format-string buffer happens with records and console. Often text strings are
compiled into wider formats directly[20]. The formatted string is entered by sprintf in a letter
array in the same way that 'printf' is used to insert the string in to the control information[10,
12].Many methods were suggested including runtime, debugging, and static analysis, but none
can differentiate between all kinds of format string vulnerabilities. The analysis method defines
the string features in the format. String processes typically include printf, fprintf, sprintf, etc.
This strategy measures only the flaw, but decreases the false positive rate[20].
www.ajrsp.com 5
Academic Journal of Research and Scientific Publishing | Vol 2 | Issue 19
Publication Date: 5-11-2020 ISSN: 2706-6495
From the reports of international authoritative emergency organizations, the insecure nature of
copy data over the scale of the target buffer resulted for approximately 1/2 of the overall
vulnerability in 2018[14]. The build-up of a buffer overflow vulnerability contains three
requirements: a memory allocation operation, the main requirement to buffer overflowing ; a
buffer copying process with bigger space of the stack space capacity so the buffer allocation
length the main reason of the issue[11].The vulnerability of the buffer overflow will be observed,
if the program meets all the requirements specified previously[11].
www.ajrsp.com 6
Academic Journal of Research and Scientific Publishing | Vol 2 | Issue 19
Publication Date: 5-11-2020 ISSN: 2706-6495
www.ajrsp.com 7
Academic Journal of Research and Scientific Publishing | Vol 2 | Issue 19
Publication Date: 5-11-2020 ISSN: 2706-6495
www.ajrsp.com 8
Academic Journal of Research and Scientific Publishing | Vol 2 | Issue 19
Publication Date: 5-11-2020 ISSN: 2706-6495
www.ajrsp.com 9
Academic Journal of Research and Scientific Publishing | Vol 2 | Issue 19
Publication Date: 5-11-2020 ISSN: 2706-6495
www.ajrsp.com 10
Academic Journal of Research and Scientific Publishing | Vol 2 | Issue 19
Publication Date: 5-11-2020 ISSN: 2706-6495
7. Reference
www.ajrsp.com 11
Academic Journal of Research and Scientific Publishing | Vol 2 | Issue 19
Publication Date: 5-11-2020 ISSN: 2706-6495
[10] W. HAN, M. REN, S. TIAN, L. DING and Y. HE, Static analysis of format string
vulnerabilities, 2011 First ACIS International Symposium on Software and Network
Engineering, IEEE, 2011, pp. 122-127.
[11] L. JIE, H. DA and R. ZHIHONG, An Analysis Model of Buffer Overflow Vulnerability Based
on FSM, Proceedings of the 2019 2nd International Conference on Geoinformatics and Data
Analysis, 2019, pp. 47-51.
[12] M. J. KHALSAN and M. O. AGYEMAN, An overview of prevention/mitigation against
memory corruption attack, Proceedings of the 2nd International Symposium on Computer
Science and Intelligent Control, 2018, pp. 1-6.
[13] E. LEON and S. D. BRUDA, Counter-measures against stack buffer overflows in
GNU/Linux operating systems, Procedia Computer Science, 83 (2016), pp. 1301-1306.
[14] Y. LI, S. JI, C. LV, Y. CHEN, J. CHEN, Q. GU and C. WU, V-fuzz: Vulnerability-oriented
evolutionary fuzzing, arXiv preprint arXiv:1901.01142 (2019).
[15] B. LIU, L. SHI, Z. CAI and M. LI, Software vulnerability discovery techniques: A survey,
2012 fourth international conference on multimedia information networking and security,
IEEE, 2012, pp. 152-156.
[16] P. MURTHY, Reducing buffer overflow, Google Patents, 2020.
[17] Ș. NICULA and R. D. ZOTA, Exploiting stack-based buffer overflow using modern day
techniques, Procedia Computer Science, 160 (2019), pp. 9-14.
[18] J. REN, Z. ZHENG, Q. LIU, Z. WEI and H. YAN, A Buffer Overflow Prediction Approach
Based on Software Metrics and Machine Learning, Security and Communication Networks,
2019 (2019).
[19] V. SACHIDANANDA, S. BHAIRAV and Y. ELOVICI, OVER: overhauling vulnerability
detection for iot through an adaptable and automated static analysis framework,
Proceedings of the 35th Annual ACM Symposium on Applied Computing, 2020, pp. 729-738.
[20] A. SHAHAB, M. NADEEM, M. ALENEZI and R. ASIF, An automated approach to fix
buffer overflows, International Journal of Electrical and Computer Engineering, 10 (2020),
pp. 3777.
www.ajrsp.com 12
Academic Journal of Research and Scientific Publishing | Vol 2 | Issue 19
Publication Date: 5-11-2020 ISSN: 2706-6495
Copyright © 2020 Samah Muhammed S. ALHusayn, Dr. Emad Alsuwat, AJRSP. This is an open-access
article distributed under the terms of the Creative Commons Attribution License (CC BY NC).
www.ajrsp.com 13