Exploit database

GH-3237f28e4bc7c74a3157ac70ba28fe1c

0xffd700/neuland-ctf-2023

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2023-32784

13 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files6

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

CTF Challenges/PWN/Safe_Return/challange.c

C · 442 bytes
#undef _FORTIFY_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

void safe_function()  {
	char buf[64];
	read(STDIN_FILENO, buf,128);
}

void priv_fix() {
	gid_t gid = getegid();
	setresgid(gid, gid, gid);
}

void greeting()
{
  char buf[48];
  read(0, buf, sizeof(buf)+4);
  puts(buf);
}

int main(int argc, char** argv) {
        priv_fix();
	greeting();
	safe_function();
	write(STDOUT_FILENO, "Hello, Neuland\n", 13);
}