Is it possible to perform a stack smashing attack using a buffer in the heap? No Yes
Added by Paul W.
Step 1
A stack smashing attack typically involves overflowing a buffer located on the stack, which can overwrite the return address of a function and allow an attacker to execute arbitrary code. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 70 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Akash M.
Assignment. Given the following C code file, perform a stack smash on the vuln.c code file using a C program that you create named exploit.c. The vuln.c code must be compiled in its own, seperate program and must not be altered from its original state. // vuln.c #include <stdio.h> #include <string.h> int main(int argc, char **argv) { // Make some stack information char a[100], b[100], c[100], d[100]; // Call the exploitable function exploitable(argv[1]); // Return everything is OK return(0); } int exploitable(char *arg) { // Make some stack space char buffer[10]; // Now copy the buffer strcpy(buffer, arg); printf("The buffer says .. [%s/%p]. ", buffer, &buffer); // Return everything fun return(0); }
Buffer overflow, sql injection, and stack smashing are examples of:
Madhur L.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD