Vbs Script File Execution skills

Source: Internet
Author: User

From non-transparent blog f-tm.net

Today, a batch of webshells are ready to retrain the Elevation of Privilege technology.

3389 opened the SERV-U did not.

Run CMD if the component supports WSCRIPT. SHELL ..

The net user command can be executed, but the add USER does not have the echo. Does it seem that the operation is not successful?

Let's take a look at the components that support ASP. NET, So we passed the ASPX horse of the galaxy.

It seems that I still cannot execute CMD (#‵′)

Users cannot add it .. In this case, you can use VBS to add users without CMD.

I need to execute a file to add the user Adduser. vbs, Which is easy for me to learn. This small problem actually costs me a lot.
Share the conclusion. I found it.

After thinking about this question, I had the idea to go to Microsoft's News Group and ask. Then I went to the full-text search of CSDN. It is really disappointing. My keyword is only vbs. After execution, I found a lot of things I want. Wscript.exe is used to execute this file.

Wscript.exe Deploy. vbs is typed in the response, but the error "There is no script engine for file extension. vbs" is returned. At this time, I thought of google. I found a lot of useful information, and I found a solution in the first one. The reason is that my vbs Association has been lost and must be specified.

Run wscript.exe // e: vbscript add. vbs in cmd. Sure enough !!!

Conclusion: wscript.exe is used to execute script files such as vbs. If the file association is lost. You can use // e: vbscript.

Attached is a helpful article I found.

1. What is WSH?

WSH is the scaling form of Windows Scripting Host (Windows Script Host. WSH was first introduced in the Windows 98 operating system and is a language-independent script running environment based on a 32-bit Windows platform. For example, you have compiled a script file, such as the suffix. vbs or. js file, and then double-click and execute it in Windows. Then, the system will automatically call an appropriate program to explain and execute it, and this program, it is Windows Scripting Host, and the program execution file name is Wscript.exe (Cscript.exe if it is at the DOS command prompt ).

Do you want to know if WSH is available on your machine? If your machine does not contain the wscipt.exe000000000000cscript.exe files, you can. If you find it, congratulations! You have installed WSH. Otherwise, install it manually:

In Windows 98, WSH is automatically installed as a component of the operating system. If this component is accidentally lost, you can open "control panel --> Add/delete procedure --> Windows Installer --> attachment" in sequence, and then forward "√" before "Windows Scripting Host ", then confirm the installation of the WSH component.

Ii. Relationship between script language and WSH

As you know, scripting languages (including JavaScript and VBscript) are often embedded into webpages (including HTML page clients and ASP page servers ). For scripts implanted in HTML pages, the parsing engine is loaded by Web browsers such as IE. For scripts implanted in ASP pages, the required parsing engine is provided by IIS (Internet Information Services. For scripts that appear outside the HTML and ASP pages (they often exist in the form of independent files), they need to be processed through WSH. To work properly, install IE 3.0 or later, because WSH will call VBScript and JavaScript parsing engines in IE. [Not ended] [iduba_page] Most of these scripting languages implanted on webpages are irrelevant to network security. However, there are also a few good people with ulterior motives who put some code that seriously threatens network security (we often call it "malicious code ", they usually need to modify the Registry to "malicious !), Mixing in normal scripts often makes it difficult for us to defend against attacks. However, if we know a little bit about the scripting language, these "tricks" are very easy to understand. Let's start with some simple examples ......

3. WSH application example

WSH can process the script program. How can I read and write the WSH script source file? As long as you have a little bit of Basic (VB programming is better, huh, huh) language basics, it is not difficult to learn to understand programs in the WSH script language. Go to the C: WINDOWSSAMPLESWSH directory! There are several typical script examples, and VBScript and JavaScript versions are provided respectively. It is not difficult to learn some basic WSH applications as long as we open them in notepad and study them carefully.

In notepad, you only need to enter the code in each of the following instances in sequence, save it as the corresponding "*. vbs" file, and double-click the file to see the corresponding effect.


Q: How do I open script files? Trying the above solution makes Windows XP throw an error?

A: This is similar to *. js association problem. some machines seem to, for some reason, lose their *. vbs association. its not that the files open with dreamweaver or whatever -- its that the machine just doesnt know how to run them. if you have a scheduled task, "cocould not run" will appear in the status column.

So, youre a smart person and read through the FAQ. you find *. js extension problem, and you try that fix: you run it as "wscript c: pathoscript. vbs ". but that, in turn, produces a pop-up error, this time a "Windows Scripting Host" error: "There is no script engine for file extension. vbs. "So, for some reason, wscript doesnt even know what to do *. vbs files.

The solution to this problem is to run the script:

Wscript // e: vbscript c: pathoscript. vbs

The "// e: vbscript" tells wscript to use the vbscript engine to parse the script. It will then run correctly.

A few alternative solutions, perhaps easier are:

Rename it. vbe (VBScript Encoded Script File). Not sure if this is a bad idea, but it seemed to work for some scripts.
Make a new association for VBS. open up my computer, select Tools menu-> Folder Options, and go to the File Types tab. there probably isnt a VBS association listed if you have this problem. select New, type in VBS, and hit Advanced>. then, from the pull-down menu, select "VBScript Script File ". making this selection automatically takes care of the association, along with the // e: vbscript problem. this is probably the "correct" solution...
This problems usually occurs only on Windows XP machines, but the cause is not known. A Microsoft KB article on this issue can be found here. Thanks goes to Bob_2k for writing this FAQ entry.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.