oleg Posted March 2, 2006 Share Posted March 2, 2006 Is anybody aware of way denying termination of an application or a service ? There is a hex ( 31303030303030 ) reasons i love AutoIt ! Link to comment Share on other sites More sharing options...
mikeytown2 Posted March 2, 2006 Share Posted March 2, 2006 Run it as a different user, that has given me limited success.Also look at this threadhttp://www.autoitscript.com/forum/index.ph...topic=11710&hl=What are you going to use this for? Email: POP3 & SMTP using SSL/TLS (OpenSSL)Email: IMAPEmail: Base64 & SMTP login & Send email direct to MX Server (thanks blindwig)Win: Hook Registry ChangesWin: Read/Write to Alternate Data Streams (ini example)Utility: GPS Distance Calculations, Vincenty and Haversine formulas; angles and elevationUtility: Dell Laser Printer (3000-5100) - Print LoggerUtility: Reset Router when Wireless Link FailsUtility: ImageMagick Batch jpg ProcessorVideo HCenc Batch FrontendVideo: *DEAD* YouTube Video Encoder (avs/avi to flv)Software On CD's I Like<<back|track3 Ultimate Boot CD for Windows SpinRite Ubuntu ophcrack Link to comment Share on other sites More sharing options...
oleg Posted March 2, 2006 Author Share Posted March 2, 2006 (edited) I want to create a process / service that will monitor an application and will restart it if terminated ... So actually i want to disallow all users to terminate it . The link you provided dosent drive me anywhere Edited March 2, 2006 by oleg There is a hex ( 31303030303030 ) reasons i love AutoIt ! Link to comment Share on other sites More sharing options...
oleg Posted March 2, 2006 Author Share Posted March 2, 2006 So is there no way ? There is a hex ( 31303030303030 ) reasons i love AutoIt ! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 2, 2006 Moderators Share Posted March 2, 2006 I want to create a process / service that will monitor an application and will restart it if terminated ... So actually i want to disallow all users to terminate it .The link you provided dosent drive me anywhere Some of your questions seem so un-ethical at times... Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
mikeytown2 Posted March 3, 2006 Share Posted March 3, 2006 What environment are you doing this in?I used the RunAsSet to run the script at login (using command switches), that the current user could not kill because they where not admin. Some of your questions seem so un-ethical at times...@olegwhat exactly are you trying to do? why do you need to always have this program running? Email: POP3 & SMTP using SSL/TLS (OpenSSL)Email: IMAPEmail: Base64 & SMTP login & Send email direct to MX Server (thanks blindwig)Win: Hook Registry ChangesWin: Read/Write to Alternate Data Streams (ini example)Utility: GPS Distance Calculations, Vincenty and Haversine formulas; angles and elevationUtility: Dell Laser Printer (3000-5100) - Print LoggerUtility: Reset Router when Wireless Link FailsUtility: ImageMagick Batch jpg ProcessorVideo HCenc Batch FrontendVideo: *DEAD* YouTube Video Encoder (avs/avi to flv)Software On CD's I Like<<back|track3 Ultimate Boot CD for Windows SpinRite Ubuntu ophcrack Link to comment Share on other sites More sharing options...
CyberSlug Posted March 3, 2006 Share Posted March 3, 2006 After quick google search: name your process csrss.exe, winlogon.exe, smss.exe or services.exe and task manager will refuse to kill it (other tools will still be able to kill it).Of course there are always ways of terminating critical processes:http://weblogs.asp.net/rosherove/archive/2.../21/218212.aspxhttp://www.sysinternals.com/Utilities/ProcessExplorer.html Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
oleg Posted March 3, 2006 Author Share Posted March 3, 2006 After quick google search: name your process csrss.exe, winlogon.exe, smss.exe or services.exe and task manager will refuse to kill it (other tools will still be able to kill it).Of course there are always ways of terminating critical processes:http://weblogs.asp.net/rosherove/archive/2.../21/218212.aspxhttp://www.sysinternals.com/Utilities/ProcessExplorer.html Thanks CyberSlug Even so its helps But really guys isnt there a way to deny process termination , i dont care if it possible to kill the process with ntsd or other process management tools im sure only advanced users is aware of them but any average user wont . There is a hex ( 31303030303030 ) reasons i love AutoIt ! Link to comment Share on other sites More sharing options...
mikeytown2 Posted March 3, 2006 Share Posted March 3, 2006 In my second post of this thread i gave you an idea on how to do it. look at the last post in that thread; it's by me. there's some VB script in there on how to hide the process. Please answer me and SmOke_N's inquires about why you want to do this. Email: POP3 & SMTP using SSL/TLS (OpenSSL)Email: IMAPEmail: Base64 & SMTP login & Send email direct to MX Server (thanks blindwig)Win: Hook Registry ChangesWin: Read/Write to Alternate Data Streams (ini example)Utility: GPS Distance Calculations, Vincenty and Haversine formulas; angles and elevationUtility: Dell Laser Printer (3000-5100) - Print LoggerUtility: Reset Router when Wireless Link FailsUtility: ImageMagick Batch jpg ProcessorVideo HCenc Batch FrontendVideo: *DEAD* YouTube Video Encoder (avs/avi to flv)Software On CD's I Like<<back|track3 Ultimate Boot CD for Windows SpinRite Ubuntu ophcrack Link to comment Share on other sites More sharing options...
oleg Posted March 3, 2006 Author Share Posted March 3, 2006 (edited) In my second post of this thread i gave you an idea on how to do it. look at the last post in that thread; it's by me. there's some VB script in there on how to hide the process.Please answer me and SmOke_N's inquires about why you want to do this.Dude im not writing a virus or some other malicious software This is as i stated above is done to montior client / server application that we run actually because the application itself is reall easy to terminate so im looking into many ways how to protect it from that The application that i want to write will search for a certain exe and if its not running will restart it But i dont want to have the monitoring application to be exposed see ?The link you gave indeed have some interisting info but how this can be done in autoit ? Dll call user32 GetWindow ? Edited March 3, 2006 by oleg There is a hex ( 31303030303030 ) reasons i love AutoIt ! Link to comment Share on other sites More sharing options...
mikeytown2 Posted March 3, 2006 Share Posted March 3, 2006 Thats the part I'm not sure about... but here is a simple example where it hides the close from a cmd window. I got this off the forums from somewhere, i forgot. This should get you started. I don't know how to do what your asking, so if you get it working let me know. #include <GUIConstants.au3> AutoItSetOption("WinTitleMatchMode", 4) $SC_CLOSE = 0xF060 Run(@ComSpec) WinWait(@ComSpec) ; Get the handle $handle = WinGetHandle("classname=ConsoleWindowClass", "") If @error Then MsgBox(4096, "Error", "Could not find the correct window") Else $dSysMenu = DllCall("User32.dll", "hwnd", "GetSystemMenu", "hwnd", $handle, "int", 0) $hSysMenu = $dSysMenu[0] DllCall("User32.dll", "int", "RemoveMenu", "hwnd", $hSysMenu, "int", $SC_CLOSE, "int", 0) DllCall("User32.dll", "int", "DrawMenuBar", "hwnd", $handle) EndIf Good Luck! Email: POP3 & SMTP using SSL/TLS (OpenSSL)Email: IMAPEmail: Base64 & SMTP login & Send email direct to MX Server (thanks blindwig)Win: Hook Registry ChangesWin: Read/Write to Alternate Data Streams (ini example)Utility: GPS Distance Calculations, Vincenty and Haversine formulas; angles and elevationUtility: Dell Laser Printer (3000-5100) - Print LoggerUtility: Reset Router when Wireless Link FailsUtility: ImageMagick Batch jpg ProcessorVideo HCenc Batch FrontendVideo: *DEAD* YouTube Video Encoder (avs/avi to flv)Software On CD's I Like<<back|track3 Ultimate Boot CD for Windows SpinRite Ubuntu ophcrack Link to comment Share on other sites More sharing options...
oleg Posted March 3, 2006 Author Share Posted March 3, 2006 Thats the part I'm not sure about... but here is a simple example where it hides the close from a cmd window. I got this off the forums from somewhere, i forgot. This should get you started. I don't know how to do what your asking, so if you get it working let me know. #include <GUIConstants.au3> AutoItSetOption("WinTitleMatchMode", 4) $SC_CLOSE = 0xF060 Run(@ComSpec) WinWait(@ComSpec) ; Get the handle $handle = WinGetHandle("classname=ConsoleWindowClass", "") If @error Then MsgBox(4096, "Error", "Could not find the correct window") Else $dSysMenu = DllCall("User32.dll", "hwnd", "GetSystemMenu", "hwnd", $handle, "int", 0) $hSysMenu = $dSysMenu[0] DllCall("User32.dll", "int", "RemoveMenu", "hwnd", $hSysMenu, "int", $SC_CLOSE, "int", 0) DllCall("User32.dll", "int", "DrawMenuBar", "hwnd", $handle) EndIf Good Luck! Even if i wont figure it out CyberSlug method will do the job Thanks guys There is a hex ( 31303030303030 ) reasons i love AutoIt ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now