I have a binary that does this:
if (strstr(USERCONTROLLERSTRING, "..")) exit;
fopen(CurrentPath+"\\Data\\"+USERCONTROLLEDSTRING, "r");
then spits out all the content of the file. Is there any obvious vulnerability here?
Its a Windows service, it runs as SYSTEM, I'm trying to make it read sensitive files such as SAM or maybe some other vulnerability.
It only checks for ".."
and it appends user provided arbitrary string to CURRENTPATH+"\\Data\\"
then calls fopen
P.S. Encoding, unicode, base64, %-coding, etc won't work as it does the strstr
right before fopen
call after all the decoding. But that's pretty much it, no other checks are done
P.P.S. Its a Windows EXE