> For the complete documentation index, see [llms.txt](https://heinosass.gitbook.io/leet-sheet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://heinosass.gitbook.io/leet-sheet/post-exploitation/untitled/windows-script-host.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
