# Keylogger program.



## anshul (Jun 17, 2008)

Hey guys I am trying to make my own keylogger program in C and think that it has 3 steps:>
1. Execute an endless loop which constantly recieves keytaps and saves them into a file.
2. Schedule it to start everytime system starts.
3. Make it run in the background and recieve kaytaps on any window or program.

The first step was easy and second can be done by putting it in autoexec.bat.
But How to Do the third step. ?

Can anyone Help??


----------



## sreenidhi88 (Jun 18, 2008)

anshul said:


> Hey guys I am trying to make my own keylogger program in C and think that it has 3 steps:>
> 1. Execute an endless loop which constantly recieves keytaps and saves them into a file.
> 2. Schedule it to start everytime system starts.
> 3. Make it run in the background and recieve kaytaps on any window or program.
> ...



are you using windows hook procedure for this??
which compiler are you using??give us more details!!

3>you can run it in the background but it wil be displayed in the processes list.
use windows hook procedures to get the key strokes.and to hide the process
2>u can also use registry to start a program as well as start up folderwhen system starts.
using multiple ways is always better than relying on single way.

atb


----------



## hullap (Jun 18, 2008)

isnt this illegal 
reported


----------



## prem4u (Jun 18, 2008)

hullap said:


> isnt this illegal
> reported




he is developing his own code...so why it is illegal....?


----------



## Roadripper (Jun 18, 2008)

Tahts gr8 man .. let us knw once ur done .. it shdnt get detected in the processes or in the add remove programs.....


----------



## pushkar (Jun 18, 2008)

Why should it be illegal? Keyloggers are used for constructive purposes also, like in offices.


----------



## dheeraj_kumar (Jun 18, 2008)

Keyloggers are not illegal. Learning to program one is probably the best way to learn windows hooking.

Now, you are way better off doing this stuff in windows c++. your "techniques" wont get you anywhere. If you dont know, learn it.



> 1. Execute an endless loop which constantly recieves keytaps and saves them into a file.


This works, but there are better methods.


> 2. Schedule it to start everytime system starts.


Okay, this is necessary, but you should hide it from task manager, etc.


> 3. Make it run in the background and recieve kaytaps on any window or program.


Heh, you wont EVER get this done unless you learn c++. Enough said. There is something called GetAsyncKeyState which beginning keylogger programmers use.


----------



## anshul (Jun 19, 2008)

I am using Bloodshed Dev C++.I don't konw about the hook algorithm can You post some useful link and I will try to improvise.


----------



## dheeraj_kumar (Jun 19, 2008)

google "keyboard hook"


----------



## raghavpande123 (Mar 8, 2009)

yes u can do 3 procedures and also GetAsyncKeyState can be used to trap keys (for beginners).
u can use windows.h file as header and then write down this code for hiding the window but task manager still shows it.
/*
HWND vanish;
AllocConsole();
vanish=FindWindowA("ConsoleWindowClass",'\0');
ShowWindow(vanish,0);
*/
this is the handle method.


----------



## dheeraj_kumar (Mar 8, 2009)

He needs kernelmode drivers for a good keylogger. BTW this is ten months old...


----------



## anshul (Mar 13, 2009)

Dont worry friends.........I am still listening....and always open to suggestions......

Where can we get a offline copy of the entire MS API reference..........
Because I am trying my hands on disassembly nowadays..........


----------



## Rebecca Joiesh (Mar 14, 2009)

Did you check here?
*msdn.microsoft.com/en-us/library/aa383749(VS.85).aspx
*blogs.msdn.com/windowssdk/archive/2008/02/21/how-to-find-api-references-alphabetically.aspx


----------



## dheeraj_kumar (Mar 14, 2009)

@anshul

*www.carabez.com/downloads/win32api_big.zip

Very famous... Win32 API Programmer's Reference Guide

I'm interested in disassembly as well  I've done a bit of cracking, but moved on to game hacking - imho one of the best uses of disassembly


----------



## anshul (Mar 16, 2009)

Well I also plan to learn the same thing someday............but would also want to learn it as a important factor in career.

So I would highly appreciate it if you could send me some useful links and resources about disassembly and cracking.


----------



## dheeraj_kumar (Mar 17, 2009)

^^ 
crackmes.de
tuts4you.com has lots of resources in disassembling and unpacking.
unpack.cn's english section.

extalia.com for game hacking
gamehacking.com
cheatengine.org/forum


----------



## grvpuri (Mar 27, 2009)

> 3. Make it run in the background and recieve kaytaps on any window or program


 
You should know how to make a TSR (Terminate and stay resident).


----------



## lilovirus (Apr 4, 2009)

Long timeback it was written, but still it works
checkout this page
*www.codeguru.com/cpp/w-p/system/logging/article.php/c8709/


----------

