Common Q&A on Preventing Intrusions in Virtual Host IIS

by huasun on 2008-09-25 22:21:06

Here is the translation of your text into English:

---

1. **How to make an ASP script run with System privileges?**

Modify the virtual directory corresponding to your ASP script and change "Application Protection" to "Low"...

2. **How to prevent ASP Trojans?**

- **ASP Trojan based on FileSystemObject component**

```bash

cacls %systemroot%\system32\scrrun.dll /e /d guests // Prohibit guests from using

regsvr32 scrrun.dll /u /s // Unregister (delete)

```

- **ASP Trojan based on Shell.Application component**

```bash

cacls %systemroot%\system32\shell32.dll /e /d guests // Prohibit guests from using

regsvr32 shell32.dll /u /s // Unregister (delete)

```

3. **How to encrypt ASP files?**

Download `sce10chs.exe` for free from Microsoft, run it directly to complete the installation process.

After installation, the `screnc.exe` file will be generated. This is a command-line tool that runs in the DOS PROMAPT.

Run the following command:

```bash

screnc -l vbscript source.asp destination.asp

```

A new file `destination.asp` containing encrypted ASP scripts will be generated. When opened in Notepad, everything within quotes (`""`) will be transformed into unreadable ciphertext, regardless of whether it is commented or not.

However, Chinese characters cannot be encrypted.

4. **How to extract UrlScan from IISLockdown?**

Run the following command:

```bash

iislockd.exe /q /c /t:c:\urlscan

```

5. **How to prevent the Content-Location header from exposing the internal IP address of the web server?**

Execute the following command:

```bash

cscript c:\inetpub\adminscripts\adsutil.vbs set w3svc/UseHostName True

```

Finally, restart IIS.

6. **How to resolve HTTP 500 Internal Server Error?**

Most causes of IIS HTTP 500 internal errors are due to...

---

(Note: The last part about the cause of HTTP 500 errors seems incomplete in the original text, so it remains as-is.)