Jump to content

Recommended Posts

Posted

I've realised I left one of the computers on at my university residence, and am on my way home for Easter.

I've figured I can upload an ASP page in order to run shutdown.exe, but in order to do that I need administrative privileges.

 

Does anyone know a simple way to impersonate an account in ASP, I'm sure I recall seeing a WSH or similar object to facilitate it, but can't remember where I saw it, and can't find anything on the net.

Posted

This is code that performs a shutdown via WMI:

http://www.robvanderwoude.com/files/shutdown_vbs.txt

 

and this page is about impersonation:

Microsoft Corporation

 

but it looks like it only offers impersonation of the already existing process not providing new user credentials to run with.

 

You may be able to use a shell.run though depending on the computers config:

<%
Dim wshell, intReturn
set wshell = server.createobject("wscript.shell")
intReturn = wshell.run("shutdown -s", 0, True)
Response.Write( intReturn )
set wshell = nothing
%>

 

or even a command prompt that uses the runas command then uses sendkeys to type in the required password.

  • Thanks 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...