Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Security-Basics
[Top] [All Lists]

RE: Script

Subject: RE: Script
Date: Wed, 25 Jul 2007 16:50:47 -0400
Quick VB script example from the Microsoft Scripting Guys forums:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/hsgarch.ms
px
'''''''''''''''''
'Set the Computer Browser Service to disabled on local node'
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\cimv2")

Set colServiceList = objWMIService.ExecQuery _
    'Set the service name below'
    ("Select * from Win32_Service where Name = 'Browser'")

For Each objService in colServiceList
    If objService.State = "Running" Then
        objService.StopService()
        Wscript.Sleep 5000
    End If
    errReturnCode = objService.ChangeStartMode("Disabled")   
Next 

'''''''''''''''''

This can be repeated for other services, and the 'ChangeStartMode' can
also be toggled from automatic > manual > disabled. Put this in the
'start' up folder, and it will run each time a user logs on, and will
configure the services as needed.

Hope this helps a bit,
~Peter
-----Original Message-----
From: listbounce@securityfocus.com [mailto:listbounce@securityfocus.com]
On Behalf Of Hoover, Travis
Sent: Wednesday, July 25, 2007 3:18 PM
To: 'Siscar, Emerson E.'; security-basics@securityfocus.com
Subject: RE: Script

From command line, run sc.exe /?

This should help for disabling services...

-Travis

-----Original Message-----
From: listbounce@securityfocus.com [mailto:listbounce@securityfocus.com]
On Behalf Of Siscar, Emerson E.
Sent: Tuesday, July 24, 2007 11:57 PM
To: security-basics@securityfocus.com
Subject: Script



Hello to all:



Am not into script writing yet. Can anyone recommend or know where I
could find/get a script that disables windows unnecessary services for
example?



Thank you



Emer

<Prev in Thread] Current Thread [Next in Thread>