B4J Question Keylogger in B4J

Roycefer

Well-Known Member
Licensed User
Longtime User
It should work on Windows, Linux and Mac OS. I've only tested it on Windows.

Make sure to read through that whole thread for details, caveats and cautions. Keylogging and native hooking isn't the abstract idealized world of Java/B4J. You're dealing directly with hardware and operating system events. It can be tricky.

Feel free to report on your successes and failures getting that library to work on any operating system in that thread.
 
Upvote 0

Roycefer

Well-Known Member
Licensed User
Longtime User
Doing so would probably require greater system privileges than the user.

Another alternative is to package your keylogger into an .exe (check out the B4JPackager tutorial) and give it the same name and description as a system process like conhost or cmd or taskhost (for Windows). There are typically more than one instance of those processes running so an extra one won't necessarily look out of place. You'll want to make sure that you choose a system process with a similar CPU/RAM usage profile as your keylogger so that your keylogger process doesn't look out of place to the astute user. This won't make it forbidden to kill the keylogger but it will hide the keylogger from the user.
 
Upvote 0

Ju Yang

Active Member
Licensed User
Longtime User
Doing so would probably require greater system privileges than the user.

Another alternative is to package your keylogger into an .exe (check out the B4JPackager tutorial) and give it the same name and description as a system process like conhost or cmd or taskhost (for Windows). There are typically more than one instance of those processes running so an extra one won't necessarily look out of place. You'll want to make sure that you choose a system process with a similar CPU/RAM usage profile as your keylogger so that your keylogger process doesn't look out of place to the astute user. This won't make it forbidden to kill the keylogger but it will hide the keylogger from the user.

if I want to make a forbit-killed application in OSX and Ubuntu? how to do?
and do we have another method in Windows?
 
Upvote 0

Roycefer

Well-Known Member
Licensed User
Longtime User
The alternative strategy I outlined above should be effective on all operating systems. You'll have to package the app separately for each OS and you'll have to choose a different name/description for each OS. But the overall strategy is the same in each OS.

For Windows, it looks like there might be another way but you'll have to use considerable native access:
http://stackoverflow.com/questions/6827157/how-to-forbid-process-termination-by-regular-user
http://stackoverflow.com/questions/...killed-with-end-process-from-process-explorer
and what I said about need a higher level of privilege than the user still applies. Ultimately, if the user can gain admin-level privileges, there's little that can be done to prevent them from killing processes (if they can find them).
 
Upvote 0
Top