Skip to content

Instantly share code, notes, and snippets.

@fazlearefin
Created May 12, 2022 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fazlearefin/eed693dae891b687bbeab7e2ad5121c5 to your computer and use it in GitHub Desktop.
Save fazlearefin/eed693dae891b687bbeab7e2ad5121c5 to your computer and use it in GitHub Desktop.
#include <unistd.h>
void main() {
setuid(0);
setgid(0);
system("dirtyshellcmd"); /* create file dirtyshellcmd with shell command and make it available in $PATH */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment