Programming
5.2 Guided PracticeSecure C Programming
In this guided practice, we will demonstrate how to easy it is to create a buffer overflow condition. The example below builds on the Importance of Writing Secure Code Discussion. We are going to write a program that lends itself to a buffer overflow, compile it, and run it. Note that the example illustrates what could happen. Running this program will not necessarily give you root access. It is used to demonstrate a weakness that could be exploited.
Instructions
Follow these instructions to complete your assignment:
1. Enter the code (from the Code tab) into your compiler.
2. Compile your code and run it.
3. Answer the following critical thinking questions. Save your answers in a Word document.
1. What happens if you enter a string greater than eight characters?
2. How can a buffer overflow be avoided?
4. Upload your .c Source file and your.docx Word file into the Dropbox for grading.
· Code