Archive for March, 2008
Shutdown
Well this is my first article in what I hope is going to be a series teaching you how to fight the good fight, digital office warfare. In this article we are going to start out with the basics of offence because a good offence is … well a good offence. Basic offence includes using built in tools (or easily downloadable power tools) to attack your neighbors whose computers you have admin privileges on.
Let’s get started, I hope you have read the Geneva Convention of office warfare. The first tool we are going to look at is shutdown.
C:\Users\joshp>shutdown /?
Usage: shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]
[/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]
No args Display help. This is the same as typing /?.
/? Display help. This is the same as not typing any options.
/i Display the graphical user interface (GUI).
This must be the first option.
/l Log off. This cannot be used with /m or /d options.
/s Shutdown the computer.
/r Shutdown and restart the computer.
/g Shutdown and restart the computer. After the system is
rebooted, restart any registered applications.
/a Abort a system shutdown.
This can only be used during the time-out period.
/p Turn off the local computer with no time-out or warning.
Can be used with /d and /f options.
/h Hibernate the local computer.
Can be used with the /f option.
/e Document the reason for an unexpected shutdown of a computer.
/m \\computer Specify the target computer.
/t xxx Set the time-out period before shutdown to xxx seconds.
The valid range is 0-600, with a default of 30.
Using /t xxx implies the /f option.
/c “comment” Comment on the reason for the restart or shutdown.
Maximum of 512 characters allowed.
/f Force running applications to close without forewarning users.
/f is automatically set when used in conjunction with /t xxx.
/d [p|u:]xx:yy Provide the reason for the restart or shutdown.
p indicates that the restart or shutdown is planned.
u indicates that the reason is user defined.
if neither p nor u is specified the restart or shutdown is unplanned.
xx is the major reason number (positive integer less than 256).
yy is the minor reason number (positive integer less than 65536).
Shutdown has a fairly obvious use. Basically using the parameters available to us we can shutdown the computers of those poor souls around us. Here is the general use for that.
Shutdown /f /r /m \\enemycomp /t 30
So what are we doing here? The first flag we see if /f. This is force, what this means is that your coworkers apps will be closed forcefully if they don’t close nicely. The second flag /r is reboot, you can also use /s which will shut the computer down and not start it back, this makes little difference. The next flag is an important one /m. This is where we give the computer name of our target. Syntax is /m \\computername. The final flag we show above is /t. This flag is a way of throwing your coworkers a bone, it is the countdown timer. If left out the shutdown happens right away but if you put it in they get a countdown timer first allowing them a little time to try to either save stuff or abort the shutdown if they know what they are doing (link to defense article). The only other flag that you may be interested in at this point is /c. /c allows you to add a comment to the shutdown timer dialog, this is mostly used to taunt your coworkers and the syntax is /c “Haha, I pwns ju kthxbye”. So all put together you can use a command like this to shutdown the imaginary computer dev-BobHunington giving Bob a 10 second chance to save his day with the taunting message “Don’t Mess With TESTERS BOB!” like this.
Shutdown /f /s /m \\dev-BobHunington /t 10 /c “Don’t Mess With TESTERS BOB!”
That is all we have for this week, go forth and reboot! Remember kids save your work, you never know if the person next to you is reading this same article right now.
No comments