JP2008521111A5 - - Google Patents

Download PDF

Info

Publication number
JP2008521111A5
JP2008521111A5 JP2007542018A JP2007542018A JP2008521111A5 JP 2008521111 A5 JP2008521111 A5 JP 2008521111A5 JP 2007542018 A JP2007542018 A JP 2007542018A JP 2007542018 A JP2007542018 A JP 2007542018A JP 2008521111 A5 JP2008521111 A5 JP 2008521111A5
Authority
JP
Japan
Prior art keywords
interpreter
program
interpreted
electronic device
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2007542018A
Other languages
Japanese (ja)
Other versions
JP4638505B2 (en
JP2008521111A (en
Filing date
Publication date
Priority claimed from FI20041517A external-priority patent/FI20041517A0/en
Application filed filed Critical
Priority claimed from PCT/FI2005/000504 external-priority patent/WO2006056646A1/en
Publication of JP2008521111A publication Critical patent/JP2008521111A/en
Publication of JP2008521111A5 publication Critical patent/JP2008521111A5/ja
Application granted granted Critical
Publication of JP4638505B2 publication Critical patent/JP4638505B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

電子デバイス内の安全なプログラム解釈方法Safe program interpretation method in electronic devices 発明の背景Background of the Invention

(技術分野)
本発明はインタープリタ型プログラミング言語に関するものである。特に、本発明は電子デバイス内の安全なプログラム解釈方法に関するものである。
(Technical field)
The present invention relates to an interpreted programming language. In particular, the present invention relates to a safe program interpretation method in an electronic device.

(背景技術)
電子通信デバイスではセキュリティが重要な要素となっている。現代のモバイル端末は、シンプルな携帯電話からパーソナル・コンピュータと同様のアプリケーションを備える多目的通信デバイスへと進化を遂げている。これらの通信デバイスには、インターネット・ブラウジング、Eメール、マルチメディア・コール等のような様々なサービスが装備されている。モバイル端末向けの1つの重要な技術には、Java(登録商標)、Perl、PHP、Python等のような様々なインタープリタ型言語がある。これらのインタープリタ型言語を用いることにより、モバイル端末で利用可能な付加価値サービス及びゲームの種類は飛躍的に増加している。これらのインタープリタ型言語を使用して開発されるソフトウェアは、個別のプログラムと共有のライブラリとを含んでいる。これらのプログラム及びライブラリは、ネットワーク・サーバから無線を介してモバイル端末にダウンロードすることができる。
(Background technology)
Security is an important factor in electronic communication devices. Modern mobile terminals have evolved from simple mobile phones to multipurpose communication devices with applications similar to personal computers. These communication devices are equipped with various services such as Internet browsing, e-mail, multimedia calls and so on. One important technology for mobile terminals is a variety of interpreted languages such as Java, Perl, PHP, Python, and the like. By using these interpreted languages , the types of value-added services and games that can be used on mobile terminals are dramatically increasing. Software developed using these interpreted languages includes individual programs and shared libraries. These programs and libraries can be downloaded from the network server to the mobile terminal via radio.

ソフトウェアのダウンロードは主に、モバイル端末に設けられたブラウザを利用して行われる。ユーザがネットワークからダウンロードするアプリケーションを信頼できることが重要となる。適切なセキュリティ手順がモバイル端末に適用されない限り、悪意のあるコードをモバイル端末に仕掛けることは非常に簡単である。悪意のあるコードは、モバイル端末の様々な不具合を引き起こす恐れがある。例えば、電話がユーザへの適切な通知なしに課金サービスの番号にセットアップされる恐れがあり、モバイル端末から情報が収集され盗まれる恐れもあり、モバイル端末がある種のモバイル決済システムをサポートしている場合には、ユーザになりすまして課金購入が行われる恐れもある。   Software download is mainly performed using a browser provided in the mobile terminal. It is important that the user can trust the application downloaded from the network. Unless appropriate security procedures are applied to the mobile terminal, it is very easy to put malicious code on the mobile terminal. Malicious code can cause various problems with mobile terminals. For example, a phone may be set up with a billing service number without proper notification to the user, information may be collected from the mobile device and stolen, and the mobile device supports certain mobile payment systems. If so, there is a risk that the user will be impersonated and make a purchase.

これまでに報告された悪意のあるプログラムのいくつかの実例には、別のプラットフォーム上のインタープリタ内で実行されるインタープリタ型言語を使用して作成されたものが存在する。これらの悪意のあるプログラムは、インタープリタ型環境又はホスト環境あるいはその両方を標的としている。悪意のあるプログラムの動作が可能になった理由は、インタープリタの実行環境がそれらのプログラムを他のインタープリタ型プログラム又はホスト・プラットフォームから適切に隔離することができなかったためである。 Some examples of malicious programs reported to date have been created using interpreted languages that run in interpreters on other platforms. These malicious programs are a interpretive environment or host environment, or both targets. The reason that malicious programs can operate is that the interpreter's execution environment was unable to properly isolate them from other interpreted programs or host platforms.

本願の文脈において、アプリケーションの隔離(isolation)は、プログラムの永続的な状態と実行時の振る舞いとを分離するものとして定義される。各プログラムは互いのデータを自発的に共有することができ、あるいは他のプログラムの振る舞いに反応することができる。 In the context of the present application, application isolation is defined as separating the persistent state of the program from the runtime behavior. Each program can spontaneously share each other's data or react to the behavior of other programs.

当業界の専門家に周知の現行機能としては、データ・ケージング、実行時のプロセスの隔離、ケイパビリティ・フレームワーク(capability framework)、プロセス識別子、プロセス間通信(IPC)認証、トラステッド・コンピューティング・ベース、境界防衛、及びオペレーティング・システムのソフトウェア・インストール・プログラムが挙げられる。   Current features known to industry experts include data caging, run-time process isolation, capability framework, process identifier, inter-process communication (IPC) authentication, trusted computing base , Boundary defense, and operating system software installation programs.

プログラムは、これらの機能を連動させて互いに隔離され、トラステッド・コンピューティング・ベースから隔離され、重要なシステム・インターフェイスから隔離される。現行のオペレーティング・システムの特筆すべき特徴は、ポリシーがプロセスの境界で強制される故に、システムがプロセスの隔離に基づいており、したがってプログラムの隔離に基づいている点である。トラステッド・コンピューティング・ベースを用いることによって、各プログラムが各々の特権を高める能力も否認される。   Programs are isolated from each other by linking these functions, isolated from the trusted computing base, and isolated from critical system interfaces. A notable feature of current operating systems is that because the policy is enforced at process boundaries, the system is based on process isolation and therefore program isolation. By using a trusted computing base, the ability of each program to increase its privileges is also denied.

安全なカーネルは、ネイティブ・プログラムを互いに隔離する。つまり、リソースに対するケイパビリティ又はアクセス権を互いに隔離されていないプログラムに付与することが不可能となる。ケイパビリティを互いに隔離されていないアプリケーションに付与することが可能である場合は、ケイパビリティが悪意のあるコードに「漏洩」しないという保証はないことになる。アプリケーションの隔離は本質的に、ケイパビリティ・フレームワークの極めて重要な基盤といえる。   A secure kernel isolates native programs from each other. In other words, it becomes impossible to grant capabilities or access rights to resources to programs that are not isolated from each other. If capabilities can be granted to applications that are not isolated from each other, there is no guarantee that the capabilities will not "leak" into malicious code. Application isolation is essentially a very important foundation of a capabilities framework.

上述の各セキュリティ機能は、悪意のある又は欠陥のあるプログラムがプラットフォーム、データ、又はシステム上の他のプログラムに損害を与えるのを防止する際に役立つ。これらの機能は、アプリケーションの隔離がネイティブ・プログラムに対して適用されるように設計されている。システム仕様は現時点で、アプリケーションの隔離をインタープリタ型プログラムに適用する手法については示唆していない。本発明はこれを達成する方法を提案する。 Each of the security features described above helps in preventing malicious or defective programs from damaging the platform, data, or other programs on the system. These features are designed so that application isolation is applied to native programs. The system specification currently does not suggest a method for applying application isolation to interpreted programs . The present invention proposes a way to achieve this.

本発明は、電子デバイス内の安全なプログラム解釈方法に関するものである。前記方法は、前記電子デバイス内で少なくとも1つの共有インタープリタ・ライブラリと実行可能スタブstub executable)のプロトタイプとを提供するステップと、インタープリタ型プログラムを前記電子デバイスにロードするステップと、前記電子デバイス内の前記実行可能スタブのプロトタイプを使用して実行可能スタブを形成するステップと、前記電子デバイス内の前記実行可能スタブを前記インタープリタ型プログラムと関連付けるステップと、少なくとも1つの第2のケイパビリティを前記実行可能スタブに割り当てるステップと、前記実行可能スタブを前記電子デバイス内で実行するステップとを含む。 The present invention relates to a method for safely interpreting a program in an electronic device. The method, in the electronic device, the step of loading and providing a prototype of the at least one shared interpreter library and executable stub (stub executable), the interpreted program to the electronic device, said electronic device a step of using said prototype executable stub inner forming an executable stub, the execution and associating the executable stub in the electronic device and the interpreted program, at least one second capability It can include assigning to the stub, and executing the executable stub within the electronic device.

本発明は、電子デバイスであって、インタープリタ・エンジンを実装するように構成された少なくとも1つの共有インタープリタ・ライブラリと、インタープリタ型プログラムを前記電子デバイスにロードし、実行可能スタブのプロトタイプを使用して実行可能スタブを形成し、少なくとも1つの第2のケイパビリティを前記実行可能スタブに割り当て、前記少なくとも1つの第2のケイパビリティを前記実行可能スタブと関連付けるように構成されたインストーラ・エンティティと、前記実行可能スタブを実行するように構成されたオペレーティング・システム・エンティティとを備える電子デバイスにも関する。 The present invention is an electronic device using at least one shared interpreter library configured to implement an interpreter engine, an interpreted program loaded into the electronic device, and using an executable stub prototype. the executable stub is formed, at least one second capability assigned to the executable stub, said at least one second installation entity configured to associate with the executable stub a capability, the executable It also relates to an electronic device comprising an operating system entity configured to execute a stub .

本発明は、コンピュータ・プログラムであって、データ処理システム上で実行されたときに、インタープリタ型プログラムをロードするステップと、実行可能スタブのプロトタイプを使用して実行可能スタブを形成するステップと、前記実行可能スタブを前記インタープリタ型プログラムと関連付けるステップと、少なくとも1つの第2のケイパビリティを前記インタープリタ型プログラムに割り当てるステップと、前記少なくとも1つの第2のケイパビリティを前記実行可能スタブと関連付けるステップと、前記実行可能スタブを実行するステップと、前記実行可能スタブが前記インタープリタ型プログラムを少なくとも1つの共有インタープリタ・ライブラリに示すステップと、前記実行可能スタブが前記共有インタープリタ・ライブラリ内の少なくとも1つの関数を呼び出して前記インタープリタ型プログラムを解釈するステップとを実施するように適合されたコードを含むコンピュータ・プログラムにも関する。 The present invention is a computer program that, when executed on a data processing system, loads an interpreted program , uses an executable stub prototype to form an executable stub , associating an executable stub with the interpreted program, associating at least one second capability and assigning to said interpreted program, and said at least one second said executable stub a capability, the execution performing a stub, the steps of the executable stub shown in at least one shared interpreter library said interpreted program, said executable stub said shared interpreter library Also it relates to a computer program comprising code adapted to implement the steps of interpreting said interpreted program invokes at least one function of the inner.

本発明は、コンピュータ・プログラムであって、データ処理システム上で実行されたときに、前記コンピュータ・プログラムに関連する少なくとも1つのケイパビリティをインタープリタ型プログラムに提供するステップと、インタープリタ型プログラムに関する情報を前記コンピュータ・プログラムに割り当てられた安全なソースから取得するステップと、前記インタープリタ型プログラムを、インタープリタ型プログラム・コードを解釈するインタープリタ・エンジンを実装する少なくとも1つの関数を含む少なくとも1つの共有インタープリタ・ライブラリに示すステップと、前記共有インタープリタ・ライブラリ内の少なくとも1つの関数を呼び出して前記インタープリタ型プログラムを解釈するステップとを実施するように適合されたコードを含むコンピュータ・プログラムにも関する。 The present invention provides a computer program, when executed on a data processing system, providing at least one capability associated with the computer program to the interpreted program , and information about the interpreted program as described above. Obtaining from a secure source assigned to the computer program and the interpreted program into at least one shared interpreter library comprising at least one function that implements an interpreter engine that interprets the interpreted program code steps and, adapted is to perform the steps of interpreting said interpreted program invokes at least one function of the shared interpreter in the library showing It was also relates to a computer program that contains the code.

本発明の一実施形態において、前記方法は更に、前記実行可能スタブが前記インタープリタ型プログラムを前記少なくとも1つの共有インタープリタ・ライブラリに示すステップと、前記実行可能スタブが前記少なくとも1つの共有インタープリタ・ライブラリ内の少なくとも1つの関数を呼び出して前記インタープリタ型プログラムを解釈するステップと、外部のインタープリタ型プログラム・コード・セクションが前記インタープリタ型プログラムによって参照されているかどうかをチェックするステップと、前記外部のインタープリタ型プログラム・コード・セクションに関する少なくとも1つの第1のケイパビリティを推測するステップと、前記少なくとも1つの第2のケイパビリティが前記少なくとも1つの第1のケイパビリティのサブセットでない場合は、前記外部のインタープリタ型プログラム・コード・セクションの実行を許可しないようにするステップとを含む。 In one embodiment of the invention, the method further comprises the executable stub presenting the interpreted program to the at least one shared interpreter library; and the executable stub in the at least one shared interpreter library. At least one of the steps of calling the function to interpret the interpreted program, a step of checking whether the interpreted program code section for externally referenced by the interpreted program, the external interpreted program a step of inferring at least one first capability related code section, said at least one second capability is at least one first capability If not a subset, and a step to disallow execution of the interpreted program code section of the external.

本発明の一実施形態において、前記少なくとも1つの共有インタープリタ・ライブラリは更に、外部のインタープリタ型プログラム・コード・セクションがインタープリタ型プログラムによって参照されているかどうかをチェックし、前記外部のインタープリタ型プログラム・コード・セクションに関する少なくとも1つの第1のケイパビリティを推測し、少なくとも1つの第2のケイパビリティが前記少なくとも1つの第1のケイパビリティのサブセットでない場合は、前記外部のインタープリタ型プログラム・コード・セクションの実行を許可しないように構成される。 In one embodiment of the present invention, wherein even at least one shared interpreter library checks whether interpreted program code section for outside are referenced by the interpreter type program, the external interpreted program code - guessing at least one first capability of section, if at least one second capability is not a subset of the at least one first capability, permits the execution of interpreted program code section of the external Configured not to.

本発明の一実施形態において、前記安全なソースは、電子デバイス内の安全なディレクトリである。前記安全なソースは、例えばコンピュータ・プログラム・コード自体であっても前記コンピュータ・プログラムを記憶するディレクトリであってもよい。前記インタープリタ型プログラムに関する前記情報は、前記インタープリタ型プログラムのファイル名であってもよい。前記安全なソースは、前記コンピュータ・プログラムを含むファイルのファイル名を前記コンピュータ・プログラムに提供するオペレーティング・システムであってもよい。 In one embodiment of the invention, the secure source is a secure directory within the electronic device. The secure source may be, for example, the computer program code itself or a directory storing the computer program. It said information on said interpreted program may be a file name of the interpreted program. The secure source may be an operating system that provides the computer program with a file name of a file containing the computer program.

「外部のインタープリタ型プログラム・コード・セクション」という前記用語は、前記インタープリタ型プログラム自体の外部、例えば前記電子デバイス内の前記インタープリタ型プログラム用に予約されたディレクトリ以外のディレクトリから取得される、インタープリタ型プログラム・コード・セクションを指すことに留意していただきたい。例えば、前記外部のインタープリタ型プログラム・コード・セクションは、共有インタープリタ・ライブラリから読み出されてもよい。外部のインタープリタ型プログラム・コード・セクションは、前記インタープリタ型プログラムの解釈中に無線を介して取得されてもよい。「少なくとも1つの第1のケイパビリティ」という前記用語は、前記外部のインタープリタ型プログラム・コード・セクション、例えば共有インタープリタ・ライブラリに割り当てられる1組のケイパビリティを指す。「少なくとも1つの第2のケイパビリティ」という前記用語は、前記実行可能スタブの1組のケイパビリティを指す。単一のケイパビリティは、オペレーティング・システム、データ通信、又は電子デバイスの管理に関するいくつかの個々の演算又は関数を含むことができることに留意していただきたい。言い換えれば、いくつかの機能は便宜上、単一のケイパビリティにグループ化されていることもある。プログラム又はプログラム・コードの断片は、1組のケイパビリティと関連付けられている可能性もある。ケイパビリティは、前記電子デバイス内のリソース又は機能へのアクセス権を付与するものであるが、アクセス権が付与されない場合には、前記プログラム又はプログラム・コードがそれらのリソース又は機能を使用することはできなくなる。前記ケイパビリティは、前記電子デバイス内の前記プログラムにサービスする前記オペレーティング・システム又は前記機能によって監視される。 The term "external interpreted program code section", the interpreted program itself outside, for example, obtained from the interpreted program directory other than the reserved directory for in the electronic device, interpreted Note that it refers to the program code section. For example, the external interpreted program code section may be read from a shared interpreter library. An external interpreted program code section may be obtained over the air during interpretation of the interpreted program . The term “at least one first capability” refers to a set of capabilities assigned to the external interpreted program code section, eg, a shared interpreter library. The term “at least one second capability” refers to a set of capabilities of the executable stub . Note that a single capability may include several individual operations or functions related to operating system, data communication, or management of electronic devices. In other words, some functions may be grouped into a single capability for convenience. A program or program code fragment may also be associated with a set of capabilities. Capabilities grant access to resources or functions within the electronic device, but if access rights are not granted, the program or program code cannot use those resources or functions. Disappear. The capability is monitored by the operating system or the function serving the program in the electronic device.

本発明の一実施形態では、インタープリタ型プログラム・コード・セクションに関する信頼性カテゴリが、前記電子デバイスの前記ファイル・システム内に所在する前記インタープリタ型プログラム・コード・セクションを含むファイルに関する少なくとも1つの位置に基づいて判定され、前記インタープリタ型プログラム・コード・セクションが信頼されるリモート送信者から受信されたものかどうかが判定され、前記信頼レベルが、前記信頼性カテゴリに基づいて付与される。 In one embodiment of the present invention, reliability category relates interpreted program code section, in at least one position on the file that contains the interpreted program code section, located in the file system of the electronic device To determine whether the interpreted program code section was received from a trusted remote sender, and the trust level is granted based on the trust category.

本発明の一実施形態では、任意のデータの実行が、前記少なくとも1つのインタープリタ・ライブラリ内で無効化される。このことは、例えば前記インタープリタ・エンジンが任意のデータを実行するための関数にアクセスできなくなることを意味する。そのような関数をコールしようとする試みがあると、前記インタープリタ・エンジンでエラーが発生することになる。本発明の一実施形態において、前記実行可能スタブは、個別のプロセス・コンテキストで実行される。前記無効化は、前記インタープリタ・エンジンをコンパイルして前記少なくとも1つの共有インタープリタ・ライブラリを生成する前に実施されてもよい。次に、このように無効化されたバージョンが前記電子デバイスに提供される。 In one embodiment of the invention, the execution of any data is disabled in the at least one interpreter library. This means, for example, that the interpreter engine will not have access to functions for executing arbitrary data. Any attempt to call such a function will cause an error in the interpreter engine. In one embodiment of the invention, the executable stub is executed in a separate process context. The invalidation may be performed before compiling the interpreter engine to generate the at least one shared interpreter library. The invalidated version is then provided to the electronic device.

本発明の一実施形態において、前記外部のインタープリタ型プログラム・コード・セクションは、例えば無線を介してネットワーク・サーバから前記電子デバイスにロードされる。本発明の一実施形態において、前記外部のインタープリタ型プログラム・コード・セクションは、インタープリタ型プログラム・コードを含む共有インタープリタ・ライブラリ内の関数である。前記外部のインタープリタ型プログラム・コード・セクションは、前記インタープリタ型プログラム・コードが前記インタープリタ型プログラム自体から前記インタープリタ・エンジンに引き渡されるように、前記インタープリタ型プログラムによって任意のデータに基づいて形成されてもよい。 In one embodiment of the invention, the external interpreted program code section is loaded into the electronic device from a network server, eg, over the air. In one embodiment of the invention, the external interpreted program code section is a function in a shared interpreter library that includes interpreted program code. Interpreted program code section of the outside, the so interpreted program code is delivered to the interpreter engine from the interpreted program itself, it is formed based on any data by said interpreted program Good.

本発明の一実施形態では、信頼レベルが前記共有インタープリタ・ライブラリに付与される。前記信頼レベルは、前記ユーザによって又は前記インストーラ・エンティティによって自動的に付与することができる。前記インストーラ・エンティティが前記信頼レベルを自動的に付与する場合、前記信頼レベルは、ネットワーク・サーバから提供された信頼レベル情報を検査することによって取得することができる。前記信頼レベル情報には運営者の署名が付されていることもある。前記署名はまた、サービス・プロバイダから付されていることも、他の任意の信頼されるエンティティから付されていることもある。前記信頼レベルは、前記少なくとも1つの第1のケイパビリティを前記オペレーティング・システム・エンティティ・レベル又は前記インストーラ・エンティティ・レベルで判定するのに使用される。   In one embodiment of the invention, a trust level is granted to the shared interpreter library. The trust level can be granted automatically by the user or by the installer entity. If the installer entity automatically grants the trust level, the trust level can be obtained by examining trust level information provided from a network server. The trust level information may be signed by an operator. The signature may also be affixed from a service provider or from any other trusted entity. The trust level is used to determine the at least one first capability at the operating system entity level or the installer entity level.

本発明の一実施形態において、前記インタープリタ型プログラムをロードする前記ステップは、前記インタープリタ型プログラムをネットワーク・サーバからダウンロードするステップを含む。 In one embodiment of the present invention, the step of loading the interpreted program includes a step of downloading said interpreted program from a network server.

本発明の一実施形態において、前記少なくとも1つの共有インタープリタ・ライブラリと前記実行可能スタブのプロトタイプとを提供する前記ステップは、それらをネットワーク・サーバから前記電子デバイスにダウンロードするステップを含む。 In one embodiment of the invention, the step of providing the at least one shared interpreter library and a prototype of the executable stub includes downloading them from a network server to the electronic device.

本発明の一実施形態において、前記少なくとも1つの共有インタープリタ・ライブラリをロードする前記ステップは、それらをネットワーク・サーバから前記電子デバイスにダウンロードするステップを含む。   In one embodiment of the invention, loading the at least one shared interpreter library includes downloading them from a network server to the electronic device.

本発明の一実施形態において、前記インタープリタ型プログラムは、前記電子デバイス内で一意の識別子を使用して識別される。前記一意の識別子は、例えば前記オペレーティング・システム・エンティティ及び前記インストーラ・エンティティが前記インタープリタ型プログラム及び前記実行可能スタブを参照するのに使用することができる。前記少なくとも1つの第2のケイパビリティは、前記オペレーティング・システム・エンティティによって前記一意の識別子と関連付けられてもよい。 In one embodiment of the invention, the interpreted program is identified using a unique identifier within the electronic device. The unique identifier can be used, for example, by the operating system entity and the installer entity to refer to the interpreted program and the executable stub . The at least one second capability may be associated with the unique identifier by the operating system entity.

本発明の一実施形態において、前記電子デバイスは、モバイル端末を含む。本発明の一実施形態において、前記電子デバイスは、SYMBIAN(登録商標)オペレーティング・システム・デバイスを含む。   In an embodiment of the present invention, the electronic device includes a mobile terminal. In one embodiment of the invention, the electronic device comprises a SYMBIAN® operating system device.

本発明の一実施形態において、前記電子デバイスは、汎用パケット無線システム(GPRS)端末又はユニバーサル・モバイル・テレコミュニケーション・システム(UMTS)端末を含む。   In one embodiment of the invention, the electronic device includes a general packet radio system (GPRS) terminal or a universal mobile telecommunications system (UMTS) terminal.

本発明の一実施形態において、前記コンピュータ・プログラムは、コンピュータ可読媒体に記憶される。前記コンピュータ可読媒体は、取り外し可能なメモリ・カード、磁気ディスク、光ディスク、あるいは磁気テープであってもよい。   In one embodiment of the invention, the computer program is stored on a computer readable medium. The computer readable medium may be a removable memory card, magnetic disk, optical disk, or magnetic tape.

本発明の一実施形態において、前記電子デバイスは、例えばラップトップ・コンピュータ、パームトップ・コンピュータ、モバイル端末、携帯情報端末(PDA)等のモバイル・デバイスである。本発明の一実施形態において、前記電子デバイスは、デスクトップ・コンピュータ又はメインフレーム・コンピュータである。   In one embodiment of the present invention, the electronic device is a mobile device such as a laptop computer, a palmtop computer, a mobile terminal, a personal digital assistant (PDA), or the like. In one embodiment of the invention, the electronic device is a desktop computer or a mainframe computer.

本発明の利点は、ロードされるインタープリタ型プログラムの信頼性の向上に関するものである。インタープリタ型プログラムや、インタープリタで実行される各プログラム・コードは、ケイパビリティ・セットを有するネイティブ・オペレーティング・システムにとって、通常、ただの勝手なアプリケーションに見える。本発明によれば、このようなインタープリタ型プログラムやプログラム・コードに対して、ネイティブ・オペレーティング・システムで実行可能なプログラムのために定義されたケイパビリティを使用することができる。 An advantage of the present invention relates to improving the reliability of loaded interpreted programs . An interpreted program and each program code executed by the interpreter usually appears to be a self-explanatory application for a native operating system having a capability set. According to the present invention, capabilities defined for a program that can be executed by a native operating system can be used for such an interpreted program or program code.

本明細書の一部を構成し本発明の十分な理解を与えるために添付した各図面は、本発明の諸実施形態を図示するものであり、以下の詳細な説明と併せて読めば本発明の諸原理がより理解しやすくなるはずである。   The accompanying drawings, which form a part of this specification and provide a thorough understanding of the present invention, illustrate embodiments of the present invention and, when read in conjunction with the following detailed description, illustrate the present invention. The principles should be easier to understand.

実施形態の詳細な説明Detailed Description of Embodiments

ここで、本発明の諸実施形態を詳細に説明する。諸実施形態の実例は添付図面に示されている。   Now, embodiments of the present invention will be described in detail. Illustrative embodiments are illustrated in the accompanying drawings.

図1は、本発明に係る電子デバイス内のディレクトリ・ツリーの一例を示すブロック図である。電子デバイスは図3に示すとおりである。本発明の一実施形態において、電子デバイスは、SYMBIAN(登録商標)オペレーティング・システム・デバイスである。ディレクトリ・ツリーは、本発明に係る電子デバイスに記憶される方法に不可欠なファイルにはどのようなものが存在し、それらの相互関係がどのようなものかを示している。図1にはルート・ノード100が存在し、このルート・ノードにはサブ・ディレクトリ101、102、及び103が連結されている。サブ・ディレクトリ101は、インタープリタを実装するバイナリ・ファイルを記憶している。インタープリタは、例えばJava(登録商標)インタープリタ、Perlインタープリタ、PHPインタープリタ、あるいはPythonインタープリタであってもよい。サブ・ディレクトリ101にはファイル111、112、及び113が存在する。ファイル111は、コンパイラを使用して生成されたプログラム・ソース・コード又はバイト・コードを直接実行するインタープリタ・エンジンを含んでいる。   FIG. 1 is a block diagram illustrating an example of a directory tree in an electronic device according to the present invention. The electronic device is as shown in FIG. In one embodiment of the present invention, the electronic device is a SYMBIAN® operating system device. The directory tree shows what files are essential for the method stored on the electronic device according to the present invention and what their interrelationships are. In FIG. 1, a root node 100 exists, and sub-directories 101, 102, and 103 are connected to the root node. The sub directory 101 stores a binary file that implements an interpreter. The interpreter may be, for example, a Java (registered trademark) interpreter, a Perl interpreter, a PHP interpreter, or a Python interpreter. In the sub-directory 101, files 111, 112, and 113 exist. File 111 includes an interpreter engine that directly executes program source code or byte code generated using a compiler.

インタープリタ・エンジンによって解釈されるプログラム・ソース・コード又はバイト・コードを、以下では「インタープリタ型プログラム・コード」と呼ぶ。コンパイラは、人間が読むことのできるソース・コードを解釈し、それをバイト・コードにコンパイルする。しかしながら、バイト・コードは、インタープリタ・エンジンが実行できる任意の中間言語であってもよいことに留意していただきたい。中間言語は、マシン実行に最適などのようなフォーマットであってもよい。当該フォーマットは、必ずしも1バイトのサイズの演算コードを含んでいる必要はない。ファイル111は本質的に、インタープリタ・エンジンを実行するための関数を含む動的リンク・ライブラリ(DLL)である。ファイル112は、最終的にそれ自体が実行されたときにファイル111内に配置されているインタープリタ・エンジンを呼び出すことになる、スタブ・インタープリタ実行可能ファイルである。ファイル113は、インタープリタ型プログラムが電子デバイスにインストールされる度にファイル112を用いて形成されるものである。 Program source code or byte code that is interpreted by the interpreter engine is referred to below as " interpreted program code". The compiler interprets human-readable source code and compiles it into byte code. However, it should be noted that the bytecode may be any intermediate language that can be executed by the interpreter engine. The intermediate language may be in a format that is optimal for machine execution. The format does not necessarily include an operation code having a size of 1 byte. File 111 is essentially a dynamic link library (DLL) that contains functions for running the interpreter engine. File 112 is a stub interpreter executable that will call the interpreter engine located in file 111 when it is ultimately executed. The file 113 is formed using the file 112 every time the interpreted program is installed in the electronic device.

サブ・ディレクトリ102は、インタープリタ・エンジンを使用して解釈されるプログラムを含む。サブ・ディレクトリ102は、インタープリタ型プログラムを含むファイル121を含んでいる。サブ・ディレクトリ名の<SID>という要素は、インタープリタ型プログラムに割り当て済みのセキュリティ識別子(SID)を表している。SIDは、インタープリタ型プログラムを一意に識別するものであり、これを用いることでケイパビリティをインタープリタ型プログラムに割り当てることが可能となる。ケイパビリティは、SIDを使用して識別されたアプリケーションから呼び出すことができるオペレーティング・システム関数又はオペレーティング・システム関数セットに相当する。ケイパビリティの実例としては、リモート・ネットワークを介して例えばリモート・インターネット・サーバとの通信をセットアップするケイパビリティ、及び電子デバイスに記憶されているファイルにアクセスするケイパビリティが挙げられる。単一のケイパビリティは、関連するいくつかの関数及び演算を含むことができる。例えば、IPソケットに関するすべての関数が単一のケイパビリティを含むこともできる。他のケイパビリティは、電力管理、Bluetooth(登録商標)を利用したローカル通信、あるいは赤外線及び低レベル無線プロトコル処理に関するものもある。 Sub-directory 102 contains programs that are interpreted using an interpreter engine. The sub directory 102 includes a file 121 containing an interpreted program . The element <SID> of the sub-directory name represents a security identifier (SID) assigned to the interpreted program . The SID uniquely identifies an interpreter type program . By using this, capability can be assigned to an interpreter type program . Capabilities correspond to operating system functions or sets of operating system functions that can be called from applications identified using SIDs. Examples of capabilities include the ability to set up communication with, for example, a remote Internet server over a remote network, and the ability to access files stored on an electronic device. A single capability can include several related functions and operations. For example, all functions related to IP sockets can include a single capability. Other capabilities include power management, local communications using Bluetooth, or infrared and low level wireless protocol processing.

サブ・ディレクトリ103は、ファイル121に記憶されるインタープリタ型プログラム等のようなインタープリタ型プログラムから呼び出される関数を含む共有ライブラリを含んでいる。共有ライブラリは、ファイル131に記憶される。サブ・ディレクトリ132は、共有ライブラリを電子デバイス内で管理する手法に関するポリシーが規定されるポリシー・ファイルも含んでいる。ポリシー・ファイルは、/resource/<lang>ディレクトリの管理手法と、インタープリタをあるスクリプトについて起動するlang-<version>-stub-interpreter.exeの作成手法とを定義する。ポリシー定義ファイルを使用する利点は、ソフトウェア・インストール・プログラムのコンテキストでインタープリタ特有の外部コードが実行されないことである。すべてのインタープリタのポリシーを相互参照することができ、また、それらのポリシーを実装する前にエラー及び競合の有無をチェックすることもできる。また、この場合に必要なポリシーのサポートは極めて単純なものである。 The sub-directory 103 includes a shared library that includes functions called from an interpreted program such as an interpreted program stored in the file 121. The shared library is stored in the file 131. The sub-directory 132 also includes a policy file that defines policies relating to the manner in which the shared library is managed within the electronic device. The policy file defines how to manage the / resource / <lang> directory and how to create lang- <version> -stub-interpreter.exe that starts the interpreter for a script. The advantage of using a policy definition file is that no interpreter-specific external code is executed in the context of the software installation program. All interpreter policies can be cross-referenced and checked for errors and conflicts before implementing those policies. Also, the policy support required in this case is quite simple.

共有インタープリタ・ライブラリには、信頼レベル、つまりライブラリ内の関数について許可される1組のケイパビリティが割り当てられる。1組のケイパビリティは、運営者によって決定され又はユーザによって決定される。運営者が決定を行った場合には、ケイパビリティは、ファイルがネットワーク・サーバからダウンロードされたときに電子デバイスに示される。ケイパビリティは、例えば運営者のデジタル署名を使用して署名が付されるように検証される。ユーザが決定を行った場合には、ライブラリについてどのケイパビリティが許可されることになるかを示すプロンプトがユーザに示される。共有インタープリタ・ライブラリに割り当てられたケイパビリティは、ライブラリについてどの機能が検査され、その結果、どの機能が信頼できるものと見なされるかを反映することになる。例えば、あるライブラリがファイルを電子デバイスにダウンロードする上で安全なものと見なされたとしても、電子デバイス内のファイルを読み出すことは許可されないこともある。   A shared interpreter library is assigned a trust level, a set of capabilities that are allowed for functions in the library. The set of capabilities is determined by the operator or determined by the user. If the operator makes a decision, the capability is shown to the electronic device when the file is downloaded from the network server. Capabilities are verified to be signed using, for example, an operator's digital signature. If the user makes a decision, the user is prompted for which capabilities will be allowed for the library. The capabilities assigned to the shared interpreter library will reflect which functions are examined for the library and, as a result, which functions are considered reliable. For example, even if a library is considered safe for downloading files to an electronic device, it may not be allowed to read the files in the electronic device.

図2A及び図2Bは、本発明の一実施形態に係る安全なプログラム解釈方法を示すフローチャートである。
ステップ202で、主要なインタープリタ・コード、即ちインタープリタ・エンジンを含む共有インタープリタ・ライブラリが、電子デバイスに提供される。共有ライブラリは、例えばネイティブ・オペレーティング・システムの一部として提供することも、ユーザがインタープリタのダウンロードを要求したときに、無線を介してネットワーク・サーバから電子デバイスにダウンロードすることもできる。
2A and 2B are flowcharts showing a safe program interpretation method according to an embodiment of the present invention.
At step 202, a shared interpreter library that includes the main interpreter code, or interpreter engine, is provided to the electronic device. The shared library can be provided, for example, as part of a native operating system, or can be downloaded over the air from a network server to an electronic device when a user requests an interpreter download.

ステップ204で、単一のインタープリタ型プログラムを解釈するインタープリタ・エンジンを呼び出すのに必要な関数を含む実行可能スタブのプロトタイプが、電子デバイスに提供される。実行可能スタブのプロトタイプは、例えばネイティブ・オペレーティング・システムの一部として提供することも、ユーザがインタープリタをネットワーク・サーバからダウンロードすることを要求したときに、無線を介して電子デバイスにダウンロードすることもできる。主要なインタープリタ・コードと実行可能スタブのプロトタイプとを含む共有インタープリタ・ライブラリのインストールは、それらを電子デバイス内の不揮発性メモリに記憶する個別のインストーラ・エンティティで実施することができる。 At step 204, an executable stub prototype is provided to the electronic device that includes the functions necessary to invoke an interpreter engine that interprets a single interpreted program . Executable stub prototypes can be provided, for example, as part of a native operating system, or downloaded to an electronic device over the air when a user requests to download an interpreter from a network server it can. The installation of the shared interpreter library, including the main interpreter code and the executable stub prototype , can be performed by a separate installer entity that stores them in non-volatile memory in the electronic device.

本発明の一実施形態において、共有インタープリタ・ライブラリは、電子デバイスにもロードされる。共有ライブラリは、磁気ディスク又は光ディスクあるいは取り外し可能なメモリ・カード等のような取り外し可能なメモリ媒体を使用して電子デバイスにロードすることも、無線を介して電子デバイスにダウンロードすることもできる。共有インタープリタ・ライブラリのインストールは、それを電子デバイス内の不揮発性メモリに記憶する個別のインストーラ・エンティティで実施することができる。 In one embodiment of the invention, the shared interpreter library is also loaded on the electronic device. The shared library can be loaded into the electronic device using a removable memory medium, such as a magnetic disk or optical disk or a removable memory card, or downloaded to the electronic device over the air. Installation of a shared interpreter library can be carried out in separate installer entity storing it in the non-volatile memory in an electronic device.

ステップ206では任意選択で、信頼レベルが電子デバイス内の共有インタープリタ・ライブラリに付与される。信頼レベルは、共有インタープリタ・ライブラリに割り当てられる1組のケイパビリティを指定する。信頼レベルの付与に関する判断は、電子デバイスから信頼される運営者又は他の任意のエンティティによって署名が付された信頼レベル情報に基づいて行うことができる。信頼は、例えば公開鍵基盤(PKI)や信頼チェーン等を利用して確立される。電子デバイスのユーザは、信頼レベルの付与に関する判断を、電子デバイスのユーザ・インターフェイスを介して明示的に指定することもできる。   In step 206, a trust level is optionally granted to the shared interpreter library in the electronic device. The trust level specifies a set of capabilities that are assigned to the shared interpreter library. The determination regarding the granting of the trust level can be made based on trust level information signed by an operator or any other entity trusted by the electronic device. Trust is established using, for example, a public key infrastructure (PKI) or a trust chain. The user of the electronic device can also explicitly specify a decision regarding the granting of the trust level via the electronic device user interface.

ステップ208で、インタープリタ型プログラムが電子デバイスにロードされる。インタープリタ型プログラムは、例えば無線を介してダウンロードされる。インタープリタ型プログラムは、ユーザによってWWWページ又はWAPページから選択されていることもある。インタープリタ型プログラムは、例えば電子デバイスが接続を確立しているネットワーク・サーバからダウンロードされる。インタープリタ型プログラムのインストールは、インストーラ・エンティティによって実施することができる。本発明の一実施形態において、インタープリタ型プログラムは、磁気ディスク又は光ディスクあるいは取り外し可能なメモリ・カード等のような取り外し可能なメモリ媒体を使用して電子デバイスにロードすることもできる。 At step 208, an interpreted program is loaded into the electronic device. Interpreted programs are downloaded, for example, via the radio. The interpreted program may be selected from the WWW page or WAP page by the user. The interpreted program is downloaded from, for example, a network server with which the electronic device has established a connection. The installation of the interpreted program can be performed by an installer entity. In one embodiment of the present invention, the interpreted program can also be loaded into the electronic device using a removable memory medium such as a magnetic disk or optical disk or a removable memory card.

ステップ210で、一意の識別子がインタープリタ型プログラムに割り当てられる。インタープリタ型プログラムは、電子デバイスにダウンロードされている共有ライブラリ内の関数を使用することができる。一意の識別子は、一意の識別子を電子デバイス内で実行される各アプリケーションに割り振る責任を担う機関から取得される。 At step 210, a unique identifier is assigned to the interpreted program . The interpreted program can use the functions in the shared library downloaded to the electronic device. The unique identifier is obtained from the agency responsible for assigning the unique identifier to each application running within the electronic device.

ステップ212で、インタープリタ型プログラムに付与すべきケイパビリティが電子デバイスで判定される。例えば、ケイパビリティは、インタープリタ型プログラムインタープリタ型プログラム・コードを分析することによって判定され、あるいは、ネットワーク・サーバ又は取り外し可能なメモリ媒体からインタープリタ型プログラムに関して提供される個別のファイル又はデータ構造の形で指定されることもある。また、どのようなケイパビリティも付与されないインタープリタ型プログラムが存在する可能性もある。そのような場合には、インタープリタ型プログラムは単に情報を表示装置にレンダリングし、キーボードを使用するユーザと対話することしか許可されない。 At step 212, the electronic device determines the capabilities to be assigned to the interpreted program . For example, capabilities may be determined by analyzing the interpreted program code interpreted program, or in the form of a separate file or data structure provided with respect to an interpreted program from a network server or a removable memory medium Sometimes specified. There may also be interpreted programs that do not have any capabilities. In such a case, the interpreted program is only allowed to render information on the display device and interact with the user using the keyboard.

ステップ214で、実行可能スタブのプロトタイプを使用して、実行可能スタブが形成される。実行可能スタブは、インタープリタ・エンジンを呼び出し、インタープリタ・エンジンに対するインタープリタ型プログラムを判定するために形成されるものである。実行可能スタブは、実行可能スタブのプロトタイプを使用して形成される。実行可能スタブは、例えば共有インタープリタ・ライブラリに関して又はインタープリタ型プログラムに関して提供される個別のポリシー・ファイルに含まれる命令を使用して形成することもできる。実行可能スタブの形成は、インストーラ・エンティティによって実施することができる。 At step 214, an executable stub is formed using the executable stub prototype . An executable stub is formed to invoke an interpreter engine and determine an interpreter type program for the interpreter engine. The executable stub is formed using a prototype of the executable stub . Executable stubs can also be formed using instructions contained in a separate policy file provided for example with respect to a shared interpreter library or with respect to interpreted programs . The formation of the executable stub can be performed by the installer entity.

ステップ216で、実行可能スタブからの他のプログラムの実行が無効化される。無効化は、例えば実行可能スタブによって実行されることになるインタープリタ型プログラムがインタープリタ・エンジンに明示的に示されるように達成される。インタープリタ型プログラムは、例えば図1のファイル121等のようなそれ自体のファイル名を提供することによって示される。 At step 216, execution of other programs from the executable stub is disabled. Invalidation is accomplished , for example, such that an interpreted program to be executed by an executable stub is explicitly shown to the interpreter engine. An interpreted program is indicated by providing its own file name, such as file 121 of FIG.

ステップ218で、インタープリタ型プログラムについて判定されたケイパビリティは、ステップ214で形成された電子デバイス内の実行可能スタブに割り当てられる。実行可能スタブは、オペレーティング・システムのセキュリティ機能に関するインタープリタ型プログラムの取り次ぎ役となる。実行可能スタブはインタープリタ・エンジンを呼び出し、インタープリタ型プログラムをインタープリタ・エンジンに提供するのに使用されることから、インタープリタ型プログラム又は共有インタープリタ・ライブラリ内の関数以外のどのようなインタープリタ型プログラム・コードも実行されないことが保証される。言い換えれば、インタープリタ型プログラム実行可能スタブを使用せずにインタープリタ・エンジンで実行される可能性はない。 In step 218, the capabilities determined for the interpreted program are assigned to executable stubs in the electronic device formed in step 214. Executable stubs act as an intermediary for interpreted programs related to operating system security features. Executable stubs are used to invoke the interpreter engine and provide interpreted programs to the interpreter engine, so any interpreted program code other than functions in an interpreted program or shared interpreter library Guaranteed not to be executed. In other words, there is no possibility that an interpreted program will be executed on the interpreter engine without using an executable stub .

標識「A」は、図2Aに示される方法が図2Bに続くポイントを表している。ステップ220で、インタープリタ型プログラム実行可能スタブ及びインタープリタ・エンジンを用いて解釈するプロセスが、電子デバイスのオペレーティング・システムによって個別のプロセス・コンテキストで実行される。各インタープリタ型プログラム毎に個別のプロセス・コンテキストが存在する。
ステップ222では、プログラムが終了したかどうかがインタープリタ・エンジンによってチェックされる。プログラムが終了していない場合は、ステップ224に進む。
The label “A” represents the point where the method shown in FIG. 2A continues to FIG. 2B. At step 220, the process of interpreting the interpreted program using an executable stub and an interpreter engine is performed by the operating system of the electronic device in a separate process context. There is a separate process context for each interpreted program .
In step 222, the interpreter engine checks whether the program is finished. If the program has not ended, the process proceeds to step 224.

ステップ224では、外部のインタープリタ型プログラム・コードを解釈すべきかどうかがインタープリタ・エンジンによってチェックされる。外部のインタープリタ型プログラム・コードを解釈すべき場合にはステップ226に進み、そうでない場合にはステップ220に進む。外部のインタープリタ型プログラム・コードの一例は、共有インタープリタ・ライブラリに含まれるコードである。外部のインタープリタ型プログラム・コードの別の実例は、現在のコードの解釈中に電子デバイスによって受信されたコードである。 In step 224, the interpreter engine checks whether the external interpreted program code should be interpreted. If the external interpreted program code is to be interpreted, go to step 226, otherwise go to step 220. An example of an external interpreter type program code is a code included in a shared interpreter library. Another example of external interpreted program code is code received by an electronic device during interpretation of the current code.

ステップ226では、インタープリタ・エンジンによって、外部のインタープリタ型プログラム・コードの信頼レベルと、実行可能スタブのケイパビリティとの比較が行われる。実行可能スタブのケイパビリティが、外部のインタープリタ型プログラム・コード、即ち、例えば共有インタープリタ・ライブラリ等の信頼レベルに関連するケイパビリティのサブセットであることが判定される。所与の信頼レベルは、外部のインタープリタ型プログラム・コードに割り当てられた1組のケイパビリティを一意に指定する。信頼レベルは、例えば電子デバイス内のファイル・システムにおける外部のインタープリタ型プログラム・コードの位置に基づいて推測される。例えば、コードがインタープリタ型プログラムのディレクトリや言語特有の信頼ディレクトリ等のような信頼されるディレクトリ内に配置されている場合は、少なくともインタープリタ型プログラムのケイパビリティが付与される。実行可能スタブのケイパビリティが信頼レベルに関連するケイパビリティのサブセットでない場合、つまり、実行可能スタブが外部のインタープリタ型プログラム・コードについて指定された1組のケイパビリティに属さないケイパビリティを有する場合には、インタープリタ・エンジンは、信頼レベルを逸脱(exceed)しているものと見なす。 In step 226, the interpreter engine compares the confidence level of the external interpreted program code with the capabilities of the executable stub . It is determined that the capabilities of the executable stub are a subset of the capabilities associated with a level of trust such as external interpreted program code, ie, a shared interpreter library, for example. A given trust level uniquely specifies a set of capabilities assigned to external interpreted program code. The trust level is inferred based on, for example, the location of external interpreted program code in the file system within the electronic device. For example, if the code is placed in a trusted directory such as an interpreted program directory or a language-specific trusted directory, at least the capabilities of the interpreted program are provided. If capabilities of executable stub is not a subset of the capabilities associated with the trust level, i.e., if it has a capability of executable stub it does not belong to the set of capabilities specified for external interpreted program code interpreter The engine is considered to have exceeded the trust level.

ステップ228で、インタープリタ・エンジンは、信頼レベルを逸脱しているかどうかをチェックする。信頼レベルを逸脱している場合にはステップ230に進み、そうでない場合にはステップ220に進む。
ステップ230で、インタープリタ・エンジンはプログラムの実行を許可しないようにする。その際はユーザに対して適切なエラー・メッセージを示すことができ、実行可能スタブの実行は終了する。
At step 228, the interpreter engine checks whether the trust level has been exceeded. If the trust level has been deviated, the process proceeds to step 230;
At step 230, the interpreter engine does not allow execution of the program. At that time, an appropriate error message can be shown to the user, and execution of the executable stub ends.

図3は、本発明に係る電子デバイス300を示すブロック図である。電子デバイス300は、第1のメモリ(図示せず)と、第2のメモリ(図示せず)とを備える。第1のメモリは揮発性RAMワーク・メモリであり、第2のメモリは不揮発性メモリである。本発明の一実施形態において、第1及び第2のメモリは同一の不揮発性メモリである。電子デバイスは、プロセッサ(図示せず)も備える。   FIG. 3 is a block diagram illustrating an electronic device 300 according to the present invention. The electronic device 300 includes a first memory (not shown) and a second memory (not shown). The first memory is a volatile RAM work memory, and the second memory is a non-volatile memory. In one embodiment of the invention, the first and second memories are the same non-volatile memory. The electronic device also includes a processor (not shown).

図3には、電子デバイス内のソフトウェアを示すボックス302が存在する。ソフトウェアは少なくとも、オペレーティング・システム・エンティティ316と、インストーラ・エンティティ304と、通信エンティティ306とを備える。ソフトウェアは、インタープリタ・エンジン310と、インタープリタ・エンジン310に関連する実行可能スタブ308とを備えることもできる。インタープリタ・エンジン310は、インタープリタ型プログラム312等のようなインタープリタ型プログラムインタープリタ型プログラム・コードを実行する。インタープリタ型プログラムは、共有ライブラリ314に記憶されている少なくとも1つの関数を使用することができる。共有ライブラリ314は、インタープリタ・エンジン310によって実行されるインタープリタ型プログラム・コードで指定された関数を含む。共有ライブラリ314は、電子デバイスのネイティブ・マシン・コードで指定される関数を含むこともできる。実行可能スタブ308は、インタープリタ・エンジン310で所与のインタープリタ型プログラムのインスタンスを呼び出すのに使用される。インタープリタ・エンジン310では、同一の実行可能スタブを使用して他のインタープリタ型プログラムを呼び出すことはできない。通信エンティティ306は、電子デバイス内の通信関連タスクを実施する。通信エンティティ306は、無線インターフェイス通信に使用され、インターネット等のようなリモート・ネットワークとの通信を行うプロトコル・スタックを備える。通信エンティティ306がインタープリタ型プログラム312をリモート・ネットワークから受信すると、インタープリタ型プログラム312はインストーラ・エンティティ304に提供される。インストーラ・エンティティ304は、インタープリタ型プログラム312を電子デバイス内の不揮発性メモリに記憶する。インストーラ・エンティティ304は、インタープリタ型プログラム312特有の実行可能スタブを作成する。 In FIG. 3, there is a box 302 indicating software in the electronic device. The software comprises at least an operating system entity 316, an installer entity 304, and a communication entity 306. The software may also include an interpreter engine 310 and an executable stub 308 associated with the interpreter engine 310. Interpreter engine 310 executes the interpreted program code, such interpreted programs as such interpreted program 312. The interpreted program can use at least one function stored in the shared library 314. Shared library 314 includes functions specified in interpreted program code executed by interpreter engine 310. The shared library 314 can also include functions specified in the native machine code of the electronic device. Executable stub 308 is used by interpreter engine 310 to invoke an instance of a given interpreted program . The interpreter engine 310 cannot call other interpreted programs using the same executable stub . The communication entity 306 performs communication related tasks in the electronic device. The communication entity 306 is used for radio interface communication and comprises a protocol stack for communicating with a remote network such as the Internet. When the communication entity 306 receives the interpreted program 312 from the remote network, the interpreted program 312 is provided to the installer entity 304. The installer entity 304 stores the interpreted program 312 in a non-volatile memory in the electronic device. The installer entity 304 creates an executable stub specific to the interpreted program 312.

本発明の一実施形態において、インストーラ・エンティティは、インタープリタ型プログラム312を電子デバイス300内の不揮発性メモリにインストールするときに必要なファイルを形成する際に、ポリシー・ファイルを使用する。インストーラ・エンティティ304には、共有ライブラリ314が電子デバイス300にダウンロードされたときに共有ライブラリ314を不揮発性メモリにインストールし、共有ライブラリ314を構成する責任を負わせることもできる。同様に、インストーラ・エンティティには、インタープリタが電子デバイス300にダウンロードされたときにインタープリタ・エンジン310及びプロトタイプ・スタブを不揮発性メモリにインストールし、それらを構成する責任を負わせることもできる。オペレーティング・システム・エンティティ316又はインストーラ・エンティティ304には、信頼レベル及びケイパビリティを共有ライブラリ及びインタープリタ型プログラムに割り当てる責任を負わせることができる。本発明の一実施形態において、インストーラ・エンティティ304は、電子デバイス300内で実行されるアプリケーションである。 In one embodiment of the present invention, the installer entity uses the policy file in forming the files required when installing the interpreted program 312 in non-volatile memory within the electronic device 300. The installer entity 304 can also be responsible for configuring the shared library 314 by installing the shared library 314 in non-volatile memory when the shared library 314 is downloaded to the electronic device 300. Similarly, the installer entity may be responsible for installing and configuring the interpreter engine 310 and prototype stub in non-volatile memory when the interpreter is downloaded to the electronic device 300. The operating system entity 316 or installer entity 304 can be responsible for assigning trust levels and capabilities to shared libraries and interpreted programs . In one embodiment of the invention, the installer entity 304 is an application that runs within the electronic device 300.

本発明の一実施形態において、実行可能スタブ308は、電子デバイス300内のオペレーティング・システム・エンティティ316の制御下で実行されるアプリケーションである。インタープリタ・エンジン310は、電子デバイス300のネイティブ・マシン・コード内の動的リンク・ライブラリである。各関数は、実行可能スタブ308によって動的リンク・ライブラリから呼び出される。 In one embodiment of the invention, the executable stub 308 is an application that runs under the control of an operating system entity 316 in the electronic device 300. The interpreter engine 310 is a dynamic link library in the native machine code of the electronic device 300. Each function is called from the dynamic link library by the executable stub 308.

以下では、本発明の方法がSYMBIAN(登録商標)オペレーティング・システム環境で適用される本発明の一実施形態について説明する。インタープリタ型アプリケーションを他のインタープリタ型アプリケーション及びホスト・プラットフォームから隔離する重要性は、それらのインタープリタ型プログラムによって操作されるデータ及びそれらのインタープリタ型プログラムから提供される機能の重要性に関係する。インタープリタについて1つのプログラムしか実装されない場合には、アプリケーションの隔離は暗黙的に実施される。 In the following, an embodiment of the invention is described in which the method of the invention is applied in a SYMBIAN® operating system environment. Importance to isolate the interpreter applications from other interpreted applications and host platforms is related to the importance of the functions provided by the data and their interpreted program operated by their interpreted program. If only one program is implemented for the interpreter, application isolation is performed implicitly.

アプリケーションの大部分が単一のインタープリタを使用して実装される場合には、アプリケーションの隔離が極めて重要となる。インタープリタによってプラットフォーム・セキュリティが正しく適用されない場合には、プラットフォームのセキュリティ機能の大部分が使用されないことになる。これによって他のインタープリタ型プログラムの貴重なデータが悪意のあるプログラムの標的となる恐れがある。 Application isolation is critical when the majority of applications are implemented using a single interpreter. If the platform security is not correctly applied by the interpreter, most of the platform security features will not be used. This can lead to valuable data from other interpreted programs becoming the target of malicious programs.

Microsoft社のマクロウイルス問題は、課題がどの程度深刻なものかを示す最悪のケースの一例である。プログラム(例えばWordやExcel等)が実行される環境が安全でない場合には、基盤となるオペレーティング・システムが安全であるかどうかは問題ではない。   Microsoft's macro virus problem is an example of the worst case of how serious the problem is. If the environment in which the program (for example, Word or Excel) is executed is not safe, it does not matter whether the underlying operating system is safe.

統合とは、オペレーティング・システムのプラットフォーム・セキュリティに関する構文及び意味体系の重要な側面がインタープリタ型プログラムに提供されることを意味する。統合には次の機能が必要とされる。即ち、インタープリタ型プログラムは一意の識別子を有していなければならないこと、インタープリタ型プログラムは専用のプライベート・ディレクトリを有していなければならないこと、共有コード・ライブラリは信頼レベルを有していなければならず、信頼レベルは個々のプログラムと同様に管理されなければならないこと、インタープリタ型プログラムはそれ自体に割り当てられたケイパビリティ・セットを有していなければならないこと、各インタープリタ型プログラム個別のプロセス・コンテキストで実行されなければならないこと、ならびに、インタープリタ型プログラムはそれ自体のケイパビリティ・セットによって制限されなければならないことである。 Integration means that important aspects of the syntax and semantics of operating system platform security are provided to interpreted programs . The following functions are required for integration. In other words, the interpreter-type program that must have a unique identifier, be interpreted program must have its own private directory, shared code library must have a trust level First, the trust level must be managed in the same way as individual programs, interpreted programs must have a capability set assigned to them, and each interpreted program must have a separate process context. As well as interpreted programs must be limited by their own capability set.

これらの機能を実装するために提案される方法は以下の事項に基づいており、その趣旨は次のとおりである。
インタープリタ実行可能ファイルを
/sys/bin/lang-<version>-interpreter.dll
(<version>部はインタープリタのバージョンを示す)
というDLL内に配置し、他の任意のプログラムに関するSID/VIDペアが各インタープリタ型プログラムに割り当てられる度に、実行可能スタブ
/sys/bin/lang-<version>-stub-interpreter.exe
(<version>部はインタープリタのバージョンを示す)を作成し、インタープリタ型プログラムの各ファイルを/private/<SID>/ディレクトリ内に配置し、各インタープリタ型プログラムXについて、
/sys/bin/lang-<version>-stub-interpreter.exe
を/sys/bin/interpreted-program-X.exeにコピーし、インタープリタ型プログラムXが有するべきケイパビリティをインタープリタ型プログラムXに割り当て、実行可能スタブは常にそれ自体のプライベート・ディレクトリから指定されたプログラムを実行し、汎用的な共有コードを/resource/<lang>/lib内に配置し、必要とされるネイティブDLLがあればそれを/sys/bin内に配置し、共有コードの管理に使用されるポリシーを規定するファイルを/resource/<lang>/policy.txt配下に配置する。
The proposed method for implementing these functions is based on the following, and the gist is as follows.
Interpreter executable
/sys/bin/lang-<version>-interpreter.dll
(The <version> part indicates the interpreter version.)
Placed in a DLL that, each time the SID / VID pair about any other program is assigned to each interpreted program executable stub
/sys/bin/lang-<version>-stub-interpreter.exe
(<Version> part indicates the version of the interpreter), place each file of the interpreted program in the / private / <SID> / directory, and for each interpreted program X,
/sys/bin/lang-<version>-stub-interpreter.exe
And copy the /Sys/bin/interpreted-program-X.Exe, assigned a capability should have is interpreted program X in interpreted program X, the executable stub will always designated from its own private directory program Execute, place generic shared code in / resource / <lang> / lib, and place any required native DLLs in / sys / bin, used to manage shared code Place the policy definition file under /resource/<lang>/policy.txt.

本ソリューションは本質的に、各インタープリタ型プログラムを、それらがネイティブ・オペレーティング・システム・プログラムに見えるような形でネイティブ・オペレーティング・システムのプラットフォーム・セキュリティにマッピングするものである。別の利点は、ケイパビリティがネイティブ・プログラムに割り当てられたときと同様のユーザ体験が維持されることである。本ソリューションでは、共有コードに信頼レベルをどのように割り当てるかについては依然として解決されていない。これについては次のセクションで論じる。 This solution essentially each interpreted program, in which they are mapped to the native operating system of the platform security in a form visible to the native operating system program. Another advantage is that a user experience similar to that when capabilities are assigned to native programs is maintained. The solution still does not solve how to assign a trust level to shared code. This is discussed in the next section.

先に提案した設計では、インタープリタ型プログラムの外部の個々のコードに信頼レベルをどのように割り当てるかについて完全には解決されていない。課題が問題となるのは次の理由による。大部分のインタープリタ型言語では、当該言語の範囲内で(例えばPerlやPythonではeval()関数を介して)インタープリタにアクセスすることが可能となる。したがって、任意のI/Oソースを使用して即時実行可能なコードを提供することが可能である(このことは実際ネイティブ・プログラムにも当てはまることであるが、そのようなコードの存在によって認証は拒否されることになる)。 The previously proposed design does not completely resolve how to assign a confidence level to individual code outside the interpreted program . The problem becomes a problem for the following reasons. In most interpreted languages , it is possible to access the interpreter within the language (for example, via the eval () function in Perl and Python). It is therefore possible to use any I / O source to provide ready-to-execute code (this is true even for native programs, but the presence of such code does not Will be rejected).

インタープリタの外部I/Oを監視することに基づいて、どのような入力データがコードとして使用され、どのような入力データがデータとして使用されているかを演繹することができる。
スタブ・インタープリタ実行可能ファイルを使用することにより、ケイパビリティをプログラムに付与する簡潔な手法が提供されるが、既存のオペレーティング・システムの仕組みを使用してケイパビリティを任意の入力に付与することは容易なことではない。
Based on monitoring the external I / O of the interpreter, it can be deduced what input data is used as code and what input data is used as data.
Using a stub interpreter executable provides a concise approach to granting capabilities to a program, but it is easy to attach capabilities to any input using existing operating system mechanisms. Not that.

上記の考察から、信頼レベルを汎用的なコードに付与するための実用的な仕組みはいずれも、実際のインタープリタの支援を必要とすることは明らかである。そのために利用可能な2つの選択肢が存在する。即ち、信頼されないコードがケイパビリティを利用して実行されることになるコードについて、それ自体のロード/実行を拒否する選択肢と、実行時にコードがどのようなソースに由来するものであるかに応じて、より低いケイパビリティを導入する選択肢とが存在する。   From the above considerations, it is clear that any practical mechanism for assigning a trust level to a generic code requires the assistance of an actual interpreter. There are two options available for that. That is, depending on the choice of rejecting its own load / execution for code that will be executed using the capabilities of untrusted code, and what source the code comes from at runtime There are options to introduce lower capabilities.

ケイパビリティを実行時に調整することによりオペレーティング・システムのカーネルを変更する必要が生じることもある。1つの妥協案としては、スクリプトのプライベート・ディレクトリ以外のソースに由来するコードについて、それ自体のロード及び実行を無効化するケイパビリティを有するインタープリタを必要とする案がある。   It may be necessary to change the operating system kernel by adjusting capabilities at runtime. One compromise is to require an interpreter with the capability to invalidate its own loading and execution for code originating from sources other than the script's private directory.

SID/VID値は、/sys/resource内の共有コード・ライブラリに対しては割り当てられない。SID/VID値は、/sys/bin配下のバイナリだけに割り当てられる。インタープリタ型プログラム間で共有されるインタープリタ型プログラム・コードをどのように管理するかを記述するポリシー・ファイルのフォーマットが定義される。ポリシー・ファイルは次の事項を定義する。
●/sys/resource/<lang>ディレクトリの管理手法
●インタープリタをあるスクリプトについて起動するlang-<version>-stub-interpreter.exeの作成手法
SID / VID values are not assigned to shared code libraries in / sys / resource. SID / VID values are assigned only to binaries under / sys / bin. A policy file format is defined that describes how to interpret interpreted program code shared between interpreted programs . The policy file defines:
● / sys / resource / <lang> directory management method ● How to create lang- <version> -stub-interpreter.exe that starts the interpreter for a script

/sysディレクトリへの書込みは、インストーラ・エンティティだけが行うことができるが、当該ディレクトリの読出しは、すべてのプログラムが行うことができる。/private/<SID>ディレクトリは、当該ディレクトリ内にあるインストーラ・エンティティ又はプログラムだけが読み出すことのできるディレクトリである。電子デバイスがディレクトリの実際の名前ではなく上記の2つのタイプのディレクトリを有するという原則は、不可欠なものである。   Only the installer entity can write to the / sys directory, but all programs can read the directory. The / private / <SID> directory is a directory that can be read only by an installer entity or a program in the directory. The principle that an electronic device has the above two types of directories rather than the actual names of the directories is essential.

ポリシー定義ファイルを使用する利点は、SWInstall、即ちソフトウェア・インストール・プログラムのコンテキストでインタープリタ特有の外部コードが実行されないことである。すべてのインタープリタのポリシーを相互参照することができ、また、それらのポリシーを実装する前にエラー及び競合の有無をチェックすることもできる。また、この場合に必要なポリシーのサポートは極めて単純なものである。   The advantage of using a policy definition file is that no interpreter-specific external code is executed in the context of SWInstall, a software installation program. All interpreter policies can be cross-referenced and checked for errors and conflicts before implementing those policies. Also, the policy support required in this case is quite simple.

インタープリタには次の機能が実装されるべきである。
●スクリプト内で使用されるデフォルト・ディレクトリは、/private/<SID>である。グローバル読出し可能/書込み可能なファイルについてはその旨を明示的に宣言しなければならない。
●プログラムに何らかのケイパビリティ(ユーザ・ケイパビリティを含む)が付与されている場合は、プライベート・ディレクトリ及び/sys/resourceディレクトリの外部のコードの実行は無効化される。本機能を無効化する特別な「開発者スイッチ(developer-switch)」を有することが望まれる可能性もある。
●ユーザ・ケイパビリティが付与されている場合には、プログラム・コードは、プログラムのプライベート・ディレクトリ及び共有コード・ディレクトリからしかロードすることができない。
●システム・ケイパビリティが付与されている場合には、プログラム・コードは、プログラムのプライベート・ディレクトリからしかロードすることができない。
The interpreter should implement the following functionality:
● The default directory used in the script is / private / <SID>. A global readable / writable file must be explicitly declared as such.
● If the program has any capabilities (including user capabilities), execution of code outside the private directory and / sys / resource directory is disabled. It may be desirable to have a special “developer-switch” that disables this feature.
If user capabilities are granted, program code can only be loaded from the program's private directory and shared code directory.
• If system capabilities are granted, program code can only be loaded from the program's private directory.

本発明の基本的な概念は、技術の進歩に伴って様々な手法で実施できることが当業者には理解されるであろう。したがって、本発明及び本発明の諸実施形態は、上述の実例に限定されるものではなく、以下の各クレームの範囲内で様々な形をとることができる。   It will be appreciated by those skilled in the art that the basic concepts of the present invention can be implemented in various ways as technology advances. Accordingly, the present invention and embodiments of the present invention are not limited to the examples described above but may take a variety of forms within the scope of the following claims.

本発明に係る電子デバイス内のディレクトリ・ツリーの一例を示すブロック図である。It is a block diagram which shows an example of the directory tree in the electronic device which concerns on this invention. 本発明の一実施形態に係るプログラムの安全な解釈方法を示すフローチャートである(その1)。It is a flowchart which shows the safe interpretation method of the program which concerns on one Embodiment of this invention (the 1). 本発明の一実施形態に係るプログラムの安全な解釈方法を示すフローチャートである(その2)。It is a flowchart which shows the safe interpretation method of the program which concerns on one Embodiment of this invention (the 2). 本発明に係る電子デバイスを示すブロック図である。It is a block diagram which shows the electronic device which concerns on this invention.

JP2007542018A 2004-11-24 2005-11-24 Safe program interpretation method in electronic devices Expired - Fee Related JP4638505B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US99680104A 2004-11-24 2004-11-24
FI20041517A FI20041517A0 (en) 2004-11-25 2004-11-25 Procedure for safe interpretation of programs in electronic devices
PCT/FI2005/000504 WO2006056646A1 (en) 2004-11-24 2005-11-24 Method for the secure interpretation of programs in electronic devices

Publications (3)

Publication Number Publication Date
JP2008521111A JP2008521111A (en) 2008-06-19
JP2008521111A5 true JP2008521111A5 (en) 2010-12-02
JP4638505B2 JP4638505B2 (en) 2011-02-23

Family

ID=36497763

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007542018A Expired - Fee Related JP4638505B2 (en) 2004-11-24 2005-11-24 Safe program interpretation method in electronic devices

Country Status (3)

Country Link
EP (1) EP1815381A1 (en)
JP (1) JP4638505B2 (en)
WO (1) WO2006056646A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2659742C1 (en) 2017-08-17 2018-07-03 Акционерное общество "Лаборатория Касперского" Method for emulating the execution of files comprising instructions, different from machine instructions

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5974549A (en) * 1997-03-27 1999-10-26 Soliton Ltd. Security monitor
US6044467A (en) * 1997-12-11 2000-03-28 Sun Microsystems, Inc. Secure class resolution, loading and definition
GB0024918D0 (en) * 2000-10-11 2000-11-22 Sealedmedia Ltd Method of providing java tamperproofing
GB2381090B (en) * 2001-10-17 2005-02-02 Bitarts Ltd Software loading
JP2003202929A (en) * 2002-01-08 2003-07-18 Ntt Docomo Inc Distribution method and distribution system
JP2004272594A (en) * 2003-03-07 2004-09-30 Sony Corp Data use device, data use method and computer program

Similar Documents

Publication Publication Date Title
JP6248153B2 (en) Activate trust level
Smalley Configuring the SELinux policy
Gong Secure Java class loading
US7444624B2 (en) Method for the secure interpretation of programs in electronic devices
US6691230B1 (en) Method and system for extending Java applets sand box with public client storage
US6986132B1 (en) Remote incremental program binary compatibility verification using API definitions
US7231635B2 (en) Remote incremental program verification using API definitions
US20090031402A1 (en) Method and apparatus for managing access privilege in cldc osgi environment
EP1639462B1 (en) Hybrid system implementing distinct and co-existing application execution environments and methods for implementing the same
US20090307781A1 (en) Program execution control method, its device, and execution control program for same
US20100005527A1 (en) System and method for providing and handling executable web content
US20030014466A1 (en) System and method for management of compartments in a trusted operating system
KR20010040979A (en) Stack-based access control
BRPI0618027A2 (en) configuration of isolated extensions and device triggers
US7770202B2 (en) Cross assembly call interception
US7647629B2 (en) Hosted code runtime protection
WO2019062771A1 (en) Method for enabling multiple instances of one android application to be opened, mobile terminal, and storage medium
US20030084324A1 (en) Method and apparatus for type independent permission based access control
US20030084325A1 (en) Method and apparatus for implementing permission based access control through permission type inheritance
WO2017016231A1 (en) Policy management method, system and computer storage medium
Rossi et al. {SEApp}: Bringing mandatory access control to Android apps
US20220147376A1 (en) Selective substitution of legacy load module programs with classes for execution in a java virtual machine
JP4638505B2 (en) Safe program interpretation method in electronic devices
Bauer et al. Mechanisms for secure modular programming in Java
JP2008521111A5 (en)