Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

IIS 6.0 and Wscript.shell

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  IIS webserver iisweb.vbs  
Author Message
rashmijagadish

External


Since: Sep 17, 2004
Posts: 2



(Msg. 1) Posted: Fri Sep 17, 2004 11:37 am
Post subject: IIS 6.0 and Wscript.shell
Archived from groups: microsoft>public>inetserver>iis (more info?)

I'm trying to use the wscript.shell in an asp page running on IIS6

response.Write "WSCRIPT.SHELL EXAMPLE <BR>"
dim wshell, intReturn
set wshell = server.createobject("wscript.shell")
intReturn = wshell.run("ipconfig", 0, True)
response.Write intReturn & "<BR>"


The script works ok on 2000 systems, but fails on 2003 with the following
error
Microsoft VBScript runtime error '800a0046'
Permission denied

I tried giving IWMA_servername account read and execute permissions.
But and IUSR_servername account does not exist on this server.

I've searched extensively but nothing. Any help is greatly appreciated

 >> Stay informed about: IIS 6.0 and Wscript.shell 
Back to top
Login to vote
anonymous77

External


Since: Oct 14, 2003
Posts: 468



(Msg. 2) Posted: Fri Sep 17, 2004 2:32 pm
Post subject: IIS 6.0 and Wscript.shell [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hello Rashmi,

For Win2003 you need:
- IIS_WPG
- IWAM
- Sometimes IUSR

If you would like to correspond further, I have created a
temporary email address you can contact me at:

RASHMI1-CONTACT-CRAIG.TakeThisOut@GNIS.NET

Sincerely,

Craig



 >-----Original Message-----
 >I'm trying to use the wscript.shell in an asp page
running on IIS6
 >
 > response.Write "WSCRIPT.SHELL EXAMPLE <BR>"
 > dim wshell, intReturn
 > set wshell = server.createobject("wscript.shell")
 > intReturn = wshell.run("ipconfig", 0, True)
 > response.Write intReturn & "<BR>"
 >
 >
 >The script works ok on 2000 systems, but fails on 2003
with the following
 >error
 > Microsoft VBScript runtime error '800a0046'
 > Permission denied
 >
 >I tried giving IWMA_servername account read and execute
permissions.
 >But and IUSR_servername account does not exist on this
server.
 >
 >I've searched extensively but nothing. Any help is
greatly appreciated
 >
 >.
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: IIS 6.0 and Wscript.shell 
Back to top
Login to vote
rashmijagadish

External


Since: Sep 17, 2004
Posts: 2



(Msg. 3) Posted: Fri Sep 17, 2004 4:11 pm
Post subject: RE: IIS 6.0 and Wscript.shell [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Craig,
Thanks for your reponse.
I progressed a wee bit ... but again running into problems.
I gave the IWMA, ISSPublicAccess account admin privs on the server.
I can execute some shell command but some other I cannot.
For instance

Response.Write(myexec.execute("ipconfig /all")) --WORKS FINE
Response.Write(myexec.execute("at 10:15
D:\AutoApps\HealthCheck\Scripts\DSS_ACCESS_Check.cmd")) -- DOES NOT WOR

Response.Write(myexec.execute("SCHTASKS /Run /TN DSS_ACCESS_Check")) --
DOES NOT

The error I get is
Access is denied.
ERROR: Could not read key from registry

Error creating process
The system cannot find the file specified

"anonymous@discussions.microsoft.com" wrote:

 > Hello Rashmi,
 >
 > For Win2003 you need:
 > - IIS_WPG
 > - IWAM
 > - Sometimes IUSR
 >
 > If you would like to correspond further, I have created a
 > temporary email address you can contact me at:
 >
 > RASHMI1-CONTACT-CRAIG.TakeThisOut@GNIS.NET
 >
 > Sincerely,
 >
 > Craig
 >
 >
 >
  > >-----Original Message-----
  > >I'm trying to use the wscript.shell in an asp page
 > running on IIS6
  > >
  > > response.Write "WSCRIPT.SHELL EXAMPLE <BR>"
  > > dim wshell, intReturn
  > > set wshell = server.createobject("wscript.shell")
  > > intReturn = wshell.run("ipconfig", 0, True)
  > > response.Write intReturn & "<BR>"
  > >
  > >
  > >The script works ok on 2000 systems, but fails on 2003
 > with the following
  > >error
  > > Microsoft VBScript runtime error '800a0046'
  > > Permission denied
  > >
  > >I tried giving IWMA_servername account read and execute
 > permissions.
  > >But and IUSR_servername account does not exist on this
 > server.
  > >
  > >I've searched extensively but nothing. Any help is
 > greatly appreciated
  > >
  > >.
  > >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS 6.0 and Wscript.shell 
Back to top
Login to vote
someone9

External


Since: Aug 25, 2003
Posts: 2419



(Msg. 4) Posted: Fri Sep 17, 2004 11:24 pm
Post subject: Re: IIS 6.0 and Wscript.shell [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

For security reasons, pages executed by IIS are prohibited from running any
commandline programs (especially those under System32, including cmd.exe).
You can break some ACLs or elevate user privileges to "make it work", but
realize that you are responsible for compromising your own system's
security.

Also, commands/scripts involving CMD.EXE (such as the .cmd files) cannot be
launched by pages executed by IIS, and there is no work-around other than
rewriting CMD.EXE itself.

Unfortunately, what you want to do can also allow a hacker to easily
compromise your server, so for security reasons we are preventing both
hackers and you from those actions -- even if they worked on prior
Windows/IIS versions.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Rashmi Jagadish" <RashmiJagadish DeleteThis @discussions.microsoft.com> wrote in
message news:4CFAF99F-8F92-44EB-908D-93F8D73ADCB3@microsoft.com...
Craig,
Thanks for your reponse.
I progressed a wee bit ... but again running into problems.
I gave the IWMA, ISSPublicAccess account admin privs on the server.
I can execute some shell command but some other I cannot.
For instance

Response.Write(myexec.execute("ipconfig /all")) --WORKS FINE
Response.Write(myexec.execute("at 10:15
D:\AutoApps\HealthCheck\Scripts\DSS_ACCESS_Check.cmd")) -- DOES NOT WOR

Response.Write(myexec.execute("SCHTASKS /Run /TN DSS_ACCESS_Check")) --
DOES NOT

The error I get is
Access is denied.
ERROR: Could not read key from registry

Error creating process
The system cannot find the file specified

"anonymous@discussions.microsoft.com" wrote:

 > Hello Rashmi,
 >
 > For Win2003 you need:
 > - IIS_WPG
 > - IWAM
 > - Sometimes IUSR
 >
 > If you would like to correspond further, I have created a
 > temporary email address you can contact me at:
 >
 > RASHMI1-CONTACT-CRAIG DeleteThis @GNIS.NET
 >
 > Sincerely,
 >
 > Craig
 >
 >
 >
  > >-----Original Message-----
  > >I'm trying to use the wscript.shell in an asp page
 > running on IIS6
  > >
  > > response.Write "WSCRIPT.SHELL EXAMPLE <BR>"
  > > dim wshell, intReturn
  > > set wshell = server.createobject("wscript.shell")
  > > intReturn = wshell.run("ipconfig", 0, True)
  > > response.Write intReturn & "<BR>"
  > >
  > >
  > >The script works ok on 2000 systems, but fails on 2003
 > with the following
  > >error
  > > Microsoft VBScript runtime error '800a0046'
  > > Permission denied
  > >
  > >I tried giving IWMA_servername account read and execute
 > permissions.
  > >But and IUSR_servername account does not exist on this
 > server.
  > >
  > >I've searched extensively but nothing. Any help is
 > greatly appreciated
  > >
  > >.
  > >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS 6.0 and Wscript.shell 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]