Web Browsers – Threat or Menace?
IBM TJ Watson Research Center Yorktown Heights, NY Presented at Virus Bulletin Conference, Munich, Germany, October 1998 |
|
Function |
External controls |
Digital signatures |
User prompt |
Where |
|
|
HTML, DHTML |
Limited |
None |
No |
No |
Navigator, IE |
|
XML, Style sheets |
Limited |
None |
No |
No |
Navigator, IE |
|
JavaScript |
Limited |
None |
configurable |
configurable |
Navigator, IE |
|
Java Applets |
configurable |
cConfigurable |
configurable |
configurable |
Navigator, IE |
|
ActiveX |
Full function |
None |
configurable |
configurable |
IE |
|
Navigator Plug-ins |
Full function |
None |
No |
configurableYes |
Navigator |
|
VBScript |
Limited |
None |
No |
configurable |
IE |
|
Downloaded |
Full function |
None |
No |
configurable |
Navigator, IE |
Figure 1 shows languages and interfaces browsers employ.
Striking a balance: The nightmare of configuration
This section gives just some of the details of how to find out your browser’s current security settings, and how to modify them to meet your needs. The main lesson to come away with, beyond the details of menus and mouse-clicks, is that the security and configuration infrastructures of these systems are extremely complex, and not simple to understand or correctly utilize. We can only hope that they will become simpler with time!
Caveats
The examples and conclusions in these sections are based on experimentation with the browsers and operating systems in question, and a (generally fruitless) attempt to find relevant details in the published documentation. Because of the complexity of the systems, the number of different programs explicitly and implicitly involved, and the many different versions of these programs currently in use, your mileage may vary: where we found a setting on by default, you may find that it’s off. Where we got one result from one order of software installation, you may get the opposite result if you install the programs in some other order. Such is the nature of workstation software in 1998. The following roadmaps were developed under Windows 98, using Internet Explorer 4.01 and Netscape Navigator 4.05.
Working with programs that are functionally contained within the browser

This section gives navigation instructions to the areas in Internet Explorer and Netscape Navigator that control the security settings of built-in scripting languages. Again, your mileage may vary, and we encourage you to verify our findings on your own system.
To configure programs in Internet Explorer that are functional within the browser, go to View® Internet Options® Security ® Custom®Settings where you will find the dialog box displayed below. From within this dialog box you can set the level of Java permissions for the security zone selected when the dialog box was entered. Choosing Custom provides granular control over which permissions you wish to make available in the Java sandbox. You can choose from Enable, Prompt or Disable for the following permissions:
Access to all files
Access to all network addresses
Execute
Dialogs
System information
Printing
Protected scratch space
User selected file access
The Low safety, Medium safety and High safety options offered in this dialog are various combinations of the above custom settings. In Navigator, the Java settings dialog box is accessed using Edit® Preferences® Advanced.
Unlike Internet Explorer, Navigator requires applets be signed before additional privileges can be obtained. The only global user-settable options are to enable/disable Java and to enable/disable JavaScript.
Working with programs that extend the browser
Both Internet Explorer and Netscape Navigator allow the user to add new functionality to the browser by downloading and installing new code to extend the browser’s function. Unlike the scripting languages we just glanced at, these browser extensions are generally in machine language (rather than HTML, Java, or JavaScript), and once you allow one onto your system, it has full access to all your system resources.
ActiveX is the primary means for extending the functionality of Internet Explorer. You can view the currently installed ActiveX controls and Java Classes from within Internet Explorer by following View® Internet Options® Settings® View Objects which will cause the dialog in Fig. 3 to be displayed.

Figure 3. To reach this dialog box enter View® Internet Options® Settings® View Objects. This figure shows the effect of right clicking on MSNBC.
Fig. 3 shows all of the currently installed ActiveX and Java Classes. If As displayed in Fig. 3, you can right clicking on any of thosee entries to you will get a menu that offers options to Update, Remove or view Properties for that entry.

Figure 4. This dialog obtained by selecting Properties in the dialog displayed in Fig. 3.
Fig 4. Shows the result of selecting the Properties option for the MSNBC ActiveX control shown in Fig. 3. The General tab shows the program type, status and origin.

Figure 5. This dialog was obtained by selecting the Dependency Tab in Fig. 4.
Fig. 5 shows the dialog obtained by choosing the Dependency tab in Fig. 4. All of the files associated with the chosen ActiveX control are listed in Fig 5. Had this been a Java Class both the package and Namespace would have been displayed. These are the files that would be erased if the Remove item (Fig 3.) were selected.

Figure 6. This dialog was obtained by choosing the Remove item in the dialog displayed in Fig. 3.
Fig. 6 shows the result of choosing the Remove item (Fig. 3). In this case the ActiveX control had been executed before the remove item was selected. Since this ActiveX control is currently loaded it cannot be removed. One approach to resolving this is to restart windows and remove the ActiveX control before any program loads it.
The installed Plug-ins in Netscape Navigator are displayed by choosing Help® About Plug-ins from the Navigator main window. The dialog displayed will be similar to that shown in Fig. 7 below. All of the Navigator compatible plug-ins in the plug-in directory are loaded when Navigator is started. In order to remove a plug-in first go the standard windows uninstall wizard and see if there is an uninstall program listed for it. If there is none and there are no uninstall instructions in a readme file, you can note the name of the DLL used by the plug-in as shown in Fig. 7. After stopping Navigator, you can erase the DLL. When Navigator is re-started the plug-in will not be present.

Figure 7. This dialog was obtained by following Help® About Plug-ins from the Navigator main window.
The installed Plug-ins in Netscape Navigator are displayed by choosing Help® About Plug-ins from the Navigator main window. The dialog displayed will be similar to that shown in Fig. 7 below. All of the Navigator compatible plug-ins in the plug-in directory are loaded when Navigator is started. In order to remove a plug-in first go the standard windows uninstall wizard and see if there is an uninstall program listed for it. If there is none and there are no uninstall instructions in a readme file, you can note the name of the DLL used by the plug-in as shown in Fig. 7. After stopping Navigator, you can erase the DLL. When Navigator is re-started the plug-in will not be present.
Safe for Scripting
One of the challenges in complex environments is to understand the implications of how all the pieces work together. This is particularly complicated in a dynamic browser environment where programs may interact with each other in unanticipated ways. One example of this effect is the way JavaScript or VBScript programs interact with ActiveX controls under Now that we have looked at programs that extend the browser, the "Scripting" section of Figure 2 is worth a short digression. In Internet Explorer. By design, , Web-downloaded programs written in JavaScript or VBScript are restricted so they cannot directly access many system resources (such as files and environment variables) as discussed in the earlier section on limited function languages. But these programs can invoke, or attempt to invoke, ActiveX controls which have unrestricted access to your operating system. . In the previous section we discussed the techniques Internet Explorer employs to prevent you from installing ActiveX controls unless they were signed by a party you trust. It is not unusual to visit sites where you will receive JavaScript or VBScript programs along with one or more signed ActiveX controls that augment the functionality of the JavaScript or VBScript. In such cases you have received programs from a party you trust. In order for the ActiveX control to interact with its JavaScript or VBScript companion it must contain an internal parameter set by the ActiveX control’s author that indicates the ActiveX control is safe for scripting. The level of complexity becomes more apparent when you consider that once an ActiveX control is marked as safe for scripting, any JavaScript or VBScript program from any source can attempt to interact with it. There is a configuration setting in the Internet Explorer security settings (shown in Fig. 2) which allows you to prevent JavaScript or VBScript from interacting with ActiveX controls even those controls marked Safe for Scripting, however the (as shipped) default for Internet Explorer is to allow interaction.
In theory, ActiveX authors should never mark a control as "Safe for Scripting" unless the control will never, regardless of what arguments it is passed, do anything undesirable to your system. In practice, achieving this is a very difficult task: some ActiveX authors probably do not take the requirement as seriously as they should, and others no doubt attempt to, but fail. C; creating perfectly secure code is very difficult, and even moderately secure code requires considerable expertise and testing. When you install an ActiveX control that is marked Safe for Scripting, not only are you trusting the author himself not to have any ill intent, but you are assuming that his code cannot be abused by others to do you harm. For instance, if an ActiveX control contains a function that will take an arbitrary string of characters and execute it as an operating system command, that control should never be marked "Safe for Scripting". If an attacker found such an ActiveX control on the Web signed by someone you trust they could, since an attacker could create a Web page that first caused the ActiveX control to be installed the control (and, if the control was signed by someone you trusted, you would allow that installation) and then abused the control's execution function to erase critical files on your system, or format your hard drive. Subtler features that make a control unsafe for scripting include the ability to read and write files, access environment variables, alter the Registry, and so on.
Any code that accepts arbitrary input over the Web requires careful scrutiny and testing. Browsers accept arbitrary input from untrusted sources in many different ways, however, such products receive intense scrutiny from many people who publish their results. Such public scrutiny helps build a high level of confidence in these products. Every time one installs a "Safe for Scripting" control they are expressing confidence We can have some confidence that the browser manufacturers themselves have successfully blocked untrusted Web programs from doing these things, if only because their products undergo intense scrutiny from many people; but every time we install a new "Safe for Scripting" control, we are expressing confidence that this at control is similarly secure, and does not open any holes in our their system that an attacker canould exploit. . That confidence may not always be justified.
Netscape plug-ins raise some similar concerns, more subtly. Suppose aIf a Netscape plug-in designed to display a particular kind of image, for instance, had a bug that would cause it to execute data read from the image under certain circumstances. An, an attacker could cause his own code to run on your system with full privileges simply by including a carefully-designed image on his Web page. While we know of no such bugs being actively exploited today, this again illustrates that the ability to easily extend a browser's function is a two-edged sword: we can get useful new facilities, but we also have a new source of possible security exposures on our systems.
Working with programs started by the browser but executed by the operating system
As we noted above, there are various situations in which clicking on a link (or otherwise interacting with the Web) can cause your browser to run external code, either a program that was already present on your system (using Word to open a downloaded document file, for instance), or a freshly-downloaded program from some Web site. Both of the browsers we are looking at provide some level of control over this process, although the details can be hard to determine.
IIn order to ascertain which programs Internet Explorer will start when it encounters input data from a Web server, you can examine the Windows program registration database.
One way to view this database in Windows 95 or Windows 98 is to open the Windows Explorer and select View® Folder Options® File Types. A dialog box similar to the one shown on the left in Fig 8 will be displayed. The dialog box on the right was obtained by pressing the Edit button. It allows changes to be made to the settings for the selected program; Microsoft Word in this case. This dialog lets you associate a program with a file type and/or a MIME type. In the above example, Microsoft word (winword.exe) will be called to open any file with file type DOC. (One way to trigger an open request is to double-click the file in Windows Explorer).

Figure 8. To display the left dialog box follow View® Folder Options® File Types, to show the box to the right press Edit in the left box.
This dialog lets you associate a program with a file type and/or a MIME type. In the above example, Microsoft word (winword.exe) will be called to open any file with file type DOC. (One way to trigger an open request is to double-click the file in Windows Explorer). This same database entry is also used to indicate that any Web object whose MIME "content type" is "application/msword" will be opened with winword.exe as well. In order to unregister a program, press the remove button in the left dialog. If you wished to change the program associated with the DOC file type you would press the Edit button in the right dialog after which yet another dialog would appear for you to replace the fully qualified winword.exe path with the path you wish to change it to.
The most important setting in both of these dialogs is the check box labeled Confirm open after download. Leaving this box unchecked (as is shown in Fig 8.) instructs Internet Explorer that when you click on a link to a Word file, it should download the file and launch winword.exe to open that file without first asking the user.

Figure 9. To display the left dialog box follow Edit® Preferences® Applications, to show the box to the right press Edit in the left box.
Since most people click on links without knowing what is behind them, it is easy to inadvertently open a word file over the Web when this box is left unchecked. We urge all readers of this paper to take a look through the "File Types" section of any Windows 95 or Windows 98 machines at hand, and see if the Confirm open after download settings seem reasonable and prudent.
It is also notable that Internet Explorer uses the same program registration database as Windows does. One result of this integration is that there is no obvious way to view the Confirm open after download setting from within Internet Explorer; the operating system’s configuration registry must be consulted instead.
In order to ascertain which programs Netscape Navigator will start when it encounters input data from a Web server, you can examine its program registration database by choosing Edit® Preferences® Applications from the Navigator main window, which will display a dialog similar to that shown in Fig. 9. These dialogs work similarly to the Windows dialogs shown in Fig. 8, but they are contained within the browser itself, rather than the operating system. On the other hand, Netscape appears to be using the same underlying database as Internet Explorer (changes made to some settings in the Navigator dialogs are reflected in the corresponding operating system dialogs). Netscape simply provides another interface, within the browser, to these settings.
Working with digital signatures: Whom does my browser trust?
Internet Explorer and Netscape both include a lot of technology to manage digital signatures. The first thing you will want to find out is whom your browser trusts now.
In Internet Explorer, go to View® Internet Options® Content where you will see a dialog that looks similar to that shown in Fig. 10. In the Certificates section of the content page, you have the option of looking at Personal, Authorities or Publishers. Personal keys are used to identify you to servers you connect to so they can authenticate whom they are connected to. Authorities shows the signing authorities you are trusting to validate certificates. Publishers show the certificates of publishers whom you have decided to trust.

Figure 10. You can reach this dialog by View® Internet Options® Content
Figure 11. After pressing the Publishers
When the Authorities button is pressed a dialog similar to that shown in the right half of Fig. 10 is displayed. The Certificate Authorities dialog box is where you indicate which certificate authorities you are willing to trust to verify the authenticity of certificates you receive. The Certificates Authorities dialog box has four distinct sections for deciding where the certificate authorities will be trusted.
To make a certificate authority active in one of these areas choose the area from the drop down box at the top of the window. Then scroll to the certificate authority you wish to use and make sure the box is checked. For the purposes of the discussions in this paper, only the Software Publishing section has any relevance.
Figure 11 shows a dialog box that was displayed after pressing the Publishers button seen in the dialog shown on the left side of Fig. 10. In this example, there are two publishers who are being trusted. If an ActiveX control signed by a trusted publisher is encountered either of these two arrives, it will be executed without notifying the user.
If a Java applet arrives which requests privileges less than or equal to those which have been permanently granted to that signature then it too will be executed without notifying the user. To stop trusting a signer, simply highlight that line and press the Remove button. The cessation of extended Java privileges will take place immediately. If, however, you have already executed, or allowed the installation of, ActiveX components from the signer you removed, those components will still be present in the Downloaded Internet Files directory and will continue to be used until you remove them. If a Java applet arrives signed by either of these users which requests privileges less than or equal to those which have been permanently granted to that signature then it too will be executed without notifying the user. To stop trusting a signer, simply highlight that line and press the Remove button. The cessation of extended Java privileges will take place immediately. If, however, you have already executed, or allowed the installation of, ActiveX components from the signer you removed, those components will still be present in the Downloaded Internet Files directory and will continue to be used until you remove them.
Figure 12. Communicator®Security Info®Java/JavaScript
In Netscape Navigator, go to Communicator® Security Info® Java/JavaScript where you will see a dialog that looks similar to that shown in Fig. 12 that lists all of the software publishers to whom you have granted extended Java privileges. You can view certificates for each entry in the list by highlighting the entry and pressing the Edit Privileges button. If you try this you will see a dialog similar to that shown in Fig. 13 which shows two cases. On the left is a case in which enhanced privileges are being granted to the signer.
On the right is a case in which privileges are being explicitly denied to that signer. In the right hand case any Java Applet signed by this signer will not be permitted to modify stored files and if such an applet is run a pop up dialog that says privilege denied will be presented instead of offering the user an opportunity to grant the privilege.


Figure 14. To see this dialog box press the More Info button in the dialog displayed in Fig. 13.

Figure 14 shows the dialog box obtained by pressing the More Info button in the left hand dialog box of Fig. 13. Using the More Info button allows you to see a detailed listing of the Java privileges which the signer has been granted or denied.
When a signed Java Applet executing under Internet Explorer needs privileges beyond those which you have configured it will put up a dialog box similar to the one shown in Fig. 15 requesting additional privileges.
Working with digital signatures: How to grant trusted status.
The dialog box shows the file name and location, the name of the requester, and the name of the certificate authority who verified the authenticity of the signature. The requested permissions are listed, along with the option to always trust content signed with this certificate. Pressing More Info provides a detailed listing of the permissions being requested.Closing this dialog box by pressing Yes without checking the Always trust content box will grant the requested privileges to the signer for this session. If the signer sends a second signed applet requesting the same permissions, it will also be allowed to run without warning the user for the duration of that session. The buttons and the dialog box are essentially the same when a signed ActiveX control is encountered. However, the end result is quite different. There is no ability to trust an ActiveX control for just one session. When you press Yes, without checking Always trust content box, you are effectively trusting that particular ActiveX control forever, or until you go track it down and manually remove it from your system. (For information on removing ActiveX controls see Fig. 3).
The corresponding dialog shown by Netscape Navigator is similar, however there are a few additional options to choose from. Figure 16 shows the corresponding dialog in Navigator where you have the ability to Grant or Deny the privileges. For more information on what it means to Deny a privilege, see the discussion concerning Fig. 13. The help button in this dialog is also quite informative.
Figure 16.This is the Navigator dialog presented when a Java Applet is requesting extended privileges.
The corresponding dialog shown by Netscape Navigator is similar, however there are a few additional options to choose from. Figure 16 shows the corresponding dialog in Navigator where you have the ability to Grant or Deny the privileges. For more information on what it means to Deny a privilege, see the discussion concerning Fig. 13. The help button in this dialog is also quite informative.
Surprises you may encounter:
During our explorations of browser configuration options, we encountered a few things that surprised us.
ActiveX controls that keep coming back
In Internet Explorer, you can permanently grant permission to a signer of ActiveX controls by checking the Always trust content check box. If, at a later time, you use the Downloaded Program Files dialog discussed in Fig. 3 to remove an ActiveX control that you no longer want on your system, you may find it reappearing. The reason is that since the signer of that control is still in your Publishers certificates database, the control is silently downloaded and re-installed every time you visit a page that uses it. This is the expected behavior and is consistent with the system design, however, the overall result may be confusing to some users. As discussed in the text supporting Fig. 11, you must remove the signer as well as the control to prevent this effect.
Netscape Navigator can run ActiveX controls
Figure 17. To reproduce this pop up visit www.msnbc.com
Muddying the distinction between Netscape plug-ins and ActiveX controls for Internet Explorer is a Netscape plug-in that allows Netscape users to use some ActiveX controls. This plug-in is used by various sites around the Web, and it is not always clear from the site offering the control just what it is going to do. Readers who want to explore this further can try the following roadmap:
Figure 18. To display this dialog use Help-->About Plug-ins
Internet Explorer executes word without asking user
As we saw above, the Windows setting Confirm open after download can have an important effect on how much warning you get before Internet Explorer receives and opens a potentially-active document from the Web. We were surprised to find, for instance, that with at least one combination of default-installed software, the browser would open Word documents in Word without any warning; given that Word documents can contain viruses and Trojan horses, we found this disturbing. Readers may wish to replicate our result with the following roadmap:
Java Applets can make popups with any message they like
In order to interact with the user, untrusted Java Applets and JavaScript programs can both create popups and other dialog boxes on the display. Java Applets in particular can format pop ups as they wish, except for the warning in the lower left-hand corner.

Figure 19. Java Applet pop up window.
This warning may be too subtle in some circumstances; how would the typical user react to the above dialog box with a message in it such as "Timeout Warning: enter your password now or you will be logged off"?What about viruses and Trojan horses?
A Trojan horse is any program that purports to carry out some useful function, but in fact does something nasty to you; something the author or distributor of the program intended, but that you would not have permitted had you known it was about to happen. Fortification measures aim at preventing untrusted programs from doing anything untoward. Trust systems allow you to give more power to programs received from parties in whom you have confidence; if your confidence is well placed, none of those parties will ever send you a program that erases all your files and prints "ha ha, I got you!". As long as no one that you trust accidentally signs and sends you a malicious program, your exposure to Trojan horses should be acceptably low.
Computer viruses change the Trojan horse landscape. Because computer viruses spread through innocent transmission of programs, they can travel along lines of intentional communication, and through webs of trust. Even if you never accept programs or documents from strangers, if someone that you trust is infected with a virus, and you receive and execute a program, or receive and open a document, from that person, you can become infected and suffer whatever malicious payload the virus carries. Viruses exploit trust in order to spread themselves.
In September of 1998, the most common Web-borne viruses are Word and Excel macro viruses, spread through documents distributed on Web sites, by information providers who are not aware that their files are infected. These viruses involve Web browsers only to the extent that a browser can be used to download an infected document, and a browser configured not to prompt the user before invoking Word or Excel can cause a system to become infected with a single click of the wrong link. But no viruses are known that directly exploit Web browsers. There are no known JavaScript or VBScript viruses, no DHTML viruses, and only a single Java virus.
The single known Java virus, an academic experiment known as "Strange Brew", is an interesting case study. Since Java is a general-purpose language, anything (including viruses) that can be written in assembler, or C, or C++, can also be written in Java. But Java as it runs in a Web browser imposes security restrictions that other languages do not. In order to spread itself, Strange Brew needs access to the filesystem; the ability to read and write files. Since untrusted Java applets do not have this ability, the Strange Brew code would fail if an infected applet were to be run in a properly-configured Web browser. (Because of the details of its operation, Strange Brew itself would almost certainly fail even if run in an improperly-configured Web browser. It is intended to spread only between Java applications run by a standalone Java interpreter outside of a browser; but that might not be true of future Java-language viruses.)
In today’s world, people do not share Java programs, either applets or applications, often enough to make a Java virus a viable candidate for worldwide spread. While you may run Java applets from the Web, it’s unlikely that you personally have write-access to applets that many other people use. In the future, if Java applications become a common way of distributing programs, Java viruses might become as large a concern as EXE viruses (program-infecting viruses) are today. They would still not be able to spread as untrusted applets in your browser, though, because the Java security manager will block their access to the filesystem.
Version numbers are important
All of our discussion of security models, the restrictions that browsers put on untrusted code, the way to configure your system, and so on , assume that the browsers and operating systems in fact work the way that they are designed. But no complex program works exactly as designed; in the last year, a number of bugs with security implications have been found in both of the browsers that we are considering. Users can try these roadmaps to get to up-to-date list of security-related bugs:
From Navigator choose Help ® Security then click on netscape security notes
Microsoft’s current IE security issues page http://www.microsoft.com/ie/security/
Conclusions
The ability to execute downloaded code was not added to Web browsers on a whim, or simply to give security people nightmares. Plug-ins, ActiveX controls, Java programs, JavaScript scripts, and the other kinds of downloaded code we have mentioned all fill some real or perceived need of computer users. Certainly it’s more convenient to upgrade a piece of software with a single click on a Web site than it is to send off a form in the mail and receive a pile of diskettes and an Upgrade Guide two weeks later. It’s faster to interact with a small custom program running on your own system than to wait while your input, and the resulting output, travel back and forth across two continents between you and some server.
But this function and convenience comes at a price. Part of that price is in additional complexity of our systems. There are currently many different ways to accept downloaded code, and many different ways to provide security when running it. We can only hope that these things will become simpler with time, as competing standards converge. At the present time, configuring the security of a Web browser, or even figuring out what the current security-relevant settings are, can be a daunting task. Even if you have convinced yourself that the browser itself is properly configured and reasonably secure, if you have downloaded browser extensions (one of the many useful kinds of downloaded code), each one has the potential to open security holes of its own; and browser extensions may not be as carefully tested and externally scrutinized as the browsers themselves.
On the other hand, it is also clear that at the present moment the system is working. Virtually all of the browser-based attacks and security worries we have outlined are primarily theoretical; Web users are not currently being victimized by malicious programs taking advantage of misconfigured browsers to erase files or steal secrets. Still, if the systems that you use to browse the Web have access to resources and data that are valuable to you, we strongly recommend that you become aware of the security status of those systems and the browsers they use. Security begins at home.