Question: #include #include #include #include #include char buffer [ 1 9 2 ] = ; char filename [ 1 9 2 ] =
#include
#include
#include
#include
#include
char buffer;
char filename;
int mainint argc, char argv
if argv
snprintffilenamevarchallengelevels basenameargv;
printfChecking filename s
filename;
if accessfilename XOK
fprintfstderr "You do not have the permission to execute this file
;
return ;
else
fprintfstderr "Please provide the program name
;
return ;
if argv
strcpybuffer argv;
else
getsbuffer;
printfExecuting filename s
filename;
execlpfilename filename, buffer, char ;
return ;
What are the vulnerabilities in this program? how can I exploit
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
