views:

32

answers:

1

I am trying to create a window service to create a small keylogger application. I am new to window service and sole purpose is to learn.

How all the events that are available in winforms can be obtained in window service.

I am searching for it on google. But not getting good stuff and currently reading about keyhook dll

+1  A: 

Windows Services are not form based therefore you cannot do it that way.... Have a look here for an example of how to create a Windows Service that kills other windows.

A window service is not an ideal spot to place a form on... think of a daemon under Linux/Unix variants - they do not have a graphical display nor interact with the user as such and hence would be 'headless' for want a word for it as there's no interaction whatsoever, and furthermore, a service would be running under a system service account....

Speaking of Keyloggers, it does not work like that - you need to hook into the global keyboard hook and intercept the keys, an example of such a thing is here.

But then the question will arise for what purpose, gather data, etc - possibly AV's will flag them as malware... If you are doing it for yourself - that's good...but to maliciously place it on another computer without that user knowing about it is very iffy and could end up in court for invasion of privacy, in terms of local laws etc.

tommieb75
@tommieb: Thks for your help. There are many purposes for going for this. I have no idea of Windows services. Not comfortable with File handling, Attracted towards creating Hacking related tools just for ethical hacking for my system only. Hacking seems to be a great deal of an individual knowledge. These all reasons brought me to build tis application.
Shantanu Gupta