HTML Application

HTML Application (HTA)Filename extension| `.hta`

|

Internet media type| `application/hta`
Magic number| %hta
Developed by| Microsoft
Website| learn.microsoft.com/en-us/previous-versions/ms536471(v=vs.85)?redirectedfrom=MSDN

An HTML Application (HTA) is a Microsoft Windows program whose source code consists of HTML, Dynamic HTML, and one or more scripting languages supported by Internet Explorer, such as VBScript or JScript. The HTML is used to generate the user interface, and the scripting language is used for the program logic. An HTA executes without the constraints of the web browser security model; in fact, it executes as a "fully trusted" application.

The usual file extension of an HTA is `.hta`.

The ability to execute HTAs was introduced to Microsoft Windows in 1999, along with the release of Microsoft Internet Explorer 5.[1] On December 9, 2003, this technology was patented.[2][3]

## Contents

* 1 Uses
* 2 Environment
* 2.1 Execution
* 2.2 Security considerations
* 3 Development
* 4 Vulnerabilities
* 5 Example
* 6 See also
* 7 References
* 8 External links

## Uses

HTAs give the developer the features of HTML together with the advantages of scripting languages. They are popular with Microsoft system administrators who use them for system administration from prototypes to "full-scale" applications, especially where flexibility and speed of development are critical.[4]

## Environment

### Execution

One screenshot of one example window that is produced by `mshta.exe`

An HTA is executed using the program `mshta.exe`, or, alternatively, double-clicking on the file. This program is typically installed along with Internet Explorer. `mshta.exe` executes the HTA by instantiating the Internet Explorer rendering engine (mshtml) as well as any required language engines (such as vbscript.dll).

An HTA is treated like any executable file with extension `.exe`. When executed via mshta.exe (or if the file icon is double-clicked), it runs immediately. When executed remotely via the browser, the user is asked once, before the HTA is downloaded, whether or not to save or run the application; if saved, it can simply be run on demand after that.[4]

By default, HTAs are rendered as per "standards-mode content in IE7 Standards mode and quirks mode content in IE5 (Quirks) mode", but this can be altered using `X-UA-Compatible` headers.[4]

HTAs are dependent on the Trident (MSHTML) browser engine, used by Internet Explorer, but are not dependent on the Internet Explorer application itself. If a user removes Internet Explorer from Windows, via the Control Panel, the MSHTML engine remains and HTAs continue to work. HTAs continue to work in Windows 11 as well.

HTAs are fully supported running in modes equivalent to Internet Explorer versions 5 to 9. Further versions, such as 10 and 11, still support HTAs though with some minor features turned off.[citation needed]

### Security considerations

Main article: Browser security

When a regular HTML file is executed, the execution is confined to the security model of the web browser. This means it is confined to communicating with the server, manipulating the page's object model (usually to validate forms and/or create interesting visual effects) and reading or writing cookies.

On the other hand, an HTA runs as a fully trusted application and therefore has more privileges than a normal HTML file; for example, an HTA can create, edit and remove files and registry entries. Although HTAs run in this 'trusted' environment, querying Active Directory can be subject to Internet Explorer Zone logic and associated error messages.

## Development

To customize the appearance of an HTA, an optional tag `hta:application` was introduced to the `HEAD` section. This tag exposes a set of attributes that enable control of border style, the program icon, etc., and provide information such as the argument (command line) used to launch the HTA.[5] Otherwise, an HTA has the same format as an HTML page.

Any text editor can be used to create an HTA. Editors with special features for developing HTML applications may be obtained from Microsoft[6] or from third-party sources.[7]

An existing HTML file (with file extension `.htm` or `.html`, for example) can be changed to an HTA by simply changing the extension to `.hta`.

## Vulnerabilities

HTA have been used to deliver malware.[8][9] One particular HTA, named 4chan.hta (detected by antiviruses as JS/Chafpin.gen), was widely distributed by the users of the imageboard as a steganographic image in which the user were instructed to download the picture as an HTA file, which when executed, would cause the computer to automatically spam the website (evading 4chan's CAPTCHA in the process) with alternate variants of itself; it was reported that such attacks were previously delivered in which the user was prompted to save it as a .js file.[10]

## Example

This is an example of Hello World as an HTML Application.

<HTML>
<HEAD>
<HTA:APPLICATION ID="HelloExample"
BORDER="bold"
BORDERSTYLE="complex"/>
<TITLE>HTA - Hello World</TITLE>
</HEAD>
<BODY>
<H2>HTA - Hello World</H2>
</BODY>
</HTML>

## See also

* Adobe AIR
* Active Scripting
* Apache Cordova
* Chromium Embedded Framework
* Electron (software framework)
* Firefox OS
* React Native
* XAML Browser Applications (XBAPs)
* XUL and XULRunner \- a language and environment for Mozilla cross-platform applications that resembles the mechanism of HTML Applications.
* Windows Script Host

## References

1. ↑ Article ID:200874 in Microsoft Support, in Microsoft Support Knowledge Base
2. ↑ , Phillip R.; Loren M. Kohnfelder & Roderick A. Chavez"Method and apparatus for writing a windows application in HTML"  patent US6662341B1, issued 2003-12-09
3. ↑ Festa, Paul (2003-12-10). "Microsoft wins HTML application patent". http://www.cnet.com/news/microsoft-wins-html-application-patent/.
4. ↑ 4.0 4.1 4.2 "Introduction to HTML Applications (HTAs).". May 2011. https://msdn.microsoft.com/en-us/library/ms536496(v=vs.85).aspx#Compatibility. Sections include Why Use HTAs, Creating an HTA, HTA-Specific Functionality, Security, Compatibility, Deployment
5. ↑ HTA:APPLICATION Object, in MSDN Library, the complete specification of the tag `hta:application`
6. ↑ HTA Helpomatic
7. ↑ HTAEdit, an editor for HTAs with a built-in debugger
8. ↑ "Spora Ransomware Dropper Uses HTA to Infect System" (in en-US). 2017-01-17. https://www.vmray.com/cyber-security-blog/spora-ransomware-dropper-hta-infect-system/.
9. ↑ "8 Scariest Ransomware Viruses" (in en-US). https://blog.netwrix.com/2017/06/01/nine-scariest-ransomware-viruses/.
10. ↑ Constantin, Lucian (2010-08-10). "4chan Flood Script Is Back with New Social Engineering Trick". https://news.softpedia.com/news/4chan-Flood-Script-Is-Back-with-New-Social-Engineering-Trick-151603.shtml.

## External links

* HTML Component (HTC) Reference at MSDN. An HTC encapsulates specific functionality or behavior within HTAs.
* The Script Center, The Script Center, home of Hey, Scripting Guy! Blog
* Learn About Scripting for HTML Applications (HTAs), a tutorial site for learning about HTA's

* v
* t
* e

Internet Explorer

Versions|

| Main|

* 1
* 2
* 3
* 4
* 5
* 6
* 7
* 8
* 9
* 10
* 11

|

Other|

* Mobile
* for macOS
* for UNIX
* IEs4Linux

Overview|

* History
* Add-ons
* Box model
* Browser Helper Object (BHO)
* Easter eggs
* Extensions
* Removal
* Shells

Technologies|

* Accelerator
* ActiveX
* Dynamic HTML
* HTA
* HTML Components
* favicon.ico
* HTML+TIME
* Index.dat
* JScript
* MHTML
* MSXML
* RSS Platform
* Smart tags
* Temporary Internet Files
* Vector Markup Language
* Web Slice
* WPAD
* XHR/XDomainRequest

Software & engines|

* Administration Kit
* Developer Tools
* Integrated Windows Authentication
* Tasman
* Trident
* Chakra

Implementations|

* Active Channel
* Active Desktop
* ActiveMovie
* Channel Definition Format (.cdf)
* Comic Chat/Chat 2.0
* DirectX Media
* Internet Mail and News
* Microsoft Java Virtual Machine (MSJVM)
* MSN Explorer
* MSN for Mac OS X
* NetMeeting
* NetShow
* Outlook Express
* Server Gated Cryptography (SGC)
* Spyglass
* Windows Address Book
* Windows Desktop Update

Events|

* First Browser War
* Second Browser War
* Download.ject
* Eolas v. Microsoft
* Sun v. Microsoft
* United States v. Microsoft Corp.

People|

* Tantek Çelik
* Thomas Reardon
* Dean Hachamovitch
* Scott Isaacs
* Inori Aizawa

* Category
* Commons

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/HTML Application. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=HTML_Application&oldid=3962139"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template