# Windows Script Host

{% embed url="<https://www.sans.org/reading-room/whitepapers/hackers/windows-script-host-hack-windows-33583>" %}

Can be useful if you exploited something and now have a “beachhead”, e.g limited tools and possibly the necessity to evade antivirus.

Windows Script Host can be used to:

* Move binary files across a firewall via HTTP or email
* Discover and alter system configuration
* Access databases and network services
* Control local hardware on the target to gather intelligence and perform social engineering attacks

Windows Script Host (WSH) is used by Windows and admins to script stuff in windows. WSH based scripts are less likely to get flagged by antivirus programs. Written in JScript or VBScript as uncompiled text files.

They should be run in “real mode” using Cscript.exe

Example programs you can execute (CTRL+F in the whitepaper):

* Retrieving External Files via HTTP&#x20;
* Dumping Configuration Information
* Accessing a Database&#x20;
* Modifying System Configuration (without UAC prompt)
* Talking to a User with the Microsoft Speech API
* Capturing Audio and Sending it to a Web Page&#x20;
* Calling a Web Service
* Sending an Email Attachment with Microsoft Outlook


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://heinosass.gitbook.io/leet-sheet/post-exploitation/untitled/windows-script-host.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
