Question: #include int main ( int argc, char * * argv ) { char buffer [ 6 4 ] ; gets ( buffer ) ; /

#include
int main(int argc, char **argv)
{
char buffer[64];
gets(buffer);
//strcpy(password, buffer);
if (strcmp(buffer, "pass123")==0)
{
printf("Access Granted!
");
}
else
{
printf("Access Denied!
");
}
return 0;
}
Above is a snippet of my code. With following being the question1. The C Program file (Task2_1.c) has been provided on AULA:
a. Exploit the vulnerability in the code (20 marks)
b. Explain the vulnerability by using reverse engineering techniques (10 marks)
c. Provide a solution to the vulnerability (10 marks)s.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!