Exploit databaseDownload repository ZIP
GH-3237f28e4bc7c74a3157ac70ba28fe1c
0xffd700/neuland-ctf-2023
Sources for CVE-2023-32784
13 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files6
0xffd700/neuland-ctf-2023Revision 5c894bd06da7
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);
}