home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / unix / passshad.c < prev    next >
Encoding:
C/C++ Source or Header  |  2003-06-11  |  8.9 KB  |  235 lines

  1. ─ &ALT.2600 (1:340/26) ───────────────────────────────────────────── &ALT.2600 ─
  2.  Msg  : 371 of 500                                                              
  3.  From : Virtual Touch 100           1:340/13                09 Dec 95  12:49:56 
  4.  To   : All                                                 09 Dec 95  18:14:04 
  5.  Subj : Re: UNIX PASSWORD SHADOWING                                             
  6. ────────────────────────────────────────────────────────────────────────────────
  7. .RFC-Path:
  8. news.spydernet.com!nntp.pinc.com!news.bctel.net!imci2!newsfeed.internetmci.com!u
  9. wm.edu!lll-winken.llnl.gov!fnnews.fnal.gov!nntp-server.caltech.edu!miikka
  10. From: miikka@gluttony.ugcs.caltech.edu (Virtual Touch 100)
  11. .RFC-Message-ID: <4acspl$anh@gap.cco.caltech.edu>
  12. .RFC-References: <rharley-2611951103170001@ip199.pom.primenet.com>
  13. <8175052094902@linetap.com> <49hvvp$4jj@batph8.bnr.ca>
  14. <49l4se$1bk@wilma.widomaker.com> <daemon9DIzEwz.54E@netcom.com>
  15. <49sk6a$2231@bigblue.oit.unc.edu> <daemon9DJ14t6.Bx4@netcom.com>
  16. .RFC-NNTP-Posting-Host: gluttony.ugcs.caltech.edu
  17. .RFC-X-Newsreader: NN version 6.5.0 #14 (NOV)
  18.  
  19. >: |i wouldn't post it.  Cuz then, the same thing would happen like the
  20. >: |MYANIIS #.  Unix encryption processes would be changed and made more
  21. >: |difficult.  Like maybe double encryption or using sixteen character
  22.  
  23. above healthy sceptic (who is totally wrong though) ignored...
  24.  
  25.  
  26.  
  27. >    Semlling conspiracy in everything can make you a lonely -- and
  28. >    MISLEAD -- individual.  You are wrong.
  29.  
  30. above more knowledgeable responder acknowledged...
  31.  
  32. But it is possible to invert unix passwords, though the inverse is not
  33. unique (from nonexistence of inverses of singular transformations)...
  34. note singular transformations can still be inverted, but the best you
  35. can do is a maybe very large subspace of the original wordspace.
  36.  
  37. Its probably better to take the following route:  (I wrote this
  38. while drunk last night on a dare so don't laugh too hard at how
  39. sh*tty it is: (it worked though, I got the guys password in an hour,
  40. given that I saw three keys from his password (though he types so fast
  41. I didn't know what order they were in)
  42.  
  43.  
  44. #include <stdio.h>
  45. #include <string.h>
  46.  
  47. #define IS_VOWEL( x )  (
  48. (x)=='a'||(x)=='e'||(x)=='i'||(x)=='o'||(x)=='u'||(dork7==(x)&&(x)=='y')?1:0 )
  49. #define IS_CONS( x )  (!IS_VOWEL( x ) && (x!='a'-1))
  50.  
  51. /* assumptions to increase speed: */
  52. /* no three vowels in a row */
  53. /* no three consonants in a row */
  54. /* assume y is vowel (bad) */
  55. /* qu j(nav) */
  56. /* maybe later do statistical sweep according to letter statistics */
  57. #define CHECK_V( a , b , c ) if(heur && IS_VOWEL(a) && IS_VOWEL(b) &&
  58. IS_VOWEL(c) ) continue
  59. #define CHECK_C( a , b , c ) if(heur && IS_CONS(a) && IS_CONS(b) && IS_CONS(c) )
  60. continue
  61. #define CHECK_QU( a , b ) if(heur && (a)=='q' && (b)!='u') continue
  62. #define CHECK_JNAV( a , b ) if(heur && (a)=='j' && IS_CONS(b)) continue
  63. #define CHECK_NULL( x ) if( (x)=='a'-1 ) continue
  64.  
  65.  
  66. #define MAX_WORDS 10000L
  67. void main(int argc,char **argv[])
  68. {
  69.   char letts[10];
  70.   char known[10];
  71.   int heur=0;
  72.   int cp,nc_mask;
  73.   int dork0,dork1,dork2,dork3,dork4,dork5,dork6,dork7=0;
  74.   long int cnt=0;
  75.   dork0='a'-1;
  76.   dork1='a'-1;
  77.   known[0]=0;
  78.   letts[0]=0;
  79.  
  80.   if(argc>2) {
  81.     printf("Only argument is letters that are known (if any).\n");
  82.     printf("maybe I will add number of keystrokes heard option\n");
  83.     printf("argv1,2 %d = %s %s\n",argc,argv[1],argv[2]);
  84.     exit(0);
  85.   }
  86.  
  87.   if(argc==2) {
  88.     sprintf(known,"%s\0",argv[1]);
  89.     printf("known letters are [%s]\n",known);
  90.     if(strchr(argv[1],'H')) {
  91.       heur++;
  92.       printf("using heuristics\n");
  93.     }
  94.   }
  95.  
  96.   if(argc==0) {
  97.     printf("entering heuristics mode\n");
  98.     heur++;
  99.     printf("maybe instead use following options: (not ready)\n\n");
  100.     printf("-S:aght  known substring ""aght""\n");
  101.     printf("-T:aght  time ordered chars ""aght""\n");
  102.     printf("-K:aght  known chars ""aght"" maybe out of order\n");
  103.     printf("-L:7     known length 7 characters\n");
  104.     printf("-H:qu    use heuristic ''u'' always follows ''q''\n");
  105.     printf("-M:700   maximum generate 700 passwords\n");
  106.     printf("-X:j5    exclude fifth key as ''j''\n");
  107.     printf("-F:d3    force third key to be ''d''\n");
  108.     printf("-I:6     minimum length 6 characters\n");
  109.     printf("-A:7     maximum length 7 characters\n");
  110.     heur++;
  111.   }
  112.  
  113.  
  114.   for(dork0 = 'a'-1; dork0<='z'; dork0++) {
  115.   for(dork1 = 'a'-1; dork1<='z'; dork1++) {
  116.     CHECK_QU(dork0,dork1);
  117.     CHECK_JNAV(dork0,dork1);
  118.   for(dork2 = 'a'-1; dork2<='z'; dork2++) {
  119.     CHECK_NULL( dork2 );
  120.     CHECK_V(dork0,dork1,dork2);
  121.     CHECK_C(dork0,dork1,dork2);
  122.     CHECK_QU(dork1, dork2);
  123.     CHECK_JNAV(dork1,dork2);
  124.   for(dork3 = 'a'-1; dork3<='z'; dork3++) {
  125.     CHECK_NULL( dork3 );
  126.     CHECK_V(dork1,dork2,dork3);
  127.     CHECK_C(dork1,dork2,dork3);
  128.     CHECK_QU(dork2,dork3);
  129.     CHECK_JNAV(dork2,dork3);
  130.   for(dork4 = 'a'-1; dork4<='z'; dork4++) {
  131.     CHECK_NULL( dork4 );
  132.     CHECK_V(dork2,dork3,dork4);
  133.     CHECK_C(dork2,dork3,dork4);
  134.     CHECK_QU(dork3,dork4);
  135.     CHECK_JNAV(dork3,dork4);
  136.   for(dork5 = 'a'-1; dork5<='z'; dork5++) {
  137.     CHECK_NULL( dork5 );
  138.     CHECK_V(dork3,dork4,dork5);
  139.     CHECK_C(dork3,dork4,dork5);
  140.     CHECK_QU(dork4,dork5);
  141.     CHECK_JNAV(dork4,dork5);
  142.   for(dork6 = 'a'-1; dork6<='z'; dork6++) {
  143.     CHECK_NULL( dork6 );
  144.     CHECK_V(dork4,dork5,dork6);
  145.     CHECK_C(dork4,dork5,dork6);
  146.     CHECK_QU(dork5,dork6);
  147.     CHECK_JNAV(dork5,dork6);
  148.   for(dork7 = 'a'-1; dork7<='z'; dork7++) {
  149.     CHECK_NULL( dork7 );
  150.     CHECK_V(dork5,dork6,dork7);
  151.     CHECK_C(dork5,dork6,dork7);
  152.     CHECK_QU(dork6,dork7);
  153.     CHECK_JNAV(dork6,dork7);
  154.   {
  155.     letts[0]=dork0; letts[1]=dork1; letts[2]=dork2; letts[3]=dork3;
  156.     letts[4]=dork4; letts[5]=dork5; letts[6]=dork6; letts[7]=dork7;
  157.  
  158.     nc_mask=0;
  159.     if(argc==2) {
  160.       for(cp=0;(known[cp]<='z')&&(known[cp]>='a');cp++) { /* scan all known
  161. chars */
  162.     if(strchr(letts,known[cp])==0) nc_mask++; /* not found means bad */
  163.       }
  164.     }
  165.     if(nc_mask) continue;
  166.  
  167.     if(dork0 != 'a'-1) fprintf(stdout,"%c",dork0);
  168.     if(dork1 != 'a'-1) fprintf(stdout,"%c",dork1);
  169.     if(dork2 != 'a'-1) fprintf(stdout,"%c",dork2);
  170.     if(dork3 != 'a'-1) fprintf(stdout,"%c",dork3);
  171.     if(dork4 != 'a'-1) fprintf(stdout,"%c",dork4);
  172.     if(dork5 != 'a'-1) fprintf(stdout,"%c",dork5);
  173.     if(dork6 != 'a'-1) fprintf(stdout,"%c",dork6);
  174.     if(dork7 != 'a'-1) fprintf(stdout,"%c",dork7);
  175.     fprintf(stdout, "\n");
  176.     cnt++;
  177.     if((cnt % 1000)==0) printf("thousand_more\n");
  178.     if(cnt>=MAX_WORDS) {
  179.      printf("Done.\n");
  180.      exit(0);
  181.     }
  182.   }
  183.   }}}}}}}}
  184. }
  185. --- ifmail v.2.8.lwz
  186.  * Origin: California Institute of Technology, Pasadena (1:340/13@fidonet)
  187.  
  188. ─ &ALT.2600 (1:340/26) ───────────────────────────────────────────── &ALT.2600 ─
  189.  Msg  : 365 of 500                                                              
  190.  From : Virtual Touch 100           1:340/13                09 Dec 95  12:35:00 
  191.  To   : All                                                 09 Dec 95  18:14:00 
  192.  Subj : Re: decompilers-fact or fiction?                                        
  193. ────────────────────────────────────────────────────────────────────────────────
  194. .RFC-Path:
  195. news.spydernet.com!nntp.pinc.com!news.bctel.net!news.cyberstore.ca!math.ohio-sta
  196. te.edu!uwm.edu!lll-winken.llnl.gov!fnnews.fnal.gov!nntp-server.caltech.edu!miikk
  197. a
  198. From: miikka@gluttony.ugcs.caltech.edu (Virtual Touch 100)
  199. .RFC-Message-ID: <4acrtk$9u9@gap.cco.caltech.edu>
  200. .RFC-References: <49sfl9$foj@news.ios.com>
  201. .RFC-NNTP-Posting-Host: gluttony.ugcs.caltech.edu
  202. .RFC-X-Newsreader: NN version 6.5.0 #14 (NOV)
  203.  
  204. joe@soho.ios.com (Kent Robotii) writes:
  205.  
  206. >DOSE ANYONE KNOW WHERE TO GET A DECOMPILER
  207. >FOR C AND OR C++?
  208.  
  209. first: quit typing in uppercase, it is considered a signature of a neophyte.
  210.  
  211. second: decompilers exist, I had one but deleted it after the dissappointment.
  212. I compiled a very simple program (c=a+b, give a and b hardcoded values)
  213. and decompiled it.  I got several hundred k of C source/pseudosource out.
  214. Unless you are using your own personal home-built compiler with the most
  215. primitive possible code generation a decompiler will do you no good,
  216. it gets stuck spewing thousands of lines of code to represent relatively
  217. simple statements.  It may have been that the implementation I was using was
  218. poorly designed, since a decompiler is possible given a reversible compilation
  219. algorithm.
  220.  
  221.  
  222. -----BEGIN PGP PUBLIC KEY BLOCK-----
  223. Version: 2.6
  224.  
  225. mQCNAy+/DmUAAAEEAJ8xv33LOZTThs1DmWVh+dwxdVKZYmdWuTuYzglIF9fZ3hE7
  226. D93E+pFFRF2we+co90KxXTmkR4qnRQDZVZ39NMqCT/AdazBafSOONtZZfQMMYBfZ
  227. s+2wCRmDpyRx7OXBDB0JdrFUZ5hKOXj6wNW7FlTvNvJ5FhQInbGJUbypojHNAAUR
  228. tCxNaWlra2EgTS4gS2FuZ2FzIDxtaWlra2FAYWx1bW5pLmNhbHRlY2guZWR1Pg==
  229. =/Ro5
  230. -----END PGP PUBLIC KEY BLOCK-----
  231. http://www.alumni.caltech.edu/~miikka
  232. --- ifmail v.2.8.lwz
  233.  * Origin: California Institute of Technology, Pasadena (1:340/13@fidonet)
  234.  
  235.