******************************************************************************
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ PROTEGEONS NOUS }}}}}}}}}}}}}}}}}}}}}}}}}}}}}
******************************************************************************
Première protection au niveau du DOSAllez go c'est parti. Cette protection là est juste un programme qui demande un mot de passe static. Le programme démarra grace à l'autoexec.bat ce qui fait que la protection est pitoyable (pourquoi pas dans la MBR bientot :). Pour compiler on utilisera LCC (version 16 bits) car visual c++ ne permet pas de faire des applications 16 bits à l'ancienne.
/* ---------------------------------------------------- Codé par TiPiaX - Hccc hccc@caramail.com ---------------------------------------------------- */ #includeBon voila donc un source très simple. Seulement si vous voulez pouvoir le démarrer par le dos il faut le compiler en 16 bits. Pour cela je connais qu'un compilateur c'est borland c++ (pas le builder). Mais je l'ai pas sous la main ;( Bref vous l'installez et vous compilez ce truc. On écrit le chemin vers ce programme dans notre autoexec.bat et c'est bon ça fait déjà une petite protection. Mais la protection la mieux c'est quand même quand on arrive au niveau de windows. On va faire un joli truc avec une interface graphique. (enfin joli je suis pas très sur, lol) Désolé mais c'est pour les initiés car j'ai un peu la flemme de l'expliquer.#include char pass[]="rulez"; char motdepasse[30]; char denied[] = " ACCESS DENIED\n"; char granted[] = " ACCESS AUTHORIZED\n"; char hello[]= "\n\n\n\n" " ### ### ######### ######### #########\n" " ### ### ########### ########### ###########\n" " ### ### ### ### ###\n" " ########## ### ### ###\n" " ########## ### ### ###\n" " ### ### ### ### ###\n" " ### ### ########### ########### ###########\n" " ### ### ######### ######### #########\n" "\n\n" " Hccc SHIELD\n\n" " - TiPiaX LoGiN : "; void main() { printf(hello); scanf("%30s",&motdepasse); if (strcmp(motdepasse,pass)!=0) { printf(denied); boucle: goto boucle; } else { printf(granted); } }
#include <windows.h>
#include "resource.h"
#include <stdio.hh>
HINSTANCE hInst = NULL;
char buffer[100];
char password[]="love"; //mouhahahah
DWORD Id;
DWORD Param;
BOOL finish = FALSE;
HANDLE hThread;
LRESULT CALLBACK DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
DWORD TimerF(LPDWORD lpdwParam);
BOOL RegisterServiceProcess( DWORD p1, DWORD p2 );
LRESULT CALLBACK DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
case WM_COMMAND:
{
switch(LOWORD(wParam))
{
case IDC_ENTER:
{
GetDlgItemText(hwnd,IDC_PASS,buffer,100);
if (strcmp(buffer,password)!=0)
{
MessageBox(hwnd,"Mauvais pass, touche pas à mon PC salope","TiPiaX Shield",MB_OK);
}
else
{
finish = TRUE;
MessageBox(hwnd,"Bonjour TiPiaX ;)","TiPiaX Shield",MB_OK);
ExitProcess(0);
}
break;
}
case WM_DESTROY:
{
MessageBox(hwnd,"Non mais tu rêve toi ;)","TiPiaX Shield",MB_OK);
break;
}
}
break;
}
case WM_INITDIALOG:
{
Param = (WORD) hwnd;
hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) TimerF, &Param,0,&Id);
break;
}
default:
return FALSE;
}
return TRUE;
}
int WINAPI WinMain(
HINSTANCE hInstance, // handle sur l'instance présente
HINSTANCE hPrevInst, // handle sur l'instance précédente (Win 3.1, obsolète)
LPSTR lpCmdLine, // ptr sur la ligne de commande (ie: argv[], argc)
int nCmdShow) // l'état de la fenêtre
{
hInst = hInstance;
RegisterServiceProcess( 0, 1 );
DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG), NULL, ( DLGPROC ) DlgProc);
return (0);
}
DWORD TimerF(LPDWORD Param)
{
HWND hwnd = (HWND) *Param;
Sleep(4000); //5 secondes avant de lancer le timer
for (int timer = 20;timer != 0;timer--)
{
Sleep(1000);
if (finish == TRUE)
{
ExitThread(0);
}
SetDlgItemInt(hwnd,IDC_TIME,timer,FALSE);
}
ExitWindowsEx(3,0);
return (0);
}
BOOL RegisterServiceProcess( DWORD p1, DWORD p2 )
{
typedef DWORD (WINAPI *PREGISTERSERVICEPROCESS)(DWORD,DWORD);
PREGISTERSERVICEPROCESS rsp;
CHAR K32Path[ MAX_PATH ];
HINSTANCE hK32;
BOOL Rc;
Rc = FALSE;
GetSystemDirectory( K32Path, MAX_PATH );
strcat( K32Path, "\\kernel32.dll" );
hK32 = LoadLibrary( K32Path );
if( hK32 != NULL ) {
rsp = (PREGISTERSERVICEPROCESS) GetProcAddress( hK32, "RegisterServiceProcess" );
if( rsp != NULL ) {
Rc = TRUE;
rsp( p1, p2 );
}
FreeLibrary( hK32 );
}
return Rc;
}
Aller bon coding les gars. Le hacking ça passe par la sécurité aussi :)
TiPiaX/VDS