Hooks for mac, specifically keyboard hooks - macos

I have recently been trying to make a keylogger for macs (since I work on one) JUST FOR FUN, no intent to use it. I have literally been looking around for 10+ hours and have found zero documentation of hooks for macs. Could anyone point me in the right direction?

Make a KEXT and load it up!
http://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/KernelProgramming/About/About.html
Might need to read a good bit of this...
http://developer.apple.com/library/mac/#documentation/DeviceDrivers/Conceptual/IOKitFundamentals/Introduction/Introduction.html#//apple_ref/doc/uid/TP0000011-CH204-TPXREF101
Lots of overhead involved if you aren't up to speed.
If you want to get right to it, there was a good phrack article on osx rootkits an issue back...
http://www.phrack.com/issues.html?issue=66&id=16#article

Related

Can OS X system calls be overridden or interposed on a system-wide basis?

Working under OS X Lion, I've done some work with code injection to interpose system calls on a process-by-process basis recently.
I've learned a lot along the way, and it now looks like it would make more sense, at least for research purposes, to "simply" interpose all calls to certain system functions, such as pwrite, if such a thing is possible.
Is it possible to get my code called instead of the OS for every call to certain system calls (e.g. pwrite) from every process?
And if so, can I know what process has made the call?
Edit: Lest anyone think I'm a malware author because of the nature of my question, I'll explain why I'm here now, asking what I'm asking:
I'm trying to get a big, complex piece of closed-source software working like it should. Why not wait for the vendor to fix it? Two years ago they starting pointing fingers at another party, and that party pointed right back. The situation is preposterous, and it is worth trying to overcome without either party's assistance because this software gets used by film and video production people who charge hundreds of dollars an hour for their creatively- and technically-advanced efforts, and shouldn't be wasting their time wrestling their tools.
The problem with my efforts thus far are that I need to use code injection and interposing to find the source of the problem (this is what I referred to above as "research"). Once I find the source of the problem, the solution might also be injection and interposing, or replacement of a dynamic library, or some obscure low-level system tuning, or who knows what? The software I'm analyzing is sprawling, and it in turn leverages other frameworks, libraries and background tasks, some of which is part of OS X, and some of which is part of the software package in question. Code injection and interposing on a component-by-component basis has become a little crazy, which is why I'd like to spy on what's going on at the system call end of things, so I can see, for example, where all pwrite calls originate and the specifics of the calls.
I hope this clarification helps, and that someone can point me in the right direction. Thanks!
You should look at DTrace: http://en.wikipedia.org/wiki/DTrace It's part of OS X now. For interposing, I think there are several approaches, many of which will probably be twarted by Gatekeeper/Code Signing. If that's not a worry, you might be able to use otool to edit the app linkage to have it load modified versions of it's libraries. For code injection, I believe people have hacked this in the past with Input Components... but I really don't know if that still works. Not really an answer I guess.

FranTK installation

I am trying to work with FranTK in order to make some examples to work for class. But cant go further the installation process (cabal install may be to mainstream).
I've gotten it from http://src.gnu-darwin.org/ports/x11-toolkits/hs-frantk/work/
in the readme a directory above it says i need to compile TclHaskellSrc, then FranSrc, then FranTkSrc. but i dont know how.
It also says it works with ghc-5, will it work with ghc-7?
has someone already use it successfully?
FRAN is outdated, bitrotted, and will almost certainly not compile under GHC 7. (See Conal Elliott's page for confirmation of this.) It was supposed to have been followed up with successors Reactive and FieldTrip, but, if I remember correctly, these projects hit a snag over OpenGL implementation issues.
If you're looking for good demos of FRP animation, then you'll be better off with one of the following:
elerea - it's simple, and has several good examples
sodium - also simple, and also has several good examples
reactive-banana - More complex than the other two, and more intended for GUI programming than for animation. Still worth a look, as it is well-documented and actively maintained.
The state of the art for FRP used to be Yampa, but I'd recommend against using either it or its recent fork Animas, not because they're bad in any way, but rather because they use Arrows, which tend to overcomplicate an already-difficult subject.
Hope this helps.
Old thread, I know, but Elm (elm-lang.org) has come along in the meantime. It compiles down the JavaScript, supports animations easily, and is under active development.

Programmatically enable multitouch support?

I am running windows7 on my laptop, and all is well, but I am jealous of the multitouch on macs. I don't really know how all of this "works", but i'm imagining that it couldn't be that hard to write a program to patch into windows that allows this.
Currently, if I put two fingers on the pad and drag around, it sortv half-heartedly tries to follow both. Or something. It's pitiful. After extended experimentation, I don't think it can really track both points at once. But perhaps I could detect the fumbling that occurs when I put my second finger down mathematically, and then "release" tracking on one of them.
Basically, I'm not trying for true multitouch (like stretching images), but I feel like I ought to be able to get something together that detects a double press as a right click. That's a step in the right direction.
What would I need to write that in? How would I install it?
If you're going to say it's impossible, then ignore that and take it from another direction. What if I wanted to enable a triple tap as a right click? (please no pre-built 3rd party solutions, I want to write this myself) That's certainly got to be possible.
How do I tap in to the resources I need?
This might be a hardware and or driver limitation. Not all touch surfaces (like trackpads) support multitouch.
You might want to check out Raw Input on msdn which supports alternative input methods.
Edit:
Note that the Raw Input API only provides access to multitouch if its supported by your hardware.
This is not possible, this is discussed on the www.insanelymac.com forum, where people create hackintosh pcs (basically pcs running mac osx). Several attempts have been made, but DUE to the construction and METHOD with which MANY touchpads collect sensory data it is impossible. Best of luck...

Is QuickSilver dead? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
After having read that QuickSilver was no longer supported by BlackTree and has since gone open source, I noticed more and more people switching to/suggesting other app launchers i.e. Buttler and LaunchBar.
Is QuickSilver still relevant? Has anyone experienced any instability since it's gone open source?
Quicksilver is still alive and well. There are at least a couple of endeavours to keep it going, up to date and restructure and clean up the code base. Check out the code from Google Code.
As for launching apps, not even Spotlight comes close to how fast it is in Quicksilver.
Of course the real joy of Quicksilver is past just launching apps and using triggers, scripts and the many plugins. My workflow goes to a new level with Quicksilver. I'd be lost without it.
Update: Since posting this I switched and use LaunchBar for a while. This was during the time that QuickSilver seemed to be almost close to death. Loved LaunchBar and didn't need to switch back to QuickSilver. Recently though, I have left LaunchBar and have been using Alfred. I would highly recommend it. For me, LaunchBar and Alfred are pretty close. But, aesthetically and operationally, Alfred suits my tastes more than LaunchBar.
It still runs stably for me. I would be miserable without it.
And yeah, I would recommend switching if you only use it for an "app launcher", but launching apps is like white belt Quicksilver. I don't know of any program that lets you simply tell your computer what to do in such a simple way. And even Spotlight won't remember the keys you usually type to identify an object or action.
Ubiquity for Firefox is pretty good, but it's locked inside a browser...
I haven't used OS X in a while, but the impression I get is that Spotlight has largely negated the reason for using a launcher in the first place. Quicksilver has some cool things like direct objects built in, but by and large it was mostly used for launching apps, and Spotlight can now do that just as fast.
I also gave up on QuickSilver for a while when Leopard came out. I tried Spotlight. I gave up on that and returned. QuickSilver is much faster, and it does so much more that I missed.
I have not noticed any instability (Leopard) running B54 (3815) - it looks like the open-source version is B56A3 though.
QuickSilver is awesome when integrated with Parallels/VMWare Fusion to launch Windows apps too. You don't get the deep integration as with the various OSX plugins, but it definitely helps the dual-OS usability.
I love QS and agree that it is so productive that I am willing to put up with its flaws. I usually have to launch it several times before it gets up and running, though. To fix that issue I created a little quicksilver launcher app.
I use quicksilver all day (on latest version of OSX); and no spotlight doesn't negate it... quicksilver is still much faster for launching applications.
After Quicksilver stopped being updated for a while, I migrated to LaunchBar. Quicksilver had some occasional crashes and could be very resource intensive. LaunchBar has largely the same functionality without these problems. It is not free though.
The one thing I do miss was using QS to quickly send attachments via email to people in my address book. Highlighting the file, activate QS, Current Selection tab Mail to.. tab Person's name was just awesome.
After the 10.5.5 update, I find Spotlight to solve 99% of the things I originally used Quicksilver for and the speed is nearly identical now. Spotlight is invaluable for finding information you may not remember where or when you last saw it. Unless a major rewrite of QS causes me to reevaluate it again, I suspect Spotlight will be all I need and use.
There are a couple branches out there that are active, I think I'm currently running B56 and loving it. I have too many scripts, triggers, objects that I rely on daily...I would be lost without it.
It's 201 and it's still running strong!
QuickSilver is still alive, and well.
You can find the hub-website for all activities at http://qsapp.com/
GitHub (used for source code and issues tracking) is at https://github.com/quicksilver/Quicksilver
The latest version, B58 (3841) is quite stable on Snow Leopard (10.6.6).
No. It's back, baby.
I didn't know Quicksilver wasn't being as actively supported.
It does all I need it to do at the moment though.
Just installed LaunchBar but I can't set it to be Option + Space to "launch", I can't deal with it not using that, I'm too use to Spotlight on Command + Space and Ctrl + Space is for VS 2008 :P

Project in Ruby

I've been coding alot of web-stuff all my life, rails lately. And i can always find a website to code, but i'm kind of bored with it. Been taking alot of courses of Java and C lately so i've become a bit interested in desktop application programming.
Problem: I can't for the life of me think of a thing to code for desktop. I just can't think of anything i can code that isn't already out there for download. So what do i do?
I need some project suggestions that i can set as a goal.
I would say you should roam through github or some other open source site and find an existing young or old project that you can contribute to. Maybe there is something that is barely off the ground, or maybe there is a mature project that could use some improvement.
I find to complete a project, it needs to be something I am passionate about. I feel you need to find your own project I'm afraid.
There is always the Netflix Prize though!
I would write a ray tracer.
Oops, sorry... you're looking for an original idea. :) Ray tracers are still cool, though, and easy to get started on. Maybe you'll get an idea for a game while you're working on it.
Visit shoooes.net for a UI toolkit that's easy and fun, and then the-shoebox.org to see the kinds of things people are doing with it.
If you could make a Ruby ANSI (and xbin, and idf, and adf...) Editor, I would love you. Because that means you would have written ANSI parsing routines that I can hope you release to the open source community.
... but that is a selfish answer. Oh, and a cross-platform editor would be nice as well (although TundraDraw somewhat takes care of that).

Resources