The information in this article applies to:
Moderate: Requires basic macro, coding, and interoperability skills. This article applies only to a Microsoft Access database (.mdb). SYMPTOMSUsing Jet 4.x, a user is able to call unsafe Visual Basic for Applications functions in query statements from Microsoft Access. For example, the following statement would result in all files being deleted from a computer's current folder: SELECT Shell("Cmd /c del *.*") As c1 From CustomersNOTE: The Shell command in this example works in Microsoft Windows NT. The command would have to be modified as follows to work on a computer running Microsoft Windows 95/98: SELECT Shell("Command.com /c del *.*") As c1 From CustomersThe security risk occurs when expressions contain Visual Basic for Application commands that can be harmful to a computer running the query, for example, Shell commands to delete files or format the computer. CAUSE
Jet queries can contain Visual Basic for Applications expressions. These are evaluated during query execution, a behavior that is desirable in many circumstances. However, if part of the query contains the Shell command, it is parsed and executed on the computer.
RESOLUTIONMicrosoft recommends that you first install the latest release of Microsoft Data Access Components MDAC 2.1.2.4202.3 (GA). You can download MDAC 2.1.2.4202.3 (GA) from the following Microsoft Web site: http://www.microsoft.com/dataNext, in order to enable Sandbox mode for non-Access applications, install the Microsoft Jet 4.0 SP3 update. After installing this update, the next time that you run Jet, a new registry key is added to the registry. You can use this new registry key to prevent this type of security risk. The following is the registry key that is added:
For additional information about how to obtain the Microsoft Jet 4.0 SP3 update, please click the article number below to view the article in the Microsoft Knowledge Base:
Q239114 ACC2000: Updated Version of Microsoft Jet 4.0 Available on MSLTo make your system more resistant to malicious attacks while at the same time making it possible for older applications to keep running, the operation of the Sandbox mode has changed in the Jet update so that it is fully under your control. You can set the key to the following values, with 0 (zero) being most permissive and 3 being least permissive:
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. MORE INFORMATIONWith Sandbox mode enabled, if you try to use Visual Basic for Applications functions in a Jet 4.0 query that are not considered safe, you receive the following error message:
Sandbox Mode Operations AllowedThe following is a list of functions that you can use in Jet queries when Sandbox mode is enabled. Any functions that do not appear in the list are not available in Sandbox mode.
Additional query words: pra
Keywords : kbdta |
Last Reviewed: September 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |