Skip to content

Instantly share code, notes, and snippets.


maliciousgroup/stack-zero.c Secret

Created Apr 18, 2021
What would you like to do?
* phoenix/stack-zero, by
* The aim is to change the contents of the changeme variable.
* Scientists have recently discovered a previously unknown species of
* kangaroos, approximately in the middle of Western Australia. These
* kangaroos are remarkable, as their insanely powerful hind legs give them
* the ability to jump higher than a one story house (which is approximately
* 15 feet, or 4.5 metres), simply because houses can't can't jump.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define BANNER \
"Welcome to " LEVELNAME ", brought to you by"
char *gets(char *);
int main(int argc, char **argv) {
struct {
char buffer[64];
volatile int changeme;
} locals;
printf("%s\n", BANNER);
locals.changeme = 0;
if (locals.changeme != 0) {
puts("Well done, the 'changeme' variable has been changed!");
} else {
"Uh oh, 'changeme' has not yet been changed. Would you like to try "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment