JP2013182500A - Api execution control device and program - Google Patents

Api execution control device and program Download PDF

Info

Publication number
JP2013182500A
JP2013182500A JP2012046958A JP2012046958A JP2013182500A JP 2013182500 A JP2013182500 A JP 2013182500A JP 2012046958 A JP2012046958 A JP 2012046958A JP 2012046958 A JP2012046958 A JP 2012046958A JP 2013182500 A JP2013182500 A JP 2013182500A
Authority
JP
Japan
Prior art keywords
api
unit
information
execution
user
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.)
Pending
Application number
JP2012046958A
Other languages
Japanese (ja)
Inventor
Hideaki Kawabata
秀明 川端
Keisuke Takemori
敬祐 竹森
Ayumi Kubota
歩 窪田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
KDDI Corp
Original Assignee
KDDI Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by KDDI Corp filed Critical KDDI Corp
Priority to JP2012046958A priority Critical patent/JP2013182500A/en
Publication of JP2013182500A publication Critical patent/JP2013182500A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an API execution control device and a program in which a user can control the operation of an application by grasping the operation of the application in advance.SOLUTION: An API execution part 11 detects the operation executed in API (Application Program Interface) by an application. When this operation is detected, a notification part 17 notifies its detection to a user. After notification is made to a user by the notification part 17, an execution control part 16 controls execution of the API on the basis of information inputted by the user.

Description

本発明は、アプリケーションによるAPI(Application Program Interface)の実行を制御するAPI実行制御装置に関する。また、本発明は、本API実行制御装置としてコンピュータを機能させるためのプログラムにも関する。   The present invention relates to an API execution control device that controls execution of an application program interface (API) by an application. The present invention also relates to a program for causing a computer to function as the API execution control device.

汎用OS(オペレーティングシステム)を用いたオープンプラットフォームを採用する、スマートフォンと呼ばれる携帯情報端末が普及している。また、スマートフォンに搭載される汎用OSとして、端末で管理される情報や機能を利用するための命令や関数の集合であるAPI が豊富に用意されているAndroid(登録商標)が注目を集めている。本明細書では一例として、Android(登録商標) OSを搭載したスマートフォンについて記載する。   Portable information terminals called smartphones that use an open platform using a general-purpose OS (operating system) have become widespread. As a general-purpose OS installed in smartphones, Android (registered trademark), which has abundant APIs that are a set of instructions and functions for using information and functions managed by terminals, is attracting attention. . As an example, this specification describes a smartphone equipped with an Android (registered trademark) OS.

スマートフォンは、誰もが自由にアプリケーションを開発して公開でき、公開されたアプリケーションをユーザが自由にインストールできるプラットフォームである。公開されたアプリケーションをスマートフォンに導入することにより、スマートフォンの様々な機能を柔軟かつ容易に拡張することができる。   A smartphone is a platform that allows anyone to freely develop and publish applications and allow users to freely install published applications. By introducing a published application to a smartphone, various functions of the smartphone can be expanded flexibly and easily.

しかし、アプリケーションの中には、ユーザに気づかれないように、端末内の情報を収集して外部に送信する悪性アプリケーション(マルウェア)が存在する。特に、正規のアプリケーションを装いつつ、こうした不正な振る舞いを行うアプリケーションはトロイの木馬と呼ばれており、ユーザがその脅威に気づくことは困難である。   However, among applications, there is a malicious application (malware) that collects information in the terminal and transmits it to the outside so that the user does not notice it. In particular, an application that impersonates a legitimate application and performs such illegal behavior is called a Trojan horse, and it is difficult for the user to notice the threat.

スマートフォンには、電話やカメラを制御するAPIが設けられており、アプリケーションがAPIを利用して、発呼や、SMS(Short Message Service)通信、写真撮影を行うことができる。これらの行為を悪性アプリケーションが密かに行った場合、勝手な課金やプライバシの漏洩が発生する。   Smartphones are provided with APIs that control phones and cameras, and applications can make calls, SMS (Short Message Service) communications, and take pictures using the APIs. If these actions are secretly performed by a malicious application, self-charging or privacy leakage will occur.

スマートフォンは、ユーザとの結びつきがPC(パーソナルコンピュータ)よりも緊密な機器であり、電話番号、メールアドレス、住所録、メールの送受信履歴、インターネットの閲覧履歴等の個人情報が集積している。また、端末の高機能化と、常に携帯される利用形態とから、従来のPCでは収集されなかった位置情報等の情報も容易に取得可能となり、情報が悪用される脅威に直面する。   Smartphones are devices that have a closer connection with users than PCs (personal computers), and collect personal information such as phone numbers, email addresses, address books, email transmission / reception histories, and Internet browsing histories. In addition, because of the high functionality of the terminal and the mode of use that is always carried, it is possible to easily acquire information such as location information that was not collected by conventional PCs, and face the threat of misuse of information.

Android(登録商標)では、アプリケーションが利用する機能群や情報群はパーミッションとして定義されている。パーミッションは、アプリケーションを実行可能な端末内の機能・情報の利用や設定の変更に係る権限である。アプリケーションのインストール時に、アプリケーションが使用するパーミッションがユーザに通知(宣言)され、ユーザによってインストールの可否が判断される。アプリケーションがインストールされた後、アプリケーションは、インストール時にユーザに通知したパーミッションにより許可されている範囲内で動作する。このような、パーミッションに基づいてアプリケーションの動作に制限を与える機構により、アプリケーションの不正な動作が防止される。なお、非特許文献1〜3には、アプリケーションのインストール時とインストール後に、アプリケーションが使用するパーミッションをユーザが変更することができるようにAndroid(登録商標)に改良を加えることが記載されている。   In Android (registered trademark), function groups and information groups used by applications are defined as permissions. The permission is an authority relating to use of functions / information in the terminal capable of executing the application and change of settings. When installing an application, the user is notified (declared) of the permissions used by the application, and the user determines whether or not the application can be installed. After the application is installed, the application operates within a range permitted by the permission notified to the user at the time of installation. Such a mechanism that restricts the operation of the application based on the permission prevents an illegal operation of the application. Non-Patent Documents 1 to 3 describe that Android (registered trademark) is improved so that the user can change the permission used by the application during and after the installation of the application.

M.Nauman, S.Khan, and X.Zhang, “Apex: Extending Android Permission Model and Enforcement with User-defined Runtime Constraints”, 5th ACM Symposium on Information, Computer and Communications Security, pp 328-332,2010M.Nauman, S.Khan, and X.Zhang, “Apex: Extending Android Permission Model and Enforcement with User-defined Runtime Constraints”, 5th ACM Symposium on Information, Computer and Communications Security, pp 328-332,2010 M. Ongtang, S. McLaughlin, W. Enck, and P. McDaniel, “Semantically Rich Application-Centric Security in Android”, ieee:Annual Computer Security Applications Conference,pp 340-349, 2009M. Ongtang, S. McLaughlin, W. Enck, and P. McDaniel, “Semantically Rich Application-Centric Security in Android”, ieee: Annual Computer Security Applications Conference, pp 340-349, 2009 H.Banuri, M.Alam, S.Khan, J.Manzoor, B.Ali, Y.Khan, M.Yaseen, M.N.Tahir, T.Ali and X.Zhaug, “Android Runtime Security Policy Enforcement Framework” The 2010 International Workshop on Smartphone Applications and Services, 2010H.Banuri, M.Alam, S.Khan, J.Manzoor, B.Ali, Y.Khan, M.Yaseen, MNTahir, T.Ali and X.Zhaug, “Android Runtime Security Policy Enforcement Framework” The 2010 International Workshop on Smartphone Applications and Services, 2010

しかし、パーミッションに基づいてアプリケーションの動作に制限を与える機構では、アプリケーションのインストール時に承認したパーミッション、あるいはアプリケーションのインストール後に変更したパーミッションが、アプリケーションによって、いつ、どのように使用されているのかをユーザが知ることができないという課題がある。現在、許可されたパーミッションを用いて不正な動作を行う悪性アプリケーションが出現していることが問題となっている。ユーザが、アプリケーションをインストールするために、パーミッションを一度許可してしまうと、パーミッションを必要とする動作をアプリケーションが実行したとしても、ユーザにはそのことが通知されない。そのため、ユーザが情報漏えいなどの被害に気づくことが難しい。   However, with a mechanism that restricts the behavior of an application based on permissions, the user can determine when and how the application uses the permission that was approved at the time of application installation or the permission that was changed after the application was installed. There is a problem that we cannot know. At present, there is a problem that a malicious application that performs an illegal operation using a permitted permission has appeared. Once the user grants permission to install the application, the user is not notified even if the application performs an operation that requires permission. Therefore, it is difficult for the user to notice damage such as information leakage.

マルウェアと呼ばれる悪性アプリケーションの中には、トロイの木馬と呼ばれる機能を持つアプリケーションがある。マルウェアが、本来の目的に沿って正しくパーミッションを使用しつつ、同じパーミッションを用いてバックグラウンドで不正な動作を行っている場合、マルウェアを検知することは極めて難しい。例えば、SMSクライアントアプリケーションが、外部への情報の送信に関するパーミッションであるSEND_SMSを宣言することは正しいと考えられる。しかし、SMSクライアントアプリケーションが正規の振る舞いをしつつ、ユーザの意図とは無関係にバックグラウンドで不正に外部へ情報を送信していた場合、ユーザが情報の送信に気づくことは極めて難しい。このため、ユーザが承認していない行為がアプリケーションによって、いつ、どのように実行されるのかを把握できる仕組みが必要となる。   Among malicious applications called malware, there is an application having a function called a Trojan horse. It is extremely difficult to detect malware when the malware uses the same permissions according to the original purpose and performs illegal operations in the background using the same permissions. For example, it is considered correct for an SMS client application to declare SEND_SMS, which is a permission for sending information to the outside. However, if the SMS client application behaves normally and sends information to the outside illegally in the background regardless of the user's intention, it is extremely difficult for the user to notice the information transmission. For this reason, a mechanism is needed that can grasp when and how an action that the user has not approved is executed by the application.

上記の課題以外に、ユーザの誤操作に起因する課題もある。例えば、SMSクライアントアプリケーションの動作中に画面に表示されたボタンのうちSMSによりメッセージを送信するボタンをユーザが間違えて押しても、メッセージの送信動作を止めることができない。したがって、ユーザビリティの観点で、SMSによるメッセージの送信等が行われる前に、アプリケーションがこれから行う動作をユーザが確認でき、動作の実行の可否をユーザが選択できるようになると、ユーザの誤操作による不利益が発生しなくなる。   In addition to the above problems, there are also problems caused by user's erroneous operations. For example, even if the user mistakenly presses a button for sending a message by SMS among the buttons displayed on the screen during the operation of the SMS client application, the message sending operation cannot be stopped. Therefore, from the viewpoint of usability, the user can confirm the operation that the application will perform before sending the message by SMS, etc., and the user can select whether to execute the operation. Will not occur.

本発明は、上述した課題に鑑みてなされたものであって、ユーザがアプリケーションの動作を事前に把握し、アプリケーションの動作を制御することができるAPI実行制御装置およびプログラムを提供することを目的とする。   The present invention has been made in view of the above-described problems, and an object of the present invention is to provide an API execution control device and a program that allow a user to grasp the operation of an application in advance and control the operation of the application. To do.

本発明は、上記の課題を解決するためになされたもので、アプリケーションがAPI(Application Program Interface)を実行しようとする動作を検出する検出部と、前記動作が検出された場合に、ユーザに通知を行う通知部と、前記通知部がユーザに通知を行った後、ユーザによって入力された情報に基づいて、前記APIの実行を制御する制御部と、を備えたことを特徴とするAPI実行制御装置である。   The present invention has been made to solve the above-described problem, and a detection unit that detects an operation of an application to execute an API (Application Program Interface), and notifies the user when the operation is detected. An API execution control, comprising: a notification unit that performs the control; and a control unit that controls the execution of the API based on information input by the user after the notification unit notifies the user Device.

また、本発明のAPI実行制御装置は、前記APIの実行の制御内容を示す制御情報を記憶する記憶部と、前記通知部がユーザに通知を行った後、ユーザによって入力された情報を前記制御情報として前記記憶部に格納する格納処理部と、をさらに備え、前記制御部は、前記通知部がユーザに通知を行った後、ユーザによって入力された情報に基づいて前記APIの実行を制御し、前記動作が再度検出された場合に、前記記憶部に格納されている前記制御情報に基づいて前記APIの実行を制御することを特徴とする。   In addition, the API execution control device of the present invention includes a storage unit that stores control information indicating the control content of the API execution, and the control unit controls information input by the user after the notification unit notifies the user. A storage processing unit that stores the information in the storage unit as information, and the control unit controls execution of the API based on information input by the user after the notification unit notifies the user. When the operation is detected again, the execution of the API is controlled based on the control information stored in the storage unit.

また、本発明のAPI実行制御装置は、前記動作が検出された場合に、前記APIを実行するメソッドの情報を取得する情報取得部をさらに備え、前記格納処理部は、前記通知部がユーザに通知を行った後、ユーザによって入力された情報と、前記メソッドの情報とを関連付けて前記制御情報として前記記憶部に格納し、前記制御部は、前記通知部がユーザに通知を行った後、ユーザによって入力された情報に基づいて前記APIの実行を制御し、前記動作が再度検出された場合に、前記情報取得部によって取得された前記メソッドの情報と同一の情報を含む前記制御情報を前記記憶部から読み出し、読み出した前記制御情報に基づいて前記APIの実行を制御することを特徴とする。   The API execution control device of the present invention further includes an information acquisition unit that acquires information on a method that executes the API when the operation is detected, and the storage processing unit is configured so that the notification unit notifies the user. After performing the notification, the information input by the user and the method information are associated with each other and stored in the storage unit as the control information. After the notification unit notifies the user, the control unit The execution of the API is controlled based on information input by a user, and the control information including the same information as the method information acquired by the information acquisition unit when the operation is detected again. The execution of the API is controlled based on the control information read from the storage unit.

また、本発明のAPI実行制御装置において、前記制御部は、前記通知部がユーザに通知を行った後、ユーザによって入力された情報が前記APIの実行の許可を示している場合のみ前記APIの実行を許可し、前記動作が再度検出された場合に、前記記憶部に格納されている前記制御情報が前記APIの実行の許可を示しているときのみ前記APIの実行を許可することを特徴とする。   Further, in the API execution control device of the present invention, the control unit is configured such that after the notification unit notifies the user, only when the information input by the user indicates permission to execute the API, When execution is permitted and the operation is detected again, execution of the API is permitted only when the control information stored in the storage unit indicates permission to execute the API. To do.

また、本発明のAPI実行制御装置において、前記制御部は、前記通知部がユーザに通知を行った後、ユーザによって入力された情報がダミー情報を利用することを示している場合に、前記APIの実行結果として、前記ダミー情報を前記アプリケーションに返すように前記APIを制御し、前記動作が再度検出された場合に、前記記憶部に格納されている前記制御情報がダミー情報を利用することを示していれば、前記APIの実行結果として前記ダミー情報を前記アプリケーションに返すように前記APIを制御することを特徴とする。   Further, in the API execution control device of the present invention, the control unit, when the information input by the user indicates that the dummy information is used after the notification unit notifies the user, As a result of the execution, the API is controlled to return the dummy information to the application, and the control information stored in the storage unit uses the dummy information when the operation is detected again. If indicated, the API is controlled so that the dummy information is returned to the application as a result of execution of the API.

また、本発明のAPI実行制御装置において、前記格納処理部と前記制御部に対して同一のUID(User ID)が与えられていることを特徴とする。   In the API execution control device of the present invention, the same UID (User ID) is given to the storage processing unit and the control unit.

また、本発明のAPI実行制御装置において、前記アプリケーションと前記検出部は同一のプロセスで処理を行い、前記アプリケーションと、前記格納処理部および前記制御部とに対して異なるUID(User ID)が与えられ、前記記憶部に格納されている前記制御情報にアクセスする権限が前記アプリケーションには与えられず、前記格納処理部および前記制御部には与えられていることを特徴とする。   In the API execution control apparatus of the present invention, the application and the detection unit perform processing in the same process, and different UIDs (User IDs) are given to the application, the storage processing unit, and the control unit. The authority to access the control information stored in the storage unit is not given to the application, but is given to the storage processing unit and the control unit.

また、本発明のAPI実行制御装置において、前記制御部は、前記アプリケーションの動作中、バックグラウンドで動作していることを特徴とする。   In the API execution control device of the present invention, the control unit operates in the background while the application is operating.

また、本発明のAPI実行制御装置において、前記APIは、指定された引数に対応する情報をデータベースから取得するAPIであり、前記通知部は、前記動作が検出され、かつ、前記動作の際に所定の引数が指定されている場合にユーザに通知を行うことを特徴とする。   In the API execution control device of the present invention, the API is an API for acquiring information corresponding to a specified argument from a database, and the notification unit detects the operation and performs the operation. The user is notified when a predetermined argument is specified.

また、本発明のAPI実行制御装置において、前記通知部は、Activity、Service、BroadcastReceiver、ContentProviderの少なくともいずれかをアプリケーションの構成要素とするOS上で動作するアプリケーションであって、前記Activityを構成要素とするアプリケーションであることを特徴とする。   In the API execution control device of the present invention, the notification unit is an application that operates on an OS having at least one of Activity, Service, BroadcastReceiver, and ContentProvider as a component of the application, and the Activity is a component. It is characterized by being an application.

また、本発明は、アプリケーションがAPI(Application Program Interface)を実行しようとする動作を検出する検出部と、前記動作が検出された場合に、ユーザに通知を行う通知部と、前記通知部がユーザに通知を行った後、ユーザによって入力された情報に基づいて、前記APIの実行を制御する制御部と、としてコンピュータを機能させるためのプログラムである。   In addition, the present invention provides a detection unit that detects an operation in which an application attempts to execute an API (Application Program Interface), a notification unit that notifies a user when the operation is detected, and the notification unit includes a user Is a program for causing a computer to function as a control unit that controls the execution of the API based on information input by a user after notification.

本発明によれば、アプリケーションがAPIを実行しようとする動作が検出された場合に、ユーザに通知が行われ、ユーザによって入力された情報に基づいて、APIの実行が制御されるので、ユーザがアプリケーションの動作を事前に把握し、アプリケーションの動作を制御することができる。   According to the present invention, when an operation of an application trying to execute an API is detected, the user is notified and the execution of the API is controlled based on information input by the user. It is possible to grasp the operation of the application in advance and control the operation of the application.

本発明の一実施形態による端末装置の構成を示すブロック図である。It is a block diagram which shows the structure of the terminal device by one Embodiment of this invention. 本発明の一実施形態においてフックの対象となるAPIの一覧を示す参考図である。FIG. 6 is a reference diagram showing a list of APIs to be hooked in an embodiment of the present invention. 本発明の一実施形態におけるAPI実行部の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the API execution part in one Embodiment of this invention. 本発明の一実施形態における情報取得部の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the information acquisition part in one Embodiment of this invention. 本発明の一実施形態におけるセキュリティポリシー判定部の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of the operation | movement of the security policy determination part in one Embodiment of this invention. 本発明の一実施形態においてAPIが実行される状況の情報を示す参考図である。It is a reference figure which shows the information of the condition where API is performed in one Embodiment of this invention. 本発明の一実施形態においてAPIを呼び出したメソッドが記述されたソースコードを示す参考図である。FIG. 5 is a reference diagram illustrating source code in which a method that calls an API is described in an embodiment of the present invention. 本発明の一実施形態においてAPIを呼び出したメソッドを呼び出したメソッドが記述されたソースコードを示す参考図である。FIG. 5 is a reference diagram illustrating source code in which a method that calls a method that calls an API is described in an embodiment of the present invention. 本発明の一実施形態におけるソケット生成部の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the socket production | generation part in one Embodiment of this invention. 本発明の一実施形態における起動部の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the starting part in one Embodiment of this invention. 本発明の一実施形態における通知部の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the notification part in one Embodiment of this invention. 本発明の一実施形態において表示されるメッセージを示す参考図である。It is a reference figure showing the message displayed in one embodiment of the present invention. 本発明の一実施形態における格納処理部の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the storage process part in one Embodiment of this invention. 本発明の一実施形態における実行制御部の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the execution control part in one Embodiment of this invention. 本発明の一実施形態におけるデータベース参照APIの引数を示す参考図である。It is a reference figure which shows the argument of the database reference API in one Embodiment of this invention. 本発明の一実施形態におけるAPI実行部の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the API execution part in one Embodiment of this invention.

以下、図面を参照し、本発明の実施形態を説明する。本明細書および図面では、便宜上、必要に応じてandroid(登録商標)という文字列を*andrd*という文字列で代用し、Android(登録商標)という文字列を*Andrd*という文字列で代用し、java(登録商標)という文字列を*jv*という文字列で代用している。すなわち、*andrd*という文字列はandroid(登録商標)という文字列と等価であり、*Andrd*という文字列はAndroid(登録商標)という文字列と等価であり、*jv*という文字列はjava(登録商標)という文字列と等価である。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In this specification and drawings, for convenience, the character string “android (registered trademark)” is substituted with the character string “* andrd *” and the character string “Android (registered trademark)” is substituted with the character string “* Andrd *” as necessary. , Java (registered trademark) is replaced with the character string * jv *. That is, the string * andrd * is equivalent to the string Android (registered trademark), the string * Andrd * is equivalent to the string Android (registered trademark), and the string * jv * is java It is equivalent to the character string (registered trademark).

図1は、本発明の一実施形態による端末装置の構成を示している。本実施形態の端末装置は、OS にAndroid(登録商標)を実装したスマートフォン等の装置として構成されている。図1に示すように端末装置は、アプリケーション10、API実行部11、情報取得部12、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16、通知部17、格納処理部18、記憶部19、入力部20、表示部21、通信部22を有する。API実行部11、情報取得部12、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16、通知部17、格納処理部18は、本発明のAPI実行制御装置の一例であるAPI実行制御部30を構成する。   FIG. 1 shows a configuration of a terminal device according to an embodiment of the present invention. The terminal device of the present embodiment is configured as a device such as a smartphone in which Android (registered trademark) is mounted on the OS. As shown in FIG. 1, the terminal device includes an application 10, an API execution unit 11, an information acquisition unit 12, a security policy determination unit 13, a socket generation unit 14, an activation unit 15, an execution control unit 16, a notification unit 17, and a storage processing unit. 18, a storage unit 19, an input unit 20, a display unit 21, and a communication unit 22. The API execution unit 11, the information acquisition unit 12, the security policy determination unit 13, the socket generation unit 14, the activation unit 15, the execution control unit 16, the notification unit 17, and the storage processing unit 18 are examples of the API execution control device according to the present invention. An API execution control unit 30 is configured.

アプリケーション10は、SMSクライアントアプリケーション等であり、アプリケーションの処理として規定された各種の処理を行う。API実行部11は、アプリケーション10からの要求に応じてAPI11aを実行する。API11aは、OSであるAndroid(登録商標)で用意されているAPI(メソッド)である。API実行部11は、アプリケーション10からAPI11aの実行要求を受けたときにAPI11aを実行し、実行結果をアプリケーション10に返す。   The application 10 is an SMS client application or the like, and performs various processes defined as application processes. The API execution unit 11 executes the API 11a in response to a request from the application 10. The API 11a is an API (method) prepared by Android (registered trademark) which is an OS. The API execution unit 11 executes the API 11 a when receiving an execution request for the API 11 a from the application 10 and returns an execution result to the application 10.

情報取得部12は、アプリケーション10がAPI11aを呼び出して実行しようとするときに、API11aを実行するメソッドの情報を含む各種情報を取得する。情報取得部12が取得した情報は、コンテキストデータCDとして、記憶部19内のセキュリティデータSDの記憶領域に格納される。セキュリティデータSDは、セキュリティポリシーSP(制御情報)とコンテキストデータCDで構成される。セキュリティポリシーSPは、API11aの実行を制御するための、API11aの制御内容(実行の可否等)を示す情報を含むデータである。コンテキストデータCDは、情報取得部12が取得した情報を含むデータである。セキュリティデータSDは記憶部19に格納されており、セキュリティポリシー判定部13、起動部15、および格納処理部18によって記憶部19から適宜読み出されて参照される。   The information acquisition unit 12 acquires various types of information including information on a method for executing the API 11a when the application 10 calls and executes the API 11a. Information acquired by the information acquisition unit 12 is stored in the storage area of the security data SD in the storage unit 19 as context data CD. The security data SD is composed of a security policy SP (control information) and context data CD. The security policy SP is data including information indicating the control contents (executability and the like) of the API 11a for controlling the execution of the API 11a. The context data CD is data including information acquired by the information acquisition unit 12. The security data SD is stored in the storage unit 19 and is appropriately read from the storage unit 19 and referenced by the security policy determination unit 13, the activation unit 15, and the storage processing unit 18.

セキュリティポリシー判定部13は、実行されるAPI11aに関する情報がセキュリティポリシーSPに登録されているか否かを判定する。セキュリティポリシーSPに情報が登録されている場合、セキュリティポリシー判定部13は、セキュリティポリシーSPに登録されている情報に基づいた情報をAPI実行部11に与える。また、セキュリティポリシーSPに情報が登録されていない場合、セキュリティポリシー判定部13は、ソケット生成部14に処理を引き渡す。   The security policy determination unit 13 determines whether information related to the API 11a to be executed is registered in the security policy SP. When information is registered in the security policy SP, the security policy determination unit 13 gives the API execution unit 11 information based on the information registered in the security policy SP. If no information is registered in the security policy SP, the security policy determination unit 13 passes the processing to the socket generation unit 14.

ソケット生成部14は、入力部20を介してユーザによって入力される情報を格納するためのソケットSKを生成する。起動部15は、通常では停止している通知部17および格納処理部18を起動する。実行制御部16は、入力部20を介してユーザによって入力される情報に基づいて、API11aの実行を制御する。通知部17は、アプリケーション10がAPI11aを実行しようとしていることをユーザに通知する処理を行う。格納処理部18は、入力部20を介してユーザによって入力される情報をセキュリティポリシーSPおよびソケットSKに格納する処理を行う。   The socket generation unit 14 generates a socket SK for storing information input by the user via the input unit 20. The activation unit 15 activates the notification unit 17 and the storage processing unit 18 that are normally stopped. The execution control unit 16 controls the execution of the API 11 a based on information input by the user via the input unit 20. The notification unit 17 performs processing for notifying the user that the application 10 is about to execute the API 11a. The storage processing unit 18 performs processing for storing information input by the user via the input unit 20 in the security policy SP and the socket SK.

記憶部19は、メモリで構成されており、OSのプログラムや、アプリケーションプログラム、端末装置が使用する各種データ等を記憶する。入力部20は、ユーザが操作するキーやボタン等を有し、ユーザによって入力された情報を格納処理部18に通知する。表示部21は、通知部17による処理の結果等を表示する。通信部22は外部の通信装置と通信を行う。アプリケーション10は、必要に応じて通信部22を介して通信を行う。   The storage unit 19 includes a memory, and stores an OS program, application programs, various data used by the terminal device, and the like. The input unit 20 includes keys and buttons operated by the user, and notifies the storage processing unit 18 of information input by the user. The display unit 21 displays the result of processing by the notification unit 17 and the like. The communication unit 22 communicates with an external communication device. The application 10 performs communication via the communication unit 22 as necessary.

API実行部11、情報取得部12、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16は、Android(登録商標)で提供されているアプリケーションフレームワーク(AplicationFramework)層で動作し、通知部17、格納処理部18はアプリケーション層で動作する。本実施形態のOSのプログラムでは、アプリケーションフレームワークで提供されている既存のクラスを定義しているコードに対して新たなコードが追加されている。   The API execution unit 11, the information acquisition unit 12, the security policy determination unit 13, the socket generation unit 14, the activation unit 15, and the execution control unit 16 operate in an application framework (AplicationFramework) layer provided by Android (registered trademark). The notification unit 17 and the storage processing unit 18 operate in the application layer. In the OS program of this embodiment, new code is added to the code defining the existing class provided by the application framework.

具体的には、本実施形態で制御の対象とするAPIを定義するクラス(TelephonyManagerクラス等)のコードに対して、API実行部11および情報取得部12が実行する処理を規定するコードが追加されている。また、アプリケーションのインストールおよびアンインストールの管理を行ったり、アプリケーションに適切なパーミッションが付与されているか否かの判定を行ったりするPackageManagerServiceクラスのコードに対して、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16の各部が実行する処理を規定するコードが追加されている。通知部17、格納処理部18はそれぞれアプリケーションの一部として構成されており、通知部17、格納処理部18が実行する処理を規定するコードがアプリケーションプログラムに含まれる。   Specifically, a code that defines the processing executed by the API execution unit 11 and the information acquisition unit 12 is added to the code of the class (TelephonyManager class or the like) that defines the API to be controlled in this embodiment. ing. In addition, a security policy determination unit 13 and a socket generation unit 14 for the PackageManagerService class code that manages installation and uninstallation of an application and determines whether or not an appropriate permission is granted to the application. A code for defining processing executed by each unit of the activation unit 15 and the execution control unit 16 is added. The notification unit 17 and the storage processing unit 18 are each configured as a part of an application, and the application program includes a code that defines the processing executed by the notification unit 17 and the storage processing unit 18.

本実施形態のOSのプログラムと、通知部17、格納処理部18を構成するアプリケーションのプログラムとをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータ(本実施形態の端末装置)に読み込ませ、実行させることにより、API実行部11、情報取得部12、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16、通知部17、格納処理部18は、各部に対して規定された処理を実行する。   The OS program of the present embodiment and the application programs constituting the notification unit 17 and the storage processing unit 18 are recorded on a computer-readable recording medium, and the program recorded on the recording medium is stored in a computer (this embodiment). By executing the API execution unit 11, the information acquisition unit 12, the security policy determination unit 13, the socket generation unit 14, the activation unit 15, the execution control unit 16, the notification unit 17, and the storage processing unit. 18 executes processing defined for each unit.

ここで、「コンピュータ」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。   Here, the “computer” includes a homepage providing environment (or display environment) if the WWW system is used. The “computer-readable recording medium” refers to a storage device such as a portable medium such as a flexible disk, a magneto-optical disk, a ROM, and a CD-ROM, and a hard disk built in the computer. Further, the “computer-readable recording medium” refers to a volatile memory (RAM) in a computer system that becomes a server or a client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. In addition, those holding programs for a certain period of time are also included.

また、上述したプログラムは、このプログラムを記憶装置等に格納したコンピュータから、伝送媒体を介して、あるいは伝送媒体中の伝送波により他のコンピュータに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように、情報を伝送する機能を有する媒体のことをいう。また、上述したプログラムは、前述した機能の一部を実現するためのものであってもよい。さらに、前述した機能を、コンピュータに既に記録されているプログラムとの組合せで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。   The program described above may be transmitted from a computer storing the program in a storage device or the like to another computer via a transmission medium or by a transmission wave in the transmission medium. Here, the “transmission medium” for transmitting a program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line. Further, the above-described program may be for realizing a part of the above-described function. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer, what is called a difference file (difference program) may be sufficient.

本実施形態では、アプリケーションフレームワーク層に実装されるAPI実行部11および情報取得部12と連携する処理を高速化するために、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16がアプリケーションフレームワーク層に実装されているが、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16をアプリケーションとして構成することも可能である。   In the present embodiment, in order to speed up the processing linked with the API execution unit 11 and the information acquisition unit 12 implemented in the application framework layer, the security policy determination unit 13, the socket generation unit 14, the activation unit 15, the execution control Although the unit 16 is implemented in the application framework layer, the security policy determination unit 13, the socket generation unit 14, the activation unit 15, and the execution control unit 16 can be configured as applications.

上記の構成を有するAPI実行制御部30は、アプリケーション10が所定のAPI11aを実行しようとするときにユーザに通知を行い、入力部20を介してユーザによって入力される情報に基づいて、API11aの実行を制御する。これによって、パーミッションを必要とする動作時等にユーザがアプリケーションの動作を事前に把握し、アプリケーションの動作を制御することができる。   The API execution control unit 30 having the above configuration notifies the user when the application 10 tries to execute the predetermined API 11a, and executes the API 11a based on information input by the user via the input unit 20. To control. As a result, the user can grasp the operation of the application in advance and control the operation of the application at the time of the operation requiring permission.

次に、Android(登録商標)上で動作するアプリケーションの構成要素(コンポーネント)を説明する。Android(登録商標)上で動作するアプリケーションのコンポーネントとして、Activity、Service、BroadcastReceiver、ContentProviderの4つがある。アプリケーションのソースコードにおいて、クラスが継承するコンポーネントが記述されることにより、そのクラスで定義されているメソッドはそのコンポーネントを利用することが可能となる。以下、各コンポーネントについて説明する。   Next, components (components) of an application that operates on Android (registered trademark) will be described. There are four application components that run on Android (registered trademark): Activity, Service, BroadcastReceiver, and ContentProvider. When a component inherited by a class is described in the application source code, a method defined in the class can use the component. Hereinafter, each component will be described.

Activityは、ユーザに対して視覚的なインターフェイスを提供し、画面上でユーザと対話を行うコンポーネントである。アプリケーションを起動すると画面が表示される場合、Activityに記述されたプログラムが動作している。   Activity is a component that provides a visual interface to the user and interacts with the user on the screen. If the screen is displayed when the application is started, the program described in Activity is running.

Serviceは、画面を表示する機能を持たずに、バックグラウンドで処理を実行するコンポーネントである。例えば、ユーザが音楽を聞きながらブラウザを起動してインターネットの利用を楽しむ場合、音楽用アプリケーションがServiceを起動することにより、ユーザはインターネットの利用中に音楽を聞くことができる。   Service is a component that executes processing in the background without having a function of displaying a screen. For example, when the user activates a browser while listening to music and enjoys using the Internet, the user can listen to the music while using the Internet by activating the service for the music application.

BroadcastReceiverは、Android(登録商標)が搭載された端末装置のシステム全体にブロードキャストされるINTENT(インテント)を受け取るコンポーネントである。例えば、電池残量が減ってきたときに、「残りのバッテリー残量が少ないです」というメッセージを含む画面を表示するアプリケーションでは、電池残量が変化するときに発行されるBroadcastIntentをBroadcastReceiverにより受け取ったアプリケーションがActivityを起動して画面を表示する。   BroadcastReceiver is a component that receives INTENT (intent) broadcast to the entire system of a terminal device on which Android (registered trademark) is installed. For example, an application that displays a screen that includes the message “Remaining battery level is low” when the battery level is low, receives the BroadcastIntent issued when the battery level changes by the BroadcastReceiver. The application starts Activity and displays the screen.

ContentProviderは、アプリケーションが保持するデータを他のコンポーネントでも使用可能にするコンポーネントである。例えば、あるアプリケーションが電話帳のデータを取得したい場合、そのアプリケーションは、電話帳アプリケーションのContentProviderを利用して、電話帳に登録されている情報を取得する。   ContentProvider is a component that makes it possible for other components to use data held by the application. For example, when an application wants to acquire phonebook data, the application acquires information registered in the phonebook using the ContentProvider of the phonebook application.

本実施形態の通知部17および格納処理部18はActivityで構成されている。Android(登録商標)のアプリケーションフレームワークで提供されているAlertDialogクラスのメソッド(API)を利用することで、アラートダイアログと呼ばれるダイアログを簡易に表示することができる。しかし、アプリケーション10がAPI11aを実行しようとしたときにAPI実行部11がAlertDialogクラスのメソッドを呼び出してアラートダイアログを表示するようにした場合、以下の課題がある。   The notification unit 17 and the storage processing unit 18 of this embodiment are configured by Activity. By using a method (API) of the AlertDialog class provided by the Android (registered trademark) application framework, a dialog called an alert dialog can be displayed easily. However, when the API execution unit 11 calls the method of the AlertDialog class to display the alert dialog when the application 10 tries to execute the API 11a, there are the following problems.

Android(登録商標)の仕様では、アプリケーション10がActivityによって動作し、API11aを呼び出して実行しようとする場合にはアラートダイアログを表示することができるが、アプリケーション10がServiceによって動作し、API11aを呼び出して実行しようとする場合にはアラートダイアログを表示することはできない。本実施形態では、画面表示を行う機能を備えているActivityで構成されている通知部17が画面表示を行うことによって、アプリケーション10がServiceによって動作する場合でも、ユーザに通知を行うことができる。   In the specification of Android (registered trademark), when the application 10 is operated by Activity and the API 11a is called and executed, an alert dialog can be displayed. However, the application 10 is operated by Service and the API 11a is called. An alert dialog cannot be displayed when attempting to execute. In the present embodiment, the notification unit 17 configured by Activity having a screen display function performs screen display, so that even when the application 10 is operated by Service, the user can be notified.

次に、本実施形態の端末装置の動作を説明する。アプリケーション10がAPI11aを呼び出すと、API実行部11は、API11aが呼び出されたことを検出してAPI11aの実行に介入する(API11aをフックする)。   Next, the operation of the terminal device of this embodiment will be described. When the application 10 calls the API 11a, the API execution unit 11 detects that the API 11a has been called and intervenes in the execution of the API 11a (hooks the API 11a).

図2は、フックの対象となるAPIの一覧を示している。本実施形態では、TelephonyManagerクラス、LocationManagerクラス、PackageManagerServiceクラス、ContextImpleクラス、SmsManagerクラス、ContentResolverクラスのAPIがフックの対象となる。なお、図2に示すAPIは一例であり、これに限らない。APIはメソッドであるが、本実施形態で注目するメソッドを他のメソッドと区別するため、図2に示すメソッドをAPIと記載している。   FIG. 2 shows a list of APIs to be hooked. In the present embodiment, the TelephonyManager class, LocationManager class, PackageManagerService class, ContextImple class, SmsManager class, and ContentResolver class API are hooked. The API shown in FIG. 2 is an example, and the present invention is not limited to this. Although the API is a method, the method shown in FIG. 2 is described as an API in order to distinguish the method focused in this embodiment from other methods.

TelephonyManagerクラスのAPIでフックの対象となるのは、端末を識別するIDであるIMEI(International Mobile Equipment Identity)を取得するgetDeviceIdや、端末のアプリケーションのバージョンを取得するgetDeviceSoftwareVersion、端末の電話番号を取得するgetLine1Number、SIM (Subscriber Identity Module)のシリアル番号を取得するgetSimSerialNumber、SIMの固有番号であるIMSI(International Mobile Subscriber Identity)を取得するgetSubscriberIdである。   The target of hook in the API of the TelephonyManager class is getDeviceId to obtain the IMEI (International Mobile Equipment Identity) which is the ID for identifying the device, getDeviceSoftwareVersion to obtain the application version of the device, and the phone number of the device getLine1Number, getSimSerialNumber that obtains the SIM (Subscriber Identity Module) serial number, and getSubscriberId that obtains IMSI (International Mobile Subscriber Identity), which is the SIM unique number.

LocationManagerクラスのAPIでフックの対象となるのは、位置情報を取得するgetLastKnownLocation、LocationListener、requestLocationUpdatesである。PackageManagerServiceクラスのAPIでフックの対象となるのは、アプリケーションに適切なパーミッションが付与されているか否かを判定するCheckUidPermissionである。ContextImpleクラスのAPIでフックの対象となるのは、端末にインストールされているアプリケーションの一覧を示す情報を取得するgetInstallPackagesである。   The target of hooking in the LocationManager class API is getLastKnownLocation, LocationListener, and requestLocationUpdates that acquire location information. The target of the hook in the API of the PackageManagerService class is CheckUidPermission that determines whether or not appropriate permission is granted to the application. The target of hooking in the API of the ContextImple class is getInstallPackages that acquires information indicating a list of applications installed in the terminal.

SmsManagerクラスのAPIでフックの対象となるのは、SMSによりメッセージを送信するsendTextMessageである。ContentResolverクラスのAPIでフックの対象となるのは、メモリ内のデータベースにアクセスして情報を取得するCursorである。   The subject of hooking in the SmsManager class API is sendTextMessage that sends a message by SMS. The target of hooking in the API of the ContentResolver class is a Cursor that accesses a database in memory to obtain information.

本実施形態では、TelephonyManagerクラスおよびLocationManagerクラスの各APIを情報取得APIと記載し、PackageManagerServiceクラスのCheckUidPermissionをパーミッション判定APIと記載する。また、本実施形態では、ContextImpleクラスのgetInstallPackagesを一覧取得APIと記載し、SmsManagerクラスのsendTextMessageを外部送信APIと記載し、ContentResolverクラスのCursorをデータベース参照APIと記載する。   In this embodiment, each API of the TelephonyManager class and the LocationManager class is described as an information acquisition API, and CheckUidPermission of the PackageManagerService class is described as a permission determination API. In this embodiment, getInstallPackages of the ContextImple class is described as a list acquisition API, sendTextMessage of the SmsManager class is described as an external transmission API, and a Cursor of the ContentResolver class is described as a database reference API.

図1ではAPI実行部11とAPI11aが1つだけ描かれているが、API実行部11とAPI11aの組は複数(上記のAPI と同数)あるものとする。例えば、アプリケーション10が情報取得APIを呼び出した場合、複数用意されているAPI11aのうち情報取得APIであるAPI11aの実行に関して、そのAPI11aに対応するAPI実行部11が処理を行い、アプリケーション10がパーミッション判定APIを呼び出した場合、複数用意されているAPI11aのうちパーミッション判定APIであるAPI11aの実行に関して、そのAPI11aに対応するAPI実行部11が処理を行う。   In FIG. 1, only one API execution unit 11 and API 11a are depicted, but it is assumed that there are a plurality of sets (the same number as the above API) of API execution units 11 and APIs 11a. For example, when the application 10 calls the information acquisition API, the API execution unit 11 corresponding to the API 11a processes the API 11a that is the information acquisition API among the APIs 11a that are prepared, and the application 10 determines the permission. When the API is called, the API execution unit 11 corresponding to the API 11a performs processing regarding the execution of the API 11a which is the permission determination API among the plurality of APIs 11a prepared.

アプリケーション10が所定のAPI11aを呼び出したとき、API実行部11は、図3に示す処理を実行する。まず、API実行部11は、API11aを実行する前に情報取得部12に処理を指示する(ステップS100)。続いて、API実行部11は、セキュリティポリシー判定部13または実行制御部16から処理結果を受け取り、その処理結果に応じた処理を実行することによりAPI11aの実行を制御する(ステップS105)。ステップS105で行われる処理の詳細については後述する。続いて、API実行部11は実行結果をアプリケーション10に返す(ステップS110)。   When the application 10 calls a predetermined API 11a, the API execution unit 11 executes the processing shown in FIG. First, the API execution unit 11 instructs the information acquisition unit 12 to execute a process before executing the API 11a (step S100). Subsequently, the API execution unit 11 receives the processing result from the security policy determination unit 13 or the execution control unit 16, and controls the execution of the API 11a by executing a process according to the processing result (step S105). Details of the processing performed in step S105 will be described later. Subsequently, the API execution unit 11 returns an execution result to the application 10 (step S110).

API実行部11から指示を受けた情報取得部12は、図4に示す処理を実行する。まず、情報取得部12は、API11aを呼び出したアプリケーション10のパッケージの名称(パッケージ名)を特定するため、ContextクラスのgetPackageNameメソッドを実行し、パッケージ名を取得する(ステップS200)。Android(登録商標)では、パッケージファイルの形式でアプリケーションが公開されている。パッケージファイルは、例えば拡張子が.apkのファイルであり、命令列を含む実行コード(例えば拡張子が.dex)、アプリケーションが利用する権限が定義されたマニフェストファイル(例えば拡張子が.xml)、アプリケーションが利用する画像ファイル(例えば拡張子が.jpg)等を含む。   Receiving the instruction from the API execution unit 11, the information acquisition unit 12 executes the process shown in FIG. First, the information acquisition unit 12 executes the getPackageName method of the Context class to acquire the package name in order to identify the package name (package name) of the application 10 that has called the API 11a (step S200). In Android (registered trademark), applications are published in the form of package files. The package file is, for example, a file with an extension of .apk, an execution code including an instruction sequence (for example, the extension is .dex), a manifest file in which the authority used by the application is defined (for example, the extension is .xml), Includes image files used by the application (for example, the extension is .jpg).

続いて、情報取得部12は、API11aがどのような状況で実行されるのかを解析するため、SystemクラスのcurrentMillisメソッドを実行し、API11aが呼び出された時刻を取得すると共に、Throwable クラスのgetStacktraceメソッドを実行し、クラス名、メソッド名、ファイル名、行番号が格納されたStackTraceElementクラスの配列を取得する(ステップS205)。   Subsequently, the information acquisition unit 12 executes the currentMillis method of the System class in order to analyze the situation in which the API 11a is executed, acquires the time when the API 11a is called, and the getStacktrace method of the Throwable class Is executed to obtain an array of the StackTraceElement class in which the class name, method name, file name, and line number are stored (step S205).

ステップS205で取得される配列に格納されているクラス名は、APIを呼び出したメソッドを定義するクラスの名称である。クラス名は、StackTraceElementクラスのgetClassNameメソッドを実行することで取得される。ステップS205で取得される配列に格納されているメソッド名は、APIを呼び出したメソッドの名称である。メソッド名は、StackTraceElementクラスのgetMethodNameメソッドを実行することで取得される。ステップS205で取得される配列に格納されているファイル名は、APIを呼び出したメソッドを実行するコードが記述されたソースファイルの名称である。ファイル名は、StackTraceElementクラスのgetFileNameメソッドを実行することで取得される。ステップS205で取得される配列に格納されている行番号は、APIを呼び出したメソッドを実行するコードが記述されたソースファイル内の行番号である。行番号は、StackTraceElementクラスのgetLineNumberメソッドを実行することで取得される。   The class name stored in the array acquired in step S205 is the name of the class that defines the method that called the API. The class name is obtained by executing the getClassName method of the StackTraceElement class. The method name stored in the array acquired in step S205 is the name of the method that called the API. The method name is obtained by executing the getMethodName method of the StackTraceElement class. The file name stored in the array acquired in step S205 is the name of the source file in which the code for executing the method that called the API is described. The file name is obtained by executing the getFileName method of the StackTraceElement class. The line number stored in the array acquired in step S205 is the line number in the source file in which the code for executing the method that called the API is described. The line number is obtained by executing the getLineNumber method of the StackTraceElement class.

メソッドが呼び出される毎に、そのメソッドの情報はメモリ内のスタック領域(スタックフレーム)にスタックトレースとして保存される。上記のgetClassNameメソッド等の各メソッドによって、スタックトレースからクラス名等の情報が取得される。   Each time a method is called, the method information is stored as a stack trace in a stack area (stack frame) in memory. Information such as the class name is acquired from the stack trace by each method such as the getClassName method described above.

続いて、情報取得部12はセキュリティポリシー判定部13に処理を指示する(ステップS210)。このとき、情報取得部12は、ステップS200,S205で取得した情報をセキュリティポリシー判定部13に与える。   Subsequently, the information acquisition unit 12 instructs the security policy determination unit 13 to perform processing (step S210). At this time, the information acquisition unit 12 gives the information acquired in steps S200 and S205 to the security policy determination unit 13.

情報取得部12から指示を受けたセキュリティポリシー判定部13は、図5に示す処理を実行する。まず、セキュリティポリシー判定部13は、情報取得部12から与えられた情報(情報取得部12がステップS200,S205で取得した情報)をコンテキストデータCDとして、記憶部19内のセキュリティデータSDの記憶領域に格納する(ステップS300)。   Upon receiving the instruction from the information acquisition unit 12, the security policy determination unit 13 executes the process shown in FIG. First, the security policy determination unit 13 uses the information given from the information acquisition unit 12 (information acquired by the information acquisition unit 12 in steps S200 and S205) as the context data CD, and the storage area of the security data SD in the storage unit 19 (Step S300).

図6は、情報取得部12がステップS205で取得した情報のうち、API11aが呼び出された時刻を除く情報の一例を示している。図6では、便宜上、1つのメソッド(API)の情報が4行に分かれて記載されており、各行の先頭には行番号が付与されている。図6の4行単位の情報によって1つの情報群が構成される。1〜4行目の情報で構成される情報群st[0]は、呼び出されたAPI11aの情報を含む。4行目の「getMethodName()=」に続く文字列「getDeviceId」はAPI11aのメソッド名を示している。   FIG. 6 shows an example of information excluding the time when the API 11a is called out of the information acquired by the information acquisition unit 12 in step S205. In FIG. 6, for convenience, information of one method (API) is divided into four lines, and a line number is given to the head of each line. One information group is constituted by the information in units of four lines in FIG. An information group st [0] composed of information on the first to fourth lines includes information on the called API 11a. The character string “getDeviceId” following “getMethodName () =” on the fourth line indicates the method name of the API 11 a.

5〜8行目の情報で構成される情報群st[1]は、API11a(getDeviceId)を呼び出したメソッドの情報を含む。5行目の「getClassName()=」に続く文字列「jp.sample.app.Sample」は、API11aを呼び出したメソッドが定義されているクラスの名称(クラス名)を示している。クラス名は、パッケージ名とクラス単体の名称との組合せとして示されている。例えば、5行目に記載されている「jp.sample.app.Sample」の「jp.sample.app」がパッケージ名であり、「Sample」がクラス単体の名称である。6行目の「getFileName()=」に続く文字列「Sample.*jv*」は、API11aを呼び出したメソッドを実行するコードが記述されたソースファイルの名称(ファイル名)である。7行目の「getLineNumber()=」に続く数字27は、API11aを呼び出したメソッドを実行するコードが記述されたソースファイル内の行番号を示している。8行目の「getMethodName()=」に続く文字列「onCreate」は、API11aを呼び出したメソッドの名称(メソッド名)を示している。   An information group st [1] composed of information on the 5th to 8th lines includes information on a method that calls the API 11a (getDeviceId). The character string “jp.sample.app.Sample” following “getClassName () =” on the fifth line indicates the name (class name) of the class in which the method that calls the API 11 a is defined. The class name is shown as a combination of a package name and a class name. For example, “jp.sample.app” of “jp.sample.app.Sample” described in the fifth line is a package name, and “Sample” is a name of a single class. The character string “Sample. * Jv *” following “getFileName () =” on the sixth line is the name (file name) of the source file in which the code for executing the method calling the API 11 a is described. The number 27 following “getLineNumber () =” on the seventh line indicates the line number in the source file in which the code for executing the method calling the API 11 a is described. The character string “onCreate” following “getMethodName () =” on the eighth line indicates the name of the method (method name) that calls the API 11 a.

情報群st[1]が示すファイル名に対応するソースファイルは、API11aを呼び出したアプリケーション10のソースファイルである。つまり、情報群st[1]に含まれる情報は、API11aを呼び出したアプリケーション10のソースファイルで記述されているメソッドの情報である。   The source file corresponding to the file name indicated by the information group st [1] is the source file of the application 10 that called the API 11a. That is, the information included in the information group st [1] is information on a method described in the source file of the application 10 that has called the API 11a.

図7は、API11aを呼び出したメソッドが記述されたソースコードの一例を示している。このソースコードは、情報群st[1]に含まれる「Sample.*jv*」がファイル名であるソースファイルに記載されているコードである。このソースコードにおいて、Sampleクラス(情報群st[1]に含まれる「jp.sample.app.Sample」に対応)で定義されているonCreateメソッド(情報群st[1]に含まれる「onCreate」に対応)内で、情報群st[0]が示すgetDeviceIdメソッド(API11a)が呼び出されている。また、getDeviceIdメソッドを呼び出すコードは、情報群st[1]に含まれる行番号に対応する27行目に記載されている。   FIG. 7 shows an example of source code in which a method that calls the API 11a is described. This source code is a code described in a source file whose file name is “Sample. * Jv *” included in the information group st [1]. In this source code, the onCreate method ("onCreate" included in the information group st [1]) defined in the Sample class (corresponding to "jp.sample.app.Sample" included in the information group st [1]) The getDeviceId method (API 11a) indicated by the information group st [0] is called. The code for calling the getDeviceId method is described in the 27th line corresponding to the line number included in the information group st [1].

図6の9〜12行目の情報で構成される情報群st[2]は、情報群st[1]が示すonCreateメソッドを呼び出したメソッドの情報を含む。9行目の「getClassName()=」に続く文字列「*andrd*.app.ActivityThread」は、onCreateメソッドを呼び出したメソッドが定義されているクラスの名称(クラス名)を示している。9行目に記載されている「*andrd*.app.ActivityThread」の「*andrd*.app」がパッケージ名であり、「ActivityThread」がクラス単体の名称である。10行目の「getFileName()=」に続く文字列「ActivityThread.*jv*」は、onCreateメソッドを呼び出したメソッドを実行するコードが記述されたソースファイルの名称(ファイル名)である。11行目の「getLineNumber()=」に続く数字1945は、onCreateメソッドを呼び出したメソッドを実行するコードが記述されたソースファイル内の行番号を示している。12行目の「getMethodName()=」に続く文字列「handleCreateService」は、onCreateメソッドを呼び出したメソッドの名称(メソッド名)を示している。   The information group st [2] composed of information on the 9th to 12th lines in FIG. 6 includes information on a method that called the onCreate method indicated by the information group st [1]. The character string “* andrd * .app.ActivityThread” following “getClassName () =” on the ninth line indicates the name (class name) of the class in which the method that called the onCreate method is defined. “* Andrd * .app” of “* andrd * .app.ActivityThread” described in the ninth line is a package name, and “ActivityThread” is a name of a single class. The character string “ActivityThread. * Jv *” following “getFileName () =” on the 10th line is the name (file name) of the source file in which the code for executing the method that called the onCreate method is described. The number 1945 following “getLineNumber () =” on the eleventh line indicates the line number in the source file in which the code for executing the method that called the onCreate method is described. The character string “handleCreateService” following “getMethodName () =” on the 12th line indicates the name (method name) of the method that called the onCreate method.

図8は、onCreateメソッドを呼び出したメソッドが記述されたソースコードの一例を示している。このソースコードは、情報群st[2]に含まれる「ActivityThread.*jv*」がファイル名であるソースファイルに記載されているコードである。このソースコードにおいて、ActivityThreadクラス(情報群st[2]に含まれる「*andrd*.app.ActivityThread」に対応)で定義されているhandleCreateServiceメソッド(情報群st[2]に含まれる「handleCreateService」に対応)内で、情報群st[1]が示すonCreateメソッドが呼び出されている。また、onCreateメソッドを呼び出すコードは、情報群st[2]に含まれる行番号に対応する1945行目に記載されている。   FIG. 8 shows an example of source code in which a method that calls the onCreate method is described. This source code is a code described in a source file whose file name is “ActivityThread. * Jv *” included in the information group st [2]. In this source code, the handleCreateService method (corresponding to “* andrd * .app.ActivityThread” included in the information group st [2]) defined in the activityThread class (“handleCreateService” included in the information group st [2]) The onCreate method indicated by the information group st [1] is called. The code for calling the onCreate method is described in the 1945th line corresponding to the line number included in the information group st [2].

上記のように、情報群st[n+1]の情報は、情報群st[n](nは0以上の整数)が示すメソッド(API)を呼び出したメソッドの情報を含む。図6の情報群st[3]〜st[7]も同様である。なお、図6では、情報群st[7]が示すメソッドを呼び出したメソッド等の情報は省略されている。図6に示す情報と、API11aが呼び出された時刻と、情報取得部12がステップS200で取得したパッケージ名との組合せがコンテキストデータCDとして保存される。   As described above, the information of the information group st [n + 1] includes information of a method that calls a method (API) indicated by the information group st [n] (n is an integer of 0 or more). The same applies to the information groups st [3] to st [7] in FIG. In FIG. 6, information such as a method that calls a method indicated by the information group st [7] is omitted. The combination of the information shown in FIG. 6, the time when the API 11a is called, and the package name acquired by the information acquisition unit 12 in step S200 is stored as context data CD.

本実施形態では、アプリケーション10からAPI11aが呼び出される毎に1つのコンテキストデータCDが生成され、保存される。例えば、第1のAPIが呼び出された後、第2のAPIが呼び出される場合、第1のAPIが呼び出されたときに第1のAPIに関するコンテキストデータCDが生成されて保存され、その後、第2のAPIが呼び出されたときに第2のAPIに関するコンテキストデータCDが生成されて保存される。   In this embodiment, each time the API 11a is called from the application 10, one context data CD is generated and stored. For example, when the second API is called after the first API is called, the context data CD related to the first API is generated and stored when the first API is called, and then the second API is called. When the API is called, context data CD relating to the second API is generated and stored.

それぞれのコンテキストデータCDは、コンテキストデータCDに含まれる時刻によって区別される。あるいは、それぞれのコンテキストデータCDにシーケンス番号等のIDを付与し、そのIDによってそれぞれのコンテキストデータCDを区別してもよい。それぞれのコンテキストデータCDは、上記の情報群のうち複数の情報群(例えば情報群st[0],st[1],st[2])の情報を含む。コンテキストデータCDには、それぞれの情報群を識別する識別情報(例えば、st[0]等の文字列)が含まれており、この識別情報によって各情報群が区別される。   Each context data CD is distinguished by the time included in the context data CD. Alternatively, an ID such as a sequence number may be assigned to each context data CD, and each context data CD may be distinguished by the ID. Each context data CD includes information of a plurality of information groups (for example, information groups st [0], st [1], st [2]) among the above information groups. The context data CD includes identification information for identifying each information group (for example, a character string such as st [0]), and each information group is distinguished by this identification information.

情報取得部12から与えられた情報をコンテキストデータCDとして保存した後、セキュリティポリシー判定部13は記憶部19内のセキュリティデータSDの記憶領域からセキュリティポリシーSPを読み出す(ステップS305)。続いて、セキュリティポリシー判定部13は、呼び出されたAPI11aに関する情報がセキュリティポリシーSPに登録されているか否かを判定する(ステップS310)。   After saving the information given from the information acquisition unit 12 as context data CD, the security policy determination unit 13 reads the security policy SP from the storage area of the security data SD in the storage unit 19 (step S305). Subsequently, the security policy determination unit 13 determines whether information regarding the called API 11a is registered in the security policy SP (step S310).

セキュリティポリシーSPには、API11aの実行制御情報と、パッケージ名と、コンテキストデータCDに含まれる情報群st[1]のクラス名、メソッド名、行番号とを一組とした情報が登録される。セキュリティポリシーSPには、この一組の情報を登録の単位として複数組登録することが可能である。後述するように、格納処理部18によって、セキュリティポリシーSPに対する情報の登録が行われる。   Registered in the security policy SP is a set of API 11a execution control information, package name, and class name, method name, and line number of the information group st [1] included in the context data CD. A plurality of sets of this set of information can be registered in the security policy SP as a registration unit. As will be described later, the storage processing unit 18 registers information for the security policy SP.

API11aの実行制御情報は、APIの実行の許可、APIの実行の拒否、ダミー情報の利用のいずれかを示す情報である。ダミー情報とは、API11aとして情報取得APIがアプリケーション10によって呼び出された場合に、アプリケーション10に対して返答する虚偽の情報である。例えば、位置情報を取得するAPI11aが呼び出された場合、端末装置の現在の位置と異なる位置の情報がダミー情報としてアプリケーション10に対して返答される。   The execution control information of the API 11a is information indicating either permission of API execution, rejection of API execution, or use of dummy information. The dummy information is false information that is returned to the application 10 when the information acquisition API is called by the application 10 as the API 11a. For example, when the API 11a for acquiring position information is called, information on a position different from the current position of the terminal device is returned to the application 10 as dummy information.

情報取得部12から与えられた情報の一部(パッケージ名、コンテキストデータCDに含まれる情報群St[1]のクラス名、メソッド名、行番号)が、セキュリティポリシーSPに登録されている一組の情報(パッケージ名、クラス名、メソッド名、行番号)のいずれかと完全に一致した場合、呼び出されたAPI11aに関する情報がセキュリティポリシーSPに登録されている。また、情報取得部12から与えられた情報の一部(パッケージ名、コンテキストデータCDに含まれる情報群St[1]のクラス名、メソッド名、行番号)が、セキュリティポリシーSPに登録されている一組の情報(パッケージ名、クラス名、メソッド名、行番号)のいずれとも一致しなかった場合、呼び出されたAPI11aに関する情報はセキュリティポリシーSPに登録されていない。   A set in which a part of information given from the information acquisition unit 12 (package name, class name, method name, and line number of the information group St [1] included in the context data CD) is registered in the security policy SP. Information (package name, class name, method name, line number), information on the called API 11a is registered in the security policy SP. A part of the information given from the information acquisition unit 12 (package name, class name, method name, and line number of the information group St [1] included in the context data CD) is registered in the security policy SP. If none of the set of information (package name, class name, method name, line number) matches, the information about the called API 11a is not registered in the security policy SP.

呼び出されたAPI11aに関する情報がセキュリティポリシーSPに登録されている場合、セキュリティポリシー判定部13は、呼び出されたAPI11aに関してセキュリティポリシーSPに登録されている実行制御情報がダミー情報の利用を示しているか否かを判定する(ステップS315)。実行制御情報がダミー情報の利用を示している場合、セキュリティポリシー判定部13は、API11aにダミー情報を利用させることを示す情報をAPI実行部11に与える(ステップS320)。API実行部11は、セキュリティポリシー判定部13から与えられた情報に基づいて処理を実行する(図3のステップS105)。このとき、API実行部11は、例えばダミー情報の格納場所として予め決められている場所から情報を読み出すAPIを実行してダミー情報を取得する。   When the information regarding the called API 11a is registered in the security policy SP, the security policy determination unit 13 determines whether the execution control information registered in the security policy SP regarding the called API 11a indicates the use of dummy information. Is determined (step S315). When the execution control information indicates the use of dummy information, the security policy determination unit 13 gives the API execution unit 11 information indicating that the dummy information is used by the API 11a (step S320). The API execution unit 11 executes processing based on the information given from the security policy determination unit 13 (step S105 in FIG. 3). At this time, the API execution unit 11 acquires dummy information by executing an API that reads information from a predetermined location as a dummy information storage location, for example.

実行制御情報がダミー情報の利用を示していない場合、セキュリティポリシー判定部13は、実行制御情報がAPIの実行の許可を示しているか否かを判定する(ステップS330)。実行制御情報がAPIの実行の許可を示している場合、セキュリティポリシー判定部13は、API11aの実行を許可することを示す情報をAPI実行部11に与える(ステップS335)。API実行部11は、セキュリティポリシー判定部13から与えられた情報に基づいてAPI11aに処理を実行させる(図3のステップS105)。   If the execution control information does not indicate the use of dummy information, the security policy determination unit 13 determines whether or not the execution control information indicates that API execution is permitted (step S330). If the execution control information indicates that API execution is permitted, the security policy determination unit 13 provides the API execution unit 11 with information indicating that execution of the API 11a is permitted (step S335). The API execution unit 11 causes the API 11a to execute a process based on the information given from the security policy determination unit 13 (step S105 in FIG. 3).

また、実行制御情報がAPIの実行の許可を示していない場合、実行制御情報はAPIの実行の拒否を示している。この場合、セキュリティポリシー判定部13は、API11aの実行を拒否することを示す情報をAPI実行部11に与える(ステップS340)。API実行部11は、セキュリティポリシー判定部13から与えられた情報に基づいてAPI11aの処理を中止する(図3のステップS105)。   Further, when the execution control information does not indicate permission of API execution, the execution control information indicates rejection of API execution. In this case, the security policy determination unit 13 gives the API execution unit 11 information indicating that the execution of the API 11a is rejected (step S340). The API execution unit 11 stops the processing of the API 11a based on the information given from the security policy determination unit 13 (step S105 in FIG. 3).

ステップS310において、呼び出されたAPI11aに関する情報がセキュリティポリシーSPに登録されていない場合、セキュリティポリシー判定部13はソケット生成部14に処理を指示する(ステップS325)。   In step S310, when the information regarding the called API 11a is not registered in the security policy SP, the security policy determination unit 13 instructs the socket generation unit 14 to perform processing (step S325).

本実施形態のセキュリティポリシーSPでは、メソッド名だけでなく、パッケージ名、クラス名、行番号が実行制御情報と関連付けられている。これによって、どのアプリケーションからAPI11aが呼び出されたのか、どのクラスで定義されているメソッドからAPI11aが呼び出されたのか、ソースファイル中のどの位置で記述されたメソッドからAPI11aが呼び出されたのかといった、API11aが実行される際の詳細な状況に応じて、API11aの実行を制御することができる。   In the security policy SP of this embodiment, not only the method name but also the package name, class name, and line number are associated with the execution control information. As a result, the API 11a, such as from which application the API 11a is called, from which method the API 11a is called from which method is defined, and from which position in the source file the API 11a is called The execution of the API 11a can be controlled in accordance with the detailed situation when is executed.

セキュリティポリシー判定部13から指示を受けたソケット生成部14は、図9に示す処理を実行する。まず、ソケット生成部14は、入力部20を介してユーザによって入力される情報を格納するためのソケットSKを生成する(ステップS400)。一例として、LocalServerSocketクラスのインスタンスを初期化する際にString型の名前を与えることでUnix(登録商標)ドメインソケットを生成することができる。ソケットSKには記憶部19の記憶領域が使用される。ソケットSKを生成したソケット生成部14は、起動部15に処理を指示する(ステップS405)。このとき、ソケット生成部14は、生成したソケットSKを識別するアドレス情報を起動部15に通知する。   Upon receiving an instruction from the security policy determination unit 13, the socket generation unit 14 executes the process shown in FIG. First, the socket generation unit 14 generates a socket SK for storing information input by the user via the input unit 20 (step S400). As an example, a Unix (registered trademark) domain socket can be generated by giving a String type name when initializing an instance of the LocalServerSocket class. The storage area of the storage unit 19 is used for the socket SK. The socket generation unit 14 that has generated the socket SK instructs the activation unit 15 to perform processing (step S405). At this time, the socket generation unit 14 notifies the activation unit 15 of address information for identifying the generated socket SK.

ソケット生成部14から指示を受けた起動部15は、図10に示す処理を実行する。まず、起動部15は、記憶部19内のセキュリティデータSDの記憶領域からコンテキストデータCDを読み出す(ステップS500)。このとき読み出されるコンテキストデータCDは、直近(最後)に呼び出されたAPI11aに関するコンテキストデータCDである。コンテキストデータCDに含まれる時刻が最も新しいコンテキストデータCDが、直近に呼び出されたAPI11aに関するコンテキストデータCDである。あるいは、コンテキストデータCD毎にシーケンス番号が付与される場合、そのシーケンス番号から、直近に呼び出されたAPI11aに関するコンテキストデータCDを識別してもよい。   Upon receiving the instruction from the socket generation unit 14, the activation unit 15 executes the process illustrated in FIG. First, the activation unit 15 reads the context data CD from the storage area of the security data SD in the storage unit 19 (step S500). The context data CD read at this time is the context data CD related to the API 11a that was called most recently (last). The context data CD having the latest time included in the context data CD is the context data CD related to the API 11a that has been called most recently. Alternatively, when a sequence number is assigned to each context data CD, the context data CD related to the API 11a that is called most recently may be identified from the sequence number.

続いて、起動部15は、ソケット生成部14から通知されたアドレス情報を含むActivityのインテントを発行し、通知部17および格納処理部18を起動する(ステップS505)。通知部17および格納処理部18を起動するためのインテントにソケットSKのアドレス情報が含まれるため、通知部17および格納処理部18に情報を効率的に通知することができる。続いて、起動部15は、実行制御部16に処理を指示する(ステップS510)。   Subsequently, the activation unit 15 issues an Activity intent including the address information notified from the socket generation unit 14, and activates the notification unit 17 and the storage processing unit 18 (step S505). Since the intent for starting the notification unit 17 and the storage processing unit 18 includes the address information of the socket SK, the information can be efficiently notified to the notification unit 17 and the storage processing unit 18. Subsequently, the activation unit 15 instructs the execution control unit 16 to perform processing (step S510).

起動した通知部17は、図11に示す処理を実行する。まず、通知部17は、API11aが実行されようとしていることを示すメッセージを表示部21に表示する(ステップS600)。このとき、例えばポップアップウィンドウが表示され、そのポップアップウィンドウにメッセージが表示される。続いて、通知部17は、格納処理部18に処理を指示する(ステップS605)。   The activated notification unit 17 executes the process shown in FIG. First, the notification unit 17 displays a message on the display unit 21 indicating that the API 11a is about to be executed (step S600). At this time, for example, a pop-up window is displayed, and a message is displayed in the pop-up window. Subsequently, the notification unit 17 instructs the storage processing unit 18 to perform processing (step S605).

API11aを実行しようとしているアプリケーション10の種類や実行対象のAPI11aの種類を明示的にユーザに通知するため、アプリケーション10やAPI11aを識別する情報がメッセージに含まれていてもよい。この場合、例えば起動部15が発行するインテントに、コンテキストデータCDに含まれるパッケージ名および情報群St[0]のメソッド名が含まれ、このパッケージ名およびメソッド名がメッセージと共に表示される。   In order to explicitly notify the user of the type of the application 10 that is about to execute the API 11a and the type of the API 11a to be executed, information for identifying the application 10 or the API 11a may be included in the message. In this case, for example, the intent issued by the activation unit 15 includes the package name included in the context data CD and the method name of the information group St [0], and the package name and the method name are displayed together with the message.

図12は、表示されるメッセージの一例を示している。表示部21の画面にウィンドウ210が表示されている。ウィンドウ210では、API11aを実行しようとしているアプリケーション10のパッケージ名(Maps)と、実行対象のAPI11aのメソッド名(requestLocationUpdates)とを含むメッセージが表示され、どのアプリケーション10がどのAPI11aを実行しようとしているのかがユーザに通知される。   FIG. 12 shows an example of the displayed message. A window 210 is displayed on the screen of the display unit 21. In the window 210, a message including the package name (Maps) of the application 10 that is going to execute the API 11a and the method name (requestLocationUpdates) of the API 11a to be executed is displayed, and which application 10 is about to execute which API 11a. Is notified to the user.

また、ウィンドウ210では、ユーザがAPIの実行の許可/拒否を選択するためのボタン211,212が表示されている。ユーザが入力部20を用いてボタン211を操作した場合には、APIの実行の許可を示す情報が入力され、ユーザが入力部20を用いてボタン212を操作した場合には、APIの実行の拒否を示す情報が入力される。図12では、ダミー情報の利用の許可/拒否を選択するためのボタンは表示されていないが、表示してもよい。   In the window 210, buttons 211 and 212 for the user to select permission / rejection of API execution are displayed. When the user operates the button 211 using the input unit 20, information indicating that API execution is permitted is input. When the user operates the button 212 using the input unit 20, the API execution is performed. Information indicating rejection is input. In FIG. 12, a button for selecting permission / rejection of use of dummy information is not displayed, but may be displayed.

また、ウィンドウ210では、入力された情報をセキュリティポリシーSPに登録するか否かをユーザが選択するためのチェックボックス213が表示されている。ユーザが入力部20を用いてチェックボックス213にチェックを入れると、入力された情報がセキュリティポリシーSPに登録され、次に同じAPI11aが実行されるときにセキュリティポリシーSPに基づいてAPI11aの実行が制御される。   In the window 210, a check box 213 for the user to select whether or not to register the input information in the security policy SP is displayed. When the user checks the check box 213 using the input unit 20, the input information is registered in the security policy SP, and when the same API 11a is executed next, execution of the API 11a is controlled based on the security policy SP. Is done.

通知部17から指示を受けた格納処理部18は、図13に示す処理を実行する。まず、格納処理部18は、入力部20を介して入力される情報の監視を開始する(ステップS700)。通知部17によってメッセージが表示された後、メッセージを確認したユーザによって入力部20が操作され、APIの実行の許可、APIの実行の拒否、ダミー情報の利用のいずれかを示す情報が入力される。格納処理部18は、入力部20を介してユーザによって情報が入力されたか否かを判定する(ステップS705)。情報が入力されていない場合、格納処理部18はステップS705の判定を繰り返す。   Upon receipt of the instruction from the notification unit 17, the storage processing unit 18 executes the process shown in FIG. First, the storage processing unit 18 starts monitoring information input via the input unit 20 (step S700). After the message is displayed by the notification unit 17, the input unit 20 is operated by the user who has confirmed the message, and information indicating one of permission of API execution, rejection of API execution, and use of dummy information is input. . The storage processing unit 18 determines whether information is input by the user via the input unit 20 (step S705). If no information is input, the storage processing unit 18 repeats the determination in step S705.

また、情報が入力された場合、格納処理部18は、ユーザによって入力された、APIの実行の許可、APIの実行の拒否、ダミー情報の利用のいずれかを示す実行制御情報を、起動部15が発行したインテントにより通知されたアドレス情報が示すソケットSKに格納する(ステップS710)。続いて、格納処理部18は、セキュリティポリシーSPに情報を登録するか否かを判定する(ステップS715)。   When the information is input, the storage processing unit 18 displays the execution control information that is input by the user and indicates one of API execution permission, API execution denial, and dummy information use. Is stored in the socket SK indicated by the address information notified by the intent issued by (step S710). Subsequently, the storage processing unit 18 determines whether or not to register information in the security policy SP (step S715).

セキュリティポリシーSPに情報を登録する指示がユーザによって入力されていない場合、格納処理部18は処理を終了する。また、セキュリティポリシーSPに情報を登録する指示がユーザによって入力された場合、格納処理部18は、記憶部19のセキュリティデータSDの記憶領域から、直近に呼び出されたAPI11aに関するコンテキストデータCDを読み出す(ステップS720)。格納処理部18は、読み出したコンテキストデータCDに含まれる情報のうち、パッケージ名と、情報群st[1]のクラス名、メソッド名、行番号と、ユーザによって入力された、APIの実行の許可、APIの実行の拒否、ダミー情報の利用のいずれかを示す実行制御情報とを、セキュリティポリシーSPとして、記憶部19内のセキュリティデータSDの記憶領域に格納する(ステップS725)。上記の処理の終了後、ユーザ通知部17および格納処理部18は動作を停止する。   If an instruction to register information in the security policy SP has not been input by the user, the storage processing unit 18 ends the process. Further, when an instruction to register information in the security policy SP is input by the user, the storage processing unit 18 reads the context data CD related to the API 11a that has been called most recently from the storage area of the security data SD in the storage unit 19 ( Step S720). The storage processing unit 18 includes the package name, the class name, the method name, the line number of the information group st [1] among the information included in the read context data CD, and the API execution permission input by the user. The execution control information indicating either API rejection or dummy information usage is stored in the storage area of the security data SD in the storage unit 19 as the security policy SP (step S725). After completion of the above processing, the user notification unit 17 and the storage processing unit 18 stop operating.

起動部15から指示を受けた実行制御部16は、図14に示す処理を実行する。まず、実行制御部16はソケットSKの監視を開始する(ステップS800)。続いて、実行制御部16は、ソケットSKに実行制御情報が格納されたか否かを判定する(ステップS805)。ソケットSKに実行制御情報が格納されていない場合、実行制御部16はステップS805の判定を繰り返す。   The execution control unit 16 that has received an instruction from the activation unit 15 executes the process shown in FIG. First, the execution control unit 16 starts monitoring the socket SK (step S800). Subsequently, the execution control unit 16 determines whether or not execution control information is stored in the socket SK (step S805). If the execution control information is not stored in the socket SK, the execution control unit 16 repeats the determination in step S805.

また、ソケットSKに実行制御情報が格納された場合、実行制御部16はソケットSKから実行制御情報を読み出す(ステップS810)。続いて、実行制御部16は、ソケットSKから読み出した実行制御情報がダミー情報の利用を示しているか否かを判定する(ステップS815)。実行制御情報がダミー情報の利用を示している場合、実行制御部16は、API11aにダミー情報を利用させることを示す情報をAPI実行部11に与える(ステップS820)。API実行部11は、実行制御部16から与えられた情報に基づいて処理を実行する(図3のステップS105)。このとき、API実行部11は、例えばダミー情報の格納場所として予め決められている場所から情報を読み出すAPIを実行してダミー情報を取得する。   If execution control information is stored in the socket SK, the execution control unit 16 reads the execution control information from the socket SK (step S810). Subsequently, the execution control unit 16 determines whether or not the execution control information read from the socket SK indicates use of dummy information (step S815). If the execution control information indicates the use of dummy information, the execution control unit 16 provides the API execution unit 11 with information indicating that the API 11a uses the dummy information (step S820). The API execution unit 11 executes processing based on the information given from the execution control unit 16 (step S105 in FIG. 3). At this time, the API execution unit 11 acquires dummy information by executing an API that reads information from a predetermined location as a dummy information storage location, for example.

実行制御情報がダミー情報の利用を示していない場合、実行制御部16は、実行制御情報がAPIの実行の許可を示しているか否かを判定する(ステップS825)。実行制御情報がAPIの実行の許可を示している場合、実行制御部16は、API11aの実行を許可することを示す情報をAPI実行部11に与える(ステップS830)。API実行部11は、実行制御部16から与えられた情報に基づいてAPI11aに処理を実行させる(図3のステップS105)。   If the execution control information does not indicate use of dummy information, the execution control unit 16 determines whether or not the execution control information indicates permission to execute the API (step S825). If the execution control information indicates permission to execute the API, the execution control unit 16 provides the API execution unit 11 with information indicating that the execution of the API 11a is permitted (step S830). The API execution unit 11 causes the API 11a to execute a process based on the information given from the execution control unit 16 (step S105 in FIG. 3).

また、実行制御情報がAPIの実行の許可を示していない場合、実行制御情報はAPIの実行の拒否を示している。この場合、実行制御部16は、API11aの実行を拒否することを示す情報をAPI実行部11に与える(ステップS835)。API実行部11は、実行制御部16から与えられた情報に基づいてAPI11aの処理を中止する(図3のステップS105)。   Further, when the execution control information does not indicate permission of API execution, the execution control information indicates rejection of API execution. In this case, the execution control unit 16 gives the API execution unit 11 information indicating that the execution of the API 11a is rejected (step S835). The API execution unit 11 stops the processing of the API 11a based on the information given from the execution control unit 16 (step S105 in FIG. 3).

上記のように、API実行制御部30は、アプリケーション10が所定のAPI11aを実行しようとするときにユーザに通知を行い、入力部20を介してユーザによって入力される情報に基づいて、API11aの実行を制御する。これによって、パーミッションを必要とする動作時等にユーザがアプリケーションの動作を事前に把握し、アプリケーションの動作を制御することができる。また、API実行制御部30は、同じアプリケーション10によって所定のAPI11aが再度呼び出されるときには、セキュリティポリシーSPに登録されている実行制御情報に基づいて、API11aの実行を制御する。これによって、ユーザにとって手間となりうる確認の作業を省略することができる。   As described above, the API execution control unit 30 notifies the user when the application 10 tries to execute the predetermined API 11a, and executes the API 11a based on information input by the user via the input unit 20. To control. As a result, the user can grasp the operation of the application in advance and control the operation of the application at the time of the operation requiring permission. Further, when a predetermined API 11a is called again by the same application 10, the API execution control unit 30 controls the execution of the API 11a based on the execution control information registered in the security policy SP. As a result, it is possible to omit the confirmation work that can be troublesome for the user.

次に、本実施形態で用いる要素技術のうち、上記で説明していない他の要素技術の内容を説明する。   Next, among the elemental technologies used in the present embodiment, the contents of other elemental technologies not described above will be described.

前述したように、本実施形態で制御の対象とするAPIを定義するクラス(TelephonyManagerクラス等)のコードに対して、API実行部11および情報取得部12が実行する処理を規定するコードが追加されている。API実行部11および情報取得部12は、アプリケーション10がAPI11aを呼び出したときにアプリケーション10と同一のプロセスで処理を行う。   As described above, the code that defines the processing executed by the API execution unit 11 and the information acquisition unit 12 is added to the code of the class (TelephonyManager class or the like) that defines the API to be controlled in this embodiment. ing. The API execution unit 11 and the information acquisition unit 12 perform processing in the same process as the application 10 when the application 10 calls the API 11a.

また、前述したように、アプリケーションフレームワークで提供されているPackageManagerServiceクラスのコードに対して、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16の各部が実行する処理を規定するコードが追加されている。これにより、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16の各部は同一のプロセスで処理を行う。また、前述したように、通知部17、格納処理部18が実行する処理を規定するコードを含むアプリケーションプログラムが用意されている。これにより、通知部17および格納処理部18は同一のプロセスで処理を行う。   Further, as described above, the processing executed by the security policy determination unit 13, the socket generation unit 14, the activation unit 15, and the execution control unit 16 is defined for the code of the PackageManagerService class provided by the application framework. The code to be added has been added. Thereby, each part of the security policy determination part 13, the socket production | generation part 14, the starting part 15, and the execution control part 16 processes by the same process. Further, as described above, an application program including a code that defines processing executed by the notification unit 17 and the storage processing unit 18 is prepared. Thereby, the notification unit 17 and the storage processing unit 18 perform processing in the same process.

Android(登録商標)では、通常、UID(User ID)と呼ばれる、プロセス毎に異なるIDがプロセスに与えられ、UIDが異なるプロセス間ではリソースを共有することができない。セキュリティデータSDを共有するため、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16、通知部17、格納処理部18には、同一のUIDが与えられ、これらの各部は同一のプロセスで処理を行う。   In Android (registered trademark), an ID that is different for each process, usually called UID (User ID), is given to the process, and resources cannot be shared between processes with different UIDs. In order to share the security data SD, the security policy determination unit 13, the socket generation unit 14, the activation unit 15, the execution control unit 16, the notification unit 17, and the storage processing unit 18 are given the same UID. Process in the same process.

本実施形態では、アプリケーション10が直接セキュリティデータSDにアクセスしてセキュリティデータSDの内容を改竄できないようにするため、アプリケーション10のプロセスと、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16、通知部17、格納処理部18のプロセスとには、異なるUIDが与えられる。また、アプリケーション10のプロセスにはセキュリティデータSDにアクセスできるパーミッションが与えられておらず、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16、通知部17、格納処理部18のプロセスにはセキュリティデータSDにアクセスできるパーミッションが与えられている。上記によって、セキュリティデータSDの安全性を高めることができる。   In the present embodiment, in order to prevent the application 10 from directly accessing the security data SD and tampering with the contents of the security data SD, the process of the application 10, the security policy determination unit 13, the socket generation unit 14, the activation unit 15, Different UIDs are given to the processes of the execution control unit 16, the notification unit 17, and the storage processing unit 18. Further, the process of the application 10 is not given permission to access the security data SD, and the security policy determination unit 13, socket generation unit 14, activation unit 15, execution control unit 16, notification unit 17, storage processing unit 18. This process is given permission to access the security data SD. As described above, the security of the security data SD can be improved.

上記のように同一のUIDを与える仕組みとして、sharedUserIdという仕組みがある。通知部17、格納処理部18の機能を実現するアプリケーションのパッケージファイルが生成される際に、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16の機能を実現するPackageManagerServiceクラスのコードで使用されているUIDと同一のUIDを使用するsharedUserIdのコードが、アプリケーションのソースファイルに含まれるマニフェストファイルに記述される。   As a mechanism for giving the same UID as described above, there is a mechanism called sharedUserId. PackageManagerService class that realizes the functions of the security policy determination unit 13, the socket generation unit 14, the activation unit 15, and the execution control unit 16 when a package file of an application that realizes the functions of the notification unit 17 and the storage processing unit 18 is generated. The code of sharedUserId that uses the same UID as the UID used in this code is described in the manifest file included in the application source file.

続いて、PackageManagerServiceクラスのコードのアセンブル(コンパイル)時に使用される鍵(プラットフォームキー)と同一の鍵を用いて、アプリケーションの全てのソースファイルに署名を施した後、アセンブルを行い、パッケージファイルを生成する。これによって、通知部17および格納処理部18に対して、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16に与えられるUIDと同一のUIDを与えることができる。したがって、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16、通知部17、格納処理部18は同一のプロセスで処理を行い、セキュリティデータSDを共有することができる。また、ソケットSKも共有することができる。   Next, after signing all the source files of the application using the same key (platform key) used when assembling (compiling) the code of the PackageManagerService class, assemble and generate a package file To do. Thereby, the same UID as the UID given to the security policy determination unit 13, the socket generation unit 14, the activation unit 15, and the execution control unit 16 can be given to the notification unit 17 and the storage processing unit 18. Therefore, the security policy determination unit 13, the socket generation unit 14, the activation unit 15, the execution control unit 16, the notification unit 17, and the storage processing unit 18 can perform processing in the same process and share the security data SD. Also, the socket SK can be shared.

本実施形態では、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16は、端末装置の起動後、バックグラウンドで動作する。したがって、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16は、アプリケーション10の動作中でもバックグラウンドで動作している。   In the present embodiment, the security policy determination unit 13, the socket generation unit 14, the activation unit 15, and the execution control unit 16 operate in the background after the terminal device is activated. Therefore, the security policy determination unit 13, the socket generation unit 14, the activation unit 15, and the execution control unit 16 are operating in the background even while the application 10 is operating.

アプリケーション10によって呼び出されたAPI11aに関する情報がセキュリティポリシーSPに登録されている場合、ユーザによる確認が行われることなく、セキュリティポリシーSPに登録されている実行制御情報に基づいて、API11aの実行が制御される。これによって、アプリケーション10による処理が中断する時間を短くし、処理速度が向上する。また、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16がバックグラウンドで動作することによって、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16の起動に必要な時間を省略することができるため、処理速度がより向上する。   When information related to the API 11a called by the application 10 is registered in the security policy SP, the execution of the API 11a is controlled based on the execution control information registered in the security policy SP without confirmation by the user. The This shortens the time during which the processing by the application 10 is interrupted and improves the processing speed. Further, the security policy determination unit 13, the socket generation unit 14, the activation unit 15, and the execution control unit 16 operate in the background, so that the security policy determination unit 13, the socket generation unit 14, the activation unit 15, and the execution control unit 16 Since the time required for activation can be omitted, the processing speed is further improved.

次に、本実施形態で制御の対象とする各APIに対して上記の制御を適用した例を説明する。   Next, an example in which the above control is applied to each API to be controlled in this embodiment will be described.

(1)情報取得APIへの適用
従来、アプリケーションが情報を利用する動作をパーミッションにより完全には制御できないという課題がある。例えば、端末内の情報の取得に関するパーミッションであるREAD_PHONE_STATEは、IMEIや、電話番号、IMSI等の様々な情報へのアクセスを制限している。ユーザにとって、自身の電話番号がアプリケーションの開発者に知られるのは怖いので電話番号へのアクセスを許可しないが、IMEIへのアクセスを許可しても良いというケースが考えられる。しかしながら、パーミッションに基づいてアプリケーションの動作に制限を与える機構では、各情報へのアクセスを個別に制御する仕組みがない。また、インストールされているアプリケーションの一覧等の情報へのアクセスにはパーミッションによる制限がなく、制御を行えない情報も存在する。本実施形態で説明した制御を、IMEIを取得するAPIであるgetDeviceId等の各情報取得APIに対して個別に適用することにより、端末に格納されている情報毎に利用を制限することができる。
(1) Application to information acquisition API Conventionally, there is a problem that an operation of an application using information cannot be completely controlled by permission. For example, READ_PHONE_STATE, which is a permission for acquiring information in the terminal, restricts access to various information such as IMEI, telephone number, and IMSI. For users, it is afraid that their phone number is known to the application developer, so access to the phone number is not allowed, but access to IMEI may be allowed. However, in the mechanism that restricts the operation of the application based on the permission, there is no mechanism for individually controlling access to each piece of information. In addition, access to information such as a list of installed applications is not limited by permissions, and there is information that cannot be controlled. By individually applying the control described in the present embodiment to each information acquisition API such as getDeviceId that is an API for acquiring IMEI, the use can be limited for each information stored in the terminal.

(2)パーミッション判定APIへの適用
実行にパーミッションが必要なAPIをアプリケーションが実行する際、OSは、アプリケーションが適切なパーミッションを有しているか否かを判定する。具体的には、パーミッション判定API であるCheckUidPermissionが実行され、アプリケーションが適切なパーミッションを有しているか否かの判定が行われる。本実施形態で説明した制御をCheckUidPermissionに対して適用することにより、パーミッションが必要なアプリケーションの動作をユーザが制御することができる。
(2) Application to permission determination API When an application executes an API that requires permission for execution, the OS determines whether or not the application has appropriate permission. Specifically, CheckUidPermission, which is a permission determination API, is executed to determine whether or not the application has appropriate permissions. By applying the control described in this embodiment to CheckUidPermission, the user can control the operation of an application that requires permission.

(3)一覧取得APIへの適用
端末にインストールされているアプリケーションの一覧を示す情報を取得するAPIであるgetInstallPackagesにはパーミッションによる制限が設けられていない。このように、パーミッションによる制限がないAPIの実行を制限したい場合に、本実施形態で説明した制御を適用すればよい。本実施形態で説明した制御をgetInstallPackagesに対して適用することにより、アプリケーションが、端末にインストールされているアプリケーションの一覧を示す情報を取得する動作をユーザが制御することができる。
(3) Application to List Acquisition API There is no permission restriction on getInstallPackages, which is an API that acquires information indicating a list of applications installed in the terminal. In this way, when it is desired to restrict the execution of an API that is not restricted by permissions, the control described in the present embodiment may be applied. By applying the control described in this embodiment to getInstallPackages, the user can control the operation in which the application acquires information indicating a list of applications installed in the terminal.

(4)外部送信APIへの適用
本実施形態で説明した制御を、外部送信API であるsendTextMessageに対して適用することにより、SMSクライアントアプリケーションが正規の振る舞いをしつつ、ユーザの意図とは無関係にバックグラウンドで不正に外部へ情報を送信しようとする場合でも、情報漏洩に繋がる可能性がある動作が行われようとしていることをユーザが知ることができる。また、ユーザが誤って、メッセージを送信するボタンを押した場合でも、送信動作を行うかどうかを確認するためのメッセージが表示されるので、ユーザは、誤操作を行った場合には送信動作を中止することができる。
(4) Application to external transmission API By applying the control described in this embodiment to sendTextMessage, which is an external transmission API, the SMS client application behaves normally, regardless of the user's intention. Even when information is illegally transmitted to the outside in the background, the user can know that an operation that may lead to information leakage is being performed. Even if the user accidentally presses the button to send a message, a message for confirming whether or not to perform the transmission operation is displayed. Therefore, if the user makes an erroneous operation, the transmission operation is canceled. can do.

(5)データベース参照APIへの適用
電話帳(アドレス帳)や通話履歴等の情報は、コンテンツプロバイダと呼ばれるデータベースで管理されている。アプリケーションは、コンテンツプロバイダから情報を取得する場合、データベース参照APIであるCursorの引数に、データベース内のアクセス先(データベース参照APIがアクセスするデータベース内の位置)を示す、URIと呼ばれる情報を指定する。アクセス先の情報毎に引数が異なる。
(5) Application to database reference API Information such as a phone book (address book) and a call history is managed in a database called a content provider. When acquiring information from a content provider, an application specifies information called URI indicating an access destination in the database (a position in the database accessed by the database reference API) as an argument of Cursor that is a database reference API. The argument varies depending on the information of the access destination.

図15は、Cursorの引数の一例を示している。com.*andrd*.contactcontactsは、電話帳へのアクセスの際に指定される引数である。call_logは、通話履歴へのアクセスの際に指定される引数である。browserは、ブックマークへのアクセスの際に指定される引数である。smsは、SMSメッセージ本文へのアクセスの際に指定される引数である。com.*andrd*.calendarは、カレンダーへのアクセスの際に指定される引数である。本実施形態で説明した制御を、Cursorで指定される引数毎に適用することにより、データベースに格納されている情報毎に利用を制限することができる。   FIG. 15 shows an example of an argument of Cursor. com. * andrd * .contactcontacts is an argument specified when accessing the phone book. call_log is an argument specified when accessing the call history. browser is an argument specified when accessing the bookmark. sms is an argument specified when accessing the SMS message body. com. * andrd * .calendar is an argument that is specified when accessing the calendar. By applying the control described in this embodiment for each argument specified by Cursor, the use can be limited for each information stored in the database.

図16は、Cursorに対応したAPI実行部11の動作を示している。まず、API実行部11は、Cursorの引数に指定された情報の内容を確認する(ステップS900)。続いて、API実行部11は、指定された引数がcom.*andrd*.contactcontactsであるか否か、すなわち電話帳へのアクセスが要求されているか否かを判定する(ステップS905)。指定された引数がcom.*andrd*.contactcontactsである場合、処理はステップS910に進む。   FIG. 16 shows the operation of the API execution unit 11 corresponding to the Cursor. First, the API execution unit 11 confirms the content of information specified as an argument of Cursor (step S900). Subsequently, the API execution unit 11 determines whether or not the designated argument is com. * Andrd * .contactcontacts, that is, whether or not access to the telephone directory is requested (step S905). If the specified argument is com. * Andrd * .contactcontacts, the process proceeds to step S910.

また、指定された引数がcom.*andrd*.contactcontactsでない場合、API実行部11は、指定された引数がcall_logであるか否か、すなわち通話履歴へのアクセスが要求されているか否かを判定する(ステップS925)。指定された引数がcall_logである場合、処理はステップS910に進む。   If the specified argument is not com. * Andrd * .contactcontacts, the API execution unit 11 determines whether the specified argument is call_log, that is, whether access to the call history is requested. (Step S925). If the specified argument is call_log, the process proceeds to step S910.

また、指定された引数がcall_logでない場合、API実行部11は、指定された引数がbrowserであるか否か、すなわちブックマークへのアクセスが要求されているか否かを判定する(ステップS930)。指定された引数がbrowserである場合、処理はステップS910に進む。   If the specified argument is not call_log, the API execution unit 11 determines whether the specified argument is a browser, that is, whether access to the bookmark is requested (step S930). If the specified argument is browser, the process proceeds to step S910.

また、指定された引数がbrowserでない場合、API実行部11は、指定された引数がsmsであるか否か、すなわちSMSメッセージの本文へのアクセスが要求されているか否かを判定する(ステップS935)。指定された引数がsmsである場合、処理はステップS910に進む。   If the designated argument is not a browser, the API execution unit 11 determines whether the designated argument is sms, that is, whether access to the text of the SMS message is requested (step S935). ). If the specified argument is sms, the process proceeds to step S910.

また、指定された引数がsmsでない場合、API実行部11は、指定された引数がcom.*andrd*.contactcontactsであるか否か、すなわちカレンダーへのアクセスが要求されているか否かを判定する(ステップS940)。指定された引数がcom.*andrd*.contactcontactsである場合、処理はステップS910に進む。また、指定された引数がcom.*andrd*.contactcontactsでない場合、処理はステップS945に進む。   If the specified argument is not sms, the API execution unit 11 determines whether the specified argument is com. * Andrd * .contactcontacts, that is, whether access to the calendar is requested. (Step S940). If the specified argument is com. * Andrd * .contactcontacts, the process proceeds to step S910. If the designated argument is not com. * Andrd * .contactcontacts, the process proceeds to step S945.

処理がステップS910に進んだ場合、API実行部11は、API11aを実行する前に情報取得部12に処理を指示する(ステップS910)。続いて、API実行部11は、セキュリティポリシー判定部13または実行制御部16から処理結果を受け取り、その処理結果に応じた処理を実行することによりAPI11aの実行を制御する(ステップS915)。続いて、API実行部11は実行結果をアプリケーション10に返す(ステップS920)。   When the process proceeds to step S910, the API execution unit 11 instructs the information acquisition unit 12 to execute the process before executing the API 11a (step S910). Subsequently, the API execution unit 11 receives the processing result from the security policy determination unit 13 or the execution control unit 16, and controls the execution of the API 11a by executing a process according to the processing result (step S915). Subsequently, the API execution unit 11 returns an execution result to the application 10 (step S920).

処理がステップS945に進んだ場合、API実行部11はAPI11aに処理を実行させる(ステップS945)。続いて、API実行部11は実行結果をアプリケーション10に返す(ステップS920)。   When the process proceeds to step S945, the API execution unit 11 causes the API 11a to execute the process (step S945). Subsequently, the API execution unit 11 returns an execution result to the application 10 (step S920).

上述したように、本実施形態によれば、アプリケーションがAPIを実行しようとする動作が検出された場合に、ユーザに通知が行われ、ユーザによって入力された情報に基づいて、APIの実行が制御される。これによって、ユーザがアプリケーションの動作を事前に把握し、アプリケーションの動作を制御することができる。   As described above, according to the present embodiment, when an operation that an application tries to execute an API is detected, the user is notified, and the execution of the API is controlled based on information input by the user. Is done. As a result, the user can grasp the operation of the application in advance and control the operation of the application.

また、セキュリティポリシーSPに登録されている実行制御情報に基づいてAPIの実行が制御される。これによって、ユーザにとって手間となりうる確認の作業が頻繁に行われることを防止することができる。   Further, API execution is controlled based on execution control information registered in the security policy SP. Accordingly, it is possible to prevent frequent confirmation work that may be troublesome for the user.

また、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16と、通知部17および格納処理部18とに同一のUIDが与えられている。これによって、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16、通知部17、格納処理部18が同一のプロセスで処理を行い、セキュリティデータSDを共有することができる。   The same UID is given to the security policy determination unit 13, the socket generation unit 14, the activation unit 15, the execution control unit 16, the notification unit 17, and the storage processing unit 18. Accordingly, the security policy determination unit 13, the socket generation unit 14, the activation unit 15, the execution control unit 16, the notification unit 17, and the storage processing unit 18 can perform processing in the same process and share the security data SD.

また、アプリケーション10と、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16、通知部17、格納処理部18とに異なるUIDが与えられている。さらに、アプリケーション10のプロセスにはセキュリティデータSDにアクセスできる権限(パーミッション)が与えられず、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16、通知部17、格納処理部18のプロセスにはセキュリティデータSDにアクセスできる権限(パーミッション)が与えられている。これによって、アプリケーション10がセキュリティデータSDにアクセスすることを防止することができる。   Different UIDs are assigned to the application 10, the security policy determination unit 13, the socket generation unit 14, the activation unit 15, the execution control unit 16, the notification unit 17, and the storage processing unit 18. In addition, the process of the application 10 is not given authority to access the security data SD, and the security policy determination unit 13, the socket generation unit 14, the activation unit 15, the execution control unit 16, the notification unit 17, and the storage processing unit The process 18 is given the authority (permission) to access the security data SD. As a result, the application 10 can be prevented from accessing the security data SD.

また、セキュリティポリシー判定部13、ソケット生成部14、起動部15、実行制御部16がバックグラウンドで動作することによって、処理速度が向上する。   In addition, the processing speed is improved by the security policy determination unit 13, the socket generation unit 14, the activation unit 15, and the execution control unit 16 operating in the background.

また、データベース参照APIの引数に応じてAPIの実行を制御することによって、データベースに格納されている情報毎に利用を制限することができる。   Further, by controlling the execution of the API according to the argument of the database reference API, it is possible to restrict the use for each piece of information stored in the database.

また、Activityで構成されている通知部17がユーザに通知を行うことによって、アプリケーション10がServiceによって動作する場合でも、ユーザに通知を行うことができる。   Further, the notification unit 17 configured by Activity notifies the user, so that the user can be notified even when the application 10 is operated by Service.

また、通知部17および格納処理部18を起動するために起動部15が発行するインテントにソケットSKのアドレス情報が含まれるため、通知部17および格納処理部18に情報を効率的に通知することができる。   In addition, since the address information of the socket SK is included in the intent issued by the activation unit 15 to activate the notification unit 17 and the storage processing unit 18, the information is efficiently notified to the notification unit 17 and the storage processing unit 18. be able to.

以上、図面を参照して本発明の実施形態について詳述してきたが、具体的な構成は上記の実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。   As described above, the embodiments of the present invention have been described in detail with reference to the drawings. However, the specific configuration is not limited to the above-described embodiments, and includes design changes and the like without departing from the gist of the present invention. .

10・・・アプリケーション、11・・・API実行部(検出部)、12・・・情報取得部、13・・・セキュリティポリシー判定部、14・・・ソケット生成部、15・・・起動部、16・・・実行制御部(制御部)、17・・・通知部、18・・・格納処理部、19・・・記憶部、20・・・入力部、21・・・表示部、22・・・通信部、30・・・API実行制御部   DESCRIPTION OF SYMBOLS 10 ... Application, 11 ... API execution part (detection part), 12 ... Information acquisition part, 13 ... Security policy determination part, 14 ... Socket generation part, 15 ... Starting part, 16 ... execution control unit (control unit), 17 ... notification unit, 18 ... storage processing unit, 19 ... storage unit, 20 ... input unit, 21 ... display unit, 22. ..Communication unit, 30 ... API execution control unit

Claims (11)

アプリケーションがAPI(Application Program Interface)を実行しようとする動作を検出する検出部と、
前記動作が検出された場合に、ユーザに通知を行う通知部と、
前記通知部がユーザに通知を行った後、ユーザによって入力された情報に基づいて、前記APIの実行を制御する制御部と、
を備えたことを特徴とするAPI実行制御装置。
A detection unit that detects an operation of an application to execute an API (Application Program Interface);
A notification unit for notifying a user when the operation is detected;
After the notification unit notifies the user, based on information input by the user, a control unit that controls execution of the API;
An API execution control device comprising:
前記APIの実行の制御内容を示す制御情報を記憶する記憶部と、
前記通知部がユーザに通知を行った後、ユーザによって入力された情報を前記制御情報として前記記憶部に格納する格納処理部と、をさらに備え、
前記制御部は、前記通知部がユーザに通知を行った後、ユーザによって入力された情報に基づいて前記APIの実行を制御し、前記動作が再度検出された場合に、前記記憶部に格納されている前記制御情報に基づいて前記APIの実行を制御する
ことを特徴とする請求項1に記載のAPI実行制御装置。
A storage unit for storing control information indicating control contents of execution of the API;
A storage processing unit that stores information input by the user as the control information in the storage unit after the notification unit notifies the user;
The control unit controls execution of the API based on information input by the user after the notification unit notifies the user, and is stored in the storage unit when the operation is detected again. The API execution control apparatus according to claim 1, wherein execution of the API is controlled based on the control information.
前記動作が検出された場合に、前記APIを実行するメソッドの情報を取得する情報取得部をさらに備え、
前記格納処理部は、前記通知部がユーザに通知を行った後、ユーザによって入力された情報と、前記メソッドの情報とを関連付けて前記制御情報として前記記憶部に格納し、
前記制御部は、前記通知部がユーザに通知を行った後、ユーザによって入力された情報に基づいて前記APIの実行を制御し、前記動作が再度検出された場合に、前記情報取得部によって取得された前記メソッドの情報と同一の情報を含む前記制御情報を前記記憶部から読み出し、読み出した前記制御情報に基づいて前記APIの実行を制御する
ことを特徴とする請求項2に記載のAPI実行制御装置。
When the operation is detected, further comprising an information acquisition unit for acquiring information of a method for executing the API,
The storage processing unit stores the information input by the user after the notification unit notifies the user and the method information in the storage unit as the control information,
The control unit controls execution of the API based on information input by the user after the notification unit notifies the user, and is acquired by the information acquisition unit when the operation is detected again. The API execution according to claim 2, wherein the control information including the same information as the method information is read from the storage unit, and the execution of the API is controlled based on the read control information. Control device.
前記制御部は、前記通知部がユーザに通知を行った後、ユーザによって入力された情報が前記APIの実行の許可を示している場合のみ前記APIの実行を許可し、前記動作が再度検出された場合に、前記記憶部に格納されている前記制御情報が前記APIの実行の許可を示しているときのみ前記APIの実行を許可することを特徴とする請求項2に記載のAPI実行制御装置。   After the notification unit notifies the user, the control unit permits execution of the API only when information input by the user indicates permission to execute the API, and the operation is detected again. 3. The API execution control device according to claim 2, wherein, when the control information stored in the storage unit indicates permission to execute the API, the API execution control device is permitted. . 前記制御部は、前記通知部がユーザに通知を行った後、ユーザによって入力された情報がダミー情報を利用することを示している場合に、前記APIの実行結果として、前記ダミー情報を前記アプリケーションに返すように前記APIを制御し、前記動作が再度検出された場合に、前記記憶部に格納されている前記制御情報がダミー情報を利用することを示していれば、前記APIの実行結果として前記ダミー情報を前記アプリケーションに返すように前記APIを制御することを特徴とする請求項2に記載のAPI実行制御装置。   When the information input by the user indicates that the dummy information is used after the notification unit notifies the user, the control unit displays the dummy information as the execution result of the API. If the control information stored in the storage unit indicates that dummy information is used when the API is controlled to be returned to and the operation is detected again, the execution result of the API The API execution control apparatus according to claim 2, wherein the API is controlled so that the dummy information is returned to the application. 前記格納処理部と前記制御部に対して同一のUID(User ID)が与えられていることを特徴とする請求項2〜請求項5のいずれか一項に記載のAPI実行制御装置。   The API execution control device according to any one of claims 2 to 5, wherein the same UID (User ID) is given to the storage processing unit and the control unit. 前記アプリケーションと前記検出部は同一のプロセスで処理を行い、
前記アプリケーションと、前記格納処理部および前記制御部とに対して異なるUID(User ID)が与えられ、
前記記憶部に格納されている前記制御情報にアクセスする権限が前記アプリケーションには与えられず、前記格納処理部および前記制御部には与えられている
ことを特徴とする請求項6に記載のAPI実行制御装置。
The application and the detection unit perform processing in the same process,
Different UID (User ID) is given to the application and the storage processing unit and the control unit,
The API according to claim 6, wherein an authority to access the control information stored in the storage unit is not given to the application, but is given to the storage processing unit and the control unit. Execution control device.
前記制御部は、前記アプリケーションの動作中、バックグラウンドで動作していることを特徴とする請求項2〜請求項7のいずれか一項に記載のAPI実行制御装置。   The API execution control apparatus according to any one of claims 2 to 7, wherein the control unit is operating in the background during the operation of the application. 前記APIは、指定された引数に対応する情報をデータベースから取得するAPIであり、
前記通知部は、前記動作が検出され、かつ、前記動作の際に所定の引数が指定されている場合にユーザに通知を行う
ことを特徴とする請求項1〜請求項8のいずれか一項に記載のAPI実行制御装置。
The API is an API for acquiring information corresponding to a specified argument from a database,
The said notification part notifies a user when the said operation | movement is detected and the predetermined | prescribed argument is designated at the time of the said operation | movement. API execution control device described in 1.
前記通知部は、Activity、Service、BroadcastReceiver、ContentProviderの少なくともいずれかをアプリケーションの構成要素とするOS上で動作するアプリケーションであって、前記Activityを構成要素とするアプリケーションであることを特徴とする請求項1〜請求項9のいずれか一項に記載のAPI実行制御装置。   The notification unit is an application that operates on an OS having at least one of Activity, Service, BroadcastReceiver, and ContentProvider as a component of an application, and is an application having the Activity as a component. The API execution control device according to any one of claims 1 to 9. アプリケーションがAPI(Application Program Interface)を実行しようとする動作を検出する検出部と、
前記動作が検出された場合に、ユーザに通知を行う通知部と、
前記通知部がユーザに通知を行った後、ユーザによって入力された情報に基づいて、前記APIの実行を制御する制御部と、
としてコンピュータを機能させるためのプログラム。
A detection unit that detects an operation of an application to execute an API (Application Program Interface);
A notification unit for notifying a user when the operation is detected;
After the notification unit notifies the user, based on information input by the user, a control unit that controls execution of the API;
As a program to make the computer function as.
JP2012046958A 2012-03-02 2012-03-02 Api execution control device and program Pending JP2013182500A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012046958A JP2013182500A (en) 2012-03-02 2012-03-02 Api execution control device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012046958A JP2013182500A (en) 2012-03-02 2012-03-02 Api execution control device and program

Publications (1)

Publication Number Publication Date
JP2013182500A true JP2013182500A (en) 2013-09-12

Family

ID=49273091

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012046958A Pending JP2013182500A (en) 2012-03-02 2012-03-02 Api execution control device and program

Country Status (1)

Country Link
JP (1) JP2013182500A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107430531A (en) * 2014-12-30 2017-12-01 脸谱公司 For managing the method and system for the license for accessing mobile device resource
CN107636666A (en) * 2015-07-08 2018-01-26 谷歌有限责任公司 For the method and system for controlling the allowance for the application on computing device to ask
JP2018032261A (en) * 2016-08-25 2018-03-01 ソフトバンク株式会社 Information processing device and program
JP2018511902A (en) * 2015-03-27 2018-04-26 マカフィー,エルエルシー Determining sensor usage

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004102394A1 (en) * 2003-05-15 2004-11-25 Vodafone K.K. Linkage operation method, mobile communication terminal device, mail transmission/reception method, and communication system
JP2006254294A (en) * 2005-03-14 2006-09-21 Fujitsu Ten Ltd System and method for providing information
JP2007286905A (en) * 2006-04-17 2007-11-01 Nec System Technologies Ltd Information processing terminal device, file leakage prevention method, and file leakage prevention program
WO2008099738A1 (en) * 2007-02-07 2008-08-21 Humming Heads Inc. Information processor for managing electronic information history
JP2013145511A (en) * 2012-01-16 2013-07-25 Kddi Corp Api execution controller and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004102394A1 (en) * 2003-05-15 2004-11-25 Vodafone K.K. Linkage operation method, mobile communication terminal device, mail transmission/reception method, and communication system
JP2006254294A (en) * 2005-03-14 2006-09-21 Fujitsu Ten Ltd System and method for providing information
JP2007286905A (en) * 2006-04-17 2007-11-01 Nec System Technologies Ltd Information processing terminal device, file leakage prevention method, and file leakage prevention program
WO2008099738A1 (en) * 2007-02-07 2008-08-21 Humming Heads Inc. Information processor for managing electronic information history
JP2013145511A (en) * 2012-01-16 2013-07-25 Kddi Corp Api execution controller and program

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JPN6015012439; 川端秀明、磯原隆将、竹森敬祐、窪田歩、可児潤也、上松晴信、西垣正勝: 'Android OSにおける機能や情報へのアクセス制御機構の提案' コンピュータセキュリティシンポジウム2011論文集 Vol.2011、No.3, 20111012, p.161-166, 一般社団法人情報処理学会  コンピュータセキュリティ *
JPN6015012441; 株式会社豆蔵: Google Androidプログラミング入門 , 20100212, p.385, 株式会社アスキー・メディアワークス *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107430531A (en) * 2014-12-30 2017-12-01 脸谱公司 For managing the method and system for the license for accessing mobile device resource
JP2018508857A (en) * 2014-12-30 2018-03-29 フェイスブック,インク. Method and system for managing permissions to mobile device resources
CN107430531B (en) * 2014-12-30 2020-06-16 脸谱公司 Method and system for managing permissions to access mobile device resources
JP2018511902A (en) * 2015-03-27 2018-04-26 マカフィー,エルエルシー Determining sensor usage
US10659479B2 (en) 2015-03-27 2020-05-19 Mcafee, Llc Determination of sensor usage
CN107636666A (en) * 2015-07-08 2018-01-26 谷歌有限责任公司 For the method and system for controlling the allowance for the application on computing device to ask
CN107636666B (en) * 2015-07-08 2021-04-20 谷歌有限责任公司 Method and system for controlling permission requests for applications on a computing device
JP2018032261A (en) * 2016-08-25 2018-03-01 ソフトバンク株式会社 Information processing device and program

Similar Documents

Publication Publication Date Title
US10990696B2 (en) Methods and systems for detecting attempts to access personal information on mobile communications devices
KR101373986B1 (en) Method and apparatus to vet an executable program using a model
Jiang et al. Detecting passive content leaks and pollution in android applications
US9825977B2 (en) System and method for controlling access to data of a user device using a security application that provides accessibility services
Do et al. Enhancing user privacy on android mobile devices via permissions removal
CN103856446A (en) Login method and device, and open platform system
Banuri et al. An Android runtime security policy enforcement framework
JP5723760B2 (en) Application analysis apparatus, application analysis system, and program
Liu et al. An empirical study on android for saving non-shared data on public storage
JP2013065114A (en) Control method of information processing system, control program of relay device and control program of client device
US20170193218A1 (en) Reducing Unregulated Aggregation Of App Usage Behaviors
JP2013182500A (en) Api execution control device and program
Vecchiato et al. Risk assessment of user-defined security configurations for android devices
Kywe et al. Attacking android smartphone systems without permissions
JP2011233081A (en) Application determination system and program
KR101977428B1 (en) Content handling for applications
JP5828457B2 (en) API execution control device and program
CN105791221B (en) Rule issuing method and device
Kaur et al. PeMo: Modifying application's permissions and preventing information stealing on smartphones
JP5825595B2 (en) API execution control device and program
CN114238021A (en) SDK interface positioning method, device, equipment and computer storage medium
US20130263278A1 (en) Method and apparatus for controlling operations performed by a mobile co
US20200329056A1 (en) Trusted advisor for improved security
Palfinger et al. Androprint: analysing the fingerprintability of the android api
JP6084916B2 (en) Data transmission restriction method, data transmission restriction device, and data transmission restriction program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140723

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20140724

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150401

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150804