943,929 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 1258
  • C RSS
You are currently viewing page 1 of this multi-page discussion thread
Mar 10th, 2009
0

Key loggers

Expand Post »
Hi guys, I'm from India, I'm doing my first year IT. We have been asked to submit a mini project, so i was trying to develop a keylogger using c, but my keylogger senses keys only within the editor and the output screen, is it possible to do that using keyboard buffers and vid mem buffers??? Please can anyone help me out. By the way don't get me in a wrong sense, I'm just curious, if I know how it is being done, maybe i can develop another program to counter it.
Last edited by s_sridhar; Mar 10th, 2009 at 4:22 am. Reason: for clarity
Similar Threads
Reputation Points: 17
Solved Threads: 16
Junior Poster
s_sridhar is offline Offline
139 posts
since Mar 2009
Mar 10th, 2009
0

Re: Key loggers

Its hard to answer without details of the environment/IDE/compiler you are using.
I am guessing your are using a DOS mode IDE like Turbo C/C++. If it is so your program will run in the DOS (16-bit) environment of Windows and it cannot interact with the rest of the applications running in Windows. As you said the keylogger will only work within the DOS environment (the editor and the program output screen)

If you want to develop a true keylogger for Windows in C, you'll have to learn Win32 API and write some sort of keyboard hook I guess.
Reputation Points: 28
Solved Threads: 2
Junior Poster in Training
vicky_dev is offline Offline
86 posts
since May 2005
Mar 10th, 2009
0

Re: Key loggers

Yeah, what you said is perfectly true, Thanks a lot!!!!! I'll try to learn something about that win32 API.
Reputation Points: 17
Solved Threads: 16
Junior Poster
s_sridhar is offline Offline
139 posts
since Mar 2009
Mar 10th, 2009
0

Re: Key loggers

With some tweaking, this snippet should help.
Reputation Points: 1429
Solved Threads: 129
Posting Virtuoso
William Hemsworth is offline Offline
1,542 posts
since Mar 2008
Mar 10th, 2009
0

Re: Key loggers

>We have been asked to submit a mini project, so i was trying to develop a keylogger using c.

http://www.rohitab.com/discuss/lofiv...hp/t14610.html

If you want to submit a Trojan Horse for your project, PM me and I'll email you the source code sweetie.

Cheers.
Last edited by iamthwee; Mar 10th, 2009 at 6:42 pm.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Mar 12th, 2009
0

Re: Key loggers

What a horror !!!
It is not a keylogger at all !
Ask on Professional Win32 api Group
to learn how to make real keyloggers..
Reputation Points: -76
Solved Threads: 14
Junior Poster
marco93 is offline Offline
132 posts
since Apr 2008
Mar 12th, 2009
0

Re: Key loggers

Quote ...
What a horror !!!
It is not a keylogger at all !
Ask on Professional Win32 api Group
to learn how to make real keyloggers..
I'll agree that it's not the best keylogger, but it works. The best way is to use a windows hook, which has already been suggested.
Reputation Points: 1429
Solved Threads: 129
Posting Virtuoso
William Hemsworth is offline Offline
1,542 posts
since Mar 2008
Mar 14th, 2009
0

Re: Key loggers

There are several ways to develop key loggers on Windows. I'll list them in order worst to best:
1. You could GetAsyncKeyState() from W32 API in a loop, but I guess most of the anti-viruses would detect those easily. But it's worth to try if you are a beginner (I made my own key logger using this way).
2. Windows Hooks. I can't give you more details on those but some say this is a popular way to make key loggers.
3. Writing a malicious keyboard driver. This takes more skills to do, as well as some assembly knowledge.
The next step you'd want to take is to decide how you are going to store data your key logger makes. This depends on the purpose of the key logger. If you do this for fun, then I guess just a plain file would be good, but if you plan to use it the "not right" way or sell it you need to do some Google research. It would probably be e-mailing or sending to a remote host, maybe an FTP server?

Hope this helps
Reputation Points: 34
Solved Threads: 7
Junior Poster in Training
venomxxl is offline Offline
72 posts
since Jan 2009
Mar 14th, 2009
0

Re: Key loggers

>I'll list them in order worst to best
I wouldn't say that's the best order, why create your own malicious keyboard driver when you can just use a windows hook? But transferring the information that's been logged is out of the question, as long as you get the key strokes, what happens with the data is up to s_sridhar, and doesn't really fit in any of those three points.
Reputation Points: 1429
Solved Threads: 129
Posting Virtuoso
William Hemsworth is offline Offline
1,542 posts
since Mar 2008
Mar 15th, 2009
0

Re: Key loggers

Click to Expand / Collapse  Quote originally posted by venomxxl ...
The next step you'd want to take is to decide how you are going to store data your key logger makes. This depends on the purpose of the key logger. If you do this for fun, then I guess just a plain file would be good, but if you plan to use it the "not right" way or sell it you need to do some Google research. It would probably be e-mailing or sending to a remote host, maybe an FTP server?

Hope this helps
Nice indeed, but won't the firewall block it??? Is it possible to turn it off using c-programs
Reputation Points: 17
Solved Threads: 16
Junior Poster
s_sridhar is offline Offline
139 posts
since Mar 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: Problem with gcc and trying to produce assembly file
Next Thread in C Forum Timeline: Conflicting types warning





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC