JP2016200948A - Program unauthorized rewriting prevention device - Google Patents

Program unauthorized rewriting prevention device Download PDF

Info

Publication number
JP2016200948A
JP2016200948A JP2015080131A JP2015080131A JP2016200948A JP 2016200948 A JP2016200948 A JP 2016200948A JP 2015080131 A JP2015080131 A JP 2015080131A JP 2015080131 A JP2015080131 A JP 2015080131A JP 2016200948 A JP2016200948 A JP 2016200948A
Authority
JP
Japan
Prior art keywords
program
authentication
controller
memory
tool
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
JP2015080131A
Other languages
Japanese (ja)
Inventor
英樹 八木
Hideki Yagi
英樹 八木
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.)
Tokai Rika Co Ltd
Original Assignee
Tokai Rika 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 Tokai Rika Co Ltd filed Critical Tokai Rika Co Ltd
Priority to JP2015080131A priority Critical patent/JP2016200948A/en
Publication of JP2016200948A publication Critical patent/JP2016200948A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a program unauthorized rewriting prevention device capable of preventing unauthorized rewriting of program data.SOLUTION: When a user accesses a controller 1 from a tool 11 and performs program rewriting, a fraud frequency counting unit 13 counts the failure frequency Kx of the authentication (in this example, challenge response authentication) applied between the tool 11 and the controller 1. An unauthorized rewriting prevention unit 14, when recognizing that the failure frequency Kx is a defined value Kt or higher, executes processing of restricting or prohibiting the rewriting of program data Pd written in a first memory 3 of the controller 1.SELECTED DRAWING: Figure 1

Description

本発明は、コントローラに書き込まれたプログラムデータの不正書き替えを防止するプログラム不正書き替え防止装置に関する。   The present invention relates to a program illegal rewrite prevention apparatus for preventing illegal rewrite of program data written in a controller.

従来、コントローラのメモリに書き込まれたプログラムデータの不正書き替えを防止するプログラム不正書き替え防止装置が周知である(特許文献1等参照)。コントローラのプログラムデータを書き替える一例としては、例えばツールを使用する形式がある。この場合、例えばツールとコントローラとの間で認証が実施され、この認証が成立すれば、ツールによるプログラムデータの書き替えが許可される。   2. Description of the Related Art Conventionally, a program illegal rewrite preventing apparatus for preventing illegal rewrite of program data written in a memory of a controller is well known (see Patent Document 1, etc.). As an example of rewriting the program data of the controller, there is a form using a tool, for example. In this case, for example, authentication is performed between the tool and the controller, and if this authentication is established, rewriting of program data by the tool is permitted.

特開2014−88062号公報JP 2014-88062 A

ところで、第三者が不正なツールを使用して、コントローラのプログラムデータを書き替えようと試みる場合も想定される。ツールとコントローラとの間の認証としてチャレンジレスポンス認証を採用している場合、例えば疑似乱数を何度も繰り返して相手側に送信することにより、不正に認証を成立させてしまう行為が考えられる。よって、このような不正なプログラムデータの書き替え行為に対する対策が必要とされていた。   By the way, it is assumed that a third party tries to rewrite the controller program data using an unauthorized tool. When the challenge response authentication is adopted as the authentication between the tool and the controller, for example, it is possible to illegally establish the authentication by repeatedly transmitting a pseudo random number to the other party. Therefore, a countermeasure against such illegal program data rewriting action is required.

本発明の目的は、プログラムデータの不正書き替えを生じ難くすることができるプログラム不正書き替え防止装置を提供することにある。   An object of the present invention is to provide an apparatus for preventing illegal program rewriting that can prevent unauthorized rewrite of program data.

前記問題点を解決するプログラム不正書き替え防止装置は、コントローラのメモリに書き込まれたプログラムが不正に書き替えられるのを防止する構成において、ツールから入力するプログラム書き替え要求を基に前記コントローラ及びツールの間で認証が実行されるにあたり、繰り返された当該認証において、該認証が不正となった回数を計数する不正回数計数部と、前記認証が不正となった回数が規定値以上となったとき、前記メモリのプログラムの書き替えを制限又は禁止する不正書き替え防止部とを備えた。   An apparatus for preventing illegal program rewriting that solves the above problems is configured to prevent the program written in the memory of the controller from being illegally rewritten, and based on a program rewrite request input from the tool, the controller and the tool In the repeated authentication, when the authentication is repeated, the fraud count counting unit that counts the number of times the authentication is fraud, and the number of times that the fraud is greater than a specified value And an unauthorized rewrite prevention unit that restricts or prohibits rewriting of the program in the memory.

本構成によれば、ツールとコントローラとの間で実行される認証の不成立回数を計数し、不成立回数が規定値以上となったときには、コントローラのメモリに書き込まれているプログラムの書き替えを制限又は禁止する処置を実行する。このため、仮に不正なツールを用いて認証を何度も行って当該認証を不正に成立させようとする行為に対して、認証の不成立回数が規定値以上となった時点で、この不正行為を終了させることが可能となる。よって、プログラムデータの不正書き替えを生じ難くすることが可能となる。   According to this configuration, the number of times of failure of authentication executed between the tool and the controller is counted, and when the number of failures is not less than a specified value, rewriting of the program written in the memory of the controller is limited or Perform the action to be prohibited. For this reason, if an unauthorized tool is used to perform authentication many times and attempts to establish the authentication illegally, this fraudulent activity is It can be terminated. Therefore, it is possible to make it difficult for the program data to be illegally rewritten.

前記プログラム不正書き替え防止装置において、前記認証は、チャレンジレスポンス認証であることが好ましい。この構成によれば、第三者によりツールを通じてチャレンジレスポンスの弱点をつくような不正行為をされても、認証の不成立回数が規定値以上となったときにプログラムの書き替えが制限又は停止される。よって、2者間の認証にチャレンジレスポンス認証を使用したとしても、プログラムの不正書き替えを生じ難くすることが可能となる。   In the program illegal rewriting prevention device, the authentication is preferably challenge response authentication. According to this configuration, even if a third party performs an illegal act that creates a challenge response weakness through a tool, rewriting of the program is restricted or stopped when the number of authentication failures is equal to or greater than a specified value. . Therefore, even if challenge-response authentication is used for authentication between two parties, it is possible to make it difficult for the program to be rewritten illegally.

前記プログラム不正書き替え防止装置において、前記コントローラは、前記プログラムの書き込み先となる第1メモリと、前記認証が不正となった回数を書き込む第2メモリとを備え、前記不正回数計数部は、前記認証が不正となった回数を前記第2メモリに逐次書き込んでいくことにより、当該回数を計数することが好ましい。この構成によれば、プログラムの書き込み箇所と不成立回数の書き込み箇所とをそれぞれ別としたので、各情報を管理し易くすることが可能となる。   In the program unauthorized rewrite prevention device, the controller includes a first memory to which the program is written, and a second memory to which the number of times the authentication has been invalidated is written, It is preferable to count the number of times that the authentication has been invalidated by sequentially writing the number of times to the second memory. According to this configuration, since the program writing location and the writing failure count writing location are separated from each other, each information can be easily managed.

前記プログラム不正書き替え防止装置において、前記不正書き替え防止部は、前記認証が不正となった回数が規定値以上となったとき、前記ツールに対して、通信不可の旨を通知する処理、又は返信を返さない処理を実行することが好ましい。この構成によれば、認証の不成立回数が規定値以上となったときには、ツールに通信不可の旨を通知する、又はツールに返信を返さないという簡素な処理により、第三者によるツールを用いたプログラムの不正書き替えに対する処置を講ずることが可能となる。   In the program unauthorized rewrite preventing apparatus, the unauthorized rewrite preventing unit is configured to notify the tool that communication is not possible when the number of times the authentication has become unauthorized exceeds a specified value, or It is preferable to execute a process that does not return a reply. According to this configuration, when the number of unsuccessful authentications exceeds the specified value, a tool by a third party is used by a simple process of notifying the tool that communication is impossible or not returning a reply to the tool. It is possible to take measures against illegal program rewriting.

前記プログラム不正書き替え防止装置において、前記コントローラのメモリは、通常の作動時に使用される製品制御用プログラムが書き込まれ、前記不正書き替え防止部は、前記認証が不正となった回数が規定値以上となったとき、前記メモリに書き込まれている前記製品制御用プログラムを消去して、リカバリ動作を実行することが好ましい。この構成によれば、認証の不成立回数が規定値以上となったときには、コントローラにリカバリ動作を実行させるので、リカバリ後、第三者が所持するようなツール(不正ツール)ではプログラム書き替えを実行することができなくなる。よって、プログラム不正書き替えの防止に一層有利となる。   In the program unauthorized rewrite preventing apparatus, the memory of the controller is written with a product control program used during normal operation, and the unauthorized rewrite preventing unit is configured such that the number of times the authentication is unauthorized is a predetermined value or more. In this case, it is preferable that the product control program written in the memory is erased and a recovery operation is executed. According to this configuration, when the number of failed authentications exceeds the specified value, the controller performs a recovery operation. Therefore, after the recovery, rewrite the program with a tool owned by a third party (unauthorized tool). Can not do. Therefore, it is further advantageous for preventing illegal program rewriting.

本発明によれば、プログラムデータの不正書き替えを生じ難くすることができる。   According to the present invention, illegal rewriting of program data can be made difficult to occur.

一実施形態のプログラム不正書き替え防止装置の構成図。1 is a configuration diagram of a program unauthorized rewrite prevention device according to an embodiment. FIG. ツール及びコントローラの間で実行される認証のシーケンス図。The sequence diagram of the authentication performed between a tool and a controller. 認証が不正と判定されたときの処置の一例を示すシーケンス図。The sequence diagram which shows an example of a process when it determines with authentication being fraudulent. 認証が不正と判定されたときの他の処置の一例を示す説明図。Explanatory drawing which shows an example of the other treatment when it determines with authentication being fraudulent.

以下、プログラム不正書き替え防止装置の一実施形態を図1〜図4に従って説明する。
図1に示すように、コントローラ1は、例えばECU(Electronic Control Unit)からなる。コントローラ1は、コントローラ1の作動を制御する制御部2と、コントローラ1の作動時に実行されるプログラムデータPdが書き込まれた第1メモリ3と、プログラムデータPdによってのみ書き込み及び読み出しが可能な第2メモリ4とを備える。第1メモリ3及び第2メモリ4は、例えば不揮発性メモリからなり、第1メモリ3がプログラムROM(Read Only Memory)からなり、第2メモリ4がデータフラッシュからなることが好ましい。
Hereinafter, an embodiment of the program illegal rewrite preventing apparatus will be described with reference to FIGS.
As shown in FIG. 1, the controller 1 is composed of an ECU (Electronic Control Unit), for example. The controller 1 includes a control unit 2 that controls the operation of the controller 1, a first memory 3 in which program data Pd that is executed when the controller 1 is operated, and a second that can be written and read only by the program data Pd. And a memory 4. The first memory 3 and the second memory 4 are preferably composed of, for example, a non-volatile memory, the first memory 3 is preferably composed of a program ROM (Read Only Memory), and the second memory 4 is preferably composed of a data flash.

第1メモリ3には、コントローラ1を通常時において作動させる際に実行される製品制御用プログラム5と、コントローラ1をリカバリ動作(初期化)するときに実行されるリカバリ用プログラム6とが書き込み保存されている。制御部2は、製品制御用プログラム5を実行することにより、コントローラ1における演算や、他のECUとのデータ通信などを実行する。また、制御部2は、例えばコントローラ1においてリカバリを開始する要件が揃ったときや、外部からリカバリ要求等の指令を受け付けたとき、リカバリ用プログラム6を実行することにより、コントローラ1を初期化する。   The first memory 3 is written and stored with a product control program 5 executed when the controller 1 is normally operated and a recovery program 6 executed when the controller 1 is recovered (initialized). Has been. The control unit 2 executes the product control program 5 to execute calculations in the controller 1 and data communication with other ECUs. The controller 2 initializes the controller 1 by executing the recovery program 6 when, for example, the requirements for starting the recovery are complete in the controller 1 or when an instruction such as a recovery request is received from the outside. .

コントローラ1は、プログラムデータPdの不正書き替えを防止するプログラム不正書き替え防止機能(プログラム不正書き替え防止装置10)を備える。ところで、コントローラ1のプログラムデータPdを書き替えるにあたっては、コントローラ1との間でチャレンジレスポンス認証が成立することが課されている。チャレンジレスポンス認証は、相手側に疑似乱数であるチャレンジコードを送信して演算させ、その演算結果であるレスポンスコードを取得して、これの正否を確認する認証である。本例のプログラム不正書き替え防止装置10は、例えばコントローラ1に接続された外部のツール11からの不正なプログラム書き替え行為に対して、プログラムデータPdが意図に不正に書き替えられてしまうことに対する対策として設けられている。本例が想定するプログラム不正書き替え行為は、例えばプログラムデータPdの連続的な書き替え攻撃である。   The controller 1 includes a program unauthorized rewrite prevention function (program unauthorized rewrite prevention device 10) that prevents unauthorized rewrite of the program data Pd. By the way, when the program data Pd of the controller 1 is rewritten, it is required that challenge response authentication be established with the controller 1. Challenge response authentication is authentication in which a challenge code, which is a pseudo-random number, is transmitted to the other party to be operated, a response code as a result of the operation is acquired, and the correctness is confirmed. The program illegal rewrite preventing apparatus 10 of this example is for the case where the program data Pd is illegally rewritten intentionally in response to an illegal program rewrite action from an external tool 11 connected to the controller 1, for example. It is provided as a countermeasure. The illegal program rewriting action assumed in this example is, for example, a continuous rewriting attack of program data Pd.

プログラム不正書き替え防止装置10は、プログラム不正書き替え防止装置10を実現するにあたってのソフトウェアとなるプログラム書き替え制御情報12を備える。プログラム書き替え制御情報12は、第1メモリ3に書き込み保存されている。本例のプログラム書き替え制御情報12は、チャレンジレスポンス認証の不成立となる回数(不成立回数Kx)を計数し、その回数が規定値Kt以上となったときに、プログラム不正書き替え行為に対する処置を実行することを実現するソフトウェアである。   The program unauthorized rewrite preventing apparatus 10 includes program rewrite control information 12 serving as software for realizing the program unauthorized rewrite preventing apparatus 10. The program rewriting control information 12 is written and saved in the first memory 3. The program rewrite control information 12 of this example counts the number of times the challenge response authentication is not established (the number of times of failure Kx), and when the number exceeds the specified value Kt, the program rewrite action is executed. It is software that realizes to do.

プログラム不正書き替え防止装置10は、チャレンジレスポンス認証の不成立回数を計数する不正回数計数部13を備える。不正回数計数部13は、制御部2がプログラム書き替え制御情報12を実行することにより、制御部2に機能的に生成される。不正回数計数部13は、ツール11から入力するプログラム書き替え要求を基にコントローラ1及びツール11の間で認証(本例はチャレンジレスポンス認証)が実行されるにあたり、連続的に繰り返された認証が不成立となった回数(不成立回数Kx)を計数する。不正回数計数部13は、認証の不成立回数Kxを第2メモリ4に書き込み、回数が増える度に、これを逐次更新する。   The program unauthorized rewrite prevention device 10 includes an unauthorized number counting unit 13 that counts the number of times the challenge response authentication is not established. The fraud count unit 13 is functionally generated in the control unit 2 when the control unit 2 executes the program rewrite control information 12. The fraud count unit 13 performs authentication that is continuously repeated when authentication (in this example, challenge response authentication) is performed between the controller 1 and the tool 11 based on a program rewrite request input from the tool 11. The number of times of failure (number of failures Kx) is counted. The fraud count counting unit 13 writes the authentication failure count Kx in the second memory 4 and sequentially updates it every time the count increases.

プログラム不正書き替え防止装置10は、不成立回数Kxが規定値Kt以上となったときにプログラムデータPdの書き替えを制限又は禁止する不正書き替え防止部14を備える。不正書き替え防止部14は、制御部2がプログラム書き替え制御情報12を実行することにより、制御部2に機能的に生成される。プログラムデータPdの書き替えの制限又は禁止の処理としては、例えばチャレンジレスポンス認証において相手に通信不可を通知することや、通信自体を実施しない(途中で停止する)などがある。また、これ以外としては、コントローラ1のリカバリ動作がある。   The program unauthorized rewrite preventing apparatus 10 includes an unauthorized rewrite preventing unit 14 that restricts or prohibits rewriting of the program data Pd when the number of times of failure Kx is equal to or greater than a specified value Kt. The unauthorized rewrite prevention unit 14 is functionally generated in the control unit 2 when the control unit 2 executes the program rewrite control information 12. As processing for restricting or prohibiting rewriting of the program data Pd, for example, notification of communication failure to the other party in challenge response authentication or communication itself is not performed (stopped halfway). In addition to this, there is a recovery operation of the controller 1.

次に、図2〜図4を用いて、プログラム不正書き替え防止装置10の動作を説明する。
図2に示すように、ステップ101において、ツール11は、プログラム書き替えの実行をコントローラ1に要求するプログラム書き替え要求Saをコントローラ1に出力する。プログラム書き替え要求Saは、チャレンジレスポンス認証に必要な認証情報Sbの送信をコントローラ1に要求する認証情報出力要求であることが好ましい。この場合、プログラム書き替え要求Saは、例えばチャレンジレスポンス認証に必要な暗号鍵(共通鍵)と、認証の度に毎回異なる値をとる乱数値(チャレンジコード)とを、コントローラ1に送信させる要求であることが好ましい。
Next, the operation of the program illegal rewrite prevention device 10 will be described with reference to FIGS.
As shown in FIG. 2, in step 101, the tool 11 outputs to the controller 1 a program rewriting request Sa that requests the controller 1 to execute program rewriting. The program rewriting request Sa is preferably an authentication information output request for requesting the controller 1 to transmit authentication information Sb necessary for challenge response authentication. In this case, the program rewriting request Sa is a request for causing the controller 1 to transmit, for example, an encryption key (common key) necessary for challenge response authentication and a random value (challenge code) that takes a different value every time authentication is performed. Preferably there is.

ステップ102において、コントローラ1は、ツール11からプログラム書き替え要求(認証情報出力要求)Saを受信すると、認証情報Sbをツール11に送信する。認証情報Sbは、チャレンジレスポンス認証用の暗号鍵(共通鍵)と、送信の度に値が毎回変更される乱数値(チャレンジコード)とを含む情報であることが好ましい。   In step 102, when receiving a program rewrite request (authentication information output request) Sa from the tool 11, the controller 1 transmits the authentication information Sb to the tool 11. The authentication information Sb is preferably information including an encryption key (common key) for challenge response authentication and a random value (challenge code) whose value is changed each time transmission is performed.

ステップ103において、ツール11は、コントローラ1から受信した認証情報Sbを基に、チャレンジレスポンス認証の演算結果である鍵値(レスポンスコード)Scを演算する。本例の場合、ツール11は、コントローラ1から取得した乱数及び暗号鍵を、ツール11に登録されたアルゴリズム(関数)に通すことにより、演算を実行する。   In step 103, the tool 11 calculates a key value (response code) Sc that is a calculation result of challenge response authentication based on the authentication information Sb received from the controller 1. In the case of this example, the tool 11 performs an operation by passing the random number and the encryption key acquired from the controller 1 through an algorithm (function) registered in the tool 11.

ステップ104において、ツール11は、演算した鍵値(レスポンスコード)Scをコントローラ1に送信する。
ステップ105において、コントローラ1は、ツール11から鍵値(レスポンスコード)Scを受信すると、自らも同様に演算した鍵値(レスポンスコード)と比較することにより、認証を実行する。コントローラ1は、これら鍵値Scが一致することを確認すると、チャレンジレスポンス認証を成立とし、逆に一致しなければ、チャレンジレスポンス認証を不成立とする。このとき、不正回数計数部13は、認証(チャレンジレスポンス認証)が成立しないことを確認すると、例えば第2メモリ4のカウンタを「1」、更新するなどして、認証の不成立回数Kxを計数する。
In step 104, the tool 11 transmits the calculated key value (response code) Sc to the controller 1.
In step 105, when the controller 1 receives the key value (response code) Sc from the tool 11, the controller 1 performs authentication by comparing with the key value (response code) calculated in the same manner. If the controller 1 confirms that these key values Sc match, the controller 1 determines that challenge response authentication is established, and conversely if it does not match, does not establish challenge response authentication. At this time, when it is confirmed that the authentication (challenge response authentication) is not established, the fraud count counting unit 13 counts the number of times authentication is not established Kx by updating the counter of the second memory 4 to “1”, for example. .

ステップ106において、コントローラ1は、鍵値Scの認証結果Sdをツール11に通知する。すなわち、コントローラ1は、チャレンジレスポンス認証が成立すれば、認証成立の旨の通知Sdをツール11に出力し、チャレンジレスポンス認証が不成立であれば、認証不成立の旨の通知Sdをツール11に出力する。   In step 106, the controller 1 notifies the tool 11 of the authentication result Sd of the key value Sc. That is, if challenge response authentication is established, the controller 1 outputs a notification Sd indicating that authentication has been established to the tool 11, and if challenge response authentication is not established, the controller 1 outputs a notification Sd indicating that authentication has not been established to the tool 11. .

ステップ107において、ツール11は、コントローラ1から取得した鍵値の認証結果Sdを基に、認証が成立したか否かを確認する。すなわち、認証成立の旨の通知Sdを受け付ければ、チャレンジレスポンス認証が成立したと判断し、認証不成立の旨の通知Sdを受け付ければ、チャレンジレスポンス認証が不成立であると判断する。   In step 107, the tool 11 confirms whether or not authentication has been established based on the key value authentication result Sd acquired from the controller 1. That is, if the notification Sd indicating that the authentication is established is received, it is determined that the challenge response authentication is established, and if the notification Sd indicating that the authentication is not established is received, it is determined that the challenge response authentication is not established.

ところで、悪意をもった第三者がツール(不正ツール)11を通じてコントローラ1との認証(チャレンジレスポンス認証)をすり抜けようとした場合には、疑似乱数を都度生成することによってチャレンジレスポンス認証が繰り返し実行される。このとき、ツール11が不正ツールであれば認証が成立しないので、不成立回数Kxの計数値が「1」ずつ、カウントアップされていく。不正書き替え防止部14は、不成立回数Kxが規定値Kt以上となったことを確認すると、プログラム不正書き替えに対する処置を実行する。   By the way, when a malicious third party tries to pass authentication (challenge response authentication) with the controller 1 through the tool (illegal tool) 11, the challenge response authentication is repeatedly executed by generating a pseudo random number each time. Is done. At this time, if the tool 11 is an unauthorized tool, the authentication is not established, so the count value of the number of times of failure Kx is incremented by “1”. When the unauthorized rewrite prevention unit 14 confirms that the non-establishment count Kx is equal to or greater than the specified value Kt, the unauthorized rewrite preventive unit 14 performs a measure against the unauthorized program rewrite.

図3に、プログラム不正書き替えに対する処置の一例を図示する。同図の例(1)に示されるように、不正書き替え防止部14は、プログラム書き替え行為が不正であると判定したとき、いま通信中のツール11に対して、通信不可の通知を実施する。また、これ以外の動作としては、同図の例(2)に示されるように、不正書き替え防止部14は、プログラム書き替え行為が不正であると判定されたとき、ツール11に返信自体を実施しない(応答を返さない)ようにしてもよい。いずれの処置を実施するにせよ、ツール11との通信が途中で強制終了されるので、プログラムデータPdが不正に書き替えられてしまうことがない。   FIG. 3 illustrates an example of a measure against program illegal rewriting. As shown in the example (1) in the figure, when the unauthorized rewrite prevention unit 14 determines that the program rewriting action is unauthorized, it notifies the currently communicating tool 11 that communication is not possible. To do. As other operations, as shown in the example (2) in the figure, the unauthorized rewrite preventing unit 14 sends a reply itself to the tool 11 when it is determined that the program rewriting action is illegal. You may make it not implement (a response is not returned). Regardless of which measure is performed, the communication with the tool 11 is forcibly terminated midway, so that the program data Pd is not rewritten illegally.

図4に、プログラム不正書き替えに対する処置の他の例を図示する。同図に示されるように、不正書き替え防止部14は、プログラム書き替え行為が不正であると判定したとき、第1メモリ3に書き込まれている製品制御用プログラム5を消去し、リカバリ用プログラム6を実行することによって、リカバリ動作を実行してもよい。こうすれば、コントローラ1が初期化されてツール11との通信は不可となるので、プログラムデータPdが不正に書き替えられずに済む。   FIG. 4 illustrates another example of a measure for illegal program rewriting. As shown in the figure, the unauthorized rewrite preventing unit 14 erases the product control program 5 written in the first memory 3 when determining that the program rewriting action is illegal, and recovers the program. The recovery operation may be executed by executing step 6. By doing so, the controller 1 is initialized and communication with the tool 11 becomes impossible, so that the program data Pd is not rewritten illegally.

本実施形態の構成によれば、以下に記載の効果を得ることができる。
(1)ツール11からコントローラ1にアクセスしてプログラム書き替えを行うとき、ツール11とコントローラ1との間に課される認証(本例はチャレンジレスポンス認証)の不成立回数Kxを計数し、不成立回数Kxが規定値Kt以上となったときには、コントローラ1の第1メモリ3に書き込まれているプログラムデータPdの書き替えを制限又は禁止する処置を実行する。このため、仮に不正なツール11を用いて認証を何度も行って当該認証を不正に成立させようとする行為に対して、認証の不成立回数Kxが規定値Kt以上となった時点で、この不正行為を終了させることが可能となる。よって、コントローラ1のプログラムデータPdの不正書き替えを生じ難くすることができる。
According to the configuration of the present embodiment, the following effects can be obtained.
(1) When the program is rewritten by accessing the controller 1 from the tool 11, the number of times Kx of failure of authentication (in this example, challenge response authentication) imposed between the tool 11 and the controller 1 is counted, and the number of times of failure. When Kx is equal to or greater than the specified value Kt, a measure for restricting or prohibiting rewriting of the program data Pd written in the first memory 3 of the controller 1 is executed. For this reason, when the number of times of authentication failure Kx becomes equal to or greater than the specified value Kt for an action that attempts to falsely establish the authentication by using the unauthorized tool 11 many times, It becomes possible to terminate the cheating. Accordingly, it is possible to make it difficult for unauthorized rewriting of the program data Pd of the controller 1 to occur.

(2)コントローラ1のプログラムデータPdをツール11により書き替えるときに課される認証は、チャレンジレスポンス認証である。ところで、チャレンジレスポンス認証には、乱数が偏ってしまう傾向があり、ツール11からコントローラ1にアクセスしたとき、この点をつき、認証をすり抜けようと試みられることも想定される。しかし、本例の場合は、認証の不成立回数Kxが規定値Kt以上となったときには、プログラム書き替えを制限するので、チャレンジレスポンス認証の弱点をつくような不正行為をされても、これに対処することができる。   (2) The authentication imposed when the program data Pd of the controller 1 is rewritten by the tool 11 is challenge response authentication. By the way, in the challenge response authentication, random numbers tend to be biased, and when the tool 11 accesses the controller 1, it is assumed that an attempt is made to pass this point and pass through the authentication. However, in the case of this example, when the number of authentication failures Kx becomes equal to or greater than the specified value Kt, the program rewriting is restricted, so that even if an illegal act that creates a weak point of challenge response authentication is performed, this is dealt with. can do.

(3)コントローラ1は、プログラムデータPdの書き込み先となる第1メモリ3と、認証の不成立回数Kxを書き込む第2メモリ4とを備える。よって、本例の場合、プログラムの書き込み箇所と、認証の不成立回数Kxの書き込み箇所とを、それぞれ別としたので、各情報を管理し易くすることができる。   (3) The controller 1 includes a first memory 3 to which the program data Pd is written and a second memory 4 to which the number Kx of authentication failure is written. Therefore, in the case of this example, the program writing location and the writing location of the authentication failure count Kx are separated from each other, so that each information can be easily managed.

(4)認証の不成立回数Kxが規定値Kt以上となったときの処置は、ツール11に対して通信不可の旨を通知する処理、又はツール11に返信を返さない処理とした。このため、ツール11からコントローラ1にプログラム書き替えの不正な攻撃があったときには、ツール11に通信不可の旨の通知を行う、またはツール11に応答しないという簡素な処理により、第三者によるツール11を用いたプログラムの不正書き替えに対する処置を講ずることができる。   (4) The processing when the authentication failure count Kx is equal to or greater than the specified value Kt is processing for notifying the tool 11 that communication is impossible or processing for not returning a reply to the tool 11. For this reason, when there is an unauthorized attack to rewrite the program from the tool 11 to the controller 1, a tool by a third party is notified by a simple process of notifying the tool 11 that communication is impossible or not responding to the tool 11. 11 can be taken against illegal rewriting of the program.

(5)認証の不成立回数Kxが規定値Kt以上となったときの処置は、コントローラ1のリカバリ動作とした。これにより、リカバリ後は、第三者が所持するようなツール(不正なツール)11ではプログラム書き替えを実行することができなくなる。よって、プログラム不正書き替えの防止に一層有利となる。   (5) The recovery operation of the controller 1 is performed when the authentication failure count Kx is equal to or greater than the specified value Kt. As a result, after the recovery, the program rewriting cannot be executed by a tool (unauthorized tool) 11 possessed by a third party. Therefore, it is further advantageous for preventing illegal program rewriting.

なお、実施形態はこれまでに述べた構成に限らず、以下の態様に変更してもよい。
・一般的に、コントローラ1の第1メモリ3には、コントローラ1を作動させるにあたって逐次登録されていく設定情報が書き込まれる。設定情報は、例えばアプリケーションの一種である。この場合、認証の不成立回数Kxが規定値Kt以上となってプログラム書き替え行為が不正と判定されたときに、コントローラ1の第1メモリ3に書き込まれた設定情報を削除するようにしてもよい。このようにしても、コントローラ1から設定情報が削除された時点で通常通りの作動ができなくなるので、ツール11と通信を実行することができなくなる。よって、第三者によるツール11を通じてのプログラム不正書き替えを生じ難くすることができる。
Note that the embodiment is not limited to the configuration described so far, and may be modified as follows.
Generally, setting information that is sequentially registered when the controller 1 is operated is written in the first memory 3 of the controller 1. The setting information is, for example, a kind of application. In this case, the setting information written in the first memory 3 of the controller 1 may be deleted when the number of times of authentication failure Kx is equal to or greater than the specified value Kt and the program rewriting action is determined to be illegal. . Even in this case, since the normal operation cannot be performed when the setting information is deleted from the controller 1, communication with the tool 11 cannot be executed. Accordingly, it is possible to make it difficult for a third party to illegally rewrite the program through the tool 11.

・認証の不成立回数Kxをクリア(リセット)するのは、どのタイミングでもよい。すなわち、不成立回数Kxは、1機会の不正攻撃に対する計数値でもよいし、または複数機会に亘っての積算値でもよい。   -Any timing may be used to clear (reset) the authentication failure count Kx. That is, the failure count Kx may be a count value with respect to one-day illegal attacks, or an integrated value over a plurality of opportunities.

・ツール11を用いてプログラム書き替えを行うときに両者の間に課す認証は、チャレンジレスポンス認証に限らず、相手側の正否を確認できるものであれば、種々の態様に変更可能である。   The authentication imposed between the two when the program is rewritten using the tool 11 is not limited to challenge response authentication, and can be changed to various modes as long as the correctness of the other party can be confirmed.

・第1メモリ3と第2メモリ4とを1つのメモリにまとめてもよい。
・認証の不成立回数Kxが規定値Kt以上となったときに実施する処置は、プログラム書き替えを制限又は禁止する処理であれば、種々の態様に変更可能である。
The first memory 3 and the second memory 4 may be combined into one memory.
The treatment performed when the authentication failure count Kx is equal to or greater than the specified value Kt can be changed to various modes as long as the program rewriting is restricted or prohibited.

・本例のコントローラ1は、種々の装置や機器に適用可能である。   -The controller 1 of this example is applicable to various apparatuses and apparatuses.

1…コントローラ、3…メモリ(第1メモリ)、5…製品制御用プログラム、6…リカバリ用プログラム、10…プログラム不正書き替え防止装置、11…ツール、13…不正回数計数部、14…不正書き替え防止部、Pd…プログラム(プログラムデータ)、Sa…プログラム書き替え要求、Kx…不成立回数、Kt…規定値。   DESCRIPTION OF SYMBOLS 1 ... Controller, 3 ... Memory (1st memory), 5 ... Product control program, 6 ... Recovery program, 10 ... Program illegal rewriting prevention apparatus, 11 ... Tool, 13 ... Invalid number counting part, 14 ... Invalid write Replacement prevention unit, Pd... Program (program data), Sa... Program rewrite request, Kx.

Claims (5)

コントローラのメモリに書き込まれたプログラムが不正に書き替えられるのを防止するプログラム不正書き替え防止装置において、
ツールから入力するプログラム書き替え要求を基に前記コントローラ及びツールの間で認証が実行されるにあたり、繰り返された当該認証において、該認証が不正となった回数を計数する不正回数計数部と、
前記認証が不正となった回数が規定値以上となったとき、前記メモリのプログラムの書き替えを制限又は禁止する不正書き替え防止部と
を備えたことを特徴とするプログラム不正書き替え防止装置。
In the program illegal rewriting prevention device for preventing the program written in the memory of the controller from being illegally rewritten,
When authentication is performed between the controller and the tool based on a program rewrite request input from a tool, an unauthorized number counting unit that counts the number of times the authentication is invalid in the repeated authentication,
An unauthorized program rewrite prevention apparatus comprising: an unauthorized rewrite prevention unit that restricts or prohibits rewriting of the program in the memory when the number of times that the authentication has become invalid exceeds a predetermined value.
前記認証は、チャレンジレスポンス認証である
ことを特徴とする請求項1に記載のプログラム不正書き替え防止装置。
The program unauthorized rewrite prevention apparatus according to claim 1, wherein the authentication is challenge response authentication.
前記コントローラは、前記プログラムの書き込み先となる第1メモリと、前記認証が不正となった回数を書き込む第2メモリとを備え、
前記不正回数計数部は、前記認証が不正となった回数を前記第2メモリに逐次書き込んでいくことにより、当該回数を計数する
ことを特徴とする請求項1又は2に記載のプログラム不正書き替え防止装置。
The controller includes a first memory as a write destination of the program, and a second memory for writing the number of times the authentication is invalid,
3. The program illegal rewriting according to claim 1, wherein the fraud count counting unit counts the number of fraud by sequentially writing the number of times the authentication is fraudulent in the second memory. Prevention device.
前記不正書き替え防止部は、前記認証が不正となった回数が規定値以上となったとき、前記ツールに対して、通信不可の旨を通知する処理、又は返信を返さない処理を実行する
ことを特徴とする請求項1〜3のうちいずれか一項に記載のプログラム不正書き替え防止装置。
The unauthorized rewrite prevention unit executes a process of notifying the tool that communication is impossible or a process of not returning a reply when the number of times that the authentication is invalid exceeds a specified value. The program illegal rewriting prevention device according to any one of claims 1 to 3, wherein:
前記コントローラのメモリは、通常の作動時に使用される製品制御用プログラムが書き込まれ、
前記不正書き替え防止部は、前記認証が不正となった回数が規定値以上となったとき、前記メモリに書き込まれている前記製品制御用プログラムを消去して、リカバリ動作を実行する
ことを特徴とする請求項1〜3のうちいずれか一項に記載のプログラム不正書き替え防止装置。
In the memory of the controller, a product control program used during normal operation is written,
The unauthorized rewrite prevention unit deletes the product control program written in the memory and executes a recovery operation when the number of times the authentication is unauthorized exceeds a specified value. The program illegal rewriting prevention apparatus as described in any one of Claims 1-3.
JP2015080131A 2015-04-09 2015-04-09 Program unauthorized rewriting prevention device Pending JP2016200948A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015080131A JP2016200948A (en) 2015-04-09 2015-04-09 Program unauthorized rewriting prevention device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015080131A JP2016200948A (en) 2015-04-09 2015-04-09 Program unauthorized rewriting prevention device

Publications (1)

Publication Number Publication Date
JP2016200948A true JP2016200948A (en) 2016-12-01

Family

ID=57424323

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015080131A Pending JP2016200948A (en) 2015-04-09 2015-04-09 Program unauthorized rewriting prevention device

Country Status (1)

Country Link
JP (1) JP2016200948A (en)

Similar Documents

Publication Publication Date Title
KR102445518B1 (en) Device keys protection
KR101756692B1 (en) Terminal Device for Dynamic Secure Module and Driving Method Thereof
US11102014B2 (en) Method for handling data in a secure container
US20150358321A1 (en) Storage device, information processing apparatus, and information processing method
Konigsmark et al. System-of-PUFs: Multilevel security for embedded systems
US11574046B2 (en) Protecting a software program against tampering
JP6188633B2 (en) Computer system, computer, semiconductor device, information processing method, and computer program
US8683211B2 (en) Method of projecting a secure USB key
KR20060134771A (en) Portable electronic device and method for outputting data in portable electronic device
CN108270767B (en) Data verification method
CN109302442B (en) Data storage proving method and related equipment
US20100287386A1 (en) Secure integrated circuit comprising means for disclosing counterpart mask values
JP2016200948A (en) Program unauthorized rewriting prevention device
KR101296402B1 (en) Registration method for mobile otp device using encrypted seed
JP6226373B2 (en) IC card
JP6423231B2 (en) Information processing system
JP2020046989A (en) Authentication apparatus
JP2014153743A (en) Random number generation system, random number generation method, and control device
JP2005204137A (en) Mutual authentication system, apparatus to be managed, and program
JP2006011673A (en) Authentication device, user terminal and authentication method
JP2010267295A (en) Issuing method of information processor with authentication function