WO2013105554A1 - 制御装置監視システムおよび制御装置の監視方法 - Google Patents

制御装置監視システムおよび制御装置の監視方法 Download PDF

Info

Publication number
WO2013105554A1
WO2013105554A1 PCT/JP2013/050130 JP2013050130W WO2013105554A1 WO 2013105554 A1 WO2013105554 A1 WO 2013105554A1 JP 2013050130 W JP2013050130 W JP 2013050130W WO 2013105554 A1 WO2013105554 A1 WO 2013105554A1
Authority
WO
WIPO (PCT)
Prior art keywords
control
plc
program
control device
data
Prior art date
Application number
PCT/JP2013/050130
Other languages
English (en)
French (fr)
Inventor
尚 寺江
清水 勝人
直也 益子
Original Assignee
株式会社日立製作所
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 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to IN5825DEN2014 priority Critical patent/IN2014DN05825A/en
Priority to CN201380005269.2A priority patent/CN104054087A/zh
Publication of WO2013105554A1 publication Critical patent/WO2013105554A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/552Detecting local intrusion or implementing counter-measures involving long-term monitoring or reporting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2101Auditing as a secondary aspect
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2105Dual mode as a secondary aspect

Definitions

  • the present invention relates to a control device monitoring system that monitors the operation of a control device and a control method of the control device.
  • virus Malicious software such as computer virus (hereinafter referred to as virus) has been a threat in general personal computers (hereinafter referred to as PC (Personal Computer)).
  • PC Personal Computer
  • Trojan horses are known as representative of such viruses.
  • FD Flexible Disk
  • e-mails websites on the Internet, etc.
  • operations such as illegally stealing information or rewriting information.
  • PLCs programmable logic controllers
  • the PLC is a computer that is used limited to a specific purpose such as plant control.
  • a user generates a user program on a development PC, and the user program is downloaded from the development PC to the PLC.
  • the development PC is infected with a virus
  • the virus on the development PC may be downloaded to the PLC when the user program is downloaded.
  • a multiplex configuration of a plurality of PLCs loaded with the same user program is operated in preparation for a failure, and many techniques for improving the reliability of software using the multiplex configuration have been devised.
  • Patent Document 1 discloses a controller including a plurality of processors, and a processor that mainly performs communication processing and a processor that controls a control target device are independent, and a control method thereof. Further, in Patent Document 2, data is divided into a predetermined amount of data, authentication data is generated from each of the divided data, and a binomial operation is performed on the authentication data, and the calculation result matches the expected value. There is disclosed an electronic device, a gaming machine, a main control board, a peripheral board, an authentication method and an authentication program which perform authentication based on whether or not they are.
  • Patent Document 3 discloses a system bus control device and a dual memory system in which memory devices are dualized.
  • Patent Document 4 describes a failure analysis of a process controller that displays instruction execution result data of a control program using all input value data and output value data from N cycles before to the present of an instruction of a user program.
  • a support system is disclosed.
  • the virus operates a control target such as a plant so as not to be noticed by the user, and causes a malfunction or an accident of the control target. Therefore, the virus may cause undesirable effects on the user who manages and holds the control target and the end user who uses the control target.
  • virus intrusion methods for PLCs not connected to an external line such as the Internet are limited as compared to PCs. For example, it is considered that in many cases, viruses are allowed to enter at the time of downloading for software update from a PC for software development (PC for development) or a PC for operation management.
  • This invention was made in view of such a background, and this invention makes it a subject to monitor the operation state of PLC.
  • the present invention relates to a control device monitoring system including a plurality of control devices for controlling a control target, wherein the control device is executed by the other control device from a control device different from itself. And a control unit for acquiring control information for controlling the control target output from the program and generating data for operation verification based on the acquired control information.
  • a control device monitoring system including a plurality of control devices for controlling a control target, wherein the control device is executed by the other control device from a control device different from itself.
  • a control unit for acquiring control information for controlling the control target output from the program and generating data for operation verification based on the acquired control information.
  • the operating state of the PLC can be monitored.
  • FIG. 1 is a block diagram of a PLC monitoring system according to the first embodiment.
  • the PLC monitoring system 10 which is a control device monitoring system includes a PLC 1 (1a, 1b) which is a control device, a development PC (hereinafter simply referred to as a PC 2) which is a management device, a HUB (device) 3, a PI / O (Process Input / Output: Device 4 and control target 5 are included. Details of PLC 1 and PC 2 will be described later.
  • the PLCs 1a and 1b having a duplex configuration are connected to the HUB 3 via the field network 7.
  • the HUB 3 performs filtering, relay of the network, and the like.
  • the filtering here does not permit PI / O4 passage of a frame transmitted from the slave PLC1 to be described later, but allows PI / O4 passage of a frame transmitted from the master PLC1 to be described later.
  • the relay of the network refers to a function of transmitting a control command (control information) received by the HUB 3 from one PLC 1 to the PI / O 4 and also transmitting it to the other PLC 1.
  • the HUB 3 is connected via a field network 8 to a PI / O 4 which is an apparatus for controlling the control target 5.
  • Plural devices (equipment) with different functions are installed in PI / O 4, and each device is managed by a unique equipment number.
  • the PLC 1 can access any device by specifying the device number.
  • a PC 2 for performing software update and remote control is connected to each PLC 1 via a field network 6.
  • the above configuration is a general configuration as a control system.
  • one of the PLCs 1a and 1b is a master system (hereinafter, PLC1 which is the master system is appropriately referred to as a master) having the right (master right) to control the control target 5, and the other does not have the master right It becomes a slave (hereinafter, PLC1 which is a slave is appropriately called a slave).
  • PLC1 which is the master system is appropriately referred to as a master
  • PLC1 which is a slave
  • the master-slave relationship can be switched.
  • PLC 1a is the master and PLC 1b is the slave.
  • the PLC 1b acquires the data held in the memory of the PLC 1a and the alive status using the field network 7.
  • data is transmitted in frame units. That is, one PLC 1 b transmits data to the PI / O 4 and the other destination device such as the other PLC 1 a via the circuit of the field network 7 in frame units, and the destination device that is the destination is Is a scheme that receives a transmitted frame.
  • the HUB 3 relays the field networks 7 and 8 and monitors frames.
  • a unique address is assigned to PLC1 and PI / O4, and the address is assigned to the header information of the frame and transmitted.
  • a master identifier indicating whether the source PLC 1 is a master or a slave can be added to the header or data portion of the frame.
  • HUB3 implements a filtering function that transmits only frames transmitted from the master with control of control target 5 to PI / O 4 and can not transmit frames transmitted from the slave to PI / O 4 Do.
  • the PLC 1 is in the multiplex configuration, even if one of the PLCs 1 in the multiplex system is stopped for software update, the other PLCs 1 continue to operate. If the software update to PLC1 is by downloading via field network 6, then by specifying only the address of PLC1 executing the download, the software update is not affected, which affects other PLC1s in operation. Is possible. Therefore, a virus may intrude into the stopped PLC 1 to download the user program 112 (FIG. 3), but will not intrude into the ongoing PLC 1.
  • a virus infection is identified by verifying the operation of the PLC 1 immediately after the download is performed by the PLC 1 during the operation that is healthy.
  • FIG. 2 is a diagram showing an example of the hardware configuration of the PLC according to the first embodiment.
  • the PLC 1 includes a main memory 110, a central processing unit (CPU) 120, an input device 130, an output device 140, and a storage device 150.
  • the main memory 110 includes a control program (control unit, control unit on the transmission side, control unit on the reception side) 111, a user program 112, a PI / O driver 113, a master right control program 114, a data generation program 115, and a verification program 116. Etc. are expanded and executed by the CPU 120.
  • the control program 111 generally controls each of the programs 112 to 116 and updates the monitoring program table 151. That is, each of the programs 112 to 116 is a program executed on the control program 111.
  • the control program 111 is, for example, an OS (Operating System).
  • the user program 112 is a program for controlling the control target 5 (program executed by the control device), and is developed by the user in the PC 2 (FIG. 1) and downloaded to the PLC 1.
  • the PI / O driver 113 is a driver for controlling the PI / O 4.
  • the PI / O driver 113 performs processing of generating and transmitting a transmission frame addressed to the PI / O 4 and processing of receiving a frame from the PI / O 4.
  • PLC1 of duplex configuration not only the transmission frame for PI / O4 to PLC1 but also the transmission frame for PI / O4 sent by the partner PLC1 and the transmission frame for partner PLC1 from the partner PLC1 can be processed. ing.
  • the master right control program 114 switches the master right. When the PC 2 controls the master right or the user manually switches the master right, the master right control program 114 in the PLC 1 can be omitted.
  • the data generation program 115 generates operation verification data (verification data 251 (FIG. 3)) which is data for performing virus infection verification (hereinafter simply referred to as “verification”).
  • the verification program 116 is a program for verifying whether the PLC 1 is infected with a virus based on the verification data 251 and the like generated by the data generation program 115. When the verification is performed by the PC 2, the verification program 116 can be omitted. Further, in the storage device 150, a monitoring program table 151 described later is stored. If the verification is performed by the PLC 1, the verification data 251 of FIG. 3 may be generated and stored in the storage device 150.
  • the hardware configuration explicitly separates the main memory 110 and the storage device 150, the present embodiment is also applicable to a configuration in which the information stored in the storage device 150 exists on the main memory. It is feasible.
  • FIG. 3 is a diagram showing an example of the hardware configuration of the PC according to the first embodiment.
  • the PC 2 includes a main memory 210, a CPU 220, an input device 230, a display device 240, and a storage device 250.
  • a control program (control unit) 211, a download program 212, a verification program 213 and the like are expanded in the main memory 210 and executed by the CPU 220.
  • the control program 211 centrally controls the programs 212 and 213. That is, the programs 212 and 213 are programs executed on the control program 211.
  • the control program 211 is, for example, an OS.
  • the download program 212 downloads the user program 112 stored in the storage device 250 to the PLC 1 (FIG. 1).
  • the verification program 213 is a program for verifying whether or not the PLC 1 is infected with a virus based on the verification data 251 and the like sent from the PLC 1. In addition, when verification is performed by PLC1, the verification program 213 is omissible. Further, the storage device 250 stores a user program 112 developed by the user, verification data 251 transmitted from the PLC 1 and the like. The verification data 251 is data in which the behavior of the user program 112 suspected of having a virus infection is recorded. Although details will be described later, the verification data 251 is obtained by extracting specific information such as an output value to the PI / O 4 from the monitoring program table 151 which is a result of monitoring the behavior of the user program 112 by the PLC 1. A specific example of the verification data 251 will be described later with reference to FIG.
  • FIG. 4 is a diagram showing the flow of information in the PLC monitoring system according to the first embodiment.
  • symbol in FIG. 4 is the same as that of FIG. 1, and description about each component is abbreviate
  • the user program 112 stored in the PC 2 is infected with a virus.
  • devices infected with a virus are indicated by dots.
  • the control program 111 of the PLC 1 downloads the user program 112 from the PC 2 to the PLC 1 a in cooperation with the download program 212 of the PC 2 for updating its own software (S 101). At this time, the user program 112 infected with the virus is downloaded to the PLC 1a, and the PLC 1a is infected with the virus.
  • the HUB 3 sends the frame transmitted from the master (PLC 1 b) to the PI / O 4 (S 102, S 103) but does not send the frame (S 104) transmitted from the slave to the PI / O 4. That is, even when the HUB 3 receives a frame from both the master and the slave, it transmits a frame from the PLC 1 that is the master to the PI / O 4 with reference to the master identifier in the received frame. Further, the HUB 3 transfers the frame transmitted from each PLC 1 to another PLC 1 (S105, S106). This operation transmits the received frame from PLC 1 a to PLC 1 b and the received frame from PLC 1 b to PLC 1 a regardless of the master identifier of the received frame.
  • Each PLC 1 to which a frame has been transferred from HUB 3 generates verification data 251 using the transferred frame (a frame transmitted from another PLC 1), or uses this verification data 251 to verify a virus I do. Then, each PLC 1 transmits the verification data 251 and the result of the infection verification to the PC 2 (S 107, S 108).
  • the HUB 3 can be substituted as long as it has a filtering function and a network relay function as described above. For example, it may be determined whether the PLC 1 itself is a master or slave of the frame transmission source, and if it is a master, it is transmitted to the PI / O 4 and the partner PLC 1, and if it is a slave, it is transferred only to the partner PLC 1.
  • PLC1 may be replaced with HUB3 and PLC1 may operate a program for filtering or network relay.
  • FIG. 5 is a timing chart showing an operation example of the PLC monitoring process according to the first embodiment, which starts from a state in which the PC 2 is infected with a virus.
  • the process of PLC 1 in FIG. 5 is a process performed by a control program 111 as a control unit in PLC 1.
  • the PLC 1a pauses to transfer the master right to the PLC 1b, and the PLC 1b becomes a master and the PLC 1a becomes a slave. Then, the PC 2 transmits the user program 112 to the PLC 1a (S201), and the PLC 1a receives the transmitted user program 112 (S202). At this time, it is assumed that a virus is infected from PC2 to PLC1a. On the other hand, PLC1b is not infected because it has not downloaded it.
  • PLC1a may be appropriately referred to as "infected PLC” and PLC 1b as "normal PLC".
  • the PLC 1a is suspended for software update, and by transferring the master right to the PLC 1b, the PLC 1b is the master and the PLC 1a is the slave. Although the PLC 1a is restarted after the download from the PC 2 is completed, the PLC 1b is set to remain as a master and the PLC 1a as a slave until the virus verification process is completed.
  • a virus infects PLC1, destruction of memory (main memory 110 in Figure 2) and storage (storage device 150 in Figure 2) inside PLC 1 and infection with other control devices also become threats. Behavior is an illegal operation on the control target 5 (FIG. 1).
  • the control target 5 controlled by the PLC 1 includes a control plant 5 or the like that has a large influence due to a malfunction, unauthorized operation of the control target 5 should be prevented with the highest priority.
  • the PLC 1 In order for the PLC 1 to operate the controlled object 5, it is necessary to operate the PI / O 4. Therefore, in the configuration of the present embodiment, the PLC 1a infected with the virus issues an illegal control instruction to the PI / O 4, and the PI / O 4 executes the control instruction and issues an illegal output to the control target 5. You need to prevent that.
  • the PLC 1a is a slave, even if the user program 112 of the PLC 1a issues a control command, the PI / O 4 can not be controlled.
  • the PLC 1 b is a master, the user program 112 of the PLC 1 b transmits, as a frame, a control command A for controlling the control target 5 to the PI / O 4 via the HUB 3 (S 203).
  • the HUB 3 transfers the transmitted control instruction A to the PI / O 4 and the PLC 1 a (S 204).
  • the PI / O 4 executes the control instruction A transmitted from the HUB 3 (S205) to control the control target 5 (FIG. 1).
  • the data generation program 115 of the PLC 1a when the PLC 1a receives the control instruction A from the HUB 3 (S206), the data generation program 115 of the PLC 1a generates verification data 251 based on the control instruction A, and the verification program 116 verifies the verification data 251.
  • a verification process is performed to verify whether or not the PLC 1 b that is the transmission source of the control command A is infected with a virus (S 207). Then, the PLC 1a transmits the verification result to the PC 2 (S208), and the PC 2 having received the verification result displays the verification result on the display device 240 (S209).
  • PLC1a determines that PLC1b is suspected of being infected with a virus
  • PLC1a transmits a warning to PC2 indicating that PLC1b is suspected of being infected with a virus. You may do so.
  • the infected PLC PLCa continues to transmit a control command B different from the control command A as a frame to the PI / O 4 (S210).
  • the HUB 3 determines that the frame is frame transmission from the slave and does not transmit to the PI / O 4.
  • the HUB 3 transfers the frame received from the PLC 1a to the PLC 1b (S211).
  • the following three methods can be considered as a method of preventing the PI / O 4 from being controlled even if the slave issues a control instruction.
  • the slave recognizes itself as a slave and prevents the slave software from issuing a control instruction to the PI / O 4.
  • a frame containing a control command or the like has a master identifier indicating that the transmission source is a master, and the HUB 3 transmits only a frame having this master identifier to the PI / O 4, etc. It is.
  • the method of (3) is used in this embodiment, the methods of (1) and (2) may be used.
  • the method of master identification is not limited to the method by the master identifier.
  • the HUB 3 or PI / O 4 may have a function of storing an address or a node number, and a function of checking a device of a transmission source when a frame is received. In this case, the HUB 3 or PI / O 4 determines the device of the transmission source of the frame, and transmits and executes only the received frame from the master.
  • the PLC 1 may transmit a dedicated frame for notifying the master / slave switching, and change the master address or node number stored in the HUB 3 or PI / O 4.
  • the data generation program 115 of the PLC 1 b When the PLC 1 b receives the control command B from the HUB 3 (S 212), the data generation program 115 of the PLC 1 b generates verification data 251 based on the control command B. Then, using the verification data 251, the verification program 116 performs verification processing to verify whether the PLC 1a that is the transmission source of the control command B is infected with a virus (S213). Then, the PLC 1 b transmits the verification result to the PC 2 (S 214), and the PC 2 having received the verification result displays the verification result on the display device 240 (S 215).
  • PLC 1 b transmits a warning to PC 2 indicating that PLC 1 a is suspected of being infected with a virus. You may do so.
  • a plurality of PLCs 1 serving as a master does not exist in one PLC monitoring system 10, and one PLC 1 serving as a master is always present. Therefore, in order for the PLC 1a restarted after the software update to acquire the master right again and become the master, it is necessary to wait for the PLC 1b, which is the current master, to relinquish the master right. As a result, even though PLC1b is a master, even if a virus infecting PLC1a attempts to force PLC1a to become a master, a master right can be obtained by PLC1b relinquishing the master right. Without this, a valid control instruction can not be issued to PI / O4.
  • management of the master right is performed by the master right control program 114 currently run on the control program 111 of PLC1 in this embodiment.
  • the HUB 3 recognizes the master / slave by attaching a master identifier to the frame.
  • both PLC1a and 1b become masters (both PLC1 master status), that is, try each of PLC1a and 1b for effective and different control
  • the device HUB 3 or PI / O 4 detects the master state of both PLCs 1. Then, the HUB 3 or PI / O 4 transmits a frame notifying the master state of both PLCs 1 to the PLCs 1 a and 1 b, and forcibly stops the PLCs 1 a and 1 b that have received the notification.
  • each of the PLCs 1a and 1b attempts to simultaneously execute effective and different control to the control target 5
  • each of the PLCs 1a and 1b devices HUB 3 or PI / O 4 which are devices
  • the control device notifies each of the PLCs 1a and 1b that it is trying to perform effective and different control to one control target 5, respectively. By doing this, it is possible to reduce the influence of the unauthorized operation of the virus on the control target 5.
  • the HUB 3 has been described so far as not transmitting the control command of the slave (PLC 1 b) to the PI / O 4, the device that plays this role may be the PI / O 4 instead of the HUB 3.
  • the device that plays this role may be the PI / O 4 instead of the HUB 3.
  • FIG. 6 is a timing chart showing another operation example of the PLC monitoring process according to the first embodiment.
  • the process of PLC 1 in FIG. 6 is a process performed by the control program 111 as the control unit on the transmission side or the control unit on the reception side in the PLC 1.
  • the processes of steps S301 to S306 in FIG. 6 are the same as steps S201 to S206 of FIG.
  • the PLC 1a that receives the control instruction A (transmission source: PLC 1b) via the HUB 3 generates verification data 251 based on the received control instruction A (S307).
  • the verification data 251 is data for the user to visually recognize and determine an abnormality.
  • the PLC 1a transmits the verification data 251 to the PC 2 (S308), and when the verification data 251 is received, the PC 2 displays the verification data 251 on the display device 240 (S309).
  • the verification data 251 is graphed and visually displayed on the display device 204, and the user determines whether the PLC 1b is infected with a virus.
  • FIG. 7 is a diagram showing an example of the format of a frame used in the PLC monitoring system according to the first embodiment.
  • the frame has the following configuration.
  • the start of frame flag uses a unique pattern that does not appear elsewhere in the frame and indicates that it is the start of the frame.
  • the destination address indicates the physical address that is the destination of the frame.
  • the transmission source address indicates the physical address of the transmission source of the frame.
  • the master identifier indicates whether PLC1 (FIG. 1) which is the transmission source of the corresponding frame is the master, and if the frame is from the master, the HUB 3 is for transmitting the frame to the PI / O 4.
  • the frame length indicates the length of the entire frame.
  • the transmission data body stores information such as control commands.
  • the frame check sequence is an error detection code for checking whether or not an unexpected mutation such as bit inversion has occurred between the frame start flag and the end of transmission data.
  • the transmission data body has the following configuration.
  • the frame issue time indicates the time when the frame was generated and issued, and is used to calculate the arrival time of the frame.
  • the device number indicates the PI / O 4 number to which the frame is to be sent. Although only one PI / O 4 is illustrated in FIG. 1 and the like for simplification, each PI / O 4 is present when there are a plurality of PI / O 4 or devices other than PI / O 4 are connected. Or, assign unique device numbers to other devices and manage them.
  • the command is a command to operate PI / O4. For example, reading of input data and writing of output data.
  • the data size is the overall size of the control data that follows. Control data is data used in a command.
  • FIG. 8 is a flowchart showing a detailed procedure of frame transmission processing in the PLC according to the first embodiment. Note that FIG. 1 will be referred to as appropriate. This process is performed at the timings of steps S203 and S210 in FIG. 5 and steps S303 and S310 in FIG.
  • the frame transmitted to the field network 7 is generated and transmitted when the user program 112 issues a control instruction to operate the PI / O 4.
  • the user program 112 calls a control instruction as will be described later by preparing a control instruction for operating the PI / O 4 as a system call of software (control program 111) installed in the PLC 1, the user program 112 It is in a state of being saved in the storage device 150 as a context.
  • the process moves to the control program 111 of the PLC 1 as a system call.
  • the control program 111 on the PLC 1 saves the information of the user program 112 which has been executed up to the storage device 150 as a context (S 352).
  • the control program 111 on the PLC 1 acquires information from the saved context (S 353), and generates program information (S 354).
  • the information to be saved as a context includes the memory address and the like executed by the user program 112. Therefore, from the information saved as a context, for example, the memory address and the like executed by the user program 112
  • the program number can be determined by setting the unique number of the user program 112 (program number).
  • the control program 111 searches these program numbers to obtain these information. You can get
  • FIG. 9 is a flowchart showing a procedure of frame reception post-processing in the PLC according to the first embodiment. Note that FIG. 1 will be referred to as appropriate. Further, this process is performed at the timings of steps S206, S207, S212, and S213 of FIG. 5 and steps S306, S307, S312, and S313 of FIG.
  • the PI / O driver 113 receives a frame from the PLC 1 of the other system (S401). Then, the control program 111 of the PLC 1 starts the update process of the monitoring program table 151 (S402), interrupts the user program 112, and interrupts the process being executed (S403).
  • the verification program 116 does not perform the verification process, but generates the verification data 251 in step S411 and transmits the verification data 251 to the PC 2. You may do it. Then, when the verification process in step S412 is completed, the control program 111 transmits the verification result to the PC 2, and the control program 111 ends the verification process (S413), and resumes the execution of the user program 112 (S414).
  • the processing of steps S408 to S414 is periodically performed at fixed time intervals.
  • the PLC 1 executes the verification process by updating and referring to the monitoring program table 151 in this manner.
  • Example of verification data The details of the verification data 251 will be described below.
  • a method of verification a method of setting a verification pattern in advance in PLC 1 and verifying it in PLC 1 and a method of preparing an application for graphing the behavior of the user program in PC 2 and judging the validity of the user program itself Is considered.
  • the verification program 116 of PLC1 determines whether or not the partner PLC1 is infected with a virus based on the behavior of the output of the user program 112 in the partner PLC1. Good. Further, in the process shown in FIG. 6, in step S315, the PC 2 may prompt the user to confirm whether or not the PLC 1 is infected with a virus by displaying a graph as shown in FIG. 10 on the display device 240. .
  • the plot 1007 has an apparently smaller value compared to the plots before and after it. Also in this case, the user or the verification program 116 can determine that there is a possibility that the user program 112 is altered by a virus and the output value is rapidly raised and lowered to give an excessive load to the control target 5. .
  • the user or the verification program 116 can check the latency of the virus. Further, when the verification program 116 performs verification, it is preferable to set the verification criteria as described above in the PLC 1 and perform the verification based on the set criteria. Then, the verification program 116 of PLC 1 or the verification program 213 of PC 2 checks the allowable range check of the output value, the continuity check of the output value, etc., and displays an alert on the PC 2 if it is abnormal. can do.
  • the output value of PI / O4 is shown as an example in this embodiment as a parameter to be checked, various other parameters to be checked are conceivable. For example, the frequency of issuance of a specific instruction may be checked, and if issued with an abnormal frequency, a warning may be issued as an illegal operation by a virus.
  • the monitoring program table 151 may be provided as log information to the PC 2 to analyze the behavior of the virus from the log information. It should be noted that there is also a possibility that the verified PLC1 may determine that the virus is latent despite the fact that the virus is not latent, so a warning is only issued and the system is improved to improve availability. It is desirable not to have a state such as stopping the Besides, it is also possible to stop only the program judged to be a latent virus, or only PI / O 4 operated by the virus, to be put into a degenerate operation state. In this case, the control program 111 receives a notification of the number of the user program 112 in which the virus is latent from the verification program 116, and performs a process of stopping the process of the user program 112.
  • FIG. 11 is a flowchart showing the procedure of the monitoring program table update process according to the first embodiment. This process is performed at the timing of step S405 in FIG. Generation and update of the monitoring program table 151 are performed as follows.
  • the control program 111 compares the information of the user program 112 of the other system obtained from the received frame from the other system PLC 1 with the information of the user program 112 of the own system. If the information exists in the other system but not in the own system, or there is a difference in the information of the user program 112 even with the same program number in the other system and the own system, the information of the program is registered in the monitoring program table 151 .
  • the user program 112 once registered in the monitoring program table 151 is added / updated with its own information in the monitoring program table every time information is received from the partner PLC 1 thereafter. Thus, the user program 112 keeps recording the behavior of the changed user program 112 in the monitoring program table 151.
  • the control program 111 on the PLC 1 receives a frame from the PLC 1 of the other system (S 501)
  • the control program 111 acquires the contents of the received frame and searches the monitoring program table 151 for the same program number as the program number stored in the frame. (S502).
  • step S502 the control program 111 determines whether the corresponding program number is registered in the monitoring program table 151 (S503). As a result of step S503, if the program number stored in the frame is already registered in the monitoring program table 151 (S503 ⁇ Yes), the control program 111 advances the process to step S510. As a result of step S503, when the program number stored in the frame is not registered in the monitoring program table 151 (S503-> No), the control program 111 has the same program number as the program number to be processed. It is searched whether or not it exists in PLC 1 (downloaded or not) (S 504).
  • step S504 is a program list in which the downloaded user program 112 information stored in the storage device 150 of the own PLC 1 is sorted by program number in order to search for the user program 112 in the own PLC 1 It is good to use a table etc.
  • the control program 111 determines whether or not the user program 112 corresponding to the program number to be processed is in its own PLC 1 (S505).
  • step S505 when there is no user program 112 corresponding to the program number to be processed in the own PLC 1 (S505 ⁇ No), the control program 111 advances the process to step S509. If it is determined in step S505 that the user program 112 corresponding to the program number to be processed is present in its own PLC 1 (S505: Yes), the control program 111 checks whether the user program 112 has been changed. Among them, the program update time (update time in the PLC 1 of the other system) and the program size are acquired (S506). Subsequently, the control program 111 compares the acquired update time and program size with the update time and program size in the user program 112 of the own PLC 1 searched in step S504 (S507).
  • the control program 111 determines whether the program has been updated (S508) using the program size and the update time. If other program information such as a message digest value can be obtained besides the program size and the update time, it can be used for the determination. However, if it is judged only by the program size or only the message digest value, it is conceivable that the message digest values match even in different programs whose sizes are the same even if they are changed. May miss. Therefore, it is desirable to use a plurality of program information for the determination. In the present embodiment, only the output command is registered in the monitoring program table 151. The reason is that the virus can perform an undesired operation on the control target 5 because it is limited to the output command.
  • commands other than the output command are registered in the monitoring program table 151. May be For example, a master / slave switching instruction of PLC1, a device stop / reset instruction of PI / O 4 in operation, a start instruction of PI / O 4 device in suspension, a setting change instruction of PI / O 4 etc. are also sent to PI / O4. Since this is an operation, these pieces of information may be registered in the monitoring program table 151.
  • FIG. 12 is a diagram showing a configuration example of a monitoring program table according to the first embodiment. Since the PLC 1 or PC 2 monitors the behavior of the user program 112 for verification, the monitoring program table 151 manages the user program 112 to be monitored. As shown in FIG. 12, the monitoring program table 151 stores the program number, program update time, program size, command, device number, and control data of the user program 112 to be monitored.
  • the control program 111 registers information such as commands and device numbers in the monitoring program table 151 each time a frame is transmitted.
  • the target of the monitored user program 112 is the user program 112 which is not present in the own PLC 1 but is present in the PLC 1 of the opposite system, or the update time and size of the user program 112 in the own PLC 1 and the PLC 1 of the opposite system Are different.
  • Such a user program 112 may be added or changed at a planned software update, but a latent virus may add or change the user program 112.
  • PLC1 or PC2 monitors the behavior of such user program 112.
  • the monitoring program table 151 records the history of output commands by the user program 112 which may have a virus latent.
  • the update time of the user program 112 with the program number 0x0005 is 14:40:10 on August 1, 2011, the size of the user program 112 is 428 bytes, and the contents of the instruction First, write 0xFFFF1111 with long word size (LONG) to the analog output device (AO) with equipment number 0xB0000B80 (WRITE), and the second time with the digital output device (DO) with equipment number 0xB0000140 with word size It can be seen that 0x0000186D was written (WRITE) in WORD). Even though the program numbers are the same, the output commands are different because different commands may be executed each time the same user program 112 is executed.
  • the frame issuance time, the address of the data being used, etc. are registered in the monitoring program table 151 in order to monitor the behavior of the user program 112 to be monitored in more detail. It may be done.
  • the data generation program 115 When the monitoring program table 151 is generated, the data generation program 115 generates the verification data 251 by using a user request or a timer having a predetermined cycle as a trigger. Data extracted by the data generation program 115 can be freely customized by the user. For example, in the example of FIG. 10, an output value (control data) when a specific user program 112 issues an output instruction to a specific PI / O 4 is extracted.
  • the first embodiment it is possible to check the other PLC1 suspected of being infected with a virus by one of the PLCs 1 of the duplex configuration performing verification or generating the verification data 251. .
  • the other PLC1s of the multiplexing configuration can detect the virus, so that the security of the PLC1 can be reduced. Can be improved. Also, paying attention to the characteristic of the virus in the PLC 1 that there is a possibility that the downloaded user program 112 is infected with a virus, the behavior of the downloaded user program 112 and the user program 112 not performing downloading is verified. Since the method is taken, fundamental measures can be made rather than ad hoc measures such as anti-virus patches.
  • the PLC monitoring system 10 temporarily operates with the master PLC 1 a that has been stopped for software update. It is possible to switch the master / slave of the configured PLC 1 b and return the PLC 1 a to the master and the PLC 1 b to the slave, which are in the state before the software update.
  • the partner PLC 1 can not obtain the information of the user program 112 unless the user program 112 infected with the virus operates.
  • the PLC 1 on which the virus is latent may become the master and the master infected with the virus may be able to control the control target 5 .
  • the slave is infected with a virus during software update, but next, the case where the master is infected with a virus during operation will be described.
  • the first embodiment is limited to the case where the slave is infected with a virus, but if there is a means for the PC 2 and PLC 1 to communicate while the PLC 1 is in operation, then via the PC 2 even during software update Thus, there is a possibility that the PLC 1 in both the master and slave systems can be infected with a virus.
  • both the master and the slave are provided with means for verifying the operation of the program of the other system, the user program 112 possessed by the other system is different from the own system. If it exists, the PLC monitoring system 1 can detect an abnormality.
  • the master If the master is infected with a virus, it is the slave that verifies and detects that the master is infected with the virus. However, since the master infected with the virus can control the control target 5, it is in an undesirable state. Therefore, the slave must obtain a control instruction from the master via the HUB 3, analyze it, and perform verification immediately. Also, when the user receives a warning from the slave that the virus is latent or may be latent in the master, the user should immediately take measures such as stopping PLC 1 to avoid the influence of the virus. You must.
  • FIG. 13 is a timing chart showing the operation of the PLC monitoring process according to the second embodiment, which starts from a state in which the master is infected.
  • the process in FIG. 13 is a state in which the master right returns from PLC 1 b to PLC 1 a and PLC 1 a controls the control target 5.
  • the processing when the PLC 1a is infected with the virus at this time point is shown.
  • the timing at which the PLC 1 synchronizes data between the master and the slave is the timing at which the PLC 1 executes control calculation and stores the calculation result in the data area. This control calculation is triggered when the PLC 1 issues an input request to the PI / O 4 in order to acquire physical information from the control target 5.
  • the PLC 1a (master) transmits an input request A for controlling the control target 5 as a frame to the PI / O 4 (S601).
  • the HUB 3 having received the input request A transfers the input request A to the PI / O 4 and the PLC 1 b (slave) (S 602), and the PLC 1 b receives the input request A (S 603).
  • the PI / O 4 executes control of the control target 5 according to the input request A (S 604), and transmits the input response A, which is the response, to the HUB 3 (S 605).
  • the HUB 3 having received the input response A from the PI / O 4 transfers the input response A to the PLC 1 a (master) and the PLC 1 b (slave) (S 606).
  • both the master and slave PLCs 1 normally store the same user program 112 and calculate the same user program 112 based on the same input response, the result should be the same. However, if either one is infected with a virus, different results will be output because the contents of the program are different.
  • the PLC 1a transmits the synchronization data to the HUB 3 (S611).
  • the HUB 3 transfers the transmitted synchronization data to the PLC 1 b (S 612).
  • the PLC 1 b performs comparison processing for comparing the synchronization data transmitted from the PLC 1 a with the comparison data generated in step S 608 (S 613).
  • the PLC 1 b transmits the result (comparison result) of the comparison process to the PC 2 (S 614), and the PC 2 receiving the comparison result displays the received comparison result on the display device 240 (S 615).
  • the result of the comparison process is transmitted to the PC 2.
  • the slave may transmit a warning to the PC 2 only when the comparison data does not match.
  • the comparison process may be performed by a master infected with a virus. Further, the process shown in FIG. 13 is a process performed every constant time.
  • the format of a frame (synchronization frame) used for transmission of synchronization data is the same as that shown in FIG.
  • the slave number to be subjected to data synchronization is set as the device number.
  • the device number has a value that includes not only the device number but also the address of the main memory 110 where the user program 112 is being executed. The beginning is also known from the device number.
  • the commands also store commands for data synchronization. This is a command different from the PI / O 4 command.
  • Control data in the synchronization frame is data (synchronization data) for copying and synchronization from the master to the slave.
  • an input request is issued from the PLC 1 to the PI / O 4.
  • the program number is stored in the frame of the input response transmitted by the PI / O 4. This allows the slave to know which user program 112 should be used to calculate the input request. That is, the slave can generate data (comparison data) to be compared with the synchronization data using the same user program 112 as the synchronization data based on the program number and the input request. It is also conceivable to issue a plurality of input requests in one user program 112. In such a case, a branch number may be assigned to each input request so that the input request may be managed so that which instruction in the user program 112 corresponds to can be specified.
  • FIG. 14 is a diagram showing the flow of information in the PLC monitoring system according to the third embodiment.
  • the PLC monitoring system 10a in FIG. 14 has three triple-system PLC1 (1A, 1B, 1C), no HUB 3, and PI / O 4 and PLC 1 (1A, 1B, 1C) directly connect and communicate. There is.
  • the same components as in FIG. 1 will be assigned the same reference numerals and descriptions thereof will be omitted.
  • the PLC 1A infected with the virus in step S700 transmits a control command to the PI / O 4 in step S701.
  • the PI / O 4 transfers this control instruction to the PLCs 1 B and 1 C (S 711, S 712).
  • PLC 1 B and 1 C transmit a control instruction to PI / O 4 in steps S 702 and S 703, and PI / O 4 transmits this control instruction to the other PLCs 1 A to 1 C as well (S 711 and S 712. , S721, S722, S723).
  • the PI / O 4 may take a majority of the contents of the control command transmitted from each of the PLCs 1A to 1C, and transmit the control command having the largest number of contents to the control target 5.
  • the PLCs 1A, 1B, and 1C may perform verification according to the procedure shown in FIG. 3, FIG. 4, and FIG. 7 based on the received control command and the program information attached thereto.
  • Each of the PLCs 1A, 1B, and 1C performs the process described in the first embodiment or the second embodiment, and transmits the result to the PC 2 (S731 to S733).
  • the PLCs 1A, 1B, and 1C perform the verification process (S207 and S213 in FIG. 5) of the first embodiment, the verification data (S307 and S313 in FIG. 6), and the comparison process (2) in the second embodiment.
  • S613 of FIG. 13 is performed using data between the three PLCs 1.
  • PLC monitoring system 110 PLC main memory 111 PLC control program (control unit, control unit on transmission side, control unit on reception side) 112 User Program (Program) 113 PI / O driver 114 Master right control program 115 Data generation program 116 PLC verification program 120 PLC CPU 130 PLC input device 140 Output device 150 PLC storage device 151 Monitoring program table 210 PC main memory 211 PC control program (control section) 212 Download Program 213 PC Verification Program 220 PC CPU 230 PC input device 240 Display device 250 PC storage device 251 Verification data (data for operation verification)

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Programmable Controllers (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

 PLC(1)の動作状態を監視するため、制御対象(5)を制御する複数のPLC(1)の動作状態を監視するPLC監視システム(10)であって、PLC(1b)は、自身とは別のPLC(1a)から、このPLC(1a)で実行されているユーザプログラムが出力した制御命令を取得し、取得した制御命令を基に、検証用データを生成することを特徴とする。そして、PLC(1b)は、検証用データを用いて、制御命令の送信元のPLC(1a)がウィルスに感染していないか否かを検証したり、検証用データをPC(2)へ送信し、PC(2)がこの検証用データを表示装置に表示することで、ユーザがPLC(1a)のウィルスの感染を検証したりする。

Description

制御装置監視システムおよび制御装置の監視方法
 本発明は、制御装置の動作を監視する制御装置監視システムおよび制御装置の監視方法に関する。
 コンピュータウィルスなどの悪意のあるソフトウェア(以下、ウィルスと称する)はこれまで、一般的なパーソナルコンピュータ(以下、PC(Personal Computer)と称する)において脅威となる存在であった。このようなウィルスの代表的なものとしてトロイの木馬などが知られている。これらのウィルスはFD(Flexible Disk)などの外部媒体、メール、インターネット上のWebサイトなどのさまざまな経路からコンピュータに侵入し、不正に情報を盗み出したり、情報を書き換えたりするなどの動作を行う。前記したように、このようなウィルスの脅威は、従来PCにおいてのみ認知されていたが、近年、プログラマブルロジックコントローラ(以下、PLC(programmable logic controller)と称する)においても、その感染例が報告されている。例えばstuxnetなどは、USB(Universal Serial Bus)メモリなどを介して開発用PCに侵入し、開発用PCからPLCへユーザプログラムをダウンロードするときにウィルスがPLCに仕込まれる。そのため、PLCにおいても、ウィルス対策が求められてきている。
 PLCはプラント制御など、特定の目的に限定して利用される計算機である。このようなPLCでは、ユーザが開発用PC上でユーザプログラムを生成し、そのユーザプログラムが開発用PCからPLCへダウンロードされる。ここで、開発用PCがウィルスに感染していると、ユーザプログラムのダウンロード時に、開発用PC上のウィルスがPLCにダウンロードされてしまうおそれがある。
 また、障害に備えて、同一のユーザプログラムを搭載した複数のPLCによる多重化構成が運用されることも多く、その多重化構成を利用したソフトウェアの信頼性向上技術が多く考案されている。
 例えば、特許文献1には複数のプロセッサを備え、主として通信処理を行うプロセッサと、制御対象機器の制御を行うプロセッサとを独立させているコントローラおよびその制御方法が開示されている。
 また、特許文献2にはデータを所定のデータ量に分割し、分割されたそれぞれのデータから認証データを生成し、この認証データに対して2項演算を行い、演算結果と期待値が一致するか否かで認証を行う電子機器、遊技機、主制御基板、周辺基板、認証方法および認証プログラムが開示されている。
 さらに、特許文献3にはシステムバス制御装置と、メモリ装置を2重化している2重化メモリシステムが開示されている。
 そして、特許文献4には、ユーザプログラムの命令のN周期前から現在までのすべての入力値データおよび出力値データを用いて、制御プログラムの命令実行結果データの表示を行うプロセス制御コントローラの故障解析支援システムが開示されている。
特開2004-094473号公報 特開2011-030607号公報 特開平08-016484号公報 特開2001-014027号公報
 ウィルスは、ユーザに気づかれないようにプラントなどの制御対象を操作し、制御対象の誤動作や事故を発生させる。そのため、ウィルスは制御対象を管理・保有するユーザや、その制御対象を利用するエンドユーザに対して好ましくない影響をもたらすおそれがある。しかしながら、インターネットなどの外部の回線に接続されていないPLCに対するウィルスの侵入方法は、PCに比べると限定的である。例えば、ソフトウェア開発用のPC(開発用PC)や、運用管理用のPCからソフトウェア更新のためのダウンロードの際にウィルスの侵入を許してしまうことが多いと考えられる。
 このような背景に鑑みて本発明がなされたのであり、本発明は、PLCの動作状態を監視することを課題とする。
 前記した課題を解決するため、本発明は、制御対象を制御する制御装置を複数備える制御装置監視システムにおいて、前記制御装置は、自身とは別の制御装置から、前記別の制御装置で実行されているプログラムが出力した、前記制御対象を制御する制御情報を取得し、前記取得した制御情報を基に、動作検証用のデータを生成する制御部を有することを特徴とする。
 その他の解決手段は、実施形態中で適宜説明する。
 本発明によれば、PLCの動作状態を監視することができる。
第1実施形態に係るPLC監視システムの構成図である。 第1実施形態に係るPLCのハードウェア構成例を示す図である。 第1実施形態に係るPCのハードウェア構成例を示す図である。 第1実施形態に係るPLC監視システムにおける情報の流れを示す図である。 第1実施形態に係るPLC監視処理の動作例を示すタイミングチャートである。 第1実施形態に係るPLC監視処理の別の動作例を示すタイミングチャートである。 第1実施形態に係るPLC監視システムに用いられるフレームのフォーマット例を示す図である。 第1実施形態に係るPLCにおけるフレーム送信処理の詳細な手順を示すフローチャートである。 第1実施形態に係るPLCにおけるフレーム受信後処理の手順を示すフローチャートである。 第1実施形態に係るPLC監視システムによる検証用データをグラフ化した例を示す図である。 第1実施形態に係る監視プログラムテーブル更新処理の手順を示すフローチャートである。 第1実施形態に係る監視プログラムテーブルの構成例を示す図である。 第2実施形態に係るPLC監視処理の動作を示すタイミングチャートである。 第3実施形態に係るPLC監視システムにおける情報の流れを示す図である。
 次に、本発明を実施するための形態(「実施形態」という)について、適宜図面を参照しながら詳細に説明する。
[第1実施形態]
(構成)
 図1は、第1実施形態に係るPLC監視システムの構成図である。
 制御装置監視システムであるPLC監視システム10は、制御装置であるPLC1(1a,1b)、管理装置である開発用PC(以下、単にPC2と称する)、HUB(機器)3、PI/O(Process Input/Output:機器)4、制御対象5を有している。
 PLC1およびPC2については、詳細を後記する。
 PLC監視システム10では、2重化構成となっているPLC1a,1bが、フィールドネットワーク7を介して、HUB3に接続している。ここで、後記するように、HUB3は、フィルタリングやネットワークの中継などを行う。ここでのフィルタリングは、後記するスレーブのPLC1から送信されたフレームのPI/O4通過を許可しないが、後記するマスタのPLC1から送信されたフレームのPI/O4通過を許可するといった機能を指す。また、ネットワークの中継とはHUB3が一方のPLC1から受信した制御命令(制御情報)を、PI/O4へ送信するとともに、他方のPLC1にも送信する機能を指す。
 HUB3は、フィールドネットワーク8を介して、制御対象5を制御する装置であるPI/O4に接続している。
 PI/O4には機能の異なる複数デバイス(機器)が搭載されており、それぞれのデバイスは固有の機器番号によって管理されているものとする。PLC1は機器番号が指定されることでどのデバイスにもアクセスが可能である。
 また、各PLC1には、ソフトウェアの更新やリモート制御を行うためのPC2がフィールドネットワーク6を介して接続されている。
 前記の構成は制御システムとしては一般的な構成である。
 ここで、PLC1a,1bの一方が制御対象5を制御する権利(マスタ権)を持った主系(以下、主系となっているPLC1を適宜マスタと称する)となり、他方がマスタ権を持たない従系(以下、従系となっているPLC1を適宜スレーブと称する)となる。そして、マスタが障害などで動作継続不可能になったときは、マスタ・スレーブ関係を切り替えることができる。
 まず、最初にPLC1aがマスタ、PLC1bがスレーブとなっているものとする。スレーブのPLC1bがマスタのPLC1aの突発的な切替要求に対応できるようにするため、PLC1bはPLC1aがメモリに持っているデータや生存状態をフィールドネットワーク7を使って取得する。
 ここで、本実施形態におけるフィールドネットワーク7,8の通信方式は、フレーム単位でデータを送信するものとする。すなわち、一方のPLC1bがPI/O4や、他方のPLC1aなどの送信先の装置に対して、フレーム単位でフィールドネットワーク7の回線を介してデータを送信し、その宛先となっている送信先の装置が、送信されたフレームを受信するような方式である。
 前記したように、HUB3はフィールドネットワーク7,8を中継し、フレームを監視する。PLC1およびPI/O4には、固有のアドレスが付与されており、そのアドレスをフレームのヘッダ情報に付与して送信している。フレームには、後記するように、フレームのヘッダ、あるいはデータ部分に、送信元のPLC1がマスタであるかスレーブであるかを示すマスタ識別子を付加することができる。このマスタ識別子により、HUB3は制御対象5の制御権を持つマスタから送信されたフレームのみをPI/O4へ送信し、スレーブから送信されたフレームをPI/O4に送信できないようにするフィルタリング機能を実現する。
 図1に示すように、PLC1が多重化構成になっていれば、その多重系におけるPLC1のうちの1つをソフトウェアの更新のために停止しても、他のPLC1は動作継続している。PLC1へのソフトウェアの更新が、フィールドネットワーク6を経由したダウンロードによるものであれば、ダウンロードを実行するPLC1のアドレスのみを指定することで、動作継続中の他のPLC1に影響を与えずソフトウェアの更新が可能である。そのため、ウィルスは、ユーザプログラム112(図3)をダウンロードするために停止しているPLC1に侵入する可能性があるが、動作継続中のPLC1には侵入しないことになる。この時点では、動作継続中で健全なPLC1と、ウィルスの感染の可能性があるPLC1とが両立した状態となり、それら2種類のPLC1の状態を比較すれば、ウィルスの感染を特定することができる。本実施形態では、健全である動作継続中のPLC1によって、ダウンロード実施直後のPLC1の動作を検証することでウィルスの感染を特定する。
(PLCの構成)
 図2は、第1実施形態に係るPLCのハードウェア構成例を示す図である。
 PLC1は、メインメモリ110、CPU(Central Processing Unit)120、入力装置130、出力装置140、記憶装置150を有している。
 メインメモリ110には、制御プログラム(制御部、送信側の制御部、受信側の制御部)111、ユーザプログラム112、PI/Oドライバ113、マスタ権制御プログラム114、データ生成プログラム115、検証プログラム116などが展開され、CPU120によって実行されている。
 制御プログラム111は、各プログラム112~116を統括制御したり、監視プログラムテーブル151の更新を行ったりする。つまり、各プログラム112~116は制御プログラム111上で実行されるプログラムである。制御プログラム111は、例えばOS(Operating System)などである。
 ユーザプログラム112は、制御対象5を制御するためのプログラム(制御装置で実行されているプログラム)であり、ユーザによってPC2(図1)で開発され、PLC1へダウンロードされる。
 PI/Oドライバ113は、PI/O4を制御するためのドライバである。PI/Oドライバ113はPI/O4宛の送信フレームを生成して送信する処理と、PI/O4からのフレームを受信する処理を行う。二重化構成のPLC1では、PI/O4からPLC1宛の送信フレームだけでなく、相手系PLC1が送信したPI/O4宛の送信フレーム、相手系PLC1から自系PLC1宛の送信フレームを処理できるようになっている。
 マスタ権制御プログラム114は、マスタ権の切り替えを行う。なお、PC2がマスタ権の制御を行ったり、ユーザによる手動でのマスタ権の切り替えが行われる場合、PLC1におけるマスタ権制御プログラム114は省略可能である。
 データ生成プログラム115は、ウィルスの感染検証(以下、単に「検証」と称する)を行うためのデータである動作検証用のデータ(検証用データ251(図3))などを生成する。
 検証プログラム116は、データ生成プログラム115で生成された検証用データ251などを基に、PLC1がウィルスに感染しているか否かを検証するプログラムである。なお、検証がPC2で行われる場合、検証プログラム116は省略可能である。
 また、記憶装置150には、後記する監視プログラムテーブル151が格納されている。
 検証がPLC1で行われる場合、図3の検証用データ251が生成され、記憶装置150に保存されることがある。
 なお、本ハードウェア構成はメインメモリ110と記憶装置150とを明示的に分離しているが、記憶装置150に格納される情報がメインメモリ上に存在しているような構成でも本実施形態は実現可能である。
(PCの構成)
 図3は、第1実施形態に係るPCのハードウェア構成例を示す図である。
 PC2は、メインメモリ210、CPU220、入力装置230、表示装置240、記憶装置250を有している。
 メインメモリ210には、制御プログラム(制御部)211、ダウンロードプログラム212、検証プログラム213などが展開され、CPU220によって実行されている。
 制御プログラム211は、各プログラム212,213を統括制御する。つまり、各プログラム212,213は制御プログラム211上で実行されるプログラムである。制御プログラム211は、例えばOSなどである。
 ダウンロードプログラム212は、記憶装置250に格納されているユーザプログラム112をPLC1(図1)へダウンロードする。
 検証プログラム213は、PLC1から送られてきた検証用データ251などを基に、PLC1がウィルスに感染しているか否かを検証するプログラムである。なお、検証がPLC1で行われる場合、検証プログラム213は省略可能である。
 また、記憶装置250には、ユーザによって開発されたユーザプログラム112と、PLC1から送信された検証用データ251などが格納されている。
 検証用データ251はウィルス感染の疑いのあるユーザプログラム112に関する挙動を記録したデータである。詳細は後記するが、検証用データ251はPLC1にてユーザプログラム112の挙動を監視した結果である監視プログラムテーブル151から、PI/O4への出力値などの特定の情報を抽出したものである。検証用データ251の具体例は図10で後記する。
(情報の流れ)
 図4は、第1実施形態に係るPLC監視システムにおける情報の流れを示す図である。なお、図4における符号は、図1と同様であり、それぞれの構成要素についての説明を省略する。
 ここで、PC2で格納されているユーザプログラム112がウィルスに感染しているものとする。なお、図4において、ウィルスに感染している機器をドットで示すこととする。
 まず、ユーザプログラム112のダウンロード開始前に、PLC1aが一時停止し、各PLC1a,1bの制御プログラム111で実行されているマスタ権制御プログラム114が、マスタ権をPLC1aからPLC1bへ移す。
 マスタ権の移動後、自身のソフトウェアの更新のため、PLC1の制御プログラム111は、PC2のダウンロードプログラム212と連携してPC2からPLC1aへユーザプログラム112のダウンロードを行う(S101)。このとき、ウィルスに感染しているユーザプログラム112がPLC1aにダウンロードされ、PLC1aがウィルスに感染する。
 ここで、前記したように、HUB3は、マスタ(PLC1b)から送信されるフレームをPI/O4へ送るが(S102,S103)、スレーブから送信されるフレーム(S104)をPI/O4へ送らない。つまり、HUB3はマスタ・スレーブ両方からフレームを受信しても、受信フレーム内のマスタ識別子を参照してマスタになっているPLC1からのフレームをPI/O4へ送信する。
 また、HUB3は各PLC1から送信されたフレームを別のPLC1へ転送する(S105、S106)。この動作は受信したフレームのマスタ識別子に関係なく、PLC1aからの受信フレームをPLC1bへ、PLC1bからの受信フレームをPLC1aへ送信する。
 HUB3からフレームを転送された各PLC1は、転送されたフレーム(別のPLC1から送信されたフレーム)を用いて、検証用データ251を生成したり、この検証用データ251を使用してウィルスの検証を行う。そして、各PLC1は、検証用データ251や、感染検証の結果をPC2へ送信する(S107,S108)。
 なお、HUB3は前記したようなフィルタリング機能やネットワーク中継機能を有する装置であれば代用可能である。例えば、PLC1自身がフレームの送信元がマスタかスレーブかを判定して、マスタならばPI/O4と相手系PLC1に送信し、スレーブならば相手系PLC1にのみ転送するようにしてもよい。あるいは、PLC1をHUB3に置き換えて、PLC1がフィルタリングやネットワーク中継のためのプログラムを動作させてもよい。
 図5は、第1実施形態に係るPLC監視処理の動作例を示すタイミングチャートであり、PC2がウィルスに感染している状態から開始している。なお、図5におけるPLC1の処理は、PLC1における制御部としての制御プログラム111が行う処理である。
 PLC1aが一時停止して、マスタ権をPLC1bへ移し、PLC1bがマスタ、PLC1aがスレーブとなる。
 そして、PC2は、PLC1aへユーザプログラム112を送信し(S201)、PLC1aは送信されたユーザプログラム112を受信する(S202)。このとき、PC2からPLC1aへウィルスが感染したとする。一方、PLC1bはダウンロードを行っていないため、ウィルスには感染していない。以降、PLC1aを「感染PLC」、PLC1bを「正常PLC」と適宜称することがある。
 前記したように、PLC1aはソフトウェア更新のために一時停止し、マスタ権をPLC1bへ移すことによって、PLC1bがマスタ、PLC1aがスレーブとなっている。
 PC2からのダウンロード終了後、PLC1aが再起動されるが、ウィルスの検証処理が終了するまで、PLC1bがマスタ、PLC1aがスレーブのままとなるよう設定されている。
 ウィルスがPLC1に感染した場合、PLC1内部のメモリ(図2のメインメモリ110)やストレージ(図2の記憶装置150)の破壊、他の制御装置への感染なども脅威となるが、最も脅威となる挙動は、制御対象5(図1)への不正な操作である。PLC1が制御する制御対象5は、発電プラントなどの、誤動作による影響が大きいものが含まれるため、制御対象5の不正な操作は最優先で防止すべきである。
 PLC1が制御対象5の操作を行うには、PI/O4を操作する必要がある。そのため、本実施形態の構成においては、ウィルスに感染したPLC1aが不正な制御命令をPI/O4に発行して、そのPI/O4がその制御命令を実行して不正な出力を制御対象5に発することを防止する必要がある。
 前記したように、PLC1aは、スレーブなので、PLC1aのユーザプログラム112が制御命令を発行してもPI/O4を制御することはできない。
 一方、PLC1bはマスタとなっているので、PLC1bのユーザプログラム112がHUB3を経由してPI/O4へ制御対象5を制御するための制御命令Aをフレームとして送信する(S203)。
 HUB3は、送信された制御命令AをPI/O4とPLC1aへ転送する(S204)。
 PI/O4は、HUB3から送信された制御命令Aを実行して(S205)、制御対象5(図1)を制御する。
 一方、PLC1aは、HUB3から制御命令Aを受信すると(S206)、PLC1aのデータ生成プログラム115が制御命令Aを基に、検証用データ251を生成し、検証プログラム116は、その検証用データ251を用いて、制御命令Aの送信元であるPLC1bがウィルスに感染しているか否かを検証する検証処理を行う(S207)。そして、PLC1aは、検証結果をPC2へ送信し(S208)、検証結果を受信したPC2は検証結果を表示装置240に表示する(S209)。
 なお、検証処理の結果、PLC1aによって、PLC1bがウィルスに感染している疑いがあると判定された場合のみ、PLC1aは、PLC1bがウィルスに感染している疑いがある旨の警告をPC2へ送信するようにしてもよい。
 また、感染PLCであるPLC1aは、制御命令Aとは別の制御命令BをフレームとしてPI/O4に向けて送信し続けているとする(S210)。
 このとき、HUB3は、そのフレームがスレーブからのフレーム送信であることを判別し、PI/O4には送信しない。
 一方、HUB3は、PLC1aから受信したフレームをPLC1bへ転送する(S211)。
 スレーブが制御命令を発行してもPI/O4を制御できないようにする方法としては、以下の3つの手法が考えられる。
 (1)スレーブが自分自身をスレーブとして認識して、スレーブのソフトウェアが制御命令をPI/O4に発行しないようにする。
 (2)PI/O4がマスタ・スレーブの両方から制御命令を受信しても、マスタからの制御命令のみを実行するようにする。
 (3)制御命令などが含まれているフレームが、送信元がマスタであることを示すマスタ識別子を有しており、HUB3は、このマスタ識別子を有するフレームのみをPI/O4へ送信する、などである。
 本実施形態で用いられるのは、(3)の手法であるが、(1)、(2)の手法が用いられてもよい。
 また、マスタ識別の方法についても、マスタ識別子による方法に限定されない。HUB3やPI/O4がアドレスやノード番号を記憶する機能と、フレーム受信時に送信元の装置をチェックする機能を持つようにしてもよい。この場合、HUB3やPI/O4がフレームの送信元の装置を判定して、マスタからの受信フレームのみを送信・実行する。マスタとスレーブの切り替え時には、PLC1がマスタ・スレーブ切替を通知する専用のフレームを送信して、HUB3やPI/O4に記憶されているマスタのアドレスやノード番号を変更するようにすればよい。
 PLC1bは、HUB3から制御命令Bを受信すると(S212)、PLC1bのデータ生成プログラム115が制御命令Bを基に、検証用データ251を生成する。そして、検証プログラム116は、その検証用データ251を用いて、制御命令Bの送信元であるPLC1aがウィルスに感染しているか否かを検証する検証処理を行う(S213)。そして、PLC1bは、検証結果をPC2へ送信し(S214)、検証結果を受信したPC2は検証結果を表示装置240に表示する(S215)。
 なお、検証処理の結果、PLC1bによって、PLC1aがウィルスに感染している疑いがあると判定された場合のみ、PLC1bは、PLC1aがウィルスに感染している疑いがある旨の警告をPC2へ送信するようにしてもよい。
 マスタとなるPLC1は1つのPLC監視システム10において複数存在せず、マスタとなるPLC1は必ず1つである。そのため、ソフトウェア更新後に再起動したPLC1aが再度マスタ権を取得してマスタとなるためには、現在マスタであるPLC1bがマスタ権を放棄するのを待たなければならない。これにより、PLC1bがマスタであるにもかかわらず、PLC1aに感染しているウィルスが、PLC1aを強制的にマスタにしようとしても、PLC1bがマスタ権を放棄することにより、マスタ権を得ることができなければPI/O4に対して有効な制御命令を発行することはできない。マスタ権の管理方法についてもいくつか手段が考えられるが、本実施形態ではマスタ権の管理はPLC1の制御プログラム111上で実行されているマスタ権制御プログラム114が行っている。そして本実施形態において、前記したように、制御命令のフレームが送信されるときに、そのフレームにマスタ識別子が付与されることによって、HUB3がマスタ・スレーブの認識をしている。
 もしなんらかの方法でウィルスに感染したPLC1aが強制的にマスタ権を取得し、PLC1a,1bともマスタになった場合(両PLC1マスタ状態)、つまり、PLC1a,1bのそれぞれが有効かつ異なる制御を試みようとしている場合、機器であるHUB3あるいはPI/O4が両PLC1のマスタ状態を検出する。そして、HUB3あるいはPI/O4は、両PLC1のマスタ状態を通知するフレームをPLC1a,1bへ送信し、その通知を受けたPLC1a,1bを強制的に停止する。つまり、機器であるHUB3あるいはPI/O4は、それぞれのPLC1a,1b(制御装置)が、制御対象5へ、それぞれ有効かつ異なる制御を同時に試みようとしていることを検知すると、それぞれのPLC1a,1b(制御装置)が、1つの制御対象5へ、それぞれ有効かつ異なる制御を試みようとしていることを、それぞれのPLC1a,1bへ通知する。
 こうすることで、制御対象5への、ウィルスの不正操作による影響を小さくすることができる。
 マスタの切替の方法はPLC1に障害などが発生した場合の障害時切替のほかに、PC2がPLC1へマスタの切替を指示する計画的切替もある。また、ユーザが意図してPLC1のマスタを切り替える手法を用いている場合もあるが、この場合PC2に潜伏しているウィルスがユーザになりすましてマスタ切替命令をPLC1に発行するおそれがある。このときの不正操作防止手段としては、PLC1に固有のパスワードなどを設定しておき、パスワードを認証できたらマスタ切替命令を受け付けるようにすることが考えられる。
 ここまで、HUB3がスレーブ(PLC1b)の制御命令をPI/O4に送信しないものとして説明してきたが、この役割を担う装置はHUB3ではなく、PI/O4としてもよい。PI/O4で制御命令の出力制御を行う場合には、PI/O4が制御命令をマスタとスレーブのPLC1の両方から受けとったとしても、HUB3と同様の判別方法を用いることによって、制御対象5への出力を制御することができる(第3実施形態にて記載)。
 図6は、第1実施形態に係るPLC監視処理の別の動作例を示すタイミングチャートである。なお、図6におけるPLC1の処理は、PLC1における送信側の制御部あるいは受信側の制御部としての制御プログラム111が行う処理である。
 図6におけるステップS301~S306の処理は、図5のステップS201~S206と同様であるため、説明を省略する。
 HUB3経由で制御命令A(送信元:PLC1b)を受信したPLC1aは、受信した制御命令Aを基に、検証用データ251を生成する(S307)。この検証用データ251は、ユーザが視認して、異常の判別を行うためのデータである。
 そして、PLC1aは検証用データ251をPC2へ送信し(S308)、PC2は、検証用データ251を受信すると、表示装置240に検証用データ251を表示する(S309)。検証用データ251がグラフ化されて表示装置204に表示されたものを目視して、PLC1bがウィルスに感染しているか否かをユーザは判別する。
 この後のステップS310~S312の処理は、図5のステップS210~S212の処理と同様であるため、説明を省略する。
 HUB3から制御命令B(送信元:PLC1a)を受信したPLC1bは、受信した制御命令Bを基に、検証用データ251を生成する(S313)。
 そして、PLC1bは検証用データ251をPC2へ送信し(S314)、PC2は、検証用データ251を受信すると、表示装置240に検証用データ251を表示する(S315)。ユーザは、検証用データ251がグラフ化されて表示装置204に表示されたものを目視して、PLC1aがウィルスに感染しているか否かを判別する。
 なお、PC2は、ステップS309で取得した検証用データ251(送信元:PLC1a)と、ステップS315で取得した検証用データ251(送信元:PLC1b)とを比較することによって、検証処理を行ってもよい。
(フレームフォーマット)
 図7は、第1実施形態に係るPLC監視システムに用いられるフレームのフォーマット例を示す図である。
 フレームは、以下の構成を有している。
 フレーム開始フラグはフレーム内の他の部分に現れないユニークなパターンを使用し、フレームの開始であることを示している。宛先アドレスはフレームの宛先となる物理アドレスを示す。送信元アドレスはフレームの送信元の物理アドレスを示す。マスタ識別子は、該当するフレームの送信元であるPLC1(図1)がマスタであるか否かを示し、マスタからのフレームであればHUB3がPI/O4にフレームを送信するためのものである。フレーム長はフレーム全体の長さを示す。送信データ本体は制御命令などの情報を格納している。フレームチェックシーケンスはフレーム開始フラグから送信データの終了までの間でビットの反転などの予期しない変異が発生したか否かをチェックする誤り検出コードである。
 送信データ本体は、以下の構成を有している。
 フレーム発行時刻はフレームが生成・発行された時刻を示しており、フレームの到達時間の計算に使用される。機器番号はフレームの送信先であるPI/O4の番号を示す。図1などでは簡略化のためにPI/O4は1つしか図示していないが、PI/O4が複数存在する場合や、PI/O4以外の機器が接続されている場合は、各PI/O4や、その他の機器に固有の機器番号をつけて管理する。コマンドはPI/O4を操作するためのコマンドである。たとえば入力データの読み込み、出力データの書み込みなどである。データサイズは、その後に続く制御データの全体のサイズである。制御データはコマンドで使用されるデータである。制御データは、出力命令をPI/O4に発行したときにPI/O4から制御対象5へ出力させる値などを格納する。一方、入力命令において、PLC1からPI/O4へ送信するとき、制御データは空になるが、PI/O4が制御対象5から得た入力値をPLC1へ返送するときに入力値が格納される。プログラムフラグは、後に続くプログラム情報が存在するか否かを示している。プログラム情報が、その後につづく場合はプログラムフラグを「有効」にする。プログラム情報は、このフレームの発行元であるユーザプログラム112に関する情報を格納する。
 プログラム情報は、以下の構成を有する。
 プログラム番号は、ユーザプログラム112それぞれに対し一意に決められた番号が格納される。ユーザプログラム112にはその実行単位毎に管理できるように固有のプログラム番号が付与される。プログラム更新時刻はユーザプログラム112を更新した時刻が格納される。プログラムサイズはユーザプログラム112の全体サイズが格納される。プログラム情報としては他にも、プログラムのオブジェクトを原文としたメッセージダイジェスト値(ハッシュ値)なども考えられる。プログラムが更新されると、プログラム更新時刻、プログラムサイズ、メッセージダイジェスト値なども異なる値に更新される。
(フレーム送信処理)
 図8は、第1実施形態に係るPLCにおけるフレーム送信処理の詳細な手順を示すフローチャートである。なお、適宜図1を参照する。この処理は、図5におけるステップS203、S210、図6におけるステップS303,S310のタイミングで行われる。
 フィールドネットワーク7に送信されるフレームは、ユーザプログラム112がPI/O4を操作する制御命令を発行するときに生成・送信される。PI/O4を操作する制御命令を、PLC1に搭載されたソフトウェア(制御プログラム111)のシステムコールとして用意しておくことで、後記するように、ユーザプログラム112が制御命令をコールすると、ユーザプログラム112自身がコンテキストとして記憶装置150に退避された状態となる。この状態から、PLC1に搭載されたソフトウェア(制御プログラム111)は退避されたコンテキストの情報を取得することができる。PLC1上にて、制御命令を実行するPI/Oドライバ113を起動すると同時に、退避されたコンテキストから取得した情報から、呼び出し元のユーザプログラム112に関する情報(プログラム情報)をPI/Oドライバ113に渡してやれば、PI/Oドライバ113はそのプログラム情報をフレームに格納して送信することが可能である。そのフレームを受信した相手系のPLC1は受信したフレームのプログラム情報から、どのユーザプログラム112が発行した制御命令であるかが判別可能である。これにより、フレーム情報からユーザプログラム112を特定し、相手系のPLC1をユーザプログラム112単位で監視することができる。
 PLC1上のユーザプログラム112が制御命令を実行する(S351)と、システムコールとしてPLC1の制御プログラム111に処理が移る。
 次に、PLC1上の制御プログラム111が、それまで実行していたユーザプログラム112の情報をコンテキストとして記憶装置150に退避させる(S352)。
 そして、PLC1上の制御プログラム111が、退避されたコンテキストから情報を取得し(S353)、プログラム情報を生成する(S354)。
 コンテキストとして退避される情報としては、ユーザプログラム112が実行していたメモリアドレスなどが含まれるので、制御プログラム111はコンテキストとして退避される情報から、例えば、ユーザプログラム112が実行していたメモリアドレスなどをユーザプログラム112の固有の番号(プログラム番号)とすることで、プログラム番号を決定することができる。同時に、ユーザプログラム112がPC2からPLC1にダウンロードされたときの時刻やサイズなどの情報が別のメインメモリ110領域に保存してあれば、制御プログラム111はプログラム番号を検索することで、これらの情報を取得することができる。
 続いて、制御プログラム111は、生成したプログラム情報を記憶装置150などに格納し(S355)、PI/Oドライバ113を起動し(S356)、プログラム情報をPI/Oドライバ113へ渡す。
 そして、PLC1上のPI/Oドライバ113は、渡されたプログラム情報、および、実行された制御命令を取得して、取得したプログラム情報および制御命令を基にフレームを生成し(S357)、生成したフレームをフィールドネットワーク7へ送信する(S358)。このようにしてユーザプログラム112の情報を相手系のPLC1へ送信することができる。
 一方、プログラム情報をPI/Oドライバ113へ渡した制御プログラム111は、退避していたコンテキストを復帰させる(S359)ことでユーザプログラム112を復帰し、復帰したユーザプログラム112に処理をリターンする(S360)。
 そして、ユーザプログラム112は、制御処理を継続する(S361)。
(フレーム受信後処理)
 図9は、第1実施形態に係るPLCにおけるフレーム受信後処理の手順を示すフローチャートである。なお、適宜図1を参照する。また、この処理は、図5のステップS206,S207,S212,S213、図6のステップS306,S307,S312,S313のタイミングで行われる。
 まず、PI/Oドライバ113が相手系のPLC1からのフレームを受信する(S401)。
 すると、PLC1の制御プログラム111が監視プログラムテーブル151の更新処理を開始し(S402)、ユーザプログラム112に対して割込みを行い、実行中の処理を中断させる(S403)。
 次に、PLC1の制御プログラム111はフレームのプログラム情報を取得し(S404)、取得したプログラム情報などを使用して監視プログラムテーブル151を更新する(S405)。ステップS405の詳細は図11で後記する。
 監視プログラムテーブル151の更新が完了すると、制御プログラム111は更新処理を終了し(S406)、ユーザプログラム112の実行を再開させる(S407)。
 その後、制御プログラム111は、監視プログラムテーブル151に登録されたユーザプログラムの挙動をチェックする検証処理を開始し(S408)、ユーザプログラム112に対して割込みを行い、実行中の処理を中断させる(S409)。
 そして、制御プログラム111は監視プログラムテーブル151のレコードを参照する(S410)。そして、データ生成プログラム115が参照したレコードに格納されているデータを基に、監視対象となっているユーザプログラムの検証用データ251を生成する(S411)。さらに、検証プログラム116が、その検証用データ251を基に検証を行う(S412)。このとき、図6に示すようにPC2で検証を行う場合、検証プログラム116は検証処理を行わずに、ステップS411の検証用データ251の生成にとどめておき、その検証用データ251をPC2へ送信するようにしてもよい。
 そして、ステップS412の検証処理が完了すると、制御プログラム111は検証結果をPC2へ送信し、制御プログラム111は検証処理を終了し(S413)、ユーザプログラム112の実行を再開させる(S414)。
 なお、ステップS408~S414の処理は、一定時間間隔毎に周期的に行われる。
 PLC1は、このようにして監視プログラムテーブル151を更新・参照して検証の処理を実施する。
(検証用データ例)
 検証用データ251の詳細を以下説明する。
 検証の方法として、PLC1にあらかじめ検証パターンを設定してPLC1内部で検証する方法と、PC2にユーザプログラムの挙動をグラフ化するアプリケーションを用意してユーザプログラムの妥当性をユーザ自身が判断する方法とが考えられる。
 ウィルスがPLC1に潜伏する方法としてはいくつか考えられるが、既存のユーザプログラム112の書き換えや、あるいはまったく別のユーザプログラム112を新規に生成する、などがある。そのため、ウィルスが潜伏している可能性のあるユーザプログラム112は、更新されている形跡のあるものに限られてくる。しかし、本実施形態の状態において、PLC1aはソフトウェア(ユーザプログラム112)の更新を行った状態であるので、計画的にユーザがユーザプログラム112を更新しているのか、PLC1aに潜伏しているウィルスが更新しているのかの判断をユーザはできない。
 そこで、本実施形態では片系のPLC1のユーザプログラム112が変更された形跡が見られる場合は、そのユーザプログラム112を別系のPLC1で監視し、そのユーザプログラム112の挙動に異常があると判断したら、そのユーザプログラム112はウィルスにより改ざんされたと判断するようにする。検証用データ251は、監視の対象となるPLC1において変更された形跡のあるプログラムの挙動を、監視を行うPLC1またはPC2の記憶装置150、250上に記録したものであり、そのプログラムがウィルスにより改ざんされたかソフトウェアの更新で変更されたかを判断する手段となる。
 図10は第1実施形態に係るPLC監視システムによる検証用データをグラフ化した例を示す図である。
 検証用データ251は後記する監視プログラムテーブル151から、特定のユーザプログラム112が特定のアクションを行ったときのパラメータを格納したものである。図10の例は、監視プログラムテーブル151に記録されたユーザプログラム112によって特定のPI/O4へ発行された出力値を、データ生成プログラム115が検証用データ251を数字の羅列(CSVファイルなど)として抽出して、PC2の表示装置240にグラフ化して表示した例を示している。
 なお、図10において、縦軸がユーザプログラム112の出力値、横軸はユーザプログラム112におけるコマンドの実行回数を示している。
 図5に示すステップS207、S213において、PLC1の検証プログラム116は、相手系PLC1におけるユーザプログラム112の出力の挙動などを基に、相手系PLC1がウィルスに感染しているか否かを判定してもよい。また、図6に示す処理では、ステップS315において、PC2が表示装置240に図10に示すようなグラフを表示することで、PLC1がウィルスに感染しているか否か確認をユーザに促してもよい。
 破線1011と破線1012はあらかじめユーザが設定した出力値が許容される上限と下限を示している。またプロット1001~1009は1回目から9回目までのユーザプログラム112の出力値を示している。この例において、プロット1001~1004は上限1011と下限1012の間に収まっており、許容範囲内であることがわかる。しかし、プロット1005,1006,1008,1009は上限1011より高い出力値となっており、許容範囲外の値をとっていることがわかる。このグラフから、ユーザや、検証プログラム116はユーザプログラム112がウィルスによって改変されたことで、許容範囲外の値をとるようなユーザプログラム112となってしまった可能性があると検証できる。
 一方、プロット1007はその前後のプロットと比較すると明らかに小さな値である。これも、ユーザプログラム112がウィルスによって改変され、急激に出力値を上下させて制御対象5に過剰な負荷を与えようとしている可能性があると、ユーザや、検証プログラム116が判断することができる。
 このように、監視プログラムテーブル151に登録されたユーザプログラム112の挙動をグラフ化することによって、ユーザや、検証プログラム116がウィルスの潜伏をチェックすることができるようになる。また、検証プログラム116が検証を行う際には、PLC1に前記したような検証の基準を設定しておき、検証プログラム116が、設定されている基準に基づいて、検証を行うようにするとよい。そうすれば、前記した出力値の許容範囲チェック、出力値の連続性のチェックなどをPLC1の検証プログラム116や、PC2の検証プログラム213がチェックし、異常であればPC2に警告を表示するようにすることができる。チェックするパラメータとして本実施形態ではPI/O4の出力値を例として示したが、チェックするパラメータはそのほかにも様々考えられる。例えば、特定の命令の発行の頻度をチェックし、異常な頻度で発行されていればウィルスによる不正操作として警告する、などが考えられる。
 また、監視プログラムテーブル151をログ情報としてPC2に提供することで、このログ情報からウィルスの挙動を解析するようにしてもよい。なお、検証を行ったPLC1が、ウィルスが潜伏していないにもかかわらず、ウィルスが潜伏していると判断してしまう可能性も考えられるので、警告を発するにとどめ、可用性を向上するためシステムの停止などの状態にはしないようにすることが望ましい。それ以外にも、ウィルスが潜伏していると判断されたプログラムのみ、あるいは、そのウィルスによって操作されているPI/O4のみが停止させられ、縮退運転状態にさせられることもできる。この場合、制御プログラム111は、ウィルスが潜伏しているユーザプログラム112の番号を検証プログラム116から通知を受け、そのユーザプログラム112のプロセスを停止させる処理を行う。
(監視プログラムテーブル更新処理)
 図11は、第1実施形態に係る監視プログラムテーブル更新処理の手順を示すフローチャートである。この処理は、図9のステップS405のタイミングで行われる。
 監視プログラムテーブル151の生成・更新は以下のように行われる。制御プログラム111は、相手系PLC1からの受信フレームから得た相手系のユーザプログラム112の情報と、自系のユーザプログラム112の情報とを比較する。相手系には存在するが自系には存在しない、あるいは相手系と自系とで同一プログラム番号でもユーザプログラム112の情報に相違がある場合は、そのプログラムの情報を監視プログラムテーブル151に登録する。一度監視プログラムテーブル151に登録されたユーザプログラム112は、以後相手系PLC1から情報を受信するたびに監視プログラムテーブルに自身の情報を追加・更新される。このようにして、ユーザプログラム112は変更が行われたユーザプログラム112の挙動を監視プログラムテーブル151へ記録し続ける。
 PLC1上の制御プログラム111は、相手系のPLC1からフレームを受信すると(S501)、受信したフレームの内容を取得し、フレームに格納されているプログラム番号と同じプログラム番号を監視プログラムテーブル151から検索する(S502)。
 そして、制御プログラム111は、ステップS502の結果、監視プログラムテーブル151に該当するプログラム番号が登録されているか否かを判定する(S503)。
 ステップS503の結果、フレームに格納されているプログラム番号が監視プログラムテーブル151に、すでに登録されている場合(S503→Yes)、制御プログラム111はステップS510へ処理を進める。
 ステップS503の結果、フレームに格納されているプログラム番号が監視プログラムテーブル151に登録されていない場合(S503→No)、制御プログラム111は、処理対象となっているプログラム番号と同一のプログラム番号が自PLC1において存在するか(ダウンロード済みか)否かを検索する(S504)。
 ステップS504の処理は、自PLC1の中のユーザプログラム112の検索のために、自PLC1の記憶装置150などに格納されている、ダウンロードされたユーザプログラム112の情報がプログラム番号でソートされたプログラム一覧表などを用いるとよい。
 制御プログラム111は、ステップS504における検索の結果、処理対象となっているプログラム番号に該当するユーザプログラム112が自PLC1にあるか否かを判定する(S505)。
 ステップS505の結果、処理対象となっているプログラム番号に該当するユーザプログラム112が自PLC1にない場合(S505→No)、制御プログラム111はステップS509へ処理を進める。
 ステップS505の結果、処理対象となっているプログラム番号に該当するユーザプログラム112が自PLC1にある場合(S505→Yes)、制御プログラム111は、ユーザプログラム112が変更されているかを検査するため、フレームの中からプログラム更新時刻(相手系のPLC1における更新時刻)とプログラムサイズを取得する(S506)。
 続いて、制御プログラム111は取得した更新時刻およびプログラムサイズと、ステップS504で検索した自PLC1のユーザプログラム112における更新時刻およびプログラムサイズとを比較する(S507)。
 そして、制御プログラム111は、ステップS507の結果、相手系のPLC1における更新時刻およびプログラムサイズの双方について、自PLC1における更新時刻およびプログラムサイズと同じであるか否かを判定する(S508)。
 ステップS508の結果、更新時刻およびプログラムサイズの少なくとも一方が異なる場合(S508→No)、ユーザプログラム112は変更されているとみなし、制御プログラム111はフレームに格納されているプログラム番号を監視プログラムテーブル151の新しいレコードとして追加する(S509)。
 一方、ステップS508の結果、更新時刻およびプログラムサイズの双方が同じである場合(S508→Yes)、ユーザプログラム112は変更されていないとみなし、制御プログラム111は監視プログラムテーブル更新処理を終了する。
 次に、制御プログラム111は、フレームに格納されているコマンドを取得して(S510)、そのコマンドが制御対象5に対して出力を実行するコマンド(出力コマンド)であるか否かを判定する(S511)。
 ステップS511の結果、出力コマンドではない場合(S511→No)、制御プログラム111は監視プログラムテーブル更新処理を終了する。
 ステップS511の結果、出力コマンドである場合(S511→Yes)、制御プログラム111は処理対象となっているコマンド、コマンドを発行したPI/O4の番号、そのコマンドを発行したときの制御データを監視プログラムテーブル151の該当するプログラム番号のレコードに追加登録する処理を行う(S512)。
 本実施形態では、制御プログラム111はプログラムの更新が行われているか否かの判定(S508)をプログラムサイズと更新時刻を用いて行っている。プログラムサイズと更新時間以外にも、メッセージダイジェスト値などのほかのプログラム情報を入手できるならば、判定に用いることができる。しかし、プログラムサイズだけ、あるいは、メッセージダイジェスト値だけで判定されてしまうと、変更されていてもサイズが同一である、異なるプログラムでもメッセージダイジェスト値が一致している、などが考えられ、プログラムの改変を見逃す可能性がある。従って、判定には複数のプログラム情報を用いることが望ましい。
 本実施形態では、出力コマンドのみが監視プログラムテーブル151に登録されている。なぜなら、ウィルスが制御対象5に対して望ましくない動作を行うことができるのは、出力コマンドに限られるためである。それ以外のコマンドでは制御対象5を操作するようなことはできないので、本実施形態では、監視プログラムテーブル151に登録していないが、出力コマンド以外のコマンドが監視プログラムテーブル151に登録されるようにしてもよい。例えば、PLC1のマスタ・スレーブの切替命令や、稼動中のPI/O4のデバイス停止・リセット命令、停止中のPI/O4デバイスの起動命令、PI/O4の設定変更命令などもPI/O4への操作になるので、これらの情報が監視プログラムテーブル151に登録されるようにしてもよい。
(監視プログラムテーブル)
 図12は、第1実施形態に係る監視プログラムテーブルの構成例を示す図である。
 PLC1あるいはPC2は、検証のため、ユーザプログラム112の挙動を監視するので、監視対象となるユーザプログラム112を監視プログラムテーブル151で管理する。図12に示すように、監視プログラムテーブル151には、監視するユーザプログラム112のプログラム番号、プログラム更新時刻、プログラムサイズ、コマンド、機器番号、制御データが格納されている。
 制御プログラム111は、フレームが送信されるたびにコマンド、機器番号などの情報を監視プログラムテーブル151に登録していく。監視されるユーザプログラム112の対象となるのは、自PLC1には存在しないが相手系のPLC1には存在するユーザプログラム112や、自PLC1と相手系のPLC1とでユーザプログラム112の更新時刻やサイズが異なるものである。このようなユーザプログラム112は、ソフトウェアの計画的な更新のときに追加・変更していることもあるが、潜伏しているウィルスがユーザプログラム112を追加・変更している可能性もある。よって、PLC1あるいはPC2はそのようなユーザプログラム112の挙動を監視する。
 図11に示す処理が行われることによって、監視プログラムテーブル151に、ウィルスが潜伏している可能性のあるユーザプログラム112による出力コマンドの履歴が記録されていくことになる。図12の1行目の例では、プログラム番号が0x0005のユーザプログラム112の更新時刻が2011年8月1日14時40分10秒であり、ユーザプログラム112のサイズが428バイト、命令の内容としては、1回目に、機器番号が0xB0000B80のアナログ出力デバイス(AO)にロングワードサイズ(LONG)で0xFFFF1111を書き込み(WRITE)、2回目に機器番号が0xB0000140のデジタル出力デバイス(DO)にワードサイズ(WORD)で0x0000186Dを書き込み(WRITE)したことがわかる。プログラム番号が同じであるのに、出力コマンドが異なっているのは、同じユーザプログラム112でも、実行する毎に異なるコマンドが実行されることがあるためである。
 図12には一部の情報しか記録されていないが、監視対象のユーザプログラム112の挙動をより細かく監視するために、フレーム発行時刻、使用しているデータのアドレスなどが監視プログラムテーブル151に登録されてもよい。
 監視プログラムテーブル151が生成されたら、ユーザの要求あるいは一定周期のタイマなどをトリガにして、データ生成プログラム115が検証用データ251を生成する。データ生成プログラム115が抽出するデータはユーザによって自由にカスタマイズすることが可能である。例えば、図10の例では、特定のユーザプログラム112が特定のPI/O4に出力命令を発行したときの出力値(制御データ)を抽出している。
(第1実施形態のまとめ)
 第1実施形態によれば、二重化構成の一方のPLC1が検証を行ったり、検証用データ251を生成したりすることで、ウィルスに感染している疑いのある他方のPLC1をチェックすることができる。
 このように、本実施形態によれば、多重化構成のPLC1のうちの1つにウィルスが潜伏していても、それを多重化構成の他のPLC1が検出することができるので、PLC1のセキュリティを向上させることができる。また、ダウンロードされたユーザプログラム112にウィルスが感染している可能性があるという、PLC1におけるウィルスの特性に着目し、ダウンロードしたユーザプログラム112と、ダウンロードを行っていないユーザプログラム112の挙動を検証する手法をとっているため、ウィルス対策パッチなどの場当たり的な対策よりも根本的な対策が可能となる。
 本実施形態では、ユーザプログラム112の更新時刻やサイズの情報が、ウィルスに感染しているPLC1で正しく取得でき、その情報が検証を行うPLC1へ問題なく送信できる場合を想定して説明してきた。ウィルスの感染場所が、ユーザが利用するプログラム領域(ユーザプログラム112)などであれば問題ないが、PLC1のシステムプログラムの領域(制御プログラム111、PI/Oドライバ113、マスタ権制御プログラム114、データ生成プログラム115、検証プログラム116)に感染してしまうと、プログラムの更新時刻やサイズの情報をウィルスに都合のいいように書き換えられてしまう可能性があり、フレームの内容も書き換えられてしまうことも考えられる。そのため、ソフトウェアの更新を行うときには、これらのシステムプログラムの領域は書き込み禁止の状態にして更新を行い、ウィルスが侵入できないようにしておくことが本実施形態の前提となる。
 また、本実施形態に示す方法で検証処理を実施したのち、ウィルスの感染が見られなかった場合には、PLC監視システム10は、ソフトウェア更新のために停止していたPLC1aと一時的にマスタとなっていたPLC1bのマスタ・スレーブを切り替え、ソフトウェア更新前の状態である、PLC1aをマスタ、PLC1bをスレーブに戻すことができる。
 ただし、ウィルスに感染しているユーザプログラム112が動作しない限り、相手系PLC1はそのユーザプログラム112の情報を取得できない。これにより、前記のマスタ・スレーブ切り替えの時点までウィルスに感染したユーザプログラム112が動作しないと、ウィルスが潜伏したPLC1がマスタとなり、ウィルスに感染したマスタが制御対象5を制御できてしまうおそれがある。そのような事態を避けるため、ダウンロード実行後には登録されたユーザプログラム112をすべて強制的に実行させるようにしておくことで、すべてのユーザプログラム112に対して検証処理を行うことが可能である。
 監視プログラムテーブル151に登録されている内容から、ウィルスが潜伏している可能性がある場合には、前記したように、検証を行ったPLC1がPC2へ警告を発行し、ログ情報をPC2に提供する。
 ウィルスが潜伏しているときの挙動としては、ユーザプログラム112の更新時刻が他のユーザプログラム112の更新時刻と明らかに異なっている場合や、制御データ値が異常に大きいあるいは小さい場合、異常な周期で特定のデータを書き込んでいる場合、無効なコマンドを発行している場合などが考えられる。制御対象5によって正常な場合の挙動が異なるため、正常な場合とウィルスが潜伏している場合の区別は難しいので、使用環境やそのときの状況に応じてユーザが、検証機能をカスタマイズできることが望ましい。
[第2実施形態]
 これまで第1実施形態では、ソフトウェア更新中にスレーブがウィルスに感染している場合を前提にしてきたが、次に稼動中にマスタがウィルスに感染した場合について説明する。
 第1実施形態ではスレーブがウィルスに感染している場合に限定していたが、PLC1が稼動中にPC2とPLC1が通信を行う手段が存在していれば、ソフトウェア更新中以外でもPC2を経由して、マスタ・スレーブ両系のPLC1がウィルスに感染する可能性がある。
 第1実施形態で説明したように、マスタ・スレーブともに相手系のプログラムの動作を検証する手段を備えているので、相手系が持っているユーザプログラム112の中で自系と異なっているものが存在していれば、PLC監視システム1は、異常を検出することが可能である。
 マスタがウィルスに感染している場合、マスタがウィルスに感染していることを検証・検出するのはスレーブである。ただし、ウィルスに感染したマスタが制御対象5を制御することができる状態になっているので、好ましくない状態となっている。そのため、スレーブは、制御命令をHUB3を経由してマスタから取得し、それを解析して即座に検証を行わなければならない。また、ユーザは、スレーブから、マスタにウィルスが潜伏している、あるいは潜伏している可能性があるという警告を受けたら、即座にPLC1の停止などの手段を講じてウィルスの影響を回避しなければならない。
 マスタがウィルスに感染すると、スレーブが感染した場合とは別の問題も発生する。通常、2重系でホットスタンバイ状態を維持するため、マスタからスレーブに対してデータのコピーを行うことによって、データの同期化を行っている。もし、ウィルスに感染しているマスタから正常なスレーブに対してデータのコピーが行われた場合、第1実施形態で説明した方法だけではウィルスを検出することが困難である。なぜなら、ウィルスに感染したPLC1が、検証を行うPLC1のデータを上書きしてしまうため、正常なデータが失われてしまう可能性があるためである。
 そこで、第2実施形態では、スレーブがマスタから受信する同期化データの妥当性を検証し、妥当であれば同期化データを受け入れ、妥当ではない場合は警告をPC2に発行するようにする。
 図13は、第2実施形態に係るPLC監視処理の動作を示すタイミングチャートであり、マスタが感染した状態からスタートしている。なお、図13の処理は、マスタ権がPLC1bからPLC1aに戻り、PLC1aが制御対象5を制御している状態である。この時点でPLC1aがウィルスに感染している場合の処理を示す。
 PLC1がマスタとスレーブでデータを同期化するタイミングは、PLC1が制御演算を実行し、その演算結果をデータ領域に格納するタイミングである。この制御演算のトリガとなるのは、PLC1が制御対象5から物理情報を取得するために、PI/O4へ入力要求を発行したときである。
 PLC1a(マスタ)は制御対象5を制御するための入力要求AをフレームとしてPI/O4へ送信する(S601)。
 入力要求Aを受信したHUB3は、その入力要求AをPI/O4およびPLC1b(スレーブ)へ転送し(S602)、PLC1bは入力要求Aを受信する(S603)。
 PI/O4は入力要求Aを受信すると、その入力要求Aに従って制御対象5の制御を実行し(S604)、その応答である入力応答AをHUB3へ送信する(S605)。
 PI/O4から入力応答Aを受信したHUB3は、PLC1a(マスタ)とPLC1b(スレーブ)へ入力応答Aを転送する(S606)。
 マスタとスレーブの両PLC1は、通常は同じユーザプログラム112が格納されており、同じ入力応答を基に同じユーザプログラム112で演算するので、結果も同じになるはずである。しかし、どちらかがウィルスに感染していれば、プログラムの内容が異なるために、異なる結果が出力されてしまう。
 そこで、PLC1bは、PI/O4から入力応答Aを受信すると(S607)、受信した入力応答Aと、PLC1aにおけるユーザプログラム112と同じユーザプログラム112を使って、PLC1aから送信される同期化データと比較するための比較用データを生成する(S608)。
 一方、PLC1aは、PI/O4から入力応答Aを受信すると(S609)、ユーザプログラム112を用いて、PLC1bへ送信するための同期化データを生成する(S610)。
 そして、PLC1aは同期化データをHUB3に向けて送信する(S611)。
 HUB3は、送信された同期化データをPLC1bへ転送する(S612)。
 PLC1bは、PLC1aから送信された同期化データと、ステップS608で生成しておいた比較用データを比較する比較処理を行う(S613)。
 そして、PLC1bは比較処理の結果(比較結果)をPC2へ送信し(S614)、比較結果を受信したPC2は、受信した比較結果を表示装置240に表示する(S615)。
 PLC1aからPI/O4へ発行した入力要求AはHUB3のネットワーク中継機能により、フィールドネットワーク7を介して、PLC1bのPI/Oドライバ113が受け取ることができる。PLC1aからPLC1bへの同期化データの通信は、送信フレームの宛先がPI/O4ではなく、PLC1bとなっているので、PLC1bが自分宛のフレームとして受信する。PI/Oドライバ113とフィールドネットワーク7の構造により、PLC1aとPLC1bの間で、情報の共有が可能である。
 なお、同期化データが利用するパスは、マスタのPLC1からスレーブのPLC1へのデータのコピーだけでなく、生存監視のための用途としても用いることができる。スレーブPLC1がデータ同期化フレームを受信できないときは、マスタPLC1が停止したと考えて、マスタ権を取得する処理や、マスタPLC1に対して生存確認をする処理を行う。PLC1は、この生存確認のための情報を同期化データとして、ステップS613の比較処理を行ってもよい。
 なお、図13に示す処理では、比較処理の結果をPC2へ送信しているが、比較用データが一致していない場合のみ、スレーブが警告をPC2へ送信するようにしてもよい。
 また、図13では、スレーブが比較処理を行っているが、ウィルスに感染しているマスタで比較処理が行われてもよい。また、図13に示す処理は一定時間毎に行われる処理である。
 ここで、同期化データの送信に使用するフレーム(同期化フレーム)のフォーマットは図7に示すものと同一である。同期化フレームにおいては、機器番号としてデータ同期化の対象となるスレーブの番号が設定される。なお、機器番号には、その機器の番号だけでなく、ユーザプログラム112が実行されているメインメモリ110のアドレスも含んだ値になっているので、データ同期化を開始するメインメモリ110のアドレスの先頭も機器番号からわかるようになっている。また、コマンドはデータ同期化のためのコマンドを格納する。これはPI/O4のコマンドとは異なるコマンドである。同期化フレームにおける制御データはマスタからスレーブへコピーして同期化するためのデータ(同期化データ)である。
 また、PLC1からPI/O4へ入力要求が発行されている。また、PI/O4が送信してきた入力応答のフレームには、プログラム番号が格納されている。これにより、スレーブは入力要求がどのユーザプログラム112を使用して演算されるべきかを知ることができる。つまり、スレーブは、プログラム番号と入力要求を手がかりに、同期化データと同じユーザプログラム112を使用して、同期化データと比較するためのデータ(比較用データ)を生成することができる。
 なお、1つのユーザプログラム112の中で複数の入力要求を発行することも考えられる。その場合には、ユーザプログラム112内のどの命令に対応するかを特定できるように、入力要求毎に枝番号が付与されて、入力要求が管理されてもよい。
(第2実施形態のまとめ)
 第2実施形態によれば、マスタがウィルスに感染した状態で、制御対象5を制御する状態になっても、マスタがスレーブに送信する同期化データを利用することで、ウィルスの感染を検証することができる。また、ウィルス対策パッチなどの特別な対策が不要となる。
[第3実施形態]
 ここまで、PLC1が2つの2重系で、HUB3が接続されている場合について説明してきたが、それ以外の場合でもPLC1で検証を行うことが可能である。
 図14は、第3実施形態に係るPLC監視システムにおける情報の流れを示す図である。
 図14のPLC監視システム10aはPLC1(1A,1B,1C)が3つの3重系で、HUB3がなくPI/O4とPLC1(1A,1B,1C)のそれぞれが直接接続して通信を行っている。なお、図14において、図1と同様の構成要素については同一の符号を付して説明を省略する。
 第1実施形態と同様に、PC2がウィルスに感染し、PLC1Aにウィルスがダウンロードされてしまった状態を例に説明する(ウィルスに感染した機器をドットで示す)。
 制御命令が有効なものであるとき、PI/O4が制御対象5に出力を行う際の判断方法は、主に以下の2通りが考えられる。
 (a)前記した実施形態と同様に、PLC1A~1Cのうち、マスタ権を持っているPLC1の制御命令や、入力要求のみを有効な制御命令として認識する。
 (b)3つ(あるいは複数)のPLC1A~1Cからの制御命令や、入力要求をPI/O4がすべて受信し、3つのPLC1A~1Cからの制御命令や、入力要求のうち2つ以上が同じ命令であれば、その制御命令や、入力要求を有効なものとして認識し、制御対象5へ出力する。つまり、PLC監視システム10aが多数決に従って有効な制御命令を判別する。そして、他の2つと異なる命令を発行したPLC1があればそれは何らかの原因(例えば、ウィルスに感染している)が考えられるので、ユーザは、そのPLC1を停止させるなどの対策を行う。なお、3つのPLC1A~1Cから送信される制御命令や、入力要求は、同一種のユーザプログラム112(図2)による制御命令や、入力要求である。
 前記(a)、(b)の場合も、ステップS700でウィルスに感染したPLC1AはステップS701でPI/O4へ制御命令を送信する。PI/O4は、この制御命令をPLC1B,1Cへ転送する(S711,S712)。
 同様に、PLC1B,1Cは、ステップS702,S703でPI/O4へ制御命令を送信し、PI/O4は、この制御命令を他のPLC1A~1Cにも送信する点は同じである(S711,S712,S721,S722,S723)。このとき、PI/O4は、各PLC1A~1Cから送信された制御命令の内容について多数決をとり、最も多数の内容を有する制御命令を制御対象5へ送信してもよい。
 ここで、PLC1A,1B,1Cは受信した制御命令とそこに付与されたプログラム情報を基に、図3や、図4や、図7などで示した手順により検証を行ってもよい。
 また、各PLC1A,1B,1Cは、第1実施形態や、第2実施形態に示す処理を行い、その結果をPC2へ送信する(S731~S733)。なお、この際、PLC1A,1B,1Cは、第1実施形態の検証処理(図5のS207、S213)や、検証用データ(図6のS307、S313)や、第2実施形態における比較処理(図13のS613)が、3つのPLC1間のデータを用いて行われる。
(第3実施形態のまとめ)
 第3実施形態によれば、多重系PLCのうち1つがウィルスに感染していても他の健全なPLC1が検証を行うことができる。
 特に、多数決を用いることで、ウィルスに対する迅速な対応が可能となる。
 なお、第2実施形態、第3実施形態においても、PLC1、PC2のハードウェア構成は、図2、図3に示したものと同様であり、各プログラム111~116,211~213は、メインメモリ110,210に展開され、CPU120,220によって実行されている。
 1   PLC(制御装置)
 2   PC(管理装置)
 3   HUB(機器)
 4   PI/O(機器)
 5   制御対象
 6,7,8 フィールドネットワーク
 10  PLC監視システム(制御装置監視システム)
 110 PLCのメインメモリ
 111 PLCの制御プログラム(制御部、送信側の制御部、受信側の制御部)
 112 ユーザプログラム(プログラム)
 113 PI/Oドライバ
 114 マスタ権制御プログラム
 115 データ生成プログラム
 116 PLCの検証プログラム
 120 PLCのCPU
 130 PLCの入力装置
 140 出力装置
 150 PLCの記憶装置
 151 監視プログラムテーブル
 210 PCのメインメモリ
 211 PCの制御プログラム(制御部)
 212 ダウンロードプログラム
 213 PCの検証プログラム
 220 PCのCPU
 230 PCの入力装置
 240 表示装置
 250 PCの記憶装置
 251 検証用データ(動作検証用のデータ)

Claims (10)

  1.  制御対象を制御する制御装置を複数備え、
     前記制御装置は、
     自身とは別の制御装置から、前記別の制御装置で実行されているプログラムが出力した、前記制御対象を制御する制御情報を取得し、前記取得した制御情報を基に、動作検証用のデータを生成する制御部を
     有することを特徴とする制御装置監視システム。
  2.  前記制御装置の制御部が、
     前記生成した動作検証用のデータを基に、前記別の制御装置の動作状態を判別する
     ことを特徴とする請求項1に記載の制御装置監視システム。
  3.  前記制御装置監視システムは、管理装置を備え、
     前記制御装置の制御部が、
     前記生成した動作検証用のデータを、前記管理装置へ送信し、
     前記管理装置が、
     受信した前記動作検証用のデータを表示装置に表示する制御部を
     有することを特徴とする請求項2に記載の制御装置監視システム。
  4.  前記動作検証用のデータは、前記制御装置から前記制御装置が制御する制御対象へ送信される情報に含まれている出力値を含んでいる
     ことを特徴とする請求項1に記載の制御装置監視システム。
  5.  前記制御装置の制御部が、
     前記制御装置から前記制御装置が制御する制御対象へ送信される情報を、前記プログラム単位毎に格納し、
     前記プログラム単位毎に格納されている情報を基に、前記動作検証用のデータを生成する
     ことを特徴とする請求項1に記載の制御装置監視システム。
  6.  少なくとも2つ以上の前記制御装置と前記制御対象との間の通信経路に接続されている機器を備え、
     前記機器は、
     それぞれの前記制御装置が、前記制御対象へ、それぞれ有効かつ異なる制御を試みようとしていることを検知し、
     前記それぞれの制御装置が、1つの制御対象へ、それぞれ有効かつ異なる制御を試みようとしていることを、前記それぞれの制御装置へ通知する
     ことを特徴とする請求項1に記載の制御装置監視システム。
  7.  前記制御装置の制御部は、
     自身で実行されているユーザプログラムを使用して、前記制御対象から送信された前記制御対象の制御に関する情報を基に、別の制御装置へ送信するための同期化データを生成し、
     前記生成した同期化データを前記別の制御装置へ送信する送信側の制御部と、
     前記別の制御装置で実行されている前記ユーザプログラムと同様のユーザプログラムを使用して、前記制御対象から送信された前記制御対象の制御に関する同じ情報を基に、前記動作検証用データとしての比較用データを生成し、
     前記別の制御装置の送信側の制御部が送信した同期化データと、自身で生成した前記比較用データとを比較することによって、前記別の制御装置の動作状態を検証する受信側の制御部と、
     を有することを特徴とする請求項1に記載の制御装置監視システム。
  8.  3つ以上の前記制御装置と、
     前記制御装置と、前記制御装置によって制御される制御対象との間に接続されており、
     それぞれの前記制御装置から、同一種のプログラムを用いた出力情報を取得すると、
     前記取得した出力情報が一致していない場合、多数決に従って、多数の出力情報を正しい出力情報と判定する機器と、
     を有することを特徴とする制御装置監視システム。
  9.  制御対象を制御する複数の制御装置の動作状態を監視する制御装置の監視方法であって、
     前記制御装置は、
     自身とは別の制御装置から、前記別の制御装置で実行されているプログラムが出力した、前記制御対象を制御する制御情報を取得し、前記取得した制御情報を基に、動作検証用のデータを生成する
     ことを特徴とする制御装置の監視方法。
  10.  前記制御装置の送信側の制御部が、
     自身で実行されているユーザプログラムを使用して、前記制御対象から送信された前記制御対象の制御に関する情報を基に、別の制御装置へ送信するための同期化データを生成し、
     前記生成した同期化データを前記別の制御装置へ送信し、
     前記制御装置の受信側の制御部が、
     前記別の制御装置で実行されている前記ユーザプログラムと同様のユーザプログラムを使用して、前記制御対象から送信された前記制御対象の制御に関する同じ情報を基に、前記動作検証用データとしての比較用データを生成し、
     前記別の制御装置の送信側の制御部が送信した同期化データと、自身で生成した前記比較用データとを比較することによって、前記別の制御装置の動作状態を検証する
     ことを特徴とする請求項9に記載の制御装置の監視方法。
PCT/JP2013/050130 2012-01-12 2013-01-08 制御装置監視システムおよび制御装置の監視方法 WO2013105554A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
IN5825DEN2014 IN2014DN05825A (ja) 2012-01-12 2013-01-08
CN201380005269.2A CN104054087A (zh) 2012-01-12 2013-01-08 控制装置监控系统以及控制装置的监控方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2012003931A JP5756412B2 (ja) 2012-01-12 2012-01-12 監視方法および監視システム
JP2012-003931 2012-01-12

Publications (1)

Publication Number Publication Date
WO2013105554A1 true WO2013105554A1 (ja) 2013-07-18

Family

ID=48781501

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/050130 WO2013105554A1 (ja) 2012-01-12 2013-01-08 制御装置監視システムおよび制御装置の監視方法

Country Status (4)

Country Link
JP (1) JP5756412B2 (ja)
CN (1) CN104054087A (ja)
IN (1) IN2014DN05825A (ja)
WO (1) WO2013105554A1 (ja)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5701459B1 (ja) * 2014-01-23 2015-04-15 三菱電機株式会社 プログラマブルコントローラおよびプログラマブルコントローラシステム
JP7028543B2 (ja) * 2016-03-11 2022-03-02 Necプラットフォームズ株式会社 通信システム
WO2017199281A1 (ja) 2016-05-16 2017-11-23 株式会社東芝 電池制御装置、異常検出方法、及びプログラム
JP2018133037A (ja) * 2017-02-17 2018-08-23 オムロン株式会社 制御装置
JP7030429B2 (ja) * 2017-06-09 2022-03-07 三菱電機株式会社 サーバ装置、監視システム、データ処理方法、およびデータ処理プログラム
WO2019034971A1 (en) * 2017-08-13 2019-02-21 Si-Ga Data Security (2014) Ltd. THREAT DETECTION SYSTEM FOR INDUSTRIAL CONTROL DEVICES
JP7078889B2 (ja) * 2018-01-22 2022-06-01 オムロン株式会社 制御装置、制御方法、および制御プログラム
CN113508381B (zh) * 2019-03-05 2024-03-01 西门子工业软件有限公司 用于嵌入式软件应用的基于机器学习的异常检测
CN112560023A (zh) * 2020-12-07 2021-03-26 广东电力通信科技有限公司 交互式数据采集方法、机器人、系统及计算机设备
CN112738224B (zh) 2020-12-29 2022-06-10 浙江中控技术股份有限公司 一种支持触发式通信的数据处理系统和方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1063313A (ja) * 1996-08-26 1998-03-06 Meidensha Corp プロセス制御相互監視方式
JPH10340103A (ja) * 1997-06-09 1998-12-22 East Japan Railway Co フェールセーフ出力装置
JP2006344086A (ja) * 2005-06-10 2006-12-21 Hitachi Ltd データ照合装置,データ照合方法,データ制御装置及びデータ制御方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003091302A (ja) * 2001-09-17 2003-03-28 Toyoda Mach Works Ltd 工作機械の制御システムにおける異常検出装置
JP4349011B2 (ja) * 2003-06-27 2009-10-21 株式会社安川電機 ベルトコンベアトラッキングデータ自動補正方法および装置
JP4668596B2 (ja) * 2004-12-02 2011-04-13 株式会社エヌ・ティ・ティ・ドコモ 通信端末、サーバ装置及び監視システム
US7873430B1 (en) * 2006-06-14 2011-01-18 Rockwell Automation Technologies, Inc. System that can schedule operations that are performed on industrial control devices
JP5261088B2 (ja) * 2008-09-09 2013-08-14 富士通株式会社 不正操作検知回路、不正操作検知回路を備えた装置、及び不正操作検知方法
CN101697188A (zh) * 2009-06-04 2010-04-21 中冶赛迪工程技术股份有限公司 一种plc程序保护方法、访问方法及其装置
JP5404463B2 (ja) * 2010-02-12 2014-01-29 三菱電機株式会社 制御装置及び管理装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1063313A (ja) * 1996-08-26 1998-03-06 Meidensha Corp プロセス制御相互監視方式
JPH10340103A (ja) * 1997-06-09 1998-12-22 East Japan Railway Co フェールセーフ出力装置
JP2006344086A (ja) * 2005-06-10 2006-12-21 Hitachi Ltd データ照合装置,データ照合方法,データ制御装置及びデータ制御方法

Also Published As

Publication number Publication date
JP2013143077A (ja) 2013-07-22
CN104054087A (zh) 2014-09-17
IN2014DN05825A (ja) 2015-05-15
JP5756412B2 (ja) 2015-07-29

Similar Documents

Publication Publication Date Title
WO2013105554A1 (ja) 制御装置監視システムおよび制御装置の監視方法
JP6306206B2 (ja) 通信制御装置及び通信システム
CN109164780B (zh) 一种基于边缘计算的工业现场设备控制方法、装置及系统
CN102971715B (zh) 处理器装置以及程序
JP2019050507A (ja) 情報処理装置、情報処理方法およびプログラム
JP2008158899A (ja) デバイス制御装置
JP6385842B2 (ja) 情報処理端末、情報処理方法、及び情報処理システム
KR20160065202A (ko) 단말 디바이스의 디버그 포트 제어 방법 및 장치
TWI678615B (zh) 在資料處理裝置中進行除錯
JP2019080119A (ja) 車載通信装置、車載通信システム及び車載通信方法
KR20190002712A (ko) 침입 검지 장치 및 기억 매체에 저장된 침입 검지 프로그램
KR20150075996A (ko) 해킹 방지 기능을 구비한 차량 제어 시스템 및 그 동작 방법
JP2006323675A (ja) 情報処理装置、情報処理方法及びコンピュータプログラム
JP2008084275A (ja) ソフトウェアの改ざん監視装置および改ざん監視方法
RU2647684C2 (ru) Устройство и способ обнаружения несанкционированных манипуляций системным состоянием блока управления и регулирования ядерной установки
JP6404848B2 (ja) 監視装置、及び、通信システム
JP2011145945A (ja) マルウェア検出装置及びマルウェア検出方法
JP2016058997A (ja) セキュアサイト内のネットワークへのアクセス監視システム、方法
CN106416178A (zh) 用于识别自主的、自传播的软件的方法和设备
JP7138043B2 (ja) 情報処理装置
CN113157543B (zh) 一种可信度量方法及装置、服务器、计算机可读存储介质
JP6444792B2 (ja) 情報処理装置及び情報処理方法
JP2017228887A (ja) 制御システム、ネットワーク装置、及び制御装置の制御方法
CN110874323A (zh) 信息处理装置、嵌入式系统以及调试控制方法
JP7229533B2 (ja) 情報処理装置、ネットワーク機器、情報処理方法および情報処理プログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13735978

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13735978

Country of ref document: EP

Kind code of ref document: A1