HookApplication - some real-life examples

I still dont think its time for public release, however I just wanted to share with you some different situations where I liked to use HookApplication...

 For most of this actions I needed to write some plugins - I decided to keep HookApplication as simple as possible to have it as error-prone as possible.

First I tried to replace processes - I replaced Task Manager with Process Explorer and after some time also Notepad with Crimson Editor...

 Right now I am thinking about installing Maxthon 2.0 and if I found it useful, I will replace Internet Explorer with it.

This was quite interesting, however nothing really special. For example Process Explorer supports replacement of Task Manager in its options...

Then I found out I can use HookApplication to solve one of my problems I got right now - locking processes with passwords.

Why do I need this? I am citrix administrator and if I am debugging something, I would like to be able to run task manager - however I want to prevent users to do the same. Problem is that I often need to run task manager under THEIR account, not mine. So I wrote small stupid plugin, that will pop-up password message box when you try to run specific process and if you dont know password.

I got it working with task manager - and it works great :)

So, I was thinking what were other ways how users were "hacking" citrix boxes usually - one of them is somehow (taskmgr, word etc - there are many ways) running cmd and then you can do almost what you want.

Created new plugin - if process is launched without any parameters (or vice versa), pop-up input box with password :) That means that scripts will run (cmd + parameters), however without password you are not able to use it...

Another usage was related to allowing only one instance running - I have few applications that doesnt always exit correctly (GUI not visible, however application still running) and some of them are extremely stupid when handling such situation (Miranda wont show GUI for example...). New plugin -  check instances - if more than x running, do something (for some processes just popup message box, for some kill current process, for some kill rest of processes....). Quite simple, however it helped me a lot, since this I havent experienced any problems :)

Then I have some network related applications - for example I am killing all processes that are "calling home" before running VPN and then I am running them again or I am checking if NIC is enabled when trying to connect through EDGE (sometimes it fails on Unknown error if card is disabled)...

Another useful scenario for me was using Hook Application together with AutoIt scripts - sometimes you just want to automate something, however its not as simple as it looks like - you can end up with never-ending script (which is quite stupid) that will wait under condition appears (window title appears for example) or you can run your program using script (which is nothing for me as sometimes run programs using Start Menu, Launchy or shortcuts ;)). So with hook application I just assigned few AutoIT scripts with related processes and viola - its working exactly as I was expected :)

 Also I got some processes that I sometimes accidentaly close, but I want to keep them running all the time - for example GUI for my scripts. So I created entry that will run the command again when it is closed and it is working :)

Published Thu, Mar 1 2007 12:59 by martin
Filed under: ,

Comments

# re: HookApplication - some real-life examples

Don't want to "press" you in ANY way, but since several months passed away in the meantime, did you make any progress?

Are you planning to release something?

Regards,

jaclaz

Monday, January 28, 2008 5:44 AM by Jacopo Lazzari