시스템 해킹/OverTheWire - Narnia
OverTheWire - Narnia1
ii4gsp
2020. 2. 22. 16:21
#include <stdio.h>
int main(){
int (*ret)();
if(getenv("EGG")==NULL){
printf("Give me something to execute at the env-variable EGG\n");
exit(1);
}
printf("Trying to execute EGG!\n");
ret = getenv("EGG");
ret();
return 0;
}
EGG라는 이름의 환경변수에 쉘 코드를 넣어주면 된다.
Narnia2 = nairiepecu