Showing posts with label Windows2k3. Show all posts
Showing posts with label Windows2k3. Show all posts

Remotely Shutdown A PC : Childrens Trick


XP PRO has a lot of fun utilities. One of the most useful ones I have found to date is the ability to remotely reboot a PC. There are 2 ways of doing this. You will need to have admin access to the PC to preform these actions. That being said, here is the first way to do it:

Right click my computer, choose manage.
Highlight the Computer Management (Local) then click on Action, choose connect to another computer.
In the window that opens fill in the machine name of the PC (remember that, u have to put the Name, not the ip. For that i cn give u sum tools for revealing the names of any computer being connected, just do ask me.) you want to connect to and click ok.
Once connected right click on Computer Management (Remote machine name) and choose properties.
Go to the "Advanced" tab and click the Settings button under Start up and recovery.
Click on the Shutdown button.
Under action choose what you want to do (you can log off current user, shut down, restart, or power down. you can also choose if you want to force all applications to close, close hung apps, or wait for all apps to close by themselves).

The second way... Remember dos... that good old thing. Open up a command prompt and enter in the following:

%windir%\System32\shutdown.exe -r -m \\Machinename. The command prompt has more switches and options. I highly suggest using shutdown.exe /? to see all the posibilities.

6:31 AM by Shubham Mittal · 1

Retrieve the List of Old Domain Computer Accounts : Hacking Tricks



Finding inactive computer accounts in Active Directory is a chore—unless, of course, you script it.

If you need to quickly retrieve a list of old (inactive) computer accounts in the domain, VBScript is your utility of choice. The script in this hack first asks for the domain name (Figure 2-1), then prompts for the number of days for active computer accounts (Figure 2-2), and then, finally, displays the old computer accounts that are found in the domain.

Step 1 Specifying the name of your domain

Step2 Specifying number of days for cutoff

The computer accounts shown have not been active during the days you specified. For example, when we run the script we can see that the computer account for the machine named SRV111 has a password whose age is beyond the cutoff, so the script recommends that you delete this account to be safe (Figure 2-3).

Step 3 Recommending an account that should be deleted

This is a great, quick way to find those computers that could be having trouble authenticating, or those that have been brought down but remain in the domain's list.

The Code

Type the following code into Notepad (make sure Word Wrap is turned off), and save it with a .vbs extension as DeleteOldComputers.vbs:

On Error Resume Next



DomainString=Inputbox("Enter the domain name","Check Active Computers","DomainName")



if DomainString="" then

wscript.echo "No domain specified or script cancelled."

wscript.quit

end if



numDays=InputBox("What is the number of days to use as a cutoff for" & _

"Active Computer Accounts?","Check Active Computers","XX")



if numDays="" then

wscript.echo "No cutoff date specified or script cancelled."

wscript.quit

end if



Set DomainObj = GetObject("WinNT://"&DomainString)



if err.number<>0 then

wscript.echo "Error connecting to " & DomainString

wscript.quit

end if



DomainObj.Filter = Array("computer")

Wscript.echo "Computer Accounts in " & DomainString & " older than " & _ numDays & " days."

For each Computer in DomainObj

Set Account = GetObject("WinNT://" & DomainString & "/" & Computer.Name & _ "$")

RefreshTime = FormatNumber((Account.get("PasswordAge"))/86400,0)

If CInt(RefreshTime) >= CInt(numDays) Then

wscript.echo "**DELETE** " & Computer.Name & " Password Age is " & _ RefreshTime & " days."

End If

Next



set DomainObj=Nothing

set Shell=Nothing

Wscript.quit

Running the Hack

To run this script, use Cscript.exe, the command-line script engine for the Windows Script Host (WSH). Here's some sample output when the script is run to delete computer accounts older than 90 days in the MTIT domain:

C:\>cscript.exe DeleteOldComputers.vbs

Microsoft (R) Windows Script Host Version 5.6

Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.



Computer Accounts in mtit older than 90 days.

**DELETE** NEWTEST1 Password Age is 151 days.

**DELETE** QWER Password Age is 151 days.

**DELETE** SRV211 Password Age is 97 days.

**DELETE** SRV212 Password Age is 154 days.

—Rod Trent

5:09 AM by Shubham Mittal · 0

Use Run As to Perform Administrative Tasks : Hacking Tricks


Use Run As to protect your administrator workstation from Trojans and other nasties.

If you're lazy, like I am, you probably use the default administrator account on your desktop workstation for browsing the Web, checking your email, and managing the servers on your company's network.

Not a good idea.

What if you unknowingly visited a web page that executed a script that downloaded a Trojan to your machine? Your administrator account would be compromised, and the attacker would have total access to your workstation and possibly to your whole network! To avoid such dangers, administrators should always have two user accounts: a regular (user-level) account for ordinary activities, such as web browsing and messaging, and an administrator-level account, used only for performing administrative tasks. This way, when you are reading your email and suddenly remember you have to reschedule a backup, you can simply log off, log back on using your administrator account, perform the task, log off again, and log on again as a regular user.

Who am I kidding? That's too much to expect of a lazy system administrator.

How Run As Works

The Run As service (called Secondary Logon service in Windows Server 2003 and Windows XP) is a hack designed to enable you to run programs by using alternate credentials while you're logged on using another account. For example, if you are an administrator and are logged on to your desktop using your regular user account, you won't be able to run administrative tools such as Computer Management, because they require administrator credentials to run properly. (Actually, you can open Computer Management as an ordinary user; you just can't do much with it.) Using Run As, however, you can run Computer Management as an administrator while remaining logged on as an ordinary user.

There are two ways to use Run As: using the GUI or from the command line. To use the GUI method, first find the program you want to run in Windows Explorer or My Computer. Then, for executables (*.exe files), hold down the Shift key, right-click the program's icon, and select Run to open the Run As Other User dialog box shown in Figure 1-1. For MMC consoles (*.msc files) and Control Panel utilities (*.cpl files), you do the same thing but don't need to hold down the Shift key.

Once you specify the appropriate alternate credentials and click OK, the program you selected runs in the security context of those alternate credentials until you close or terminate the program. If you prefer, the alternative credentials can also be entered as domain\user or user@domain, which in Figure 1-1 would be MTIT\Administrator or Administrator@mtit.com for an example domain named mtit.com (replace these credentials with the name of your own domain). The advantage of doing it the way shown in Figure 1-1 is that, if your computer is a member server, you can specify a local user account by entering the name of the computer in the Domain field.

Using Run As from the command line is just as easy, but you need to know the path to the program (unless the program file is located within the system path). For example, the Computer Management console file compmgmt.msc is located in the \system32 directory. To run it as Administrator in the MTIT domain, simply type the following at a command prompt:

runas /user:MTIT\Administrator "mmc %windir\system32\compmgnt.msc"

You'll be prompted for a password for the account, after which Computer Management will open. Note that you can also type this command directly into the Run box (accessed by StartRun).

Limitations of Run As

While Run As is useful, it has some limitations. First, the alternate credentials you specify must have the Log On Locally user right on the computer. Since Run As is usually used with administrator credentials (which have that right by default), this is usually an issue only in certain circumstances. For example, say you grant a few knowledgeable users a second user account that belongs to the Power Users group, to allow them to update device drivers and perform other minor maintenance on their desktop computers. If you try to reduce the attack surface of your network by removing the right to Log On Locally from the Power Users group using Group Policy, then these users won't be able to perform such tasks.

Also, there are certain tasks you can't perform directly using Run As, such as opening the Printers folder to administer a printer that is connected to your machine. The reason for this is that the special folders such as Printers and Network and Dial-up Connections are opened indirectly by the operating system, not by a command. You also can't use Run As to open Windows Explorer and access the filesystem on your computer as administrator, because the Windows shell explorer.exe is already running as your current desktop environment and Windows allows only one GUI shell to run at a time.

Finally, Run As also might not work if the program you are trying to run is located on a network share, because the credentials used to access the share might be different than the credentials used to run the program.

Most limitations have workarounds of some sort, if you try hard enough to find them. So, let's see if we can figure out ways to get around these limitations (except for the Log On Locally limitation, which is absolute).

Running programs without an executable

Say you want to change some settings for the Local Area Connection in the Network and Dial-up Connections folder. If you try doing this as an ordinary user, you'll get a message saying "The controls on this properties sheet are disabled because you do not have sufficient privileges to access them." Here's how to access these settings as an administrator without logging out of your regular account. Right-click on the task bar and open Task Manager. Then, switch to the Processes tab, select explorer.exe, and click End Process to kill the desktop but leave Task Manager running. Now, switch to the Applications tab, click New Task, type runas /user:MTIT\Administrator explorer.exe to run the Windows Explorer shell in an administrator context, and click OK. Finally, move Task Manager out of the way and type your password into the command-prompt window.

A new desktop will now appear, running in the security context of your administrator account. You can now change the settings of your Local Area Connection, modify the properties of a printer in the Printers folder, browse the filesystem, or do anything you want to do as administrator. But be sure to leave Task Manager running, because it is your only connection to your original desktop! You can minimize it so it won't be in the way.

Once you're finished performing your administrative tasks, you can return to your original desktop (the one running under the security context of your regular account) as follows. Maximize Task Manager so that you'll have access to it when your desktop disappears again. Then, to log off of your administrator session, click Start Shut Down and select Log Off.

Do not try to log off by pressing Ctrl-Alt-Del and clicking Log Off, because this will log off the session for your regular user account.


Your administrator desktop has now disappeared, but Task Manager is still running (in the security context of your regular account), so switch to the Applications tab, click New Task, type runas /user:MTIT\Administrator explorer.exe, and click OK. Your desktop has returned.

At this point, you might ask, "Why should I go to all that trouble? It would be faster just to log off as a regular user and log on as an administrator." True, but any applications you have running as a regular user would then have to be terminated. Doing it the way shown here, however, leaves all your desktop applications running in the background.

Running programs from network shares

Here's how to get around the limitation of running programs from network shares with appropriate credentials. To run a program named test.exe found in the TOOLS share on server SRV230, use StartRun to open a command-prompt window as administrator, type runas /user:MTIT\Administrator cmd to open a command shell in administrator context, and then map a drive to the shared folder by typing net use Z:\\SRV230\TOOLS. Now, switch to the Z: drive and run the program as desired. This lets you connect to the shared folder using domain administrator credentials and run the program under the same credentials. This approach is also useful for installing applications from a network distribution point.

Run As Shortcuts

To make your life easier, instead of having to type stuff at the command line, you can use Run As to create a shortcut that will run a program under alternate credentials. For example, to run the Computer Management console from a Run As shortcut, right-click on your desktop, select NewShortcut, and type %windir%\system32\compmgmt.msc as the command string. Name your shortcut Computer Management and click OK. Then, right-click on the shortcut, select Properties to open its properties sheet, and on the Shortcut tab select the checkbox labeled "Run program as other user" (on Windows Server 2003, click the Advanced button on the Shortcut tab to configure this). Now, whenever you double-click on the shortcut to run Computer Management, the Run As Other User dialog box (see Figure 1-1) will appear. Just type in your administrator password to run Computer Management in administrator context.

There's another way to create Run As shortcuts that you might find even easier to use. Just right-click on your desktop, select NewShortcut, and type the following command string:

%windir%\system32\runas.exe /user:MTIT\Administrator "mmc %windir%\system32\compmgmt.msc"

Save the shortcut with the name Computer Management. Now, when you double-click the shortcut, a command-prompt window opens, prompting you for the password for the MTIT\Administrator account. Type the password, press Enter, and Computer Management starts in administrator context.

What if you get tired of typing your administrator password each time you want to run a Run As shortcut? On Windows Server 2003, there's a way to get around that. Just create a new shortcut with this command string:

%windir%\system32\runas.exe /user:MTIT\Administrator /savecred "mmc %windir%\

system32\compmgmt.msc"

Notice the /savecred switch in this string. This option first appeared in Windows XP. The first time you double-click on the shortcut, a command-prompt window opens to prompt you for the password for the alternate credentials, just like before. The next time you double-click on the shortcut, however, you are not prompted for the password; it was stored on your machine the first time you ran the shortcut. Now you no longer have to type a password each time you use your Run As shortcut. Time-saver, right? Yes, but it's also a possible security hole: once the credentials for your administrator account are stored locally on the machine, they can be used to run any command-line program using administrator credentials.

Here's a scenario to illustrate what I mean. Let's say you need to run an administrative tool on a user's desktop machine without logging the user off the machine. You ask the user to take a coffee break. Then, you open a command-prompt window and use runas with /savecred to start the tool (you use /savecred because you might have to run several administrative tools and you don't want to have to type your complex 24-character password repeatedly). When you're finished, you close all the tools you started and walk away. When the user returns to her desktop, she opens a command prompt and types runas /user:MTIT\Administrator /savecred cmd. A command-prompt window opens, displaying administrator credentials in the title bar. The user now knows that she can use this approach to run any program on her machine using administrator credentials.

What did you do wrong as administrator in this scenario? Two things: you used /savecred on a user's desktop machine, which saved your administrator password locally on the machine, and you haven't renamed the default administrator account. If you had changed the name of this account to something complex and unknown to ordinary users, the runas /user:MTIT\Administrator /savecred cmd command the user typed wouldn't work.

What do you do if you have used /savecred on an unsecured machine without thinking about the consequences? Just delete your stored credentials on the machine by opening Stored User Names and Passwords in the Control Panel.

5:08 AM by Shubham Mittal · 0

How To Automatically Log On After Booting : Hacking Tricks



It's sometimes convenient to configure machines to log on automatically when booted. Here are three ways to do this.

In all versions of Windows that are based on Windows NT (including Windows 2000, Windows XP, and Windows Server 2003), a user is required to log on before he can use the system interactively. This is usually done by pressing Ctrl-Alt-Del and typing the user's credentials. Automatic logon is an option you can set to enable Windows to log on automatically using credentials that are stored in the Registry. To invoke automatic logon, you set Registry entries that define the user ID, the password, and the domain to be used to log on. Why use this feature? There are a number of reasons. As an IT professional, I have several of my home systems set up to do this, and it makes life simpler. Test systems in a lab might be another place to use this feature. I also use it all the time on virtual machine images I have running on my Desktop.

Automatic login makes things simpler, but it creates a security hole. First, the credentials are stored in clear text in the Registry. Thus, anyone with remote Registry privileges can see the clear text user ID and password. Also, if you have automatic logon set on a laptop, anyone who turns on the laptop is automatically logged in as you. So use this feature carefully!

Manual Configuration

You can configure automatic logon manually by adding the following four key Registry entries: AutoAdminLogon, DefaultDomainName, DefaultUserName, and DefaultPassword. These entries inform Windows whether to attempt automatic logon and provide the credentials (username, password, and domain).

Start Registry Editor (StartRunregedit) and find the Registry key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon, which is where the Registry values you set to control automatic logon are located. Two of these values, DefaultDomainName and DefaultUserName, already exist. DefaultDomainName is a string that holds the domain (or workstation) name where the user ID exists, and DefaultUserName is the user ID that Winlogon will attempt to use to log on. This username is authenticated against the domain (or workstation) name set in the DefaultDomainName setting.

Now, create two new values by right-clicking on Winlogon and selecting NewString Value, which will create new values of type REG_SZ. Name the first value AutoAdminLogon, and specify a value data of 1 to instruct Winlogon to attempt to use automatic logon. Name the second value DefaultPassword; this value specifies the password for the user set in the DefaultUserName setting.

Script Method

An easier way to configure automatic logon on your machines is to use two VBScript scripts, one to enable automatic logon and the other to disable it. Here's the script for enabling it:

' Script to turn on automatic logon

' (c) Thomas Lee 2002

' Freely distributed!

Dim Prompt, oWSH,UserName, UserPass, UserDomain

set oWSH = WScript.CreateObject("WScript.Shell")



' get user name

Prompt = "Enter the autologon user name"

UserName = InputBox(Prompt, Title, "")



' get password

Prompt = "Enter the autologon user password for " & UserName

UserPass = InputBox(Prompt, Title, "")



' get domain

Prompt = "Enter the autologon user domain for " & UserName

Userdomain = InputBox(Prompt, Title, "")



' now set these in the Registry

oWSH.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon",

"1","REG_SZ"

oWSH.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\

DefaultDomainName", UserDomain, "REG_SZ"

oWSH.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\

DefaultUserName", UserName, "REG_SZ"

oWSH.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\

DefaultPassword", UserPass, "REG_SZ"



' ensure the change is persistent!

oWSH.RegWrite "HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon\ForceAutoLogon",

"1", "REG_SZ"



' All done

And here's the script for disabling automatic logon:

' Script to remove autoadmin logon

' (c) Thomas Lee 2002

' Freely distributed!

Option Explicit

On Error Resume Next



'Declare variables

Dim Prompt, oWSH



'Set the Windows Script Host Shell

set oWSH = WScript.CreateObject("WScript.Shell")



' delete the relevant keys

oWSH.RegDelete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\

AutoAdminLogon"

oWSH.RegDelete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\

DefaultDomainName"

oWSH.RegDelete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\

DefaultUserName"

oWSH.RegDelete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\

DefaultPassword"



' All done - say goodbye!

Legend = "Autoadmin removed - have a nice day!"

MyBox = MsgBox (legend, 4096, "We're Done")

You can use Notepad to type these scripts and save them with a .vbs file extension, or download autoadminlogon.vbs and noautoadminlogon.vbs from http://www.oreilly.com/catalog/winsvrhks/.

Sysinternals Tool

Finally, here's one more way to configure automatic logon on machines. Mark Russinovich, of Sysinternals fame, also wrote a simple program to do this. You can download the program and the source from http://www.sysinternals.com/ntw2k/source/misc.shtml#AutoLogon, where you can find lots of other great tools.

5:07 AM by Shubham Mittal · 0

How To Shutdown A Remote Computer : Hacking Tricks



Here's a nifty way to use a script to shut down remote machines.

Sometimes, you need to be able to shut down a server remotely. This script pings the computer in question prior to sending the Win32Shutdown method. It operates on remote PCs and has been tested on systems running Windows 2000. It will probably work on NT4 systems with the proper WHS/WMI/VB scripting, though it has not been tested on such systems.

Using the Win32Shutdown method, the script provides you with the option of logging off the current user of the machine, powering the machine down, or rebooting it. In addition, each of these options can be forced so that the action occurs even if applications are running. Use this option carefully, though, because it might cause the logged-on user to lose his work if he has open files. Note that forced log off/power down/reboot will not work if the screen saver is password-protected and is currently active.

The Code

Make sure you have the latest scripting engines on the workstation you run this script from. You can download the latest scripting engines at the Microsoft Scripting home page (http://msdn.microsoft.com/library/default.asp?url=/nhp/default.asp?contentid=28001169). Note that, when working with the Active Directory Services Interface (ADSI), you must have the same applicable rights as you need to use the built-in administrative tools. Also, for VB scripts that interact with Windows Management Instrumentation (WMI), apply the most current version of the WMI agents.

Type the following code into a text editor such as Notepad (making sure to have Word Wrap disabled) and save it with a .vbs extension. Alternatively, you can download the RemoteShutdown.vbs script from the O'Reilly web site at http://www.oreilly.com/catalog/winsvrhks/.

'/'|| RemoteShutdown.vbs

'||

'|| Created by Harvey Hendricks, MCP, MCSE, A+

'|| March 2001

'|| email: Harvey.Hendricks@aramcoservices.com

'||

'||

'|| Based on techniques and ideas from:

'|| SMS admin, SMS Installer, & WMI forums ->

'|| http://www.myITforum.com/forums

'|| Win32 Scripting -> http://cwashington.netreach.net/

'|| Microsoft Windows Script Technologies ->

'|| http://msdn.microsoft.com/scripting

'|| Microsoft Online Library ->

'|| http://msdn.microsoft.com/library/default.asp

'|| Microsoft VBScript 5.5 documentation and Microsoft WMI SDK

'||

'||~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

'|| SCRIPT LOGIC FLOW:

'|| Collects computername from user, calls function to ping the computername

'|| to determine if it is accessible, if not then display message and exit

'|| otherwise continue.

'|| Collects desired action to perform from the user, does error checking on

'|| the input to determine if it is acceptable, if not then display message

'|| and exit otherwise continue.

'|| Set variables and output messages based on the action chosen. Calls

'|| Win32Shutdown with the appropriate variable. Displays success message

'|| and exits

'||

'|| Uses WMI Win32Shutdown method from the Win32_OperatingSystem class

'|| to perform different logoff / powerdown / reboot functions

'||

'|| Testing found the following values to be effective on Win32Shutdown:

'|| Action decimal binary

'|| Logoff 0 0000

'|| Force Logoff 4 0100

'|| Reboot 2 0010

'|| Force Reboot 6 0110

'|| Powerdown 8 1000

'|| Force Powerdown 12 1100

'||

'|| Notice that the third bit from the right appears to be the "FORCE" bit.

'||

'|| A value of 1 will do a shutdown, ending at the "It is safe to turn

'|| off your computer" screen. I have no use for this and did not test it.

'||

'||

'||NOTES: - tested under Windows 2000 Pro. with ACPI compliant systems -

'|| SHOULD work under Windows NT4 without modification IF the

'|| system has compatible versions of WSH / WMI / VBscripting

'||

'||Logoff / Powerdown / Reboot:

'|| Does not work if a password protected screen saver is active or

'|| there is data to save. Either way the system waits for user input.

'||

'||Force Logoff / Force Powerdown / Force Reboot:

'|| Does not work if a password protected screen saver is active, will wait

'|| for user input. Otherwise will close open applications without saving

'|| data.

'||

'\/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



'/\/\/\/\/\/\/\/\/\/\/\/\/\/\ start function

function Ping(byval strName)

dim objFSO, objShell, objTempFile, objTS

dim sCommand, sReadLine

dim bReturn



set objShell = WScript.CreateObject("Wscript.Shell")

set objFSO = CreateObject("Scripting.FileSystemObject")



'Set default return value

bReturn = false



'Create command line to ping and save results to a temp file

sCommand = "cmd /c ping.exe -n 3 -w 1000 " & strName & " > C:\temp.txt"



'Execute the command

objShell.run sCommand, 0, true



'Get the temp file

set objTempFile = objFSO.GetFile("C:\temp.txt")

set objTS = objTempFile.OpenAsTextStream(1)



'Loop through the temp file to see if "reply from" is found,

'if it is then the ping was successful

do while objTs.AtEndOfStream <> true

sReadLine = objTs.ReadLine

if instr(lcase(sReadLine), "reply from") > 0 then

bReturn = true

exit do

end if

loop



'Close temp file and release objects

objTS.close

objTempFile.delete

set objTS = nothing

set objTempFile = nothing

set objShell = nothing

set objFSO = nothing



'Return value

Ping = bReturn

end function

'/\/\/\/\/\/\/\/\/\/\/\/\/\/\ end function



'/\/\/\/\/\/\/\/\/\/\/\ Start Main body of script

'Get computer name to operate on

ComputerName=InputBox("Enter the Machine name of the computer" & vbCRLF _

& "you wish to Shutdown / Reboot / Logoff", _

"Remote Shutdown / Reboot / Logoff", _

"ComputerName")



'if Cancel selected - exit

If (ComputerName = "") Then Wscript.Quit



'change the name to uppercase

ComputerName=UCase(ComputerName)



'ping the computername to see if it is accessible

bPingtest = ping(Computername)



If bPingtest = FALSE Then

y = msgbox ("'" & ComputerName & "' is not accessible!" & vbCRLF _

& "It may be offline or turned off." & vbCRLF _

& "Check the name for a typo." & vbCRLF, _

vbCritical, ComputerName & " NOT RESPONDING")

Wscript.Quit

end IF



'Get the action desired

Action=InputBox( _

"Select Action to perform on " & ComputerName & vbCRLF & vbCRLF _

& " 1 - Logoff" & vbCRLF _

& " 2 - Force Logoff ( NO SAVE )" & vbCRLF _

& " 3 - Powerdown" & vbCRLF _

& " 4 - Force Powerdown ( NO SAVE )" & vbCRLF _

& " 5 - Reboot" & vbCRLF _

& " 6 - Force Reboot ( NO SAVE )" & vbCRLF & vbCRLF _

& "NOTE:" & vbCRLF _

& " Using Force will close windows" & vbCRLF _

& " without saving changes!", _

"Select action to perform on " & ComputerName, "")



'if Cancel selected - exit

If (Action = "") Then Wscript.Quit



'error check input

If (INSTR("1234567",Action)=0) OR (Len(Action)>1) then

y = msgbox("Unacceptable input passed -- '" & Action & "'", _

vbOKOnly + vbCritical, "That was SOME bad input!")

Wscript.Quit

end if



'set flag to disallow action unless proper input achieved, 1 => go 0 => nogo

flag = 0



'set variables according to computername and action

Select Case Action

Case 1 'Logoff

x = 0

strAction = "Logoff sent to " & ComputerName

flag = 1

Case 2 'Force Logoff

x = 4

strAction = "Force Logoff sent to " & ComputerName

flag = 1

Case 3 'Powerdown

x = 8

strAction = "Powerdown sent to " & ComputerName

flag = 1

Case 4 'Force Powerdown

x = 12

strAction = "Force Powerdown sent to " & ComputerName

flag = 1

Case 5 'Reboot

x = 2

strAction = "Reboot sent to " & ComputerName

flag = 1

Case 6 'Force Reboot

x = 6

strAction = "Force Reboot sent to " & ComputerName

flag = 1

Case 7 'Test dialog boxes

y = msgbox("Test complete", vbOKOnly + vbInformation, "Dialog Box Test Complete")

flag = 0

Case Else 'Default -- should never happen

y = msgbox("Error occurred in passing parameters." _

& vbCRLF & " Passed '" & Action & "'", _

vbOKOnly + vbCritical, "PARAMETER ERROR")

flag = 0

End Select



'check flag

' if equal 1 (TRUE) then perform Win32Shutdown action on remote PC

' and display a confirmation message

' if not equal 1 (FALSE) then skip the action and script ends

if flag then

Set OpSysSet=GetObject("winmgmts:{(Debug,RemoteShutdown)}//" _

& ComputerName & "/root/cimv2").ExecQuery( _

"Select * from Win32_OperatingSystem where Primary=true")

for each OpSys in OpSysSet

OpSys.Win32Shutdown(x)

y = msgbox(strAction,vbOKOnly + vbInformation,"Mission Accomplished")

next

end If



'Release objects

set OpSys = nothing

set OpSysSet = nothing

Running the Hack

To run the hack, simply double-click on the RemoteShutdown.vbs file in Windows Explorer (or a shortcut to this file on your desktop) and type the name of the remote computer you want to log off from, power down, or reboot. This name can be the NetBIOS name, DNS name, or IP address of the remote machine. You will then be presented with an input box that displays a menu of options:

1 - Logoff
2 - Force Logoff
3 - Powerdown
4 - Force Powerdown
5 - Reboot
6 - Force Reboot

Simply type the number for the action you want to perform and press Enter.

5:05 AM by Shubham Mittal · 0

Implement Best Password policy For Windows Authentication


By default Windows accepts both short and long passwords as the Windows login password.
Some users use extremely short passwords, which can easily be brute forced. So in order to set the minimum number
of characters or the minimum length of the password, simply follow the following registry trick-:

1. Launch the Windows Registry Editor i.e. c:\windows\regedit.exe
2. Scroll down to the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Network
3. Click on Edit > New DWORD Value.
4. Name this new DWORD value as MinPwdLen and in the data field, enter the minimum number of characters
the password has to be of. One thing to note here is that this value is in Hexadecimal.
5. Now, Press F5 and your system just became a tiny bit securer but certainly not unhackable.

11:29 PM by Shubham Mittal · 0

Managing And Maintaining Windows 2003 Server Netwrk Outline - Learn Latest Computer And Mobile Hacking Tricks


Videos: 58
Demonstrations: 64
Simulations: 103
Fact Sheets: 77
Exam Questions: 276
Exams: 42



Contents:
0.0 Introduction (15 questions)

0.1 Introduction

0.1.1 Windows 2003 Introduction

0.2 Active Directory Overview

0.2.1 Active Directory Overview
0.2.2 Active Directory Organization
0.2.3 Functional Levels
0.2.4 Users and Groups
0.2.5 Default Local Groups
0.2.6 Default Domain Groups
0.2.7 Permissions and Rights

0.3 Group Policy

0.3.1 Group Policy Objects
0.3.2 Creating and Linking a GPO
0.3.3 Configuring GPO Settings
0.3.4 Controlling GPO Application
0.3.5 Configuring GPO Application
0.3.6 Effective GPO Settings
0.3.7 Group Policy Facts
0.3.8 Refreshing Group Policy

0.4 Server Administration

0.4.1 Management Tools
0.4.2 Microsoft Management Console (MMC)
0.4.3 ExamSim Questions - Section 0.4

1.0 Installation (8 questions)

1.1 Installing Windows 2003 Server

1.1.1 Winnt and Winnt32
1.1.2 Command Switches
1.1.3 Troubleshooting Installation Facts
1.1.4 Licensing
1.1.5 Licensing Facts
1.1.6 ExamSim Questions - Section 1.1

1.2 Automated Installs

1.2.1 Unattended Installation
1.2.2 Creating an Unattend.txt File
1.2.3 Unattended Installation Facts
1.2.4 Disk Imaging Facts
1.2.5 Remote Installation Services (RIS)
1.2.6 Network Installation Facts

2.0 Users, Groups, and Computers (62 questions)

2.1 Users

2.1.1 Creating User Accounts
2.1.2 Create a Domain User Account
2.1.3 Modify User Account Properties
2.1.4 User Account Management
2.1.5 Managing User Accounts
2.1.6 Domain User Account Facts
2.1.7 Change the Logon Name
2.1.8 Modify Password Settings
2.1.9 Set Account Expiration
2.1.10 Enable an Account
2.1.11 Modify Multiple Users
2.1.12 Create a Template User
2.1.13 ExamSim Questions - Section 2.1


2.2 Groups

2.2.1 Group Scopes
2.2.2 Domain Local Scopes
2.2.3 Group Facts
2.2.4 Creating Groups
2.2.5 Create a Global Group
2.2.6 Create a Domain Local Group
2.2.7 Create a Universal Group
2.2.8 Create a Distribution Group
2.2.9 Change the Group Scope
2.2.10 Built-in Groups
2.2.11 Default Domain Groups
2.2.12 ExamSim Questions - Section 2.2

2.3 Group Strategy

2.3.1 Group Strategy
2.3.2 Implementing a Group Strategy
2.3.3 Group Strategy Facts
2.3.4 Implement a Group Strategy 1
2.3.5 Implement a Group Strategy 2
2.3.6 ExamSim Questions - Section 2.3

2.4 User Profiles

2.4.1 Mandatory Profile
2.4.2 Create a Mandatory Profile
2.4.3 Roaming Profile
2.4.4 Managing User Profiles
2.4.5 User Profile Management Tasks
2.4.6 Roaming Profile Facts
2.4.7 Create a Roaming Profile
2.4.8 Delete User Profiles
2.4.9 Add Mandatory Roaming Profiles
2.4.10 ExamSim Questions - Section 2.4

2.5 Computer Accounts

2.5.1 Computer Accounts
2.5.2 Joining a Domain
2.5.3 Managing Computer Accounts
2.5.4 Computer Account Facts
2.5.5 Create Computer Accounts
2.5.6 Disable a Computer Account
2.5.7 Reset a Computer Account
2.5.8 ExamSim Questions - Section 2.5

2.6 Account Policies

2.6.1 Password Policies
2.6.2 Setting Account and Password Policies
2.6.3 Account Policies Facts
2.6.4 Configure Account Settings 1
2.6.5 Configure Account Settings 2
2.6.6 Configure Password Settings 1
2.6.7 Configure Password Settings 2
2.6.8 Troubleshooting Logon
2.6.9 Reset the Password
2.6.10 ExamSim Questions - Section 2.6

2.7 AD Command Prompt Tools

2.7.1 Importing and Exporting
2.7.2 AD Management Commands
2.7.3 Using Command Prompt Tools
2.7.4 Command Prompt Tools
2.7.5 ExamSim Questions - Section 2.7

3.0 Hardware Devices (12 questions)

3.1 Installing Hardware Devices

3.1.1 Device Installation
3.1.2 Installing Devices
3.1.3 Device Installation Facts
3.1.4 Autodetect a Plug and Play Device
3.1.5 Install a Legacy Device

3.2 Managing Devices and Drivers

3.2.1 Managing Devices and Drivers
3.2.2 Device Management Facts
3.2.3 Enable and Disable Devices
3.2.4 Remove a Device
3.2.5 Upgrade a Driver
3.2.6 Driver Signing
3.2.7 Configuring Driver Signing
3.2.8 Driver Facts
3.2.9 Configure Driver Signing
3.2.10 File Verification Programs
3.2.11 Hardware Control Panel Applets
3.2.12 ExamSim Questions - Section 3.2

4.0 Disk Storage (18 questions)

4.1 File Systems

4.1.1 File Systems
4.1.2 Convert to NTFS
4.1.3 File System Facts
4.1.4 Format a Drive
4.1.5 Convert a Drive
4.1.6 ExamSim Questions - Section 4.1

4.2 Disks and Volumes

4.2.1 Disk Types
4.2.2 Basic and Dynamic Disks
4.2.3 Creating a Simple Volume
4.2.4 Upgrade a Disk
4.2.5 Revert a Disk to Basic
4.2.6 Create a Volume
4.2.7 Spanned Volumes
4.2.8 Creating Spanned Volumes
4.2.9 Span an Existing Volume
4.2.10 Create a Spanned Volume
4.2.11 Volume Characteristics
4.2.12 ExamSim Questions - Section 4.2

4.3 Performance and Fault Tolerance

4.3.1 RAID Levels
4.3.2 Striping
4.3.3 Create a Striped Volume
4.3.4 Mirroring
4.3.5 Creating Mirrored Volumes
4.3.6 Create a Mirrored Volume
4.3.7 Mirror an Existing Drive
4.3.8 Mirror the System Partition
4.3.9 RAID-5
4.3.10 Creating RAID Volumes
4.3.11 Create a RAID Volume
4.3.12 Redundancy and Fault Tolerance
4.3.13 ExamSim Questions - Section 4.3

4.4 Maintaining Disks and Volumes

4.4.1 Defragmenting a Hard Disk
4.4.2 Disk Recovery
4.4.3 Recovering from a Failed Disk
4.4.4 Disk Management Facts
4.4.5 Break a Mirrored Volume
4.4.6 Recover a Failed Mirrored Volume
4.4.7 Repair a RAID Volume
4.4.8 Boot.ini File
4.4.9 Boot.ini Facts
4.4.10 ExamSim Questions - Section 4.4

5.0 Backup and Recovery (46 questions)

5.1 Backup and Restore

5.1.1 Windows Backup
5.1.2 System State Data
5.1.3 Choosing a Backup Strategy
5.1.4 Backing up Data
5.1.5 Restoring Data
5.1.6 Backup Types Facts
5.1.7 Backup Management Facts
5.1.8 ExamSim Questions - Section 5.1

5.2 Volume Shadow Copy Services (VSS)

5.2.1 Volume Shadow Copy Services (VSS)
5.2.2 Using Volume Shadow Copy
5.2.3 Enable Shadow Copies
5.2.4 ExamSim Questions - Section 5.2

5.3 System Recovery

5.3.1 Driver Rollback and ASR
5.3.2 Setting up and Using ASR
5.3.3 Troubleshooting System Startup
5.3.4 System Recovery Facts
5.3.5 Backing Up and Restoring Active Directory
5.3.6 Active Directory Restore Facts
5.3.7 ExamSim Questions - Section 5.3

6.0 File Management (29 questions)

6.1 NTFS Permissions

6.1.1 NTFS Permissions
6.1.2 Setting NTFS Permissions
6.1.3 NTFS Permission Facts
6.1.4 Configure NTFS Permissions
6.1.5 Copy and Modify Inherited Permissions
6.1.6 Remove Inherited Permissions
6.1.7 Viewing Effective Permissions
6.1.8 Effective NTFS Permissions
6.1.9 ExamSim Questions - Section 6.1

6.2 Shared Folders

6.2.1 Share a Folder
6.2.2 Shared Folder Facts
6.2.3 Share a Folder with a Second Name
6.2.4 Unshare a Folder
6.2.5 Remove a Shared Folder
6.2.6 ExamSim Questions - Section 6.2

6.3 Share Access

6.3.1 Share Permissions
6.3.2 Controlling Share Access
6.3.3 Share Access Facts
6.3.4 Configure Share Permissions
6.3.5 Create a Share and Set Permissions
6.3.6 Configure Share Limits
6.3.7 Configure NTFS and Share Permissions 1
6.3.8 Configure NTFS and Share Permissions 2
6.3.9 ExamSim Questions - Section 6.3

6.4 Disk Quotas

6.4.1 Disk Quotas
6.4.2 Enabling Quota Management
6.4.3 Enable Quota Restrictions
6.4.4 Quota Entries
6.4.5 Configuring Quota Entries
6.4.6 Create a Quota Entry
6.4.7 Modify Quota Limits
6.4.8 Delete a Quota Entry
6.4.9 Disk Quota Facts
6.4.10 ExamSim Questions - Section 6.4

6.5 Encryption and Compression

6.5.1 File Encryption
6.5.2 Encrypting Files
6.5.3 Encryption Facts
6.5.4 Encrypt a Folder
6.5.5 Decrypt a File
6.5.6 Compression
6.5.7 Compressing Files
6.5.8 File Compression Facts
6.5.9 Compress a Drive
6.5.10 Compress a Folder

6.6 Offline Files

6.6.1 Configuring Offline Files on the Server
6.6.2 Configuring Offline Files on the Client
6.6.3 Offline File Facts
6.6.4 Optimize Program Caching
6.6.5 Enable Automatic Caching
6.6.6 Disable Share Caching
6.6.7 ExamSim Questions - Section 6.6

7.0 Internet Information Services (IIS) (12 questions)

7.1 Installing and Configuring a Web Site

7.1.1 IIS Facts
7.1.2 Installing and Administering IIS
7.1.3 Install IIS
7.1.4 Change the Default Home Page
7.1.5 Change the Home Directory Path
7.1.6 Creating a Virtual Directory
7.1.7 Create a Virtual Directory
7.1.8 Set the Virtual Directory Home Page
7.1.9 ExamSim Questions - Section 7.1

7.2 Securing IIS

7.2.1 IIS Security
7.2.2 Managing IIS Authentication
7.2.3 IIS Authentication Facts
7.2.4 Configure Web Site Authentication
7.2.5 Configure Virtual Directory Authentication
7.2.6 Managing IIS Permissions
7.2.7 IIS Permission Facts
7.2.8 Configure Virtual Directory Permissions
7.2.9 ExamSim Questions - Section 7.2

7.3 Managing IIS

7.3.1 Creating a Web Site
7.3.2 Create a New Web Site
7.3.3 Configuring Web Site Identification
7.3.4 Web Site Identification Facts
7.3.5 IIS Management Facts
7.3.6 Limit Web Site Access
7.3.7 Stop the Web Site
7.3.8 ExamSim Questions - Section 7.3

8.0 Printers (9 questions)

8.1 Configuring Printing

8.1.1 Printing Concepts
8.1.2 Printing Facts
8.1.3 Installing a Local Printer
8.1.4 Install a Local Printer
8.1.5 Sharing a Printer
8.1.6 Share a Printer
8.1.7 Create and Share a Printer
8.1.8 Unpublish a Printer in Active Directory
8.1.9 Add Printer Drivers
8.1.10 Configure Printer Permissions
8.1.11 ExamSim Questions - Section 8.1

8.2 Customizing Printing

8.2.1 Advanced Print Configuration
8.2.2 Configuring Printer Pooling
8.2.3 Configure Printer Pooling
8.2.4 Configuring Multiple Printer Objects
8.2.5 Restrict Printing Times
8.2.6 Configure Printer Priority
8.2.7 ExamSim Questions - Section 8.2

8.3 Managing Printing

8.3.1 Managing Printers
8.3.2 Managing the Print Queue
8.3.3 Delete a Print Job
8.3.4 Managing the Print Server
8.3.5 Disable Printer Notification
8.3.6 Disable Printer Notification (Non-2000 Clients)
8.3.7 Change the Spool Location
8.3.8 Managing Printing

8.4 Troubleshooting Printing

8.4.1 Recovering from Printer Failure
8.4.2 Troubleshooting Printing Facts
8.4.3 Redirect Print Jobs
8.4.4 Redirect Print Jobs 2
8.4.5 ExamSim Questions - Section 8.4

8.5 Internet Printing Protocol (IPP)

8.5.1 IPP
8.5.2 Configuring IPP
8.5.3 IPP Facts
8.5.4 ExamSim Questions - Section 8.5

9.0 Installing Software (11 questions)

9.1 Deploying and Updating Software

9.1.1 Deploying Applications
9.1.2 Creating a Software Distribution
9.1.3 Troubleshooting Software Deployment
9.1.4 Service Packs and Patches
9.1.5 Installer Package Facts
9.1.6 ExamSim Questions - Section 9.1

9.2 Software Update Services (SUS)

9.2.1 Software Update Services (SUS) Components
9.2.2 SUS Server Configuration
9.2.3 Configuring SUS
9.2.4 Managing SUS Clients
9.2.5 SUS Client Configuration
9.2.6 SUS Infrastructure Design
9.2.7 SUS Facts
9.2.8 ExamSim Questions - Section 9.2

10.0 System Security (7 questions)

10.1 Auditing

10.1.1 Auditing
10.1.2 Configuring Auditing
10.1.3 Auditing Facts
10.1.4 Configure Auditing 1
10.1.5 Configure Auditing 2
10.1.6 Configure Auditing 3
10.1.7 Configuring File System Auditing
10.1.8 ExamSim Questions - Section 10.1

10.2 Security Templates

10.2.1 Security Templates
10.2.2 Analyzing Security Settings
10.2.3 Configuring and Applying Security Templates
10.2.4 Security Template Facts
10.2.5 ExamSim Questions - Section 10.2

11.0 Management and Performance (44 questions)

11.1 Remote Management

11.1.1 Terminal Services
11.1.2 Installing Terminal Services
11.1.3 Enable Remote Desktop
11.1.4 Terminal Services Facts
11.1.5 Managing Terminal Services
11.1.6 Terminal Service Licensing
11.1.7 Remote Desktop Facts
11.1.8 Remote Assistance
11.1.9 Remote Assistance Facts
11.1.10 ExamSim Questions - Section 11.1

11.2 Event Viewer

11.2.1 Event Viewer
11.2.2 Using Event Viewer
11.2.3 Managing Event Logs
11.2.4 Event Facts
11.2.5 Configure Log Properties
11.2.6 Clear the System Log
11.2.7 ExamSim Questions - Section 11.2

11.3 Monitoring Performance

11.3.1 Monitoring the System
11.3.2 Using Task Manager
11.3.3 Using System Monitor
11.3.4 Performance Monitoring Tools
11.3.5 Objects and Counters
11.3.6 ExamSim Questions - Section 11.3

ExamSim (276 questions)

Preparing for Certification

Exam Objectives
Exam FAQs
How to Register for an Exam
Exam-taking Hints and Tips

Objective 100, All Questions (32 questions)
Objective 200, All Questions (66 questions)
Objective 300, All Questions (48 questions)
Objective 400, All Questions (82 questions)
Objective 500, All Questions (48 questions)
Typical Exam

Download 12 Part


Here are The links:

http://www.linkbucks.com/link/ff575b2a/5370
http://www.linkbucks.com/link/fe343ac3/5370
http://www.linkbucks.com/link/f807962f/5370
http://www.linkbucks.com/link/f800c2d4/5370
http://www.linkbucks.com/link/fe37332c/5370
http://www.linkbucks.com/link/fd2cb22d/5370
http://www.linkbucks.com/link/ff669b9b/5370
http://www.linkbucks.com/link/f98ea2da/5370
http://www.linkbucks.com/link/fb564641/5370
http://www.linkbucks.com/link/f9491a76/5370
http://www.linkbucks.com/link/fee9f192/5370
http://www.linkbucks.com/link/f907c0d3/5370

Any broken link, pls do comment

11:57 AM by Shubham Mittal · 3