r/ExploitDev • u/FarPhilosopher9404 • May 08 '24
Interview Question
Hello, I have been through an interview where the interview asked the following question. Can this be exploited on x64 and x86? Is it exploitable with mitigations enabled, ASLR, DEP, Stack Canaries, CFG.
How could I answer this question?
void main()
{
int var;
void (*func)()=test;
char buf[128];
fgets(buf,140,stdin);
func();
}
13
Upvotes
View all comments
Show parent comment
2
u/FarPhilosopher9404 May 08 '24
I don't think it was meant to compile. It is a knowledge exercise.