JP2018073245A - Inspection apparatus, inspection system, information processing apparatus, inspection method and computer program - Google Patents

Inspection apparatus, inspection system, information processing apparatus, inspection method and computer program Download PDF

Info

Publication number
JP2018073245A
JP2018073245A JP2016214554A JP2016214554A JP2018073245A JP 2018073245 A JP2018073245 A JP 2018073245A JP 2016214554 A JP2016214554 A JP 2016214554A JP 2016214554 A JP2016214554 A JP 2016214554A JP 2018073245 A JP2018073245 A JP 2018073245A
Authority
JP
Japan
Prior art keywords
data
inspection
inspected
rom
unit
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
JP2016214554A
Other languages
Japanese (ja)
Inventor
小林 浩二
Koji Kobayashi
浩二 小林
安齋 潤
Jun Anzai
潤 安齋
藤村 一哉
Kazuya Fujimura
一哉 藤村
正人 田邉
Masato Tanabe
正人 田邉
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.)
Panasonic Intellectual Property Management Co Ltd
Original Assignee
Panasonic Intellectual Property Management Co Ltd
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 Panasonic Intellectual Property Management Co Ltd filed Critical Panasonic Intellectual Property Management Co Ltd
Priority to JP2016214554A priority Critical patent/JP2018073245A/en
Publication of JP2018073245A publication Critical patent/JP2018073245A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve accuracy of determining, from an outside of a predetermined apparatus, whether or not there is an unauthorized program in the apparatus.SOLUTION: An IVI apparatus 14 stores determination data based on data stored in an entire region of a memory of a peripheral device 16. The IVI apparatus 14 acquires, at a predetermined inspection timing, data stored in the entire region of the memory of the peripheral device 16 and derives inspection data on the basis of the data. If the IVI apparatus 14 determines, if the inspection data derived in the inspection timing is not matched with pre-stored determination data, that the peripheral device 16 is in an abnormal state.SELECTED DRAWING: Figure 1

Description

本発明はデータ処理技術に関し、特に、検査装置、検査システム、情報処理装置、検査方法およびコンピュータプログラムに関する。   The present invention relates to a data processing technique, and more particularly to an inspection apparatus, an inspection system, an information processing apparatus, an inspection method, and a computer program.

車両で実行されたプログラム更新の正当性を検証するプログラム更新システムが提案されている(例えば特許文献1参照)。このプログラム更新システムでは、ゲートウェイが、サーバから提供された更新データをECU(Electronic Control Unit)へ送信する。ECUは、更新データに含まれる更新制御プログラムのダイジェスト値を算出し、そのダイジェスト値をゲートウェイへ送信する。ゲートウェイはダイジェスト値をサーバへ送信する。そして、このダイジェスト値に基づいて、サーバは、ECUの更新が正常に終了したか否かを判定する。   There has been proposed a program update system that verifies the validity of a program update executed on a vehicle (see, for example, Patent Document 1). In this program update system, the gateway transmits update data provided from the server to an ECU (Electronic Control Unit). The ECU calculates a digest value of the update control program included in the update data, and transmits the digest value to the gateway. The gateway sends the digest value to the server. And based on this digest value, a server determines whether the update of ECU was completed normally.

特開2015−103163号公報JP, 2015-103163, A

特許文献1に記載の技術では、ECUに不正プログラムが存在する場合、ECUが正しく更新されなくても、その不正プログラムが、更新データに含まれる更新制御プログラムのダイジェスト値を算出し、そのダイジェスト値をゲートウェイへ送信することで、ECUの更新が正常に終了したとサーバが判定してしまう。すなわち、ECUが不正プログラムで動作していること(なりすまし)を、サーバなどECUの外部から正しく判定できないことがあった。   In the technique described in Patent Document 1, when an unauthorized program exists in the ECU, even if the ECU is not updated correctly, the unauthorized program calculates the digest value of the update control program included in the update data, and the digest value. Is transmitted to the gateway, the server determines that the update of the ECU has been normally completed. That is, it may not be possible to correctly determine from the outside of the ECU such as a server that the ECU is operating with an unauthorized program (spoofing).

本願発明は上記課題に鑑みたもので、所定の装置における不正プログラムの有無を当該装置の外部から判定する精度(言い換えれば正確さ)を向上させることを主な目的とする。   The present invention has been made in view of the above problems, and has as its main object to improve the accuracy (in other words, accuracy) for determining the presence or absence of a malicious program in a predetermined device from the outside of the device.

上記課題を解決するために、本発明のある態様の検査装置は、被検査装置のメモリの全領域に格納されたデータに基づく判定データを記憶する記憶部と、所定の検査タイミングにおいて、被検査装置のメモリの全領域に格納されたデータを取得する取得部と、取得部により取得されたデータに基づいて検査データを導出する導出部と、導出部により導出された検査データと、記憶部に予め記憶された判定データとが不一致の場合に、被検査装置が異常と判定する判定部と、を備える。   In order to solve the above-described problem, an inspection apparatus according to an aspect of the present invention includes a storage unit that stores determination data based on data stored in the entire area of the memory of the apparatus to be inspected, An acquisition unit that acquires data stored in the entire area of the memory of the apparatus, a derivation unit that derives inspection data based on the data acquired by the acquisition unit, inspection data derived by the derivation unit, and a storage unit And a determination unit that determines that the inspected apparatus is abnormal when the determination data stored in advance does not match.

本発明の別の態様は、検査システムである。この検査システムは、検査装置と被検査装置とを備える。被検査装置のメモリに格納されたデータは、被検査装置の動作を定めたプログラムのデータと、プログラムのデータが未格納の空き領域に全てが0または1で構成されたデータあるいは所定のパターンの繰り返しで構成されたデータとは異なるデータとが設定されたものであり、被検査装置は、メモリの全領域に格納されたデータに基づいて検査データを導出する導出部と、導出部により導出された検査データを検査装置へ送信する送信部と、を含む。検査装置は、データに基づく判定データを記憶する記憶部と、被検査装置から送信された検査データと、記憶部に予め記憶された判定データとが不一致の場合に、被検査装置が異常と判定する判定部と、を含む。   Another aspect of the present invention is an inspection system. This inspection system includes an inspection apparatus and an apparatus to be inspected. The data stored in the memory of the device to be inspected includes the data of a program that defines the operation of the device to be inspected, and data consisting of all 0s or 1s in a free area in which no program data is stored, or of a predetermined pattern. Data that is different from the data configured by repetition is set, and the inspected device is derived by the deriving unit that derives the inspection data based on the data stored in the entire area of the memory, and the deriving unit. A transmission unit that transmits the inspection data to the inspection device. The inspection apparatus determines that the inspected apparatus is abnormal when the storage unit that stores the determination data based on the data, the inspection data transmitted from the inspected apparatus, and the determination data stored in advance in the storage unit do not match. And a determination unit.

本発明のさらに別の態様は、情報処理装置である。この装置は、メモリに格納されたデータの正常性が検査される被検査装置のメモリに格納されるデータを生成する生成部と、生成部により生成されたデータを外部装置へ出力する出力部と、を備える。データは、被検査装置の動作を定めたプログラムのデータと、プログラムのデータが未設定の空き領域に全てが0または1で構成されたデータあるいは所定のパターンの繰り返しで構成されたデータとは異なるデータとが設定されたものである。   Yet another embodiment of the present invention is an information processing apparatus. The apparatus includes: a generation unit that generates data stored in a memory of a device to be inspected for checking the normality of data stored in the memory; and an output unit that outputs data generated by the generation unit to an external device. . The data is different from the data of the program that defines the operation of the device to be inspected, and the data that is composed of all 0s or 1s in the empty area where the program data is not set, or the data that is composed of repeated predetermined patterns. Data is set.

本発明のさらに別の態様は、検査方法である。この方法は、予め記憶された判定データを用いて被検査装置の正常性を検査する検査装置が、所定の検査タイミングにおいて、被検査装置のメモリの全領域に格納されたデータを取得し、取得されたデータに基づいて検査データを導出し、導出された検査データと、予め記憶された判定データとが不一致の場合に、被検査装置が異常と判定する。   Yet another embodiment of the present invention is an inspection method. In this method, an inspection apparatus that inspects the normality of an inspected apparatus using determination data stored in advance acquires and stores data stored in the entire area of the memory of the inspected apparatus at a predetermined inspection timing. Inspection data is derived based on the obtained data, and the inspected apparatus is determined to be abnormal when the derived inspection data and the determination data stored in advance do not match.

なお、以上の構成要素の任意の組合せ、本発明の表現を、コンピュータプログラム、コンピュータプログラムを記録した記録媒体、本装置を搭載した車両などの間で変換したものもまた、本発明の態様として有効である。   Note that any combination of the above components, the expression of the present invention converted between a computer program, a recording medium on which the computer program is recorded, a vehicle equipped with the present apparatus, and the like are also effective as an aspect of the present invention. It is.

本発明によれば、所定の装置における不正プログラムの有無を当該装置の外部から判定する精度(言い換えれば正確さ)を向上させることができる。   According to the present invention, it is possible to improve the accuracy (in other words, accuracy) for determining the presence or absence of a malicious program in a predetermined device from the outside of the device.

第1実施例の検査システムの構成を示す図である。It is a figure which shows the structure of the test | inspection system of 1st Example. 図1の周辺機器のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of the peripheral device of FIG. 図1の周辺機器の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the peripheral device of FIG. 図1のIVI装置のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of the IVI apparatus of FIG. 図1のIVI装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the IVI apparatus of FIG. IVI装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of an IVI apparatus. 図7(a)−(c)は被検査装置のROMに格納されるデータを模式的に示す図である。FIGS. 7A to 7C are diagrams schematically showing data stored in the ROM of the device to be inspected. 第2実施例の更新データ生成装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the update data generation apparatus of 2nd Example. 更新データ生成装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of an update data generation apparatus. 図10(a)−(c)は被検査装置のROMに格納されるデータの構成を模式的に示す図である。FIGS. 10A to 10C are diagrams schematically showing the structure of data stored in the ROM of the device under test. 図11(a)−(d)は被検査装置のROMに格納されたデータの読み出し方法を模式的に示す図である。FIGS. 11A to 11D are diagrams schematically showing a method of reading data stored in the ROM of the device under test. 応答待ち時間制限を施したIVI装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the IVI apparatus which gave the response waiting time limit. 図13(a)(b)は第2変形例において周辺機器のROMに格納される更新データの構成を模式的に示す図である。FIGS. 13A and 13B are diagrams schematically showing a configuration of update data stored in the ROM of the peripheral device in the second modification. チャレンジ・レスポンス型のデータ送受の構成を模式的に示す図である。It is a figure which shows typically the structure of a challenge response type data transmission / reception.

(第1実施例)
第1実施例の構成を詳細に説明する前に、第1実施例の概要を述べる。
車両には多くの電子機器が搭載され、それらの電子機器を制御する多くのECUが搭載されている。ECUの中には、セキュリティ能力が脆弱で、不正に改ざんされたプログラムを検出・動作させないためのセキュアブート機能または改ざん検出機能がないものもある。言い換えれば、自己正当性を保障できないECUが存在する。今後、車両における情報セキュリティの向上が一層求められる中、自己正当性を保障できないECU(検査対象となるECUであり、以下「被検査装置」とも呼ぶ。)の正当性を、当該ECUの外部の装置(以下「検査装置」とも呼ぶ。)により確認する必要がある。なお、検査装置は、自己正当性が保障できる装置である。
(First embodiment)
Before describing the configuration of the first embodiment in detail, an outline of the first embodiment will be described.
Many electronic devices are mounted on the vehicle, and many ECUs for controlling these electronic devices are mounted. Some ECUs have weak security capabilities and do not have a secure boot function or a falsification detection function to prevent detection and operation of an illegally falsified program. In other words, there are ECUs that cannot guarantee self-correctness. In the future, as further improvement in information security in vehicles is required, the legitimacy of an ECU that cannot guarantee self-validity (an ECU to be inspected, hereinafter also referred to as “device to be inspected”) is external to the ECU. It is necessary to confirm with an apparatus (hereinafter also referred to as “inspection apparatus”). The inspection device is a device that can guarantee self-correctness.

既述したように、被検査装置自身が所定の規則にしたがって生成したダイジェスト値に基づいて被検査装置の正当性を判定する方式では、正当性が保障されたプログラムでダイジェスト値の正当性を確認しない限り、その判定結果が必ずしも正しいとは言えない。例えば、被検査装置に侵入した不正プログラムが、被検査装置が正常であることを示すダイジェスト値を生成またはあらかじめ記録して返信すれば、検査装置は被検査装置を正常と判定してしまうからである。そこで、第1実施例の検査装置は、被検査装置のメモリの全領域に格納されたデータ(言い換えればメモリに格納された全データ)を取得し、そのデータに基づいて被検査装置の正常性を判定する。   As described above, in the method of judging the validity of the device to be inspected based on the digest value generated by the device to be inspected according to a predetermined rule, the validity of the digest value is confirmed by a program that guarantees the validity. Unless determined, the judgment result is not necessarily correct. For example, if a malicious program that has entered a device under test generates a digest value indicating that the device under test is normal or records it in advance and returns it, the test device will determine that the device under test is normal. is there. Therefore, the inspection apparatus according to the first embodiment obtains data stored in all areas of the memory of the inspected apparatus (in other words, all data stored in the memory), and normality of the inspected apparatus based on the data. Determine.

具体的には、第1実施例の検査装置は、被検査装置のメモリの全領域に本来格納されているべきデータに基づいて予め生成された期待値としての判定データを予め記憶しておく。検査装置は、検査タイミングにおいて、被検査装置のメモリの全領域に格納されたデータを取得し、取得データに基づいて新たな検査データを導出する。検査装置は、新たな検査データが予め記憶した期待値としての判定データと不一致であれば、被検査装置を異常と判定する。   Specifically, the inspection apparatus according to the first embodiment stores in advance determination data as an expected value generated in advance based on data that should be originally stored in all areas of the memory of the apparatus to be inspected. The inspection apparatus acquires data stored in the entire area of the memory of the inspected apparatus at the inspection timing, and derives new inspection data based on the acquired data. The inspection apparatus determines that the inspected apparatus is abnormal if the new inspection data does not match the determination data as the expected value stored in advance.

実施例での判定データおよび検査データは、ハッシュ関数により生成されるハッシュ値とするが、これに限定されない。例えば、判定データおよび検査データは、MAC(Message Authentication Code)関数により生成される暗号MAC値でもよく、また、所定の生成多項式により生成されるCRC値でもよい。   The determination data and the inspection data in the embodiment are hash values generated by a hash function, but are not limited thereto. For example, the determination data and the inspection data may be a cryptographic MAC value generated by a MAC (Message Authentication Code) function or a CRC value generated by a predetermined generator polynomial.

図1は、第1実施例の検査システム10の構成を示す。検査システム10は、車両12に搭載されたIVI(In-Vehicle Infotainment)装置14と周辺機器16を備える。IVI装置14と周辺機器16は、車載ネットワーク18を介して接続される。車載ネットワーク18は、CAN(Controller Area Network)、CAN FD(CAN with Flexible Data rate)、またはイーサネット(登録商標)であってもよい。   FIG. 1 shows a configuration of an inspection system 10 according to the first embodiment. The inspection system 10 includes an IVI (In-Vehicle Infotainment) device 14 and a peripheral device 16 mounted on the vehicle 12. The IVI device 14 and the peripheral device 16 are connected via an in-vehicle network 18. The in-vehicle network 18 may be a CAN (Controller Area Network), a CAN FD (CAN with Flexible Data rate), or an Ethernet (registered trademark).

周辺機器16は、自己正当性を保障できない上記の被検査装置である。周辺機器16は、例えばメーター、ヘッドアップディスプレイ等であってもよい。IVI装置14は、周辺機器16を検査する上記の検査装置であり、自己正当性を保障できる検査装置である。IVI装置14は、次世代車載情報通信装置とも言え、カーナビゲーションシステムとカーオーディオを含む比較的高度な情報処理を実行可能な装置である。IVI装置14は、少なくともハッシュ関数(SHA−1等)またはMAC値(AES−CMAC等)の演算能力を有する。その一方、周辺機器16の演算能力はIVI装置14より低く、ハッシュ関数を演算する暗号ハードウェアを持たず、ソフトウェア演算では時間がかかり、通信応答性に支障をきたす。   The peripheral device 16 is the above-described inspected device that cannot guarantee self-correctness. The peripheral device 16 may be a meter, a head-up display, or the like, for example. The IVI device 14 is the above-described inspection device that inspects the peripheral device 16 and is an inspection device that can ensure self-validity. The IVI device 14 can be said to be a next-generation in-vehicle information communication device, and is a device capable of executing relatively advanced information processing including a car navigation system and a car audio. The IVI device 14 has at least a hash function (such as SHA-1) or a MAC value (such as AES-CMAC). On the other hand, the computing capability of the peripheral device 16 is lower than that of the IVI device 14 and does not have cryptographic hardware for computing a hash function, so that software computation takes time and hinders communication responsiveness.

検査システム10は、PC等の情報処理装置である更新データ生成装置20をさらに備える。更新データ生成装置20は、周辺機器16のメモリ(後述のROM)に格納される、周辺機器16の動作を定めたプログラムを含む更新データを生成する。更新データのサイズは、周辺機器16のメモリのサイズ(実施例ではROMの記憶領域のサイズ)に設定される。   The inspection system 10 further includes an update data generation device 20 that is an information processing device such as a PC. The update data generation device 20 generates update data including a program that defines the operation of the peripheral device 16 and is stored in a memory (ROM described later) of the peripheral device 16. The size of the update data is set to the size of the memory of the peripheral device 16 (in the embodiment, the size of the storage area of the ROM).

また、更新データ生成装置20は、所定のハッシュ関数にしたがって更新データのハッシュ値(ハッシュ演算方式により決まるサイズの結果)を生成する。このハッシュ値は、判定データとも言え、IVI装置14のメモリに格納される。更新データおよび更新データサイズも同様に、IVI装置14のメモリに格納される。不図示のサーバを介してIVI装置14へ提供されてもよい。また、更新データは、USBメモリ等の所定の記録メディアを介してIVI装置14へ導入されてもよい。更新データ、更新データのハッシュ値、および更新データサイズも、これらの手段によりIVI装置14へ導入されてもよい。なお、更新データ、更新データのハッシュ値、および更新データサイズのうち少なくとも更新データは、IVI装置14を経由して、周辺機器16へ書き込まれる。   In addition, the update data generation device 20 generates a hash value of the update data (a result having a size determined by the hash calculation method) according to a predetermined hash function. This hash value can also be called determination data, and is stored in the memory of the IVI device 14. Similarly, the update data and the update data size are stored in the memory of the IVI device 14. It may be provided to the IVI device 14 via a server (not shown). The update data may be introduced into the IVI device 14 via a predetermined recording medium such as a USB memory. The update data, the hash value of the update data, and the update data size may also be introduced into the IVI device 14 by these means. At least the update data among the update data, the hash value of the update data, and the update data size is written to the peripheral device 16 via the IVI device 14.

図2は、図1の周辺機器16のハードウェア構成を示す。周辺機器16は、ECU30を備える。ECU30は、CPU32、RAM34、ROM36、通信IF38を含む。ROM36は、図1の更新データが格納され、また、格納データの正常性がIVI装置14により確認される。ROM36は、書き換え可能なROMであり、例えばEEPROMまたはフラッシュメモリであってもよい。典型的には、ROM36のサイズは、数Mバイト〜10Mバイト程度である。通信IF38は、車載ネットワーク18を介してIVI装置14と接続される   FIG. 2 shows a hardware configuration of the peripheral device 16 of FIG. The peripheral device 16 includes an ECU 30. The ECU 30 includes a CPU 32, a RAM 34, a ROM 36, and a communication IF 38. The ROM 36 stores the update data of FIG. 1, and the normality of the stored data is confirmed by the IVI device 14. The ROM 36 is a rewritable ROM, and may be, for example, an EEPROM or a flash memory. Typically, the size of the ROM 36 is about several megabytes to 10 megabytes. The communication IF 38 is connected to the IVI device 14 via the in-vehicle network 18.

図3は、図1の周辺機器16の機能構成を示すブロック図である。周辺機器16は、受信部40、処理部42、送信部44を備える。本明細書のブロック図において示される各ブロックは、ハードウェア的には、コンピュータのCPU・メモリをはじめとする素子や機械装置で実現でき、ソフトウェア的にはコンピュータプログラム等によって実現されるが、ここでは、それらの連携によって実現される機能ブロックを描いている。これらの機能ブロックはハードウェア、ソフトウェアの組合せによっていろいろなかたちで実現できることは、当業者には理解されるところである。   FIG. 3 is a block diagram showing a functional configuration of the peripheral device 16 of FIG. The peripheral device 16 includes a receiving unit 40, a processing unit 42, and a transmitting unit 44. Each block shown in the block diagram of the present specification can be realized in terms of hardware by an element such as a CPU / memory of a computer or a mechanical device, and in terms of software, it can be realized by a computer program or the like. Then, the functional block realized by those cooperation is drawn. Those skilled in the art will understand that these functional blocks can be realized in various forms by a combination of hardware and software.

例えば、図3の各ブロックに対応するモジュールを含むコンピュータプログラムが周辺機器16のROM36に格納されてもよい。周辺機器16のCPU32は、コンピュータプログラムのバイナリデータをROM36からRAM34に適宜読み出して実行することにより、各ブロックの機能を発揮してもよい。   For example, a computer program including a module corresponding to each block in FIG. 3 may be stored in the ROM 36 of the peripheral device 16. The CPU 32 of the peripheral device 16 may exhibit the function of each block by appropriately reading out the binary data of the computer program from the ROM 36 to the RAM 34 and executing it.

受信部40は、車載ネットワーク18を介して、外部装置(例えばIVI装置14)から送信されたコマンドデータを受信する。処理部42は、受信部40により受信されたコマンドデータに応じたデータ処理を実行する。送信部44は、処理部42によるデータ処理結果に関する応答データを、コマンドデータ送信元の外部装置へ送信する。   The receiving unit 40 receives command data transmitted from an external device (for example, the IVI device 14) via the in-vehicle network 18. The processing unit 42 performs data processing according to the command data received by the receiving unit 40. The transmission unit 44 transmits response data regarding the data processing result by the processing unit 42 to the external device that is the command data transmission source.

処理部42は、ROM更新部46とROM読出部48を含む。ROM更新部46は、ROM更新コマンドにしたがって、ROM更新コマンドとともに受信された更新データをROM36へ書き込む。なお、ROM更新部46は、IVI装置14からROM更新コマンドが入力された場合に、車載ネットワーク18を介してIVI装置14から更新データを読み出し、ROM36へ上書き保存してもよい。   The processing unit 42 includes a ROM updating unit 46 and a ROM reading unit 48. The ROM update unit 46 writes the update data received together with the ROM update command into the ROM 36 according to the ROM update command. Note that the ROM update unit 46 may read update data from the IVI device 14 via the in-vehicle network 18 and overwrite-store it in the ROM 36 when a ROM update command is input from the IVI device 14.

ROM読出部48は、ROM読み出しコマンドにしたがって、当該コマンドで指定されたROMのアドレスから、当該コマンドで指定されたサイズのデータを読み出す。送信部44は、ROM読出部48により読み出されたROMのデータを、ROM読み出しコマンドの送信元の装置(実施例ではIVI装置14)へ送信する。   In accordance with the ROM read command, the ROM reading unit 48 reads data having the size specified by the command from the ROM address specified by the command. The transmission unit 44 transmits the ROM data read by the ROM reading unit 48 to the device (IVI device 14 in the embodiment) that is the transmission source of the ROM read command.

図4は、図1のIVI装置14のハードウェア構成を示す。IVI装置14は、ECU50を備える。ECU50は、CPU52、RAM54、ROM56、通信IF58を含む。RAM54のサイズは、周辺機器16のROM36の全データが展開可能なように、周辺機器16のROM36のサイズ以上(例えば512MB等)である。通信IF58は、車載ネットワーク18を介して周辺機器16と接続される。   FIG. 4 shows a hardware configuration of the IVI device 14 of FIG. The IVI device 14 includes an ECU 50. The ECU 50 includes a CPU 52, a RAM 54, a ROM 56, and a communication IF 58. The size of the RAM 54 is equal to or larger than the size of the ROM 36 of the peripheral device 16 (for example, 512 MB) so that all data in the ROM 36 of the peripheral device 16 can be expanded. The communication IF 58 is connected to the peripheral device 16 via the in-vehicle network 18.

図5は、図1のIVI装置14の機能構成を示すブロック図である。IVI装置14は、サイズ記憶部60、ハッシュ値記憶部62、ROMデータ記憶部64、ROMデータ取得部70、ハッシュ値導出部72、状態判定部74、判定結果出力部76、自己正当性検証部77、コマンド送信部78、応答受信部79を備える。   FIG. 5 is a block diagram showing a functional configuration of the IVI device 14 of FIG. The IVI device 14 includes a size storage unit 60, a hash value storage unit 62, a ROM data storage unit 64, a ROM data acquisition unit 70, a hash value derivation unit 72, a state determination unit 74, a determination result output unit 76, and a self-validity verification unit. 77, a command transmission unit 78, and a response reception unit 79.

図5の各ブロックに対応するモジュールを含むコンピュータプログラムが、記録メディアに格納され、その記録メディアを介してIVI装置14のROM56にインストールされてもよい。IVI装置14のCPU52は、ROM56に格納されたコンピュータプログラムをRAM54へ適宜読み出して実行することにより、各ブロックの機能を発揮してもよい。自己正当性検証部77は、IVI装置14のプログラムの正当性を保障するための所定の処理を実行する。   A computer program including a module corresponding to each block in FIG. 5 may be stored in a recording medium and installed in the ROM 56 of the IVI device 14 via the recording medium. The CPU 52 of the IVI device 14 may perform the function of each block by appropriately reading out and executing the computer program stored in the ROM 56 into the RAM 54. The self-validity verification unit 77 executes predetermined processing for ensuring the validity of the program of the IVI device 14.

サイズ記憶部60は、周辺機器16における検査対象のメモリであるROM36のサイズを示すデータを記憶する記憶領域である。ハッシュ値記憶部62は、周辺機器16のROM36に格納されるデータ(上記の更新データ)のハッシュ値を記憶する記憶領域である。既述したように、更新データは、周辺機器16のROM36のサイズを有する。したがって、ハッシュ値記憶部62は、周辺機器16のROM36の全領域に格納されるデータのハッシュ値であり、周辺機器16のROM36に不正プログラムや改ざん等がない場合のハッシュ値の期待値を記憶する。   The size storage unit 60 is a storage area for storing data indicating the size of the ROM 36 that is a memory to be inspected in the peripheral device 16. The hash value storage unit 62 is a storage area for storing a hash value of data (the update data described above) stored in the ROM 36 of the peripheral device 16. As described above, the update data has the size of the ROM 36 of the peripheral device 16. Therefore, the hash value storage unit 62 is a hash value of data stored in the entire area of the ROM 36 of the peripheral device 16, and stores the expected value of the hash value when there is no unauthorized program or alteration in the ROM 36 of the peripheral device 16. To do.

ROMデータ記憶部64は、周辺機器16から取得されたROM36の格納データであるROMデータを記憶する記憶領域である。ROMデータは、周辺機器16のROM36のサイズを有するデータであり、検査時点でROM36に実際に格納されているデータである。サイズ記憶部60およびハッシュ値記憶部62はROM56により実現され、ROMデータ記憶部64はRAM54により実現されてもよい。また、ROMデータ記憶部64は、ROMデータ取得部70に含まれる構成としてもよい。   The ROM data storage unit 64 is a storage area for storing ROM data that is storage data of the ROM 36 acquired from the peripheral device 16. The ROM data is data having the size of the ROM 36 of the peripheral device 16 and is actually stored in the ROM 36 at the time of inspection. The size storage unit 60 and the hash value storage unit 62 may be realized by the ROM 56, and the ROM data storage unit 64 may be realized by the RAM 54. The ROM data storage unit 64 may be included in the ROM data acquisition unit 70.

サイズ記憶部60は、所定のサーバまたは更新データ生成装置20等の外部装置から、周辺機器16のROM36のサイズを示すデータを取得して記憶する。   The size storage unit 60 acquires and stores data indicating the size of the ROM 36 of the peripheral device 16 from a predetermined server or an external device such as the update data generation device 20.

ハッシュ値記憶部62は、所定のサーバまたは更新データ生成装置20等の外部装置から、ROM36の更新データのハッシュ値(判定データとも言える)を取得して記憶する。IVI装置14に接続されたUSBメモリ等の記録メディアからハッシュ値を読み出して記憶してもよい。   The hash value storage unit 62 acquires and stores a hash value (also referred to as determination data) of update data in the ROM 36 from a predetermined server or an external device such as the update data generation device 20. The hash value may be read from a recording medium such as a USB memory connected to the IVI device 14 and stored.

ROMデータ取得部70は、所定の検査タイミングに達した場合に、被検査装置のメモリの全領域に格納されたデータを取得する。検査タイミングは、周辺機器16のROM36に格納されるデータの更新直前または更新直後(いわゆるリプログラミングの直前または直後)でもよい。また、車両12においてイグニッションがオフからオンに切り替えられたとき(典型的にはエンジンまたはモーターの起動時)でもよい。さらに、検査タイミングは、外部機器が周辺機器16(ECU30)にアクセスするときでもよい。さらに、検査タイミングは、所定の日付または時刻になったときでもよく、1日1回、週に1回等の定期的でもよい。この場合、IVI装置14は通信や放送等で送信された正当性の保障された日時情報と同期した正しい時刻を持つ必要がある。自己正当性検証部77は、日時の正当性を保障するための所定の処理を実行してもよい。さらに、検査タイミングは、所定の装置やユーザにより周辺機器16の異常が検出された場合でもよい。   The ROM data acquisition unit 70 acquires data stored in the entire area of the memory of the inspected device when a predetermined inspection timing is reached. The inspection timing may be immediately before or immediately after the update of data stored in the ROM 36 of the peripheral device 16 (immediately before or after reprogramming). It may also be when the ignition is switched from off to on in the vehicle 12 (typically when the engine or motor is started). Furthermore, the inspection timing may be when an external device accesses the peripheral device 16 (ECU 30). Further, the inspection timing may be a predetermined date or time, or may be regular such as once a day, once a week, or the like. In this case, the IVI device 14 needs to have the correct time synchronized with the date / time information with a guaranteed validity transmitted by communication or broadcasting. The self-validity verification unit 77 may execute a predetermined process for ensuring the correctness of the date and time. Further, the inspection timing may be a case where an abnormality of the peripheral device 16 is detected by a predetermined device or user.

更新データ、ハッシュ値、および更新データサイズは、更新データ生成装置20で署名を付与して、IVI装置14に導入する際に署名検証を実行し、通信間での改ざん検出を実施してもよい。   The update data, hash value, and update data size may be given a signature by the update data generation device 20, and signature verification may be performed when introduced into the IVI device 14 to detect tampering between communications. .

コマンド送信部78は、各種のデータ処理を指示するコマンドを周辺機器16へ送信する。応答受信部79は、コマンドに対する周辺機器16の応答として、コマンドに応じたデータ処理の結果を周辺機器16から受信する。ROMデータ取得部70は、コマンド送信部78を介して、ROM読み出しコマンドを周辺機器16へ送信する。また、ROMデータ取得部70は、応答受信部79を介して、ROM読み出しコマンドに対する周辺機器16の応答であり、周辺機器16のROM36に格納されたデータを取得する。   The command transmission unit 78 transmits commands instructing various data processing to the peripheral device 16. The response receiving unit 79 receives a result of data processing corresponding to the command from the peripheral device 16 as a response of the peripheral device 16 to the command. The ROM data acquisition unit 70 transmits a ROM read command to the peripheral device 16 via the command transmission unit 78. Further, the ROM data acquisition unit 70 is a response of the peripheral device 16 to the ROM read command via the response reception unit 79 and acquires data stored in the ROM 36 of the peripheral device 16.

実施例のROMデータ取得部70は、周辺機器16のROM36の全領域に格納されたデータをROMデータとして取得する。ROMデータ取得部70は、取得したROMデータをROMデータ記憶部64へ格納する。なお、ROMデータ取得部70は、ROM36のメモリダンプを周辺機器16に要求し、ROM36のメモリダンプデータを周辺機器16から取得してもよい。この場合、ROMデータ取得部70は、メモリダンプデータに基づいてROMデータ(ROM36のイメージ)をローカルのRAM54に展開してもよい。また、ROMデータ取得部70は、周辺機器16のROM36の一部領域に格納されたデータを取得することを複数回繰り返すことにより、ROM36の全領域に格納されたデータを取得してもよい。   The ROM data acquisition unit 70 according to the embodiment acquires data stored in the entire area of the ROM 36 of the peripheral device 16 as ROM data. The ROM data acquisition unit 70 stores the acquired ROM data in the ROM data storage unit 64. The ROM data acquisition unit 70 may request the peripheral device 16 for a memory dump of the ROM 36 and acquire the memory dump data of the ROM 36 from the peripheral device 16. In this case, the ROM data acquisition unit 70 may develop ROM data (an image of the ROM 36) in the local RAM 54 based on the memory dump data. The ROM data acquisition unit 70 may acquire the data stored in the entire area of the ROM 36 by repeating the acquisition of data stored in a partial area of the ROM 36 of the peripheral device 16 a plurality of times.

ハッシュ値導出部72は、ROMデータ取得部70によるROMデータの取得が完了した場合に、ROMデータ記憶部64に記憶されたROMデータのハッシュ値(検査データとも言える)を導出する。例えば、ハッシュ値導出部72は、SHA−1等の所定のハッシュ関数にROMデータを入力することにより、当該ハッシュ関数から出力されたハッシュ値を導出してもよい。なお、ハッシュ値導出部72がROMデータに対して使用するハッシュ関数は、更新データ生成装置20が更新データに対して使用するハッシュ関数と同じである。   The hash value deriving unit 72 derives the hash value (also referred to as inspection data) of the ROM data stored in the ROM data storage unit 64 when the ROM data acquisition by the ROM data acquisition unit 70 is completed. For example, the hash value deriving unit 72 may derive the hash value output from the hash function by inputting the ROM data to a predetermined hash function such as SHA-1. The hash function used by the hash value deriving unit 72 for the ROM data is the same as the hash function used by the update data generation device 20 for the update data.

状態判定部74は、ハッシュ値導出部72により導出されたハッシュ値と、予めハッシュ値記憶部62に記憶されたハッシュ値とを照合する。状態判定部74は、両者が一致すれば周辺機器16(もしくはROM36の格納データ)が正常と判定し、両者が不一致であれば周辺機器16(もしくはROM36の格納データ)が異常と判定する。   The state determination unit 74 collates the hash value derived by the hash value deriving unit 72 with the hash value stored in the hash value storage unit 62 in advance. The state determination unit 74 determines that the peripheral device 16 (or data stored in the ROM 36) is normal if the two match, and determines that the peripheral device 16 (or data stored in the ROM 36) is abnormal if the two do not match.

判定結果出力部76は、状態判定部74による判定結果に基づく所定の後処理を実行する。実施例では、判定結果出力部76は、判定結果を示すデータを所定の外部装置へ出力する。例えば、判定結果出力部76は、周辺機器16が正常であることまたは異常であることを示すデータを所定のサーバへ送信してもよい。また、判定結果出力部76は、状態判定部74による判定結果を示すデータを所定の記憶部へ保存してもよい。また、判定結果出力部76は、判定結果が周辺機器16の異常を示す場合にのみ、アラートの出力等、所定の後処理を実行してもよい。   The determination result output unit 76 performs predetermined post-processing based on the determination result by the state determination unit 74. In the embodiment, the determination result output unit 76 outputs data indicating the determination result to a predetermined external device. For example, the determination result output unit 76 may transmit data indicating that the peripheral device 16 is normal or abnormal to a predetermined server. Further, the determination result output unit 76 may store data indicating the determination result by the state determination unit 74 in a predetermined storage unit. The determination result output unit 76 may execute predetermined post-processing such as alert output only when the determination result indicates abnormality of the peripheral device 16.

以上の構成による第1実施例のIVI装置14の動作を説明する。
図6は、IVI装置14の動作を示すフローチャートである。不図示だが、サイズ記憶部60には、周辺機器16のROM36のサイズを示すデータが予め格納される。また、ハッシュ値記憶部62には、周辺機器16のROM36に格納された更新データのハッシュ値(すなわち周辺機器16が正常な場合のハッシュ値の期待値)が予め格納される。所定の検査タイミングに至るまで待機し(S10のN)、所定の検査タイミングに至った場合(S10のY)、ROMデータ取得部70は、RAM54に、周辺機器16のROM36のサイズ分の領域をROMデータ記憶部64として確保する(S12)。
The operation of the IVI device 14 of the first embodiment having the above configuration will be described.
FIG. 6 is a flowchart showing the operation of the IVI device 14. Although not shown, the size storage unit 60 stores data indicating the size of the ROM 36 of the peripheral device 16 in advance. The hash value storage unit 62 stores in advance the hash value of the update data stored in the ROM 36 of the peripheral device 16 (that is, the expected value of the hash value when the peripheral device 16 is normal). The CPU waits until the predetermined inspection timing is reached (N in S10). When the predetermined inspection timing is reached (Y in S10), the ROM data acquisition unit 70 stores an area for the size of the ROM 36 of the peripheral device 16 in the RAM 54. The ROM data storage unit 64 is secured (S12).

ROMデータ取得部70は、周辺機器16のROM36におけるデータの読み出しアドレスと、読み出しサイズを決定する(S14、S16)。ROMデータ取得部70は、S14で決定したアドレスから、S16で決定したサイズのデータを読み出すように指示するROM読み出しコマンドを周辺機器16へ送信する(S18)。ROMデータ取得部70は、ROM読み出しコマンドへの応答として、周辺機器16からROM36に格納されたデータを取得し、ROMデータ記憶部64へ格納する(S20)。ROM36に格納されたデータの一部が未取得であれば(S22のN)、S14に戻り、未取得のデータを取得する。   The ROM data acquisition unit 70 determines the read address and read size of data in the ROM 36 of the peripheral device 16 (S14, S16). The ROM data acquisition unit 70 transmits to the peripheral device 16 a ROM read command for instructing to read data of the size determined in S16 from the address determined in S14 (S18). The ROM data acquisition unit 70 acquires the data stored in the ROM 36 from the peripheral device 16 as a response to the ROM read command, and stores it in the ROM data storage unit 64 (S20). If a part of the data stored in the ROM 36 is not acquired (N in S22), the process returns to S14 to acquire the unacquired data.

ROM36の全領域に格納されたデータの取得が完了した場合(S22のY)、ハッシュ値導出部72は、ROMデータ記憶部64に格納されたROMデータを所定のハッシュ関数へ入力し、ROMデータのハッシュ値を取得する(S24)。状態判定部74は、S24で取得されたハッシュ値と、ハッシュ値記憶部62に予め格納されたハッシュ値とを比較する。状態判定部74は、両者が一致すれば(S26のY)、周辺機器16を正常と判定し(S28)、両者が不一致であれば(S26のN)、周辺機器16を異常と判定する(S30)。判定結果出力部76は、判定結果に基づく後処理を実行する(S32)。   When the acquisition of the data stored in the entire area of the ROM 36 is completed (Y in S22), the hash value deriving unit 72 inputs the ROM data stored in the ROM data storage unit 64 to a predetermined hash function, and the ROM data Is obtained (S24). The state determination unit 74 compares the hash value acquired in S24 with the hash value stored in advance in the hash value storage unit 62. The state determination unit 74 determines that the peripheral device 16 is normal if they match (Y in S26) (S28), and if they do not match (N in S26), determines that the peripheral device 16 is abnormal (S26). S30). The determination result output unit 76 performs post-processing based on the determination result (S32).

第1実施例のIVI装置14によると、周辺機器16のROM36の全領域のデータに基づいて周辺機器16の正常性を判定する。周辺機器16のROM36内に不正なプログラムが存在すれば、取得した全領域のデータに基づくハッシュ値がその期待値と不一致になるため、IVI装置14は周辺機器16が異常と判定できる。また、ROM36内の不正プログラムが、正常なROMデータを生成し、返信するための作業領域の余地を無くし、当該不正プログラムによるなりすましを防止しやすくなる。   According to the IVI device 14 of the first embodiment, the normality of the peripheral device 16 is determined based on the data of the entire area of the ROM 36 of the peripheral device 16. If there is an unauthorized program in the ROM 36 of the peripheral device 16, the hash value based on the acquired data of all areas does not match the expected value, so the IVI device 14 can determine that the peripheral device 16 is abnormal. In addition, the malicious program in the ROM 36 eliminates room for a work area for generating and returning normal ROM data, and it is easy to prevent spoofing by the malicious program.

(第2実施例)
第2実施例では、周辺機器16における不正プログラムの有無をIVI装置14が判定する精度(言い換えれば正確さ、または完全性)を一層向上させる技術を示す。
(Second embodiment)
The second embodiment shows a technique for further improving the accuracy (in other words, accuracy or completeness) by which the IVI device 14 determines whether there is a malicious program in the peripheral device 16.

図7(a)−(c)は、被検査装置のROMに格納されるデータを模式的に示す。図7(a)は、ROMに格納される従来のデータ構成を示している。ROMの記憶領域は、被検査装置の動作を定めたプログラムが格納された領域であるプログラム領域80と、プログラムが未格納の領域(言い換えれば未使用の領域)である空き領域82に分かれる。空き領域82には、通常、空き領域を示す所定値が設定される。例えば、空き領域82に、オール0のビット列が設定されることがあり、また、オール1のビット列が設定されることもある。   FIGS. 7A to 7C schematically show data stored in the ROM of the device to be inspected. FIG. 7A shows a conventional data structure stored in the ROM. The storage area of the ROM is divided into a program area 80 that is an area in which a program that defines the operation of the device to be inspected is stored and an empty area 82 that is an area in which no program is stored (in other words, an unused area). In the empty area 82, a predetermined value indicating an empty area is usually set. For example, an all-zero bit string may be set in the empty area 82, and an all-one bit string may be set.

図7(b)は、被検査装置のROMに攻撃プログラム(言い換えれば不正プログラム)が存在する例を示している。攻撃者は、空き領域82がオール0のビット列であることを知っていることとする。攻撃者は、攻撃プログラム1のアドレスのデータを空き領域82へ退避しつつ、攻撃プログラム1をプログラム領域80に格納し、さらに攻撃プログラム2を空き領域82に格納する。攻撃プログラム1の格納領域(プログラム領域80)のメモリダンプが要求された場合、攻撃プログラム1は退避データを返す。また、空き領域82のメモリダンプが要求された場合、攻撃プログラム1は、空き領域82に相当するオール0ビット列のデータを、空き領域82のデータになりすまして返す。その結果、検査装置は、被検査装置のROM内に攻撃プログラムが存在することを検出することが困難になってしまう。   FIG. 7B shows an example in which an attack program (in other words, an unauthorized program) exists in the ROM of the device under test. Assume that the attacker knows that the empty area 82 is an all-zero bit string. The attacker stores the attack program 1 in the program area 80 while saving the address data of the attack program 1 in the free area 82, and further stores the attack program 2 in the free area 82. When a memory dump of the storage area (program area 80) of the attack program 1 is requested, the attack program 1 returns saved data. When a memory dump of the free area 82 is requested, the attack program 1 returns the data of the all 0 bit string corresponding to the free area 82 as data of the free area 82. As a result, it becomes difficult for the inspection device to detect the presence of an attack program in the ROM of the device under inspection.

図7(c)は、第2実施例においてROMに格納されるデータ構成を示している。第2実施例では、被検査装置のROMに当初格納するオリジナルデータ(すなわち更新データ)の構成が1つの特徴になる。具体的には、オリジナルデータにおけるプログラム領域80以外の空き領域82に、空き領域に対して通常設定されるデータとは異なるデータを設定する。言い換えれば、空き領域82に、空き領域を示す規則的なデータとは異なるデータを設定する。すなわち、空き領域82に、全てが0または1で構成されたデータあるいは所定のパターンの繰り返しで構成されたデータとは異なるデータを設定する。第2実施例では、空き領域82に、並びに規則性がないデータであり、および/または、アルゴリズム化が困難なデータである乱数列を設定する。   FIG. 7C shows a data structure stored in the ROM in the second embodiment. In the second embodiment, the configuration of original data (that is, update data) initially stored in the ROM of the device to be inspected is one feature. Specifically, data different from the data normally set for the empty area is set in the empty area 82 other than the program area 80 in the original data. In other words, data different from the regular data indicating the free area is set in the free area 82. That is, data different from data composed entirely of 0 or 1 or data composed of a predetermined pattern is set in the empty area 82. In the second embodiment, a random number sequence that is data having no regularity and / or data that is difficult to be algorithmized is set in the empty area 82.

第2実施例における検査システム10、IVI装置14、周辺機器16の構成は、第1実施例と同様である。以下、第1実施例と異なる構成として、更新データ生成装置20の構成を詳細に説明する。   The configurations of the inspection system 10, the IVI device 14, and the peripheral device 16 in the second embodiment are the same as those in the first embodiment. Hereinafter, the configuration of the update data generation device 20 will be described in detail as a configuration different from the first embodiment.

図8は、第2実施例の更新データ生成装置20の機能構成を示すブロック図である。更新データ生成装置20は、サイズ記憶部106、プログラム記憶部108、乱数生成部114、ROMバイナリ生成部116、更新データ生成部118、ハッシュ値導出部120を備える。   FIG. 8 is a block diagram illustrating a functional configuration of the update data generation device 20 according to the second embodiment. The update data generation device 20 includes a size storage unit 106, a program storage unit 108, a random number generation unit 114, a ROM binary generation unit 116, an update data generation unit 118, and a hash value derivation unit 120.

図8の各ブロックに対応するモジュールを含むコンピュータプログラムが、記録メディアに格納され、その記録メディアを介して更新データ生成装置20のストレージにインストールされてもよい。更新データ生成装置20のCPUは、ストレージに格納されたコンピュータプログラムをメインメモリへ適宜読み出して実行することにより、各ブロックの機能を発揮してもよい。図8のサイズ記憶部106およびプログラム記憶部108は、更新データ生成装置20のストレージやメモリがデータを記憶することで実現されてもよい。   A computer program including a module corresponding to each block in FIG. 8 may be stored in a recording medium and installed in the storage of the update data generation device 20 via the recording medium. The CPU of the update data generation device 20 may perform the function of each block by appropriately reading and executing a computer program stored in the storage into the main memory. The size storage unit 106 and the program storage unit 108 of FIG. 8 may be realized by storing data in the storage or memory of the update data generation device 20.

サイズ記憶部106は、IVI装置14のサイズ記憶部60に対応し、周辺機器16における検査対象のメモリであるROM36のサイズを示すデータを記憶する。プログラム記憶部108は、周辺機器16の動作を定めたプログラムであり、周辺機器16に実行させるべき1つ以上のプログラムのデータを記憶する。実施例では、周辺機器16で実行可能なコンパイル済のバイナリコードを記憶するが、変形例としてソースコードを記憶し、後述のROMバイナリ生成部116等が適宜周辺機器16で実行可能なバイナリコードへコンパイルしてもよい。   The size storage unit 106 corresponds to the size storage unit 60 of the IVI device 14 and stores data indicating the size of the ROM 36 that is a memory to be inspected in the peripheral device 16. The program storage unit 108 is a program that defines the operation of the peripheral device 16, and stores data of one or more programs to be executed by the peripheral device 16. In the embodiment, compiled binary code that can be executed by the peripheral device 16 is stored. However, as a modified example, source code is stored, and a ROM binary generation unit 116 and the like to be described later can be appropriately executed by the peripheral device 16. You may compile.

なお、サイズ記憶部106に記憶されるサイズのデータと、プログラム記憶部108に記憶されるプログラムのデータは、周辺機器16のプログラム作成者等が、ハードウェア仕様から、それらのデータを更新データ生成装置20へ登録してもよい。   The size data stored in the size storage unit 106 and the program data stored in the program storage unit 108 are generated by the program creator of the peripheral device 16 based on the hardware specifications and updated data is generated. You may register with the apparatus 20.

乱数生成部114は乱数を生成する。ここでいう乱数は、数学的な意味での真正乱数でなくてもよい。例えば、乱数シード値を適切に設定し、乱数の再現性がないようにした、ハードウェア乱数生成器を利用したハードウェア乱数や、乱数生成アルゴリズムを利用したソフトウェア乱数などの疑似乱数でもよい。   The random number generation unit 114 generates a random number. The random number here may not be a true random number in a mathematical sense. For example, it may be a pseudo random number such as a hardware random number using a hardware random number generator or a software random number using a random number generation algorithm in which a random number seed value is appropriately set so that the random number is not reproducible.

ROMバイナリ生成部116は、プログラム記憶部108に記憶された1つ以上のプログラムをまとめたデータであるROMバイナリを生成する。ROMバイナリは、1つ以上のプログラムの実行順序を定めたデータを含んでもよく、周辺機器16のROM36における所定形式の管理データを含んでもよい。   The ROM binary generation unit 116 generates ROM binary that is data in which one or more programs stored in the program storage unit 108 are collected. The ROM binary may include data defining the execution order of one or more programs, or may include management data in a predetermined format in the ROM 36 of the peripheral device 16.

更新データ生成部118は、周辺機器16のROM36のサイズを有するデータであり、ROM36に格納されるデータである更新データを生成する。図7(c)で示したように、更新データ生成部118は、ROMバイナリ生成部116により生成されたROMバイナリを更新データの一部に設定する。また、更新データ生成部118は、更新データにおけるROMバイナリが未設定の空き領域82に、乱数生成部114により生成された乱数列を設定する。   The update data generation unit 118 is data having the size of the ROM 36 of the peripheral device 16 and generates update data that is data stored in the ROM 36. As shown in FIG. 7C, the update data generation unit 118 sets the ROM binary generated by the ROM binary generation unit 116 as a part of the update data. Further, the update data generation unit 118 sets the random number sequence generated by the random number generation unit 114 in the empty area 82 in which the ROM binary in the update data is not set.

ハッシュ値導出部120は、更新データ生成部118により生成された更新データのハッシュ値を取得する。例えば、ハッシュ値導出部120は、SHA−1等の所定のハッシュ関数に更新データを入力することにより、当該ハッシュ関数から出力されたハッシュ値を導出することで取得してもよい。   The hash value derivation unit 120 acquires the hash value of the update data generated by the update data generation unit 118. For example, the hash value deriving unit 120 may obtain the hash value output from the hash function by inputting the update data to a predetermined hash function such as SHA-1.

更新データ生成部118は、生成した更新データと更新データサイズ情報とを所定の外部装置へ出力する。例えば、更新データ生成部118は、更新データを含むROM更新コマンドを周辺機器16へ送信し、周辺機器16のROM36に更新データを記憶させてもよい。また、更新データ生成部118は、更新データと更新データサイズ情報をIVI装置14へ送信し、IVI装置14から周辺機器16のROM36に更新データを登録させてもよい。また、更新データ生成部118は、更新データを周辺機器16へ提供する一方、更新データサイズ情報をIVI装置14へ提供する所定のサーバに対して更新データおよび更新データサイズ情報を登録してもよい。また、更新データ生成部118は、ユーザの指示に応じて、USBメモリ等の所定の記録メディアへ更新データおよび更新データサイズ情報を出力してもよい。   The update data generation unit 118 outputs the generated update data and update data size information to a predetermined external device. For example, the update data generation unit 118 may transmit a ROM update command including update data to the peripheral device 16 and store the update data in the ROM 36 of the peripheral device 16. Further, the update data generation unit 118 may transmit the update data and the update data size information to the IVI device 14 so that the update data is registered in the ROM 36 of the peripheral device 16 from the IVI device 14. Further, the update data generation unit 118 may register the update data and the update data size information with respect to a predetermined server that provides the update data to the peripheral device 16 and provides the update data size information to the IVI device 14. . In addition, the update data generation unit 118 may output update data and update data size information to a predetermined recording medium such as a USB memory in accordance with a user instruction.

ハッシュ値導出部120は、導出したハッシュ値を所定の外部装置へ出力する。例えば、ハッシュ値導出部120は、ハッシュ値をIVI装置14へ送信し、そのROM56に記憶させてもよい。また、ハッシュ値導出部120は、ハッシュ値をIVI装置14へ提供する所定のサーバに対してハッシュ値を登録してもよい。また、ハッシュ値導出部120は、ユーザの指示に応じて、USBメモリ等の所定の記録メディアへハッシュ値を出力してもよい。既述したように、更新データのハッシュ値は、IVI装置14のハッシュ値記憶部62に格納されて、周辺機器16の正常性判定時に参照される。   The hash value deriving unit 120 outputs the derived hash value to a predetermined external device. For example, the hash value deriving unit 120 may transmit the hash value to the IVI device 14 and store it in the ROM 56. The hash value deriving unit 120 may register the hash value with a predetermined server that provides the hash value to the IVI device 14. Further, the hash value deriving unit 120 may output the hash value to a predetermined recording medium such as a USB memory in accordance with a user instruction. As described above, the hash value of the update data is stored in the hash value storage unit 62 of the IVI device 14 and is referred to when determining the normality of the peripheral device 16.

以上の構成による更新データ生成装置20の動作を説明する。
図9は、更新データ生成装置20の動作を示すフローチャートである。不図示だが、サイズ記憶部106には、周辺機器16のROM36のサイズを示すデータが予め格納される。また、プログラム記憶部108には、周辺機器16の動作を定めたプログラムであり、更新データに含めるべきプログラムが予め格納される。ユーザから更新データの生成指示が入力された場合等、更新データを生成すべきタイミングにおいて、更新データ生成部118は、周辺機器16のROM36のサイズ分の記憶領域(ここでは「更新データ領域」と呼ぶ。)をメモリ(RAM等)に確保する(S42)。
The operation of the update data generation device 20 having the above configuration will be described.
FIG. 9 is a flowchart showing the operation of the update data generation device 20. Although not shown, the size storage unit 106 stores data indicating the size of the ROM 36 of the peripheral device 16 in advance. The program storage unit 108 is a program that determines the operation of the peripheral device 16, and stores a program to be included in the update data in advance. At a timing at which update data is to be generated, such as when an update data generation instruction is input from the user, the update data generation unit 118 stores a storage area (here, “update data area”) of the size of the ROM 36 of the peripheral device 16. Is stored in a memory (RAM or the like) (S42).

乱数生成部114は、乱数を生成し、更新データ生成部118は、更新データ領域の全領域に、乱数生成部114により生成された乱数列を設定する(S44)。ROMバイナリ生成部116は、プログラム記憶部108に保持されたプログラムを含むROMバイナリを生成する(S46)。更新データ生成部118は、乱数列が設定された更新データ領域の少なくとも一部領域にROMバイナリを上書き保存することにより更新データを生成する(S48)。これにより、図7(c)に示す構成の更新データが生成される。更新データ生成部118は、更新データを所定の外部装置へ送信する(S50)。更新データ生成装置20で生成された更新データは、最終的には周辺機器16のROM36に格納される。   The random number generation unit 114 generates a random number, and the update data generation unit 118 sets the random number sequence generated by the random number generation unit 114 in all areas of the update data area (S44). The ROM binary generation unit 116 generates a ROM binary including the program held in the program storage unit 108 (S46). The update data generation unit 118 generates update data by overwriting and storing the ROM binary in at least a partial area of the update data area in which the random number sequence is set (S48). As a result, update data having the configuration shown in FIG. 7C is generated. The update data generation unit 118 transmits the update data to a predetermined external device (S50). The update data generated by the update data generation device 20 is finally stored in the ROM 36 of the peripheral device 16.

ハッシュ値導出部120は、更新データのハッシュ値を取得する(S52)。ハッシュ値導出部120は、更新データのハッシュ値を所定の外部装置へ送信する(S54)。更新データ生成装置20で生成されたハッシュ値は、最終的にはIVI装置14のハッシュ値記憶部62に格納される。   The hash value deriving unit 120 acquires the hash value of the update data (S52). The hash value deriving unit 120 transmits the hash value of the update data to a predetermined external device (S54). The hash value generated by the update data generation device 20 is finally stored in the hash value storage unit 62 of the IVI device 14.

第2実施例では、検査対象となる周辺機器16のROM36において、その空き領域に乱数列が設定される。これにより、ROM36内に存在する不正プログラムが、空き領域のメモリダンプが要求された場合に、単純に0のビット列を返すことで正常になりすますことができなくなる。また、乱数列はアルゴリズム化が困難であるため、乱数列より小さいサイズの不正プログラムを作成することを困難にできる。さらにまた、乱数列はエントロピーが高く、一般的にデータ圧縮比(言い換えれば圧縮効率)が低い。そのため、ROM36の空き領域を圧縮して空いた領域に、プログラム領域80の元データ、または、不正プログラムを配置することを困難にすることができる。   In the second embodiment, a random number sequence is set in the empty area in the ROM 36 of the peripheral device 16 to be inspected. As a result, when an illegal program existing in the ROM 36 requests a memory dump of an empty area, it cannot be spoofed by simply returning a bit string of 0. In addition, since it is difficult to algorithmize a random number sequence, it is difficult to create a malicious program having a size smaller than the random number sequence. Furthermore, the random number sequence has high entropy and generally has a low data compression ratio (in other words, compression efficiency). For this reason, it is possible to make it difficult to place the original data of the program area 80 or the illegal program in the empty area of the ROM 36 after the empty area is compressed.

第2実施例では、周辺機器16のROM36の空き領域に乱数列を設定したが、空き領域に設定するデータは乱数列に制限されない。既述したように、空き領域に設定するデータは、全てが0または1で構成されたデータあるいは所定のパターンの繰り返しで構成されたデータとは異なるデータであればよい。また、空き領域に設定するデータは、アルゴリズム化が困難で、および/または、エントロピーが高いデータがより好ましい。このようなデータの例として、圧縮済みデータを、周辺機器16のROM36の空き領域に設定してもよい。言い換えれば、更新データ生成装置20は、更新データにおけるプログラムデータを含まない空き領域に、乱数列に代えて圧縮済みデータのビット列を設定してもよい。なお、圧縮済データは、例えば、所定の画像に関するJPEGデータでもよく、更新データのプログラム領域80に設定されるデータ(プログラムデータ)を圧縮したデータでもよい。この変形例においても第2実施例と同様の効果を奏する。   In the second embodiment, the random number sequence is set in the free area of the ROM 36 of the peripheral device 16, but the data set in the free area is not limited to the random number sequence. As described above, the data to be set in the free space may be data different from data composed entirely of 0 or 1 or data composed of repeated predetermined patterns. The data set in the free area is more preferably data that is difficult to algorithmize and / or has high entropy. As an example of such data, the compressed data may be set in a free area of the ROM 36 of the peripheral device 16. In other words, the update data generation device 20 may set a bit string of compressed data instead of a random number string in an empty area that does not include program data in the update data. The compressed data may be, for example, JPEG data relating to a predetermined image, or data obtained by compressing data (program data) set in the program area 80 of update data. This modification also has the same effect as the second embodiment.

(第3実施例)
第3実施例では、周辺機器16における不正プログラムの有無をIVI装置14が判定する精度(言い換えれば正確さ、または完全性)をより一層向上させる技術を示す。
(Third embodiment)
The third embodiment shows a technique for further improving the accuracy (in other words, accuracy or completeness) by which the IVI device 14 determines whether there is a malicious program in the peripheral device 16.

図10(a)−(c)は、被検査装置のROMに格納されるデータの構成を模式的に示す。被検査装置のROMに格納されたROMバイナリは、一般的に最大60%のサイズまで圧縮することができる。図10(a)は圧縮前の状態を示している。図10(b)は圧縮後の状態を示し、ROMバイナリ(プログラム領域80のデータ)を圧縮して空いた領域を斜線による網掛けで示している。図10(c)で示すように、攻撃者は、ROMバイナリを圧縮して空いた領域に攻撃プログラム1を仕掛ける可能性がある。攻撃プログラム1は、プログラム領域80に対するメモリダンプ要求を受信した場合、ROMバイナリの圧縮データを伸張し、伸張後のROMバイナリを返す。その結果、検査装置は、被検査装置のROM内に攻撃プログラム1が存在することを検出することが困難になってしまう。   FIGS. 10A to 10C schematically show the structure of data stored in the ROM of the device under inspection. ROM binaries stored in the ROM of the device under test can generally be compressed to a size of up to 60%. FIG. 10A shows a state before compression. FIG. 10 (b) shows a state after compression, and the area freed by compressing the ROM binary (data in the program area 80) is indicated by hatching with hatching. As shown in FIG. 10C, the attacker may set up the attack program 1 in an empty area by compressing the ROM binary. When the attack program 1 receives a memory dump request for the program area 80, the attack program 1 decompresses the compressed data of the ROM binary and returns the decompressed ROM binary. As a result, it becomes difficult for the inspection device to detect the presence of the attack program 1 in the ROM of the device under inspection.

そこで、第3実施例の検査装置は、被検査装置からの応答を待つ時間を設けるあるいは短くして制限する。すなわち、上述したように圧縮データを伸張することにより生じる応答の遅延を許容しない。さらに、第3実施例の検査装置は、被検査装置のROMに格納されたデータの読み出しアドレスと読み出しサイズの少なくとも一方をランダムに決定する。   Therefore, the inspection apparatus of the third embodiment limits the time by waiting for a response from the apparatus to be inspected or by shortening it. That is, the response delay caused by decompressing the compressed data as described above is not allowed. Furthermore, the inspection apparatus of the third embodiment randomly determines at least one of the read address and the read size of the data stored in the ROM of the inspected apparatus.

図11(a)−(d)は、被検査装置のROM(実施例では周辺機器16のROM36)に格納されたデータの読み出し方法を模式的に示す。図中の1st〜5thは、データ読み出しの順番を示している。   FIGS. 11A to 11D schematically show a method of reading data stored in the ROM of the device under test (in the embodiment, the ROM 36 of the peripheral device 16). In the figure, 1st to 5th indicate the order of data reading.

図11(a)は、第1の読み出し方法であるシーケンシャル固定長読み出しを模式的に示している。シーケンシャル固定長読み出しでは、ROM36の先頭アドレスから、固定サイズのデータを順次読み出していく。例えば、第1実施例および第2実施例では、シーケンシャル固定長読み出しが適用されてもよい。   FIG. 11A schematically shows sequential fixed-length reading, which is the first reading method. In sequential fixed-length reading, fixed-size data is sequentially read from the leading address of the ROM 36. For example, in the first embodiment and the second embodiment, sequential fixed length reading may be applied.

図11(b)は、第2の読み出し方法であるランダムサイズ読み出しを模式的に示している。ランダムサイズ読み出しでは、ROM36の先頭アドレスから、ランダムに決定したサイズのデータを順次読み出していく。例えば、読み出しの都度、動的に乱数を生成し、生成した乱数に基づいて読み出しサイズを決定してもよい。   FIG. 11B schematically shows random size reading which is the second reading method. In random size reading, data of a randomly determined size is sequentially read from the head address of the ROM 36. For example, a random number may be dynamically generated each time reading is performed, and the read size may be determined based on the generated random number.

図11(c)は、第3の読み出し方法であるランダムアドレス固定長読み出しを模式的に示している。ランダムアドレス固定長読み出しでは、ランダムに決定したROM36のアドレスから、固定サイズのデータを読み出していく。   FIG. 11C schematically shows random address fixed length reading which is the third reading method. In the random address fixed length reading, data of a fixed size is read from the address of the ROM 36 determined at random.

図11(d)は、第4の読み出し方法であるランダムアドレス・ランダムサイズ読み出しを模式的に示している。ランダムアドレス・ランダムサイズ読み出しでは、ランダムに決定したROM36のアドレスから、ランダムに決定したサイズのデータを読み出していく。第3実施例では、ランダムアドレス・ランダムサイズ読み出しを適用するが、変形例として、ランダムサイズ読み出し、または、ランダムアドレス固定長読み出しを適用してもよい。   FIG. 11D schematically shows random address / random size reading which is the fourth reading method. In the random address / random size reading, data of a randomly determined size is read from the address of the ROM 36 determined at random. In the third embodiment, random address / random size reading is applied, but as a modification, random size reading or random address fixed length reading may be applied.

なお、ランダムアドレス固定長読み出しと、ランダムアドレス・ランダムサイズ読み出しでは、読み出し領域の重複を許容してもよく、重複を排除してもよい。読み出し領域の重複を許容する場合、ランダムアドレス固定長読み出しでは、図11(c)で示すように、2回目の読み出しの領域と5回目の読み出しの領域が重複してもよい。また、ランダムアドレス・ランダムサイズ読み出しでは、図11(d)で示すように、3回目の読み出しの領域(斜線による網掛け領域)の一部と、5回目の読み出しの領域(縦線による網掛け領域)の一部が重複してもよい。   In random address fixed length reading and random address / random size reading, duplication of read areas may be allowed, or duplication may be eliminated. In the case where the reading area is allowed to be overlapped, in the random address fixed-length reading, as shown in FIG. 11C, the second reading area and the fifth reading area may overlap. In random address / random size reading, as shown in FIG. 11 (d), a part of the third reading area (shaded area with diagonal lines) and the fifth reading area (shaded with vertical lines). Part of (region) may overlap.

第3実施例のIVI装置14の機能ブロックは、第1実施例(図5)と同じである。以下、第3実施例のIVI装置14の構成について、第1実施例または第2実施例で説明済みの内容は適宜省略し、上記実施例と異なる点を主に説明する。   The functional blocks of the IVI device 14 of the third embodiment are the same as those of the first embodiment (FIG. 5). Hereinafter, with respect to the configuration of the IVI apparatus 14 of the third embodiment, the contents already described in the first embodiment or the second embodiment are omitted as appropriate, and differences from the above embodiment will be mainly described.

ROMデータ取得部70は、周辺機器16のROM36の一部領域に格納されたデータを取得する処理を複数回繰り返すことにより、ROM36の全領域に格納されたデータであるROMデータを取得する。ROMデータ取得部70は、複数回のデータ取得のそれぞれで指定する読み出しアドレスをランダムに決定し、かつ、複数回のデータ取得のそれぞれで指定する読み出しアドレスもランダムに決定する。例えば、ROMデータ取得部70は、更新データ生成装置20の乱数生成部114に対応する乱数生成部を含み、乱数生成部により生成された乱数値に基づいて、読み出しアドレスと読み出しサイズの両方を、規則性がない値に決定してもよい。   The ROM data acquisition unit 70 acquires ROM data that is data stored in the entire area of the ROM 36 by repeating the process of acquiring data stored in a partial area of the ROM 36 of the peripheral device 16 a plurality of times. The ROM data acquisition unit 70 randomly determines a read address specified for each of a plurality of times of data acquisition, and also randomly determines a read address specified for each of a plurality of times of data acquisition. For example, the ROM data acquisition unit 70 includes a random number generation unit corresponding to the random number generation unit 114 of the update data generation device 20, and based on the random number value generated by the random number generation unit, both the read address and the read size are obtained. You may determine to a value without regularity.

状態判定部74は、ROMデータ取得部70がROM読み出しコマンドを周辺機器16へ送信してから、周辺機器16のROM36に格納されたデータが提供されるまでの時間である応答時間を監視する。ROM読み出しコマンドに対する応答時間が、当該ROM読み出しコマンドに設定された読み出しサイズに応じた閾値(以下「待ち時間閾値」とも呼ぶ。)を超過した場合、状態判定部74は、周辺機器16が異常と判定する。   The state determination unit 74 monitors the response time, which is the time from when the ROM data acquisition unit 70 transmits the ROM read command to the peripheral device 16 until the data stored in the ROM 36 of the peripheral device 16 is provided. When the response time to the ROM read command exceeds a threshold value (hereinafter also referred to as “latency threshold value”) corresponding to the read size set in the ROM read command, the state determination unit 74 determines that the peripheral device 16 is abnormal. judge.

実施例の状態判定部74は、読み出しサイズと、IVI装置14〜周辺機器16間の通信速度に基づいて待ち時間閾値を決定する。例えば、読み出しサイズが100Kバイトで、車載ネットワーク18の通信速度が500Kbps(CAN)の場合、読み出しサイズ/通信速度の1.6秒を待ち時間閾値として決定してもよい。   The state determination unit 74 according to the embodiment determines a waiting time threshold based on the read size and the communication speed between the IVI device 14 and the peripheral device 16. For example, when the read size is 100 Kbytes and the communication speed of the in-vehicle network 18 is 500 Kbps (CAN), 1.6 seconds of the read size / communication speed may be determined as the waiting time threshold value.

以上の構成による第3実施例のIVI装置14の動作を説明する。
図12は、図6に対応し、IVI装置14の動作を示すフローチャートである。同図のS60、S62は、図6のS10、S12と同じであるため説明を省略する。ROMデータ取得部70は、第1の乱数値に基づいて読み出しアドレスをランダムに決定し(S64)、別途取得した第2の乱数値に基づいて読み出しサイズをランダムに決定し(S66)、読み出しサイズと通信速度に応じて待ち時間閾値を決定する(S68)。ROMデータ取得部70は、読み出しアドレスと読み出しサイズを指定したROM読み出しコマンドを周辺機器16へ送信する(S70)。
The operation of the IVI device 14 of the third embodiment having the above configuration will be described.
FIG. 12 is a flowchart corresponding to FIG. 6 and showing the operation of the IVI device 14. S60 and S62 in the figure are the same as S10 and S12 in FIG. The ROM data acquisition unit 70 randomly determines a read address based on the first random number value (S64), randomly determines a read size based on the second random number value acquired separately (S66), and reads the read size. The waiting time threshold is determined according to the communication speed (S68). The ROM data acquisition unit 70 transmits a ROM read command designating a read address and a read size to the peripheral device 16 (S70).

ROM読み出しコマンドを送信後、周辺機器16からROMデータを受信するまでの応答時間が待ち時間閾値を超過した場合(S72のY)、状態判定部74は、周辺機器が異常と判定する(S84)。複数回のデータ取得の途中で応答時間が待ち時間閾値を超過した場合、以降のデータ取得をスキップしてもよい。周辺機器16の応答時間が待ち時間閾値以下であれば(S72のN)、S74へ進む。S74〜S86の処理は、図6のS20〜S32の処理と同じであるため説明を省略する。   If the response time until the ROM data is received from the peripheral device 16 after transmitting the ROM read command exceeds the waiting time threshold (Y in S72), the state determination unit 74 determines that the peripheral device is abnormal (S84). . If the response time exceeds the waiting time threshold in the middle of multiple data acquisitions, subsequent data acquisition may be skipped. If the response time of the peripheral device 16 is equal to or less than the waiting time threshold (N in S72), the process proceeds to S74. Since the process of S74-S86 is the same as the process of S20-S32 of FIG. 6, description is abbreviate | omitted.

第3実施例のIVI装置14によると、図10(a)(b)(c)に関連して説明したように、圧縮したROMバイナリをメモリダンプ時に伸張して返すような攻撃プログラムが周辺機器16のROM36に存在する場合も、周辺機器16の異常を検出しやすくなる。具体的には、圧縮データの伸張にはある程度の時間を要するところ、読み出しサイズに応じた待ち時間閾値を設けることで、周辺機器16の異常(例えばROM36に攻撃プログラムが存在する可能性が高いこと)を待ち時間閾値の超過により検出することができる。   According to the IVI device 14 of the third embodiment, as described with reference to FIGS. 10A, 10B, and 10C, an attack program that expands and returns a compressed ROM binary at the time of memory dump is a peripheral device. Even in the 16 ROMs 36, it is easy to detect an abnormality of the peripheral device 16. Specifically, it takes a certain amount of time to decompress the compressed data. By providing a waiting time threshold corresponding to the read size, an abnormality of the peripheral device 16 (for example, there is a high possibility that an attack program exists in the ROM 36). ) Can be detected by exceeding the waiting time threshold.

また、第3実施例のIVI装置14は、周辺機器16のROM36の格納データを、ランダムな位置からランダムなサイズ分読み出す。ROM36内の攻撃プログラムが正規のROMバイナリを圧縮した場合、ランダムな位置からランダムなサイズのデータを読み出すためのメモリ確保が難しいため、ROMバイナリを伸張して正規のデータを返信することを困難にできる。また、圧縮データを伸張しつつ、ランダムなアドレスからランダムなサイズのデータを読み出す処理は一般的に時間を要するため、待ち時間閾値の超過により周辺機器16の異常を検出しやすくなる。   Further, the IVI device 14 of the third embodiment reads out the data stored in the ROM 36 of the peripheral device 16 by a random size from a random position. When an attack program in the ROM 36 compresses a regular ROM binary, it is difficult to secure a memory for reading random size data from a random position, so it is difficult to return the regular data by decompressing the ROM binary. it can. In addition, the process of reading out random size data from a random address while decompressing the compressed data generally requires time, so that it is easy to detect an abnormality in the peripheral device 16 when the waiting time threshold is exceeded.

以上、本発明を第1〜第3実施例をもとに説明した。これらの実施例は例示であり、それらの各構成要素あるいは各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。   The present invention has been described based on the first to third embodiments. Those skilled in the art will understand that these embodiments are exemplifications, and that various modifications can be made to each component or combination of each treatment process, and such modifications are within the scope of the present invention. is there.

第1変形例を説明する。上記第3実施例では、周辺機器16のROMデータを読み出す方式として、ランダムアドレス・ランダムサイズ読み出しを適用した。変形例として、図11(b)に記載のランダムサイズ読み出しを適用してもよく、図11(c)に記載のランダムアドレス固定長読み出しを適用してもよい。いずれの方式を適用した場合も、周辺機器16のROM36に存在する攻撃プログラムが、ROMバイナリの圧縮データを伸張しつつ、ランダムな指定アドレスまたはランダムな指定サイズに応じた正しいデータを返信することを困難にできる。また、制限時間内に正しいデータを返信することを一層困難にできる。   A first modification will be described. In the third embodiment, random address / random size reading is applied as a method of reading the ROM data of the peripheral device 16. As a modification, the random size reading described in FIG. 11B may be applied, or the random address fixed length reading described in FIG. 11C may be applied. Whichever method is applied, the attack program existing in the ROM 36 of the peripheral device 16 returns the correct data corresponding to the random designated address or the random designated size while expanding the compressed data of the ROM binary. Can be difficult. In addition, it can be made more difficult to return correct data within the time limit.

第2変形例を説明する。図13(a)(b)は、第2変形例において周辺機器16のROM36に格納される更新データの構成を模式的に示す。図13(a)は、複数の更新データがROM36に格納される例を示している。更新データ生成装置20は、ROMバイナリと乱数列との組み合わせ(すなわち更新データ)単位にデータサイズとハッシュ値を導出し、IVI装置14は、更新データ単位に導出されたデータサイズとハッシュ値を記憶してもよい。IVI装置14は、複数の更新データのそれぞれについて、更新データのサイズ分のデータを周辺機器16から取得し、取得データのハッシュ値と更新データのハッシュ値を比較してもよい。   A second modification will be described. FIGS. 13A and 13B schematically show the configuration of update data stored in the ROM 36 of the peripheral device 16 in the second modification. FIG. 13A shows an example in which a plurality of update data is stored in the ROM 36. The update data generation device 20 derives the data size and hash value for each combination of ROM binary and random number sequence (that is, update data), and the IVI device 14 stores the data size and hash value derived for the update data unit. May be. For each of the plurality of update data, the IVI device 14 may acquire data for the size of the update data from the peripheral device 16 and compare the hash value of the acquired data with the hash value of the update data.

図13(b)は、1つの更新データに複数のROMバイナリが含まれる例を示している。更新データ生成装置20は、複数のROMバイナリを含む更新データのデータサイズとハッシュ値を導出し、IVI装置14は、上記更新データのデータサイズとハッシュ値を記憶してもよい。IVI装置14は、上記更新データのサイズ分のデータを周辺機器16から取得し、取得データのハッシュ値と更新データのハッシュ値を比較してもよい。   FIG. 13B shows an example in which a plurality of ROM binaries are included in one update data. The update data generation device 20 may derive the data size and hash value of update data including a plurality of ROM binaries, and the IVI device 14 may store the data size and hash value of the update data. The IVI device 14 may acquire data for the size of the update data from the peripheral device 16 and compare the hash value of the acquired data with the hash value of the update data.

第3変形例を説明する。IVI装置14と周辺機器16は、チャレンジ・レスポンス型でデータを送受してもよい。図14は、チャレンジ・レスポンス型のデータ送受の構成を模式的に示す。IVI装置14と周辺機器16は、共通鍵である鍵Kを記憶する。また、IVI装置14は、周辺機器16のROMデータの期待値であるハッシュ値Hを記憶する。また、周辺機器16のROM36の全領域には、第2実施例と同様に、ROMバイナリと乱数列とを含む更新データが当初格納される。   A third modification will be described. The IVI device 14 and the peripheral device 16 may send and receive data in a challenge / response manner. FIG. 14 schematically shows a configuration of challenge / response data transmission / reception. The IVI device 14 and the peripheral device 16 store a key K that is a common key. In addition, the IVI device 14 stores a hash value H that is an expected value of ROM data of the peripheral device 16. Further, in the entire area of the ROM 36 of the peripheral device 16, update data including the ROM binary and the random number sequence is initially stored as in the second embodiment.

本変形例のIVI装置14は、チャレンジ送信部と状態判定部を備える。チャレンジ送信部は実施例のROMデータ取得部70に対応し、状態判定部は実施例の状態判定部74に対応する。また、本変形例の周辺機器16は、ハッシュ値導出部とレスポンス送信部を備える。ハッシュ値導出部は、実施例のハッシュ値導出部72に対応する。   The IVI device 14 of this modification includes a challenge transmission unit and a state determination unit. The challenge transmission unit corresponds to the ROM data acquisition unit 70 of the embodiment, and the state determination unit corresponds to the state determination unit 74 of the embodiment. In addition, the peripheral device 16 of this modification includes a hash value deriving unit and a response transmitting unit. The hash value deriving unit corresponds to the hash value deriving unit 72 of the embodiment.

IVI装置14のチャレンジ送信部は、検査タイミングにおいて所定の乱数発生器を用いて乱数値を動的に決定し、その乱数値に基づくチャレンジCを周辺機器16へ送信する。チャレンジCは乱数値そのものでもよい。周辺機器16のハッシュ値導出部は、ROMデータ(すなわちROM36の全領域に格納されたROMバイナリと乱数列)を所定のハッシュ関数に入力し、ROMデータのハッシュ値を取得する。周辺機器16のレスポンス送信部は、所定の規則にてチャレンジとハッシュ値とを連結したデータを鍵Kに基づいて暗号化し、所定サイズの暗号化データをレスポンスデータとしてIVI装置14へ送信する。   The challenge transmission unit of the IVI device 14 dynamically determines a random value using a predetermined random number generator at the inspection timing, and transmits a challenge C based on the random value to the peripheral device 16. The challenge C may be a random value itself. The hash value deriving unit of the peripheral device 16 inputs the ROM data (that is, the ROM binary and random number sequence stored in the entire area of the ROM 36) to a predetermined hash function, and acquires the hash value of the ROM data. The response transmission unit of the peripheral device 16 encrypts data obtained by connecting the challenge and the hash value according to a predetermined rule based on the key K, and transmits the encrypted data of a predetermined size to the IVI device 14 as response data.

IVI装置14の状態判定部は、鍵Kに基づいてレスポンスデータを復号し、復号結果として、チャレンジとハッシュ値とが連結したデータを取得する。チャレンジのデータサイズは既知であるため、状態判定部は、チャレンジとハッシュ値との連結規則にしたがって、復号結果のデータからチャレンジとハッシュ値を抽出する。例えば、復号結果の先頭から所定バイト分をチャレンジとして抽出し、残りの部分をハッシュ値として抽出してもよい。   The state determination unit of the IVI device 14 decrypts the response data based on the key K, and acquires data in which the challenge and the hash value are connected as a decryption result. Since the data size of the challenge is already known, the state determination unit extracts the challenge and the hash value from the decrypted data according to the connection rule between the challenge and the hash value. For example, a predetermined byte from the beginning of the decryption result may be extracted as a challenge, and the remaining part may be extracted as a hash value.

状態判定部は、(1)チャレンジの送信からレスポンスデータを受信するまでの応答時間が、レスポンスデータのサイズに基づく待ち時間閾値以内であり、かつ、(2)レスポンスデータから抽出したチャレンジが、周辺機器16へ送信したチャレンジと一致し、かつ、(3)レスポンスデータから抽出したハッシュ値が、予め記憶した期待値としてのハッシュ値と一致する場合に周辺機器16が正常と判定する。その一方、状態判定部は、上記(1)〜(3)の少なくとも1つが満たされない場合、周辺機器16が異常と判定する。   The state determination unit (1) the response time from the transmission of the challenge to the reception of the response data is within a waiting time threshold based on the size of the response data, and (2) the challenge extracted from the response data is The peripheral device 16 is determined to be normal when it matches the challenge transmitted to the device 16 and (3) the hash value extracted from the response data matches the hash value as the expected value stored in advance. On the other hand, the state determination unit determines that the peripheral device 16 is abnormal when at least one of the above (1) to (3) is not satisfied.

第3変形例の態様によると、周辺機器16のROM36に存在する攻撃プログラムが、ROM36の格納データが正常であるように偽装することを困難にできるとともに、周辺機器16からIVI装置14へ提供されるデータ量を低減することができる。また、周辺機器16で生成されたハッシュ値が直接通信網を流れないためセキュリティを一層高めることができる。また、チャレンジは検査の都度決定されるため、攻撃プログラムが予めレスポンスデータを用意しておくことができず、攻撃プログラムがROM36の格納データが正常であるように偽装することを一層困難にできる。   According to the aspect of the third modification, it is difficult for the attack program existing in the ROM 36 of the peripheral device 16 to be disguised so that the data stored in the ROM 36 is normal, and is provided from the peripheral device 16 to the IVI device 14. Data amount can be reduced. Further, since the hash value generated by the peripheral device 16 does not flow directly through the communication network, security can be further enhanced. Further, since the challenge is determined at each inspection, the attack program cannot prepare response data in advance, and it is further difficult for the attack program to disguise the stored data in the ROM 36 as normal.

上記第3変形例では、チャレンジ・レスポンス型でデータを送受したが、周辺機器16はIVI装置14へROMデータ(第2実施例のROMバイナリ+乱数列)のハッシュ値を送信する構成であってもよい。この構成においても、周辺機器16のROM36に存在する攻撃プログラムが、ROM36の格納データが正常であるように偽装することを困難にできる。また、上記第3実施例では言及していないが、周辺機器16のROM36には、図13(a)で示したように、複数の更新データが格納されてよい。IVI装置14のチャレンジ送信部は、ROM36に格納された複数の更新データのアドレスをランダムな順序で指定して複数の更新データを順次取得してもよい。IVI装置14の状態判定部は、更新データごとにハッシュ値の比較を実行してもよい。   In the third modified example, data is transmitted and received in a challenge / response manner, but the peripheral device 16 is configured to transmit a hash value of ROM data (ROM binary + random number sequence in the second embodiment) to the IVI device 14. Also good. Even in this configuration, it is possible to make it difficult for an attack program existing in the ROM 36 of the peripheral device 16 to be disguised so that the data stored in the ROM 36 is normal. Although not mentioned in the third embodiment, a plurality of update data may be stored in the ROM 36 of the peripheral device 16 as shown in FIG. The challenge transmission unit of the IVI device 14 may sequentially acquire the plurality of update data by designating the addresses of the plurality of update data stored in the ROM 36 in a random order. The state determination unit of the IVI device 14 may compare hash values for each update data.

第4変形例を説明する。IVI装置14のROMデータ取得部70は、車両12のイグニッションがオフからオンへ切り替えられるごとに、周辺機器16のROM36の一部領域に格納されたデータを取得してもよい。言い換えれば、イグニッションがオンにされる毎に、周辺機器16のROMデータの一部を取得していき、所定回数イグニッションがオンにされた場合に、ROM36の全領域のデータ取得を完了してもよい。例えば、図11(a)−(d)のいずれのデータ読み出し方式を適用する場合でも、1回目のイグニッションのオン時に1st領域のデータを取得し、2回目のイグニッションのオン時に2nd領域のデータを取得してもよい。   A fourth modification will be described. The ROM data acquisition unit 70 of the IVI device 14 may acquire data stored in a partial area of the ROM 36 of the peripheral device 16 each time the ignition of the vehicle 12 is switched from off to on. In other words, every time the ignition is turned on, a part of the ROM data of the peripheral device 16 is acquired, and when the ignition is turned on a predetermined number of times, the data acquisition of the entire area of the ROM 36 is completed. Good. For example, in the case of applying any of the data reading methods of FIGS. 11A to 11D, the data of the 1st area is acquired when the first ignition is turned on, and the data of the 2nd area is obtained when the second ignition is turned on. You may get it.

この態様によると、イグニッションがオンにされたことを契機とする各回の検査処理の時間を短縮でき、検査処理の実行により他の処理の実行が妨げられ、または遅延することを抑制できる。なお、周辺機器16のROM36内に存在しうる不正プログラムが、提供が要求されるデータを予測できないように、読み出しアドレスと読み出しサイズの少なくとも一方をランダムに決定すること(第3実施例の構成)が好ましい。   According to this aspect, it is possible to shorten the time for each inspection process triggered by the ignition being turned on, and to prevent the execution of other processes from being hindered or delayed due to the execution of the inspection process. It should be noted that at least one of the read address and the read size is randomly determined so that a malicious program that may exist in the ROM 36 of the peripheral device 16 cannot predict the data requested to be provided (configuration of the third embodiment). Is preferred.

第5変形例を説明する。IVI装置14は、車両に搭載された複数の被検査装置(周辺機器16、ECU30)のROMの格納データを検査してもよい。IVI装置14は、1回の検査タイミングにおいて、複数の被検査装置に対する検査処理を並行実行もしくは順次実行してもよく、複数回の検査タイミングにおいて、複数の被検査装置に対する検査処理を分散して実行してもよい。また、IVI装置14は、各被検査装置に対する検査結果を外部のサーバ(不図示)へ送信してもよい。   A fifth modification will be described. The IVI device 14 may inspect the data stored in the ROMs of a plurality of devices to be inspected (peripheral devices 16, ECU 30) mounted on the vehicle. The IVI device 14 may execute inspection processes for a plurality of devices to be inspected in parallel or sequentially at one inspection timing, and distribute inspection processes for a plurality of devices to be inspected at a plurality of inspection timings. May be executed. Further, the IVI device 14 may transmit the inspection result for each device to be inspected to an external server (not shown).

第6変形例を説明する。上記実施例では検査装置をIVI装置14としたが、検査装置はIVI装置14には限られない。例えば、検査装置は、周辺機器16のメモリのデータを書き換えるソフトウェアがインストールされたPC、スマートフォン、タブレット端末等であってもよい。この場合、検査装置と周辺機器16は、USB接続されてもよい。また、検査装置は、車両12外部のサーバであってもよく、この場合、サーバと周辺機器16は、車両12外部のネットワークおよび車載ネットワーク18を介して接続されてもよい。   A sixth modification will be described. In the above embodiment, the inspection apparatus is the IVI apparatus 14, but the inspection apparatus is not limited to the IVI apparatus 14. For example, the inspection device may be a PC, a smartphone, a tablet terminal, or the like in which software for rewriting data in the memory of the peripheral device 16 is installed. In this case, the inspection apparatus and the peripheral device 16 may be connected by USB. The inspection device may be a server outside the vehicle 12, and in this case, the server and the peripheral device 16 may be connected via a network outside the vehicle 12 and the in-vehicle network 18.

上記実施例および変形例に記載の技術の適用範囲は、車両12に関連する装置に制限されない。検査装置と被検査装置のいずれについても様々な種類の電子機器(例えばサーバ、PC、スマートフォン、タブレット端末等)にて実現できる。すなわち、上記実施例および変形例に記載の技術によると、様々な種類の電子機器における不正プログラムの有無を当該電子機器の外部から判定する精度(言い換えれば正確さ)を向上させることができる。   The scope of application of the techniques described in the above embodiments and modifications is not limited to devices related to the vehicle 12. Both the inspection device and the device to be inspected can be realized by various types of electronic devices (for example, a server, a PC, a smartphone, a tablet terminal, etc.). That is, according to the techniques described in the above-described embodiments and modifications, it is possible to improve the accuracy (in other words, accuracy) of determining the presence or absence of a malicious program in various types of electronic devices from the outside of the electronic devices.

第7変形例を説明する。IVI装置14と周辺機器16は車載ネットワーク18を介して接続しているが、間にゲートウェイ装置を介した多段の、車載ネットワーク18構成であってもよい。   A seventh modification will be described. Although the IVI device 14 and the peripheral device 16 are connected via the in-vehicle network 18, a multi-stage in-vehicle network 18 configuration via a gateway device may be used.

IVI装置14では周辺機器16が複数ある場合に、サイズ記憶部60、ハッシュ値記憶部62をテーブル化して記憶し、ROMデータ記憶部64を十分な大きさを確保し、周辺機器16それぞれで共用する構成であってもかまわない。   When there are a plurality of peripheral devices 16 in the IVI device 14, the size storage unit 60 and the hash value storage unit 62 are stored in a table, and the ROM data storage unit 64 is secured in a sufficient size and shared by the peripheral devices 16. It does not matter even if it is the composition to do.

IVI装置14では周辺機器16のサイズ情報をサイズ記憶部60に、ハッシュ値をハッシュ値記憶部62に記憶するが、初めて周辺機器に書き込む時に、ライトワンス(1回のみ書き込み可能)な記憶領域に、初めて書き込んだフラグ(値)を記録し、このフラグが存在する間は、IVI装置14で周辺機器16の更新データが正常でない限り、更新しない方式を行ってもかまわない。   In the IVI device 14, the size information of the peripheral device 16 is stored in the size storage unit 60 and the hash value is stored in the hash value storage unit 62. The flag (value) written for the first time is recorded, and while this flag is present, the IVI device 14 may perform a method of not updating unless the update data of the peripheral device 16 is normal.

IVI装置14で周辺機器16の更新結果、S28およびS30、S82およびS84の結果を、不記載のサーバに送信し、サーバにて更新状況を集中監視する方式を行ってもかまわない。   The IVI device 14 may transmit the update result of the peripheral device 16 and the results of S28 and S30, S82 and S84 to a server not described, and the server may perform a centralized monitoring of the update status.

IVI装置14で周辺機器16の更新結果、S30または、S84の異常となった場合に、不記載のログ記録部への保存、不記載のサーバへの通知後の、サーバ(別経路)からの再更新を行ってもかまわない。   When the update result of the peripheral device 16 in the IVI device 14 is abnormal in S30 or S84, from the server (separate route) after saving to the unrecorded log recording unit and notifying the unlisted server You can re-update.

工場での製造時に、最初、IVI装置14は、特に他社の周辺機器16を対象とした場合、サイズ記憶部60の値は、機器のハードウェア仕様から入手できるが、ハッシュ値記憶部62の値(ハッシュ値)は持っていない。その後組立工程にて、電源、対象機器と車載ネットワーク18で接続する。この工程で、IVI装置14が、周辺機器16に対して、S12の周辺機器16の全ROMサイズ分のメモリを確保、S44の乱数を生成し、S14〜S22でサイズ記憶部60を読み出し、S48の乱数を含む更新データを生成する。これに対して、S50のハッシュ値を生成し、ハッシュ値をハッシュ値記憶部62に記録する。そして、乱数を含む更新データを周辺機器16に対して書き込みを行う。また、IVI装置14では、不記載のライトワンス(1回のみ書き込み可能)な記憶領域に、乱数を含む更新データを周辺機器16に対して書き込んだことを記録する。このような方法で、組立工場でIVI装置14が周辺機器16に対して、乱数を含む更新データを生成して書き込む方式を行ってもかまわない。   At the time of manufacturing at the factory, the IVI device 14 is initially available for the peripheral device 16 of another company, the value of the size storage unit 60 can be obtained from the hardware specification of the device, but the value of the hash value storage unit 62 I do not have (hash value). Thereafter, in the assembly process, the power source and the target device are connected via the in-vehicle network 18. In this step, the IVI device 14 secures the memory for all the ROM sizes of the peripheral device 16 in S12 with respect to the peripheral device 16, generates a random number in S44, reads the size storage unit 60 in S14 to S22, and S48 Generate update data containing random numbers. On the other hand, the hash value of S50 is generated and the hash value is recorded in the hash value storage unit 62. Then, update data including a random number is written to the peripheral device 16. In addition, the IVI device 14 records that update data including a random number has been written to the peripheral device 16 in a write-once (not writeable once) storage area. In this way, the IVI device 14 may generate and write update data including a random number to the peripheral device 16 in the assembly factory.

上記の段落0104では、IVI装置14が周辺機器16に対して、乱数を含む更新データを生成して書き込んだが、OBD(On-board diagnostics)経由で周辺機器16のROMを読み出し、OBDと接続したPCで、S48の乱数を含む更新データを生成してもよい。そしてOBD経由で、IVI装置14へ、周辺機器16のサイズ情報をサイズ記憶部60に、ハッシュ値をハッシュ値記憶部62に記憶し、周辺機器16に乱数を含む更新データを更新する方式を行ってもかまわない。   In paragraph 0104 above, the IVI device 14 generates and writes update data including a random number to the peripheral device 16, but reads the ROM of the peripheral device 16 via OBD (On-board diagnostics) and connects to the OBD. The PC may generate update data including the random number in S48. Then, the size information of the peripheral device 16 is stored in the size storage unit 60, the hash value is stored in the hash value storage unit 62, and the update data including the random number is updated in the peripheral device 16 via the OBD. It doesn't matter.

なお、実施例および変形例に記載の技術は、以下の項目によって特定されてもよい。
[項目1]
被検査装置のメモリの全領域に格納されたデータに基づく判定データを記憶する記憶部と、所定の検査タイミングにおいて、被検査装置のメモリの全領域に格納されたデータを取得する取得部と、取得部により取得されたデータに基づいて検査データを導出する導出部と、導出部により導出された検査データと、記憶部に予め記憶された判定データとが不一致の場合に、被検査装置が異常と判定する判定部と、を備える検査装置。
この態様によると、被検査装置における不正プログラムの有無を検査装置が判定する精度(言い換えれば正確さ)を向上させることができる。
[項目2]
データは、被検査装置の動作を定めたプログラムのデータと、プログラムのデータが未格納の空き領域に全てが0または1で構成されたデータあるいは所定のパターンの繰り返しで構成されたデータとは異なるデータとが設定されたものであってもよい。
この態様によると、被検査装置のメモリに存在する不正プログラムが、当該メモリの格納データが正常であるように偽装することを困難にできる。
[項目3]
異なるデータは、乱数列であってもよい。
この態様によると、被検査装置のメモリに存在する不正プログラムが、当該メモリの格納データが正常であるように偽装することを一層困難にできる。
[項目4]
異なるデータは、圧縮済のデータであってもよい。
この態様によると、被検査装置のメモリに存在する不正プログラムが、当該メモリの格納データが正常であるように偽装することを一層困難にできる。
[項目5]
判定部は、取得部が被検査装置にデータの提供を要求してから、当該データが提供されるまでの時間が、要求したデータのサイズに応じた閾値を超過した場合、被検査装置が異常と判定してもよい。
この態様によると、被検査装置のメモリに存在する不正プログラムが、当該メモリの格納データが正常であるように偽装する場合でも、被検査装置の異常を検出しやすくなる。
[項目6]
取得部は、被検査装置のメモリの一部領域に格納されたデータを取得することを複数回繰り返すことにより、当該メモリの全領域に格納されたデータを取得し、取得部は、複数回のデータ取得のそれぞれで指定する読み出しアドレスをランダムに決定してもよい。
この態様によると、被検査装置のメモリに存在する不正プログラムが、当該メモリの格納データが正常であるように偽装することを困難にし、被検査装置の異常を検出しやすくなる。
[項目7]
取得部は、被検査装置のメモリの一部領域に格納されたデータを取得することを複数回繰り返すことにより、当該メモリの全領域に格納されたデータを取得し、取得部は、複数回のデータ取得のそれぞれで指定する読み出しサイズをランダムに決定してもよい。
この態様によると、被検査装置のメモリに存在する不正プログラムが、当該メモリの格納データが正常であるように偽装することを困難にし、被検査装置の異常を検出しやすくなる。
[項目8]
検査装置と被検査装置とを備える検査システムである。被検査装置のメモリに格納されたデータは、被検査装置の動作を定めたプログラムのデータと、プログラムのデータが未格納の空き領域に全てが0または1で構成されたデータあるいは所定のパターンの繰り返しで構成されたデータとは異なるデータとが設定されたものであり、被検査装置は、メモリの全領域に格納されたデータに基づいて検査データを導出する導出部と、導出部により導出された検査データを検査装置へ送信する送信部と、を含む。検査装置は、データに基づく判定データを記憶する記憶部と、被検査装置から送信された検査データと、記憶部に予め記憶された判定データとが不一致の場合に、被検査装置が異常と判定する判定部と、を含む。
この態様によると、被検査装置のメモリに存在する不正プログラムが、当該メモリの格納データが正常であるように偽装することを困難にできるとともに、被検査装置から検査装置へ送信されるデータ量を低減することができる。
[項目9]
検査装置と被検査装置は、チャレンジ・レスポンス型の通信を実行し、検査装置は、チャレンジを決定して、被検査装置へ送信する送信部をさらに含んでもよい。被検査装置の送信部は、検査データとチャレンジに基づいてレスポンスデータを生成し、生成したレスポンスデータを検査装置へ送信し、検査装置の判定部は、レスポンスデータとチャレンジに基づいて、被検査装置で導出された検査データを取得してもよい。
この態様によると、被検査装置で送出された検査データが直接通信網を流れないためセキュリティを一層高めることができる。また、チャレンジは検査の都度決定されるため、不正プログラムが予めレスポンスデータを用意しておくことができず、被検査装置のメモリの格納データが正常であるように偽装することを一層困難にできる。
[項目10]
メモリに格納されたデータの正常性が検査される被検査装置のメモリに格納されるデータを生成する生成部と、生成部により生成されたデータを外部装置へ出力する出力部と、を備える情報処理装置。上記データは、被検査装置の動作を定めたプログラムのデータと、プログラムのデータが未設定の空き領域に全てが0または1で構成されたデータあるいは所定のパターンの繰り返しで構成されたデータとは異なるデータとが設定されたものである。
この態様によると、被検査装置のメモリに格納されるメモリデータであり、不正プログラムの検出に好適なメモリデータを提供できる。
[項目11]
予め記憶された判定データを用いて被検査装置の正常性を検査する検査装置が、所定の検査タイミングにおいて、被検査装置のメモリの全領域に格納されたデータを取得し、取得されたデータに基づいて検査データを導出し、導出された検査データと、予め記憶された判定データとが不一致の場合に、被検査装置が異常と判定する検査方法。
この態様によると、被検査装置における不正プログラムの有無を検査装置が判定する精度(言い換えれば正確さ)を向上させることができる。
[項目12]
予め記憶された判定データを用いて被検査装置の正常性を検査する検査装置に、所定の検査タイミングにおいて、被検査装置のメモリの全領域に格納されたデータを取得し、取得されたデータに基づいて検査データを導出し、導出された検査データと、予め記憶された判定データとが不一致の場合に、被検査装置が異常と判定することを実行させるためのコンピュータプログラム。
この態様によると、被検査装置における不正プログラムの有無を検査装置が判定する精度(言い換えれば正確さ)を向上させることができる。
Note that the techniques described in the examples and the modifications may be specified by the following items.
[Item 1]
A storage unit that stores determination data based on data stored in the entire area of the memory of the device to be inspected; an acquisition unit that acquires data stored in the entire area of the memory of the device to be inspected at a predetermined inspection timing; If the derivation unit for deriving the inspection data based on the data acquired by the acquisition unit, the inspection data derived by the derivation unit, and the determination data stored in advance in the storage unit do not match, the inspected device is abnormal And a determination unit that determines that the inspection device is included.
According to this aspect, it is possible to improve the accuracy (in other words, accuracy) by which the inspection device determines whether there is a malicious program in the device to be inspected.
[Item 2]
The data is different from the data of the program that defines the operation of the device to be inspected, and the data that is composed of all 0s or 1s in the empty area where the program data is not stored, or the data that is composed of repeated predetermined patterns. Data may be set.
According to this aspect, it is possible to make it difficult for an unauthorized program existing in the memory of the device under test to be disguised so that the stored data in the memory is normal.
[Item 3]
The different data may be a random number sequence.
According to this aspect, it is possible to make it more difficult for an unauthorized program existing in the memory of the device to be inspected to be disguised so that the data stored in the memory is normal.
[Item 4]
The different data may be compressed data.
According to this aspect, it is possible to make it more difficult for an unauthorized program existing in the memory of the device to be inspected to be disguised so that the data stored in the memory is normal.
[Item 5]
The determination unit determines that the device under test is abnormal if the time from when the acquisition unit requests the device to be inspected to provide data to the time when the data is provided exceeds a threshold corresponding to the size of the requested data. May be determined.
According to this aspect, even when a malicious program existing in the memory of the device under test is disguised so that the data stored in the memory is normal, it is easy to detect an abnormality of the device under test.
[Item 6]
The acquisition unit acquires the data stored in the entire area of the memory by repeating the acquisition of the data stored in the partial area of the memory of the inspected apparatus a plurality of times. A read address designated for each data acquisition may be determined at random.
According to this aspect, it is difficult for an unauthorized program existing in the memory of the device under test to disguise the stored data in the memory as normal, and an abnormality of the device under test is easily detected.
[Item 7]
The acquisition unit acquires the data stored in the entire area of the memory by repeating the acquisition of the data stored in the partial area of the memory of the inspected apparatus a plurality of times. The read size designated for each data acquisition may be determined at random.
According to this aspect, it is difficult for an unauthorized program existing in the memory of the device under test to disguise the stored data in the memory as normal, and an abnormality of the device under test is easily detected.
[Item 8]
An inspection system includes an inspection apparatus and an apparatus to be inspected. The data stored in the memory of the device to be inspected includes the data of a program that defines the operation of the device to be inspected, and data consisting of all 0s or 1s in a free area in which no program data is stored, or of a predetermined pattern. Data that is different from the data configured by repetition is set, and the inspected device is derived by the deriving unit that derives the inspection data based on the data stored in the entire area of the memory, and the deriving unit. A transmission unit that transmits the inspection data to the inspection device. The inspection apparatus determines that the inspected apparatus is abnormal when the storage unit that stores the determination data based on the data, the inspection data transmitted from the inspected apparatus, and the determination data stored in advance in the storage unit do not match. And a determination unit.
According to this aspect, an unauthorized program existing in the memory of the inspected device can make it difficult to disguise the stored data in the memory as normal, and the amount of data transmitted from the inspected device to the inspecting device can be reduced. Can be reduced.
[Item 9]
The inspection apparatus and the inspected apparatus may perform challenge / response communication, and the inspection apparatus may further include a transmission unit that determines the challenge and transmits the challenge to the inspected apparatus. The transmission unit of the device to be inspected generates response data based on the inspection data and the challenge, and transmits the generated response data to the inspection device, and the determination unit of the inspection device is based on the response data and the challenge, The inspection data derived in (1) may be acquired.
According to this aspect, since the inspection data transmitted by the inspected device does not flow directly through the communication network, security can be further enhanced. In addition, since the challenge is determined every time an inspection is performed, the response data cannot be prepared in advance by an unauthorized program, making it even more difficult to disguise the stored data in the memory of the inspected device as normal. .
[Item 10]
Information comprising: a generating unit that generates data stored in the memory of the device to be inspected for checking the normality of the data stored in the memory; and an output unit that outputs the data generated by the generating unit to an external device Processing equipment. The above data includes data of a program that defines the operation of the device to be inspected, data composed of all 0s or 1s in an empty area where program data is not set, or data composed of repeated predetermined patterns. Different data is set.
According to this aspect, it is memory data stored in the memory of the device to be inspected, and memory data suitable for detecting unauthorized programs can be provided.
[Item 11]
An inspection apparatus that inspects the normality of the inspected apparatus using the determination data stored in advance acquires the data stored in the entire area of the memory of the inspected apparatus at a predetermined inspection timing. An inspection method for deriving inspection data based on the result, and determining that the inspected apparatus is abnormal when the derived inspection data and the determination data stored in advance do not match.
According to this aspect, it is possible to improve the accuracy (in other words, accuracy) by which the inspection device determines whether there is a malicious program in the device to be inspected.
[Item 12]
In the inspection apparatus that inspects the normality of the inspected apparatus using the determination data stored in advance, the data stored in the entire area of the memory of the inspected apparatus is acquired at a predetermined inspection timing, and the acquired data is A computer program for deriving inspection data based on the result and causing the inspected apparatus to determine that there is an abnormality when the derived inspection data and the determination data stored in advance do not match.
According to this aspect, it is possible to improve the accuracy (in other words, accuracy) by which the inspection device determines whether there is a malicious program in the device to be inspected.

また、上述した実施例および変形例の任意の組み合わせもまた本発明の実施の形態として有用である。組み合わせによって生じる新たな実施の形態は、組み合わされる実施例および変形例それぞれの効果をあわせもつ。また、請求項に記載の各構成要件が果たすべき機能は、実施例および変形例において示された各構成要素の単体もしくはそれらの連携によって実現されることも当業者には理解されるところである。   Further, any combination of the above-described embodiments and modifications is also useful as an embodiment of the present invention. The new embodiment resulting from the combination has the effects of the combined example and modification. Further, it should be understood by those skilled in the art that the functions to be fulfilled by the constituent elements described in the claims are realized by the individual constituent elements shown in the embodiments and the modified examples or by their cooperation.

10 検査システム、 14 IVI装置、 16 周辺機器、 20 更新データ生成装置、 62 ハッシュ値記憶部、 70 ROMデータ取得部、 72 ハッシュ値導出部、 74 状態判定部、 118 更新データ生成部、 120 ハッシュ値導出部。   DESCRIPTION OF SYMBOLS 10 Inspection system, 14 IVI apparatus, 16 Peripheral device, 20 Update data generation apparatus, 62 Hash value storage part, 70 ROM data acquisition part, 72 Hash value derivation part, 74 State determination part, 118 Update data generation part, 120 Hash value Derivation part.

Claims (12)

被検査装置のメモリの全領域に格納されたデータに基づく判定データを記憶する記憶部と、
所定の検査タイミングにおいて、前記被検査装置のメモリの全領域に格納されたデータを取得する取得部と、
前記取得部により取得されたデータに基づいて検査データを導出する導出部と、
前記導出部により導出された検査データと、前記記憶部に予め記憶された判定データとが不一致の場合に、前記被検査装置が異常と判定する判定部と、
を備えることを特徴とする検査装置。
A storage unit for storing determination data based on data stored in the entire area of the memory of the device under test;
An acquisition unit that acquires data stored in an entire area of the memory of the device to be inspected at a predetermined inspection timing;
A derivation unit for deriving inspection data based on the data acquired by the acquisition unit;
A determination unit that determines that the inspected apparatus is abnormal when the inspection data derived by the deriving unit and the determination data stored in advance in the storage unit do not match;
An inspection apparatus comprising:
前記データは、前記被検査装置の動作を定めたプログラムのデータと、前記プログラムのデータが未格納の空き領域に全てが0または1で構成されたデータあるいは所定のパターンの繰り返しで構成されたデータとは異なるデータとが設定されたものであることを特徴とする請求項1に記載の検査装置。   The data includes data of a program that defines the operation of the device to be inspected, data composed of all 0s or 1s in an empty area in which the data of the program is not stored, or data composed of repetition of a predetermined pattern The inspection apparatus according to claim 1, wherein different data is set. 前記異なるデータは、乱数列であることを特徴とする請求項2に記載の検査装置。   The inspection apparatus according to claim 2, wherein the different data is a random number sequence. 前記異なるデータは、圧縮済のデータであることを特徴とする請求項2に記載の検査装置。   The inspection apparatus according to claim 2, wherein the different data is compressed data. 前記判定部は、前記取得部が前記被検査装置にデータの提供を要求してから、当該データが提供されるまでの時間が、要求したデータのサイズに応じた閾値を超過した場合、前記被検査装置が異常と判定することを特徴とする請求項1から4のいずれかに記載の検査装置。   The determination unit, when the time from when the acquisition unit requests the device to be inspected to provide data to when the data is provided exceeds a threshold corresponding to the size of the requested data, The inspection apparatus according to claim 1, wherein the inspection apparatus determines that an abnormality has occurred. 前記取得部は、前記被検査装置のメモリの一部領域に格納されたデータを取得することを複数回繰り返すことにより、当該メモリの全領域に格納されたデータを取得し、
前記取得部は、複数回のデータ取得のそれぞれで指定する読み出しアドレスをランダムに決定する請求項1から5のいずれかに記載の検査装置。
The acquisition unit acquires the data stored in the entire area of the memory by repeating a plurality of times to acquire the data stored in the partial area of the memory of the device under test,
The inspection apparatus according to claim 1, wherein the acquisition unit randomly determines a read address designated by each of a plurality of data acquisitions.
前記取得部は、前記被検査装置のメモリの一部領域に格納されたデータを取得することを複数回繰り返すことにより、当該メモリの全領域に格納されたデータを取得し、
前記取得部は、複数回のデータ取得のそれぞれで指定する読み出しサイズをランダムに決定する請求項1から6のいずれかに記載の検査装置。
The acquisition unit acquires the data stored in the entire area of the memory by repeating a plurality of times to acquire the data stored in the partial area of the memory of the device under test,
The inspection apparatus according to claim 1, wherein the acquisition unit randomly determines a read size designated in each of a plurality of data acquisitions.
検査装置と被検査装置とを備え、
前記被検査装置のメモリに格納されたデータは、前記被検査装置の動作を定めたプログラムのデータと、前記プログラムのデータが未格納の空き領域に全てが0または1で構成されたデータあるいは所定のパターンの繰り返しで構成されたデータとは異なるデータとが設定されたものであり、
前記被検査装置は、
前記メモリの全領域に格納されたデータに基づいて検査データを導出する導出部と、
前記導出部により導出された検査データを前記検査装置へ送信する送信部と、を含み、
前記検査装置は、
前記データに基づく判定データを記憶する記憶部と、
前記被検査装置から送信された検査データと、前記記憶部に予め記憶された判定データとが不一致の場合に、前記被検査装置が異常と判定する判定部と、を含むことを特徴とする検査システム。
An inspection device and an inspected device;
The data stored in the memory of the device to be inspected includes data of a program that defines the operation of the device to be inspected and data consisting of all 0s or 1s in a free area in which the program data is not stored. Data that is different from the data configured by repeating the pattern of
The inspected device is:
A deriving unit for deriving inspection data based on data stored in the entire area of the memory;
A transmission unit for transmitting the inspection data derived by the deriving unit to the inspection device,
The inspection device includes:
A storage unit for storing determination data based on the data;
A test unit including a determination unit that determines that the device to be inspected is abnormal when the test data transmitted from the device to be inspected and the determination data stored in advance in the storage unit do not match system.
前記検査装置と前記被検査装置は、チャレンジ・レスポンス型の通信を実行し、
前記検査装置は、チャレンジを決定して、前記被検査装置へ送信する送信部をさらに含み、
前記被検査装置の送信部は、前記検査データと前記チャレンジに基づいてレスポンスデータを生成し、生成したレスポンスデータを検査装置へ送信し、
前記検査装置の判定部は、前記レスポンスデータと前記チャレンジに基づいて、前記被検査装置で導出された検査データを取得することを特徴とする請求項8に記載の検査システム。
The inspection device and the device to be inspected perform challenge-response communication,
The inspection apparatus further includes a transmission unit that determines a challenge and transmits the challenge to the inspected apparatus,
The transmission unit of the device to be inspected generates response data based on the inspection data and the challenge, and transmits the generated response data to the inspection device.
9. The inspection system according to claim 8, wherein the determination unit of the inspection apparatus acquires inspection data derived by the inspected apparatus based on the response data and the challenge.
メモリに格納されたデータの正常性が検査される被検査装置のメモリに格納されるデータを生成する生成部と、
前記生成部により生成されたデータを外部装置へ出力する出力部と、
を備え、
前記データは、前記被検査装置の動作を定めたプログラムのデータと、前記プログラムのデータが未設定の空き領域に全てが0または1で構成されたデータあるいは所定のパターンの繰り返しで構成されたデータとは異なるデータとが設定されたものであることを特徴とする情報処理装置。
A generator for generating data stored in a memory of a device under test whose normality of data stored in the memory is inspected;
An output unit for outputting the data generated by the generation unit to an external device;
With
The data includes data of a program that defines the operation of the device to be inspected, data composed of all 0s or 1s in an empty area where the data of the program is not set, or data composed of repetition of a predetermined pattern An information processing apparatus characterized in that different data is set.
予め記憶された判定データを用いて被検査装置の正常性を検査する検査装置が、
所定の検査タイミングにおいて、前記被検査装置のメモリの全領域に格納されたデータを取得し、
前記取得されたデータに基づいて検査データを導出し、
前記導出された検査データと、前記予め記憶された判定データとが不一致の場合に、前記被検査装置が異常と判定することを特徴とする検査方法。
An inspection apparatus that inspects the normality of the inspected apparatus using the determination data stored in advance,
At a predetermined inspection timing, obtain data stored in the entire area of the memory of the inspected device,
Deriving inspection data based on the acquired data,
An inspection method, wherein the inspected apparatus determines that an abnormality occurs when the derived inspection data and the determination data stored in advance do not match.
予め記憶された判定データを用いて被検査装置の正常性を検査する検査装置に、
所定の検査タイミングにおいて、前記被検査装置のメモリの全領域に格納されたデータを取得し、
前記取得されたデータに基づいて検査データを導出し、
前記導出された検査データと、前記予め記憶された判定データとが不一致の場合に、前記被検査装置が異常と判定する、
ことを実行させるためのコンピュータプログラム。
In the inspection apparatus that inspects the normality of the inspected apparatus using the judgment data stored in advance,
At a predetermined inspection timing, obtain data stored in the entire area of the memory of the inspected device,
Deriving inspection data based on the acquired data,
When the derived inspection data and the preliminarily stored determination data do not match, the inspected device is determined to be abnormal.
A computer program that causes things to be executed.
JP2016214554A 2016-11-01 2016-11-01 Inspection apparatus, inspection system, information processing apparatus, inspection method and computer program Pending JP2018073245A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016214554A JP2018073245A (en) 2016-11-01 2016-11-01 Inspection apparatus, inspection system, information processing apparatus, inspection method and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016214554A JP2018073245A (en) 2016-11-01 2016-11-01 Inspection apparatus, inspection system, information processing apparatus, inspection method and computer program

Publications (1)

Publication Number Publication Date
JP2018073245A true JP2018073245A (en) 2018-05-10

Family

ID=62114236

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016214554A Pending JP2018073245A (en) 2016-11-01 2016-11-01 Inspection apparatus, inspection system, information processing apparatus, inspection method and computer program

Country Status (1)

Country Link
JP (1) JP2018073245A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110718071A (en) * 2019-10-25 2020-01-21 上海眼控科技股份有限公司 Verification method and device for image acquisition equipment, computer equipment and storage medium
JP2020155026A (en) * 2019-03-22 2020-09-24 住友電装株式会社 On-vehicle update device, update processing system, update processing method, and processing program
JPWO2021044529A1 (en) * 2019-09-03 2021-03-11
CN113453959A (en) * 2019-03-04 2021-09-28 株式会社自动网络技术研究所 Vehicle-mounted updating device, update processing program, and program updating method
US11907698B2 (en) 2018-08-10 2024-02-20 Denso Corporation Vehicle electronic control system, vehicle master device, method for controlling transmission of data storage bank information and computer program product for controlling transmission of data storage bank information

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11907698B2 (en) 2018-08-10 2024-02-20 Denso Corporation Vehicle electronic control system, vehicle master device, method for controlling transmission of data storage bank information and computer program product for controlling transmission of data storage bank information
CN113453959A (en) * 2019-03-04 2021-09-28 株式会社自动网络技术研究所 Vehicle-mounted updating device, update processing program, and program updating method
JP2020155026A (en) * 2019-03-22 2020-09-24 住友電装株式会社 On-vehicle update device, update processing system, update processing method, and processing program
WO2020195034A1 (en) * 2019-03-22 2020-10-01 住友電装株式会社 Vehicle-mounted update device, update processing system, update processing method, and processing program
JP7211189B2 (en) 2019-03-22 2023-01-24 住友電装株式会社 Update processing system and update processing method
JPWO2021044529A1 (en) * 2019-09-03 2021-03-11
WO2021044529A1 (en) * 2019-09-03 2021-03-11 日本電信電話株式会社 Verification device, verification system, verification method, and verification program
AU2019464433B2 (en) * 2019-09-03 2023-04-20 Nippon Telegraph And Telephone Corporation Verification device, verification system, verification method, and verification program
JP7327490B2 (en) 2019-09-03 2023-08-16 日本電信電話株式会社 Verification device, verification system, verification method and verification program
CN110718071A (en) * 2019-10-25 2020-01-21 上海眼控科技股份有限公司 Verification method and device for image acquisition equipment, computer equipment and storage medium
CN110718071B (en) * 2019-10-25 2021-09-03 上海眼控科技股份有限公司 Verification method and device for image acquisition equipment, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US11057240B2 (en) Method and process for securing an executable image
US10397212B2 (en) Information device, data processing system, data processing method, and non-transitory storage medium for executing content upon authentication
JP2018073245A (en) Inspection apparatus, inspection system, information processing apparatus, inspection method and computer program
US8533492B2 (en) Electronic device, key generation program, recording medium, and key generation method
US10049232B2 (en) Rewrite detection system, rewrite detection device and information processing device
JP6338949B2 (en) Communication system and key information sharing method
JP6712538B2 (en) Tamper detection system
CN103729597A (en) System starting verifying method and device and terminal
CN103024438B (en) A kind of Set Top Box and production test method, system
JP2015500521A (en) Computing device integrity protection
US20180310173A1 (en) Information processing apparatus, information processing system, and information processing method
US20170302693A1 (en) Rewrite detection system and information processing device
US11366911B2 (en) Cryptography module and method for operating same
JP2013533521A (en) Method for inspecting a memory block of a non-volatile memory
US11935341B2 (en) Data storage device and non-transitory tangible computer readable storage medium
US20220114276A1 (en) Controlling a data network with respect to a use of a distributed database
US11537717B2 (en) Information processing apparatus
CN114491589A (en) Chip encryption method and device and chip verification method and device
CN111142902A (en) Upgraded firmware protection method and device for processor and vehicle
US10425233B2 (en) Method for automatically verifying a target computer file with respect to a reference computer file
US9239918B2 (en) Method and apparatus for software-hardware authentication of electronic apparatus
JP5494389B2 (en) Electronic control unit
CN114791834B (en) Application program starting method and device, electronic equipment and storage medium
CN110020535B (en) Key data area data processing method and device and set top box
JP2020035045A (en) Electronic control device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20180416