Skip to content

Instantly share code, notes, and snippets.

@pgib
Created October 30, 2009 23:55
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 pgib/222834 to your computer and use it in GitHub Desktop.
Save pgib/222834 to your computer and use it in GitHub Desktop.
Proof-of-concept to hide an exploit used to upload and execute a malicious script.
#!/usr/bin/perl
$pid = fork();
if ($pid)
{
print("Deleting $0 to be sneaky...");
unlink($0);
exit(0);
}
else
{
# hide our original location
chdir "/";
# stick around so our peeps can see us
sleep 300;
# do a bunch of other nasty stuff...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment