JScript.Encode

Last updated

JScript.Encode is a method created by Microsoft used to encode both server and Client-side JavaScript or VB Script source code in order to protect the source code from copying. [1] JavaScript code is used for creating dynamic web content on many websites, with the source code easily viewable, so this was meant to protect the code.

Contents

The encoding is a simple polyalphabetic substitution using three alphabets. [2]

How to use

You can use a command line script encoder to encode your scripts. [1] [3] To encode a HTML web-page file called default.htm, use the following command:

screnc.exe default.htm defaultenc.htm 

It would output to a file called defaultenc.htm.

Weaknesses

It has been reverse engineered [2] and many websites provide an on-the-fly decoder. [4]

Related Research Articles

Active Server Pages (ASP) is Microsoft's first server-side scripting language and engine for dynamic web pages.

<span class="mw-page-title-main">Internet Explorer</span> Web browser by Microsoft for Windows/Windows Server released in 1995

Internet Explorer is a series of graphical web browsers developed by Microsoft which was used in the Windows line of operating systems. Starting in 1995, It was first released as part of the add-on package Plus! for Windows 95 that year. Later versions were available as free downloads, or in-service packs, and included in the original equipment manufacturer (OEM) service releases of Windows 95 and later versions of Windows. Microsoft spent over US$100 million per year on Internet Explorer in the late 1990s, with over 1,000 people involved in the project by 1999. New feature development for the browser was discontinued in 2016 in favor of new browser Microsoft Edge. Microsoft Teams ended support for IE on November 30, 2020, Microsoft 365 ended its support on August 17, 2021 and support for IE desktop application ended on June 15, 2022 for Windows 10 Semi-Annual Channel.

UTF-8 is a variable-length character encoding used for electronic communication. Defined by the Unicode Standard, the name is derived from UnicodeTransformation Format – 8-bit.

VBScript is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing computers without error handling and with subroutines and other advanced programming constructs. It can give the user complete control over many aspects of their computing environment.

<span class="mw-page-title-main">FLAC</span> Lossless digital audio coding format

FLAC is an audio coding format for lossless compression of digital audio, developed by the Xiph.Org Foundation, and is also the name of the free software project producing the FLAC tools, the reference software package that includes a codec implementation. Digital audio compressed by FLAC's algorithm can typically be reduced to between 50 and 70 percent of its original size and decompresses to an identical copy of the original audio data.

<span class="mw-page-title-main">ActiveX</span> Software framework by Microsoft introduced in 1996

ActiveX is a deprecated software framework created by Microsoft that adapts its earlier Component Object Model (COM) and Object Linking and Embedding (OLE) technologies for content downloaded from a network, particularly from the World Wide Web. Microsoft introduced ActiveX in 1996. In principle, ActiveX is not dependent on Microsoft Windows operating systems, but in practice, most ActiveX controls only run on Windows. Most also require the client to be running on an x86-based computer because ActiveX controls contain compiled code.

JScript is Microsoft's legacy dialect of the ECMAScript standard that is used in Microsoft's Internet Explorer 11 and older.

<span class="mw-page-title-main">Windows Script Host</span> Automation Technology for Windows

The Microsoft Windows Script Host (WSH) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported features. This tool was first provided on Windows 95 after Build 950a on the installation discs as an optional installation configurable and installable by means of the Control Panel, and then a standard component of Windows 98 and subsequent and Windows NT 4.0 Build 1381 and by means of Service Pack 4. The WSH is also a means of automation for Internet Explorer via the installed WSH engines from IE Version 3.0 onwards; at this time VBScript became means of automation for Microsoft Outlook 97. The WSH is also an optional install provided with a VBScript and JScript engine for Windows CE 3.0 and following and some third-party engines including Rexx and other forms of Basic are also available.

JScript .NET is a .NET programming language developed by Microsoft.

<span class="mw-page-title-main">AutoHotkey</span> Automation-focused scripting language for Windows

AutoHotkey is a free and open-source custom scripting language for Microsoft Windows, initially aimed at providing easy keyboard shortcuts or hotkeys, fast macro-creation and software automation that allows users of most levels of computer skill to automate repetitive tasks in any Windows application. User interfaces can easily be extended or modified by AutoHotkey. The AutoHotkey installation includes its own extensive help file, and web-based documentation is also available.

Active Scripting is the technology used in Windows to implement component-based scripting support. It is based on OLE Automation and allows installation of additional scripting engines in the form of COM modules.

Take Command Console (TCC), formerly known as 4DOS for Windows NT (4NT), is a command-line interpreter by JP Software, designed as a substitute for the default command interpreter in Microsoft Windows, CMD.EXE.

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 internet browser security model; in fact, it executes as a "fully trusted" application.

Conditional comments are conditional statements interpreted by Microsoft Internet Explorer versions 5 through 9 in HTML source code. They can be used to provide and hide code to and from these versions of Internet Explorer. Conditional comments are not supported in Internet Explorer 10 and 11.

A batch file is a script file in DOS, OS/2 and Microsoft Windows. It consists of a series of commands to be executed by the command-line interpreter, stored in a plain text file. A batch file may contain any command the interpreter accepts interactively and use constructs that enable conditional branching and looping within the batch file, such as IF, FOR, and GOTO labels. The term "batch" is from batch processing, meaning "non-interactive execution", though a batch file might not process a batch of multiple data.

The HTML5 specification introduced the video element for the purpose of playing videos, partially replacing the object element. HTML5 video is intended by its creators to become the new standard way to show video on the web, instead of the previous de facto standard of using the proprietary Adobe Flash plugin, though early adoption was hampered by lack of agreement as to which video coding formats and audio coding formats should be supported in web browsers. As of 2020, HTML5 video is the only widely supported video playback technology in modern browsers, with the Flash plugin being phased out.

The Windows Library for JavaScript is an open-source JavaScript library developed by Microsoft. It has been designed with the primary goal of easing development of Windows Store apps for Windows 8 and Windows 10, as well as Windows Phone apps for Windows Phone 8.1, Windows 10 Mobile and Xbox One applications using HTML5 and JavaScript, as an alternative to using WinRT XAML and C#, VB.NET or C++ (CX).

<span class="mw-page-title-main">Electron (software framework)</span> Development framework built on Chromium

Electron is a free and open-source software framework developed and maintained by GitHub. The framework is designed to create desktop applications using web technologies which are rendered using a flavor of the Chromium browser engine, and a backend using the Node.js runtime environment. Additionally, it also uses various APIs to allow things such as native integration with Node services, and an Inter-process communication module.

ASP.NET Web Forms is a web application framework and one of several programming models supported by the Microsoft ASP.NET technology. Web Forms applications can be written in any programming language which supports the Common Language Runtime, such as C# or Visual Basic. The main building blocks of Web Forms pages are server controls, which are reusable components responsible for rendering HTML markup and responding to events. A technique called view state is used to persist the state of server controls between normally stateless HTTP requests.

References

  1. 1 2 Clinick, Andrew (Aug 1999). "Script Encoding with the Microsoft Script Engine Version 5.0". Script Engine. Microsoft. Archived from the original on 2002-12-14.
  2. 1 2 "Breaking the Windows Script Decoder". Virtual Conspiracy. Archived from the original on 2013-12-08. Security by obscurity is a bad, bad idea. Instead of encouraging that approach, Microsoft should educate programmers to find other ways to store their passwords and sensitive data, and tell them that an algorithm or any other piece of code that needs to be 'hidden', is just bad design
  3. Clinick, Andrew (Aug 1999). "Clinick0899.exe". Microsoft. Archived from the original (program) on 2002-12-14. The command-line script encoder (screnc.exe) provides a simple mechanism for encoding HTML, ASP, SCT, VBScript, and JScript files. The Microsoft Script group developed it as an easy-to-use command-line tool that can be easily built into your existing deployment batch files
  4. Lee, Grey (Feb 15, 2012). "Windows Script Decoder". GitHub. Decoding JScript.Encoded