SlideShare a Scribd company logo
1 of 16
Download to read offline
Module Configuring
MILS Monitoring System
State Monitoring
Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 1
 First level text
 Second level text
● Third level text
 Fourth level text
 Fifth level text
Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 2
Prerequisites
API for Configuring a
State Monitoring Application
Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 3
 Generates a monitor for every FDIR
component
 A sensor is generated for every input
port of the component
 MonitoringProperty LTL formulas are
converted into KSS policies
 Final C monitor library is generated for
all the FDIR components
Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 4
Monitoring Library Generator
Toolset architecture
Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 5
● void stmon_init(void);
Initialize monitoring library.
● void stmon_fini(void);
Finalize monitoring library.
● void stmon_reconfigure(void);
Poll for reconfiguration commands from
the configuration plane.
● void stmon_init_cmdline(int argc, char *argv[]);
Initialize monitoring library with
common command line arguments.
Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 6
Generic API
● void stmon_set_adaptation_engine(const char
*host, const char *port);
Set adaptation engine host address.
● void stmon_set_context_awareness(const char
*host, const char *port);
Set context awareness host address.
● void stmon_set_configuration_plane(const char
*host, const char *port);
Set configuration plane host address.
● int stmon_get_configuration_plane_fd(void);
Get configuration plane socket. May be used for
reconfiguration polling.
Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 7
CITADEL API
● void stmon_time_set(stmon_time_t time);
Set current model time. Time must be monotonically
increasing.
● stmon_time_t stmon_time_get(void);
Get current model time.
 STMON_TIME_MSEC(msec) — convert milliseconds to
internal time.
 STMON_TIME_SEC(sec) — convert seconds to internal
time.
 STMON_TIME_MIN(min) — convert minutes to internal
time.
 STMON_TIME_HOUR(hour) — convert hours to internal
time.
 STMON_TIME_DAY(day) — convert days to internal time.
Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 8
Time API
● void update_<PACKAGE>_<COMPONENT>_<SENSOR>(<SENSOR_TYPE> value);
Update sensor value.
 <PACKAGE> — SLIM package name.
 <COMPONENT> — FDIR component
name.
 <SENSOR> — input port name.
 <SENSOR_TYPE> — input port type.
Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 9
Sensor API
● <PACKAGE>_<COMPONENT>
*new_<PACKAGE>_<COMPONENT>(void);
Create an instance of a model.
● void
free_<PACKAGE>_<COMPONENT>(<PACKAGE>_<COMPONENT>
*model);
Free an instance of a model.
● void
check_<PACKAGE>_<COMPONENT>(<PACKAGE>_<COMPONENT>
*model);
Check all monitoring properties of a model, raising alarms if
any violated.
 <PACKAGE> — SLIM package name.
 <COMPONENT> — FDIR component name.
Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 10
Model API
Example (SLIM model)
package Model public
system HeartbeatMonitor
features
heartbeat: in event port;
prop: out event port {
Alarm => true;
MonitoringProperty => “always (time_since(heartbeat) <= 1 sec”;
};
properties FDIR => true;
end HeartbeatMonitor;
11
Example (Initialization)
int main(int argc, char *argv[])
{
stmon_init_cmdline(argc, argv);
Model_HeartbeatMonitor *mon = new_Model_HeartbeatMonitor();
/* MONITORING LOOP */
free_Model_HeartbeatMonitor(mon);
return 0;
}
12
Example (Monitoring loop)
while (true) {
stmon_time_set(STMON_TIME_SEC(time(NULL)));
if (system_alive())
update_Model_HeartbeatMonitor_heartbeat();
check_Model_HeartbeatMonitor();
stmon_reconfigure();
}
13
Support sensor/alarm SLIM types
● boolean
● int
● real
● continuous
● clock
● enum(<NAME>...)
● (<TYPE>...)
14
● Arithmetic (+, -, *, /, %)
● Comparison (>, <, >=, <=, =, !=)
● Logical (and, or, xor, xnor, not,
iff, imp, implies)
● Temporal (always, future, until,
next, then)
● Time (time_since)
● Data (last_data, data)
● Event triggers (rise, fall, change)
● Time suffixes (msec, sec, min, hour,
day)
Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 15
Supported SLIM LTL operators
[1] CITADEL D4.4 MILS Monitoring System
[2] CITADEL D3.3 CITADEL Design Techniques to
Specify, Verify, and Synthesize Policies for Run-Time
Monitors
[3] CITADEL D4.5 Integrated and tested Adaptive
MILS Platform
[4] CITADEL. D4.3 MILS adaptation system
[5] Advanced Technical Module - State Monitoring.
D6.6 Training Materials for Electronic Delivery
Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 16
Related reading

More Related Content

What's hot

Formal Model Based Design of Control Software
Formal Model Based Design of Control SoftwareFormal Model Based Design of Control Software
Formal Model Based Design of Control Software
Vadim Alimguzhin
 
RTI-CODES+ISSS-2012-Submission-1
RTI-CODES+ISSS-2012-Submission-1RTI-CODES+ISSS-2012-Submission-1
RTI-CODES+ISSS-2012-Submission-1
Serge Amougou
 
System verilog verification building blocks
System verilog verification building blocksSystem verilog verification building blocks
System verilog verification building blocks
Nirav Desai
 
Challenges in Using UVM at SoC Level
Challenges in Using UVM at SoC LevelChallenges in Using UVM at SoC Level
Challenges in Using UVM at SoC Level
DVClub
 
Session 9 advance_verification_features
Session 9 advance_verification_featuresSession 9 advance_verification_features
Session 9 advance_verification_features
Nirav Desai
 
To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...
To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...
To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...
ijsrd.com
 
Session 8 assertion_based_verification_and_interfaces
Session 8 assertion_based_verification_and_interfacesSession 8 assertion_based_verification_and_interfaces
Session 8 assertion_based_verification_and_interfaces
Nirav Desai
 
On an LAS-integrated soft PLC system based on WorldFIP fieldbus
On an LAS-integrated soft PLC system based on WorldFIP fieldbusOn an LAS-integrated soft PLC system based on WorldFIP fieldbus
On an LAS-integrated soft PLC system based on WorldFIP fieldbus
ISA Interchange
 

What's hot (20)

Advanced tech module - state monitoring
Advanced tech module  -  state monitoringAdvanced tech module  -  state monitoring
Advanced tech module - state monitoring
 
safety assurence in process control
safety assurence in process controlsafety assurence in process control
safety assurence in process control
 
System verilog important
System verilog importantSystem verilog important
System verilog important
 
Formal Model Based Design of Control Software
Formal Model Based Design of Control SoftwareFormal Model Based Design of Control Software
Formal Model Based Design of Control Software
 
Microcontroller Based Testing of Digital IP-Core
Microcontroller Based Testing of Digital IP-CoreMicrocontroller Based Testing of Digital IP-Core
Microcontroller Based Testing of Digital IP-Core
 
RTI-CODES+ISSS-2012-Submission-1
RTI-CODES+ISSS-2012-Submission-1RTI-CODES+ISSS-2012-Submission-1
RTI-CODES+ISSS-2012-Submission-1
 
PRFC SysML 1.4
PRFC SysML 1.4PRFC SysML 1.4
PRFC SysML 1.4
 
SysML for embedded system engineering - Academy Camp 2015
SysML for embedded system engineering - Academy Camp 2015SysML for embedded system engineering - Academy Camp 2015
SysML for embedded system engineering - Academy Camp 2015
 
System verilog verification building blocks
System verilog verification building blocksSystem verilog verification building blocks
System verilog verification building blocks
 
Jonathan bromley doulos
Jonathan bromley doulosJonathan bromley doulos
Jonathan bromley doulos
 
Challenges in Using UVM at SoC Level
Challenges in Using UVM at SoC LevelChallenges in Using UVM at SoC Level
Challenges in Using UVM at SoC Level
 
Model Based Design of Hybrid and Electric Powertrains
Model Based Design of Hybrid and Electric PowertrainsModel Based Design of Hybrid and Electric Powertrains
Model Based Design of Hybrid and Electric Powertrains
 
Session 9 advance_verification_features
Session 9 advance_verification_featuresSession 9 advance_verification_features
Session 9 advance_verification_features
 
Design the implementation of CDEx Robust DC Motor.
Design the implementation of CDEx Robust DC Motor.Design the implementation of CDEx Robust DC Motor.
Design the implementation of CDEx Robust DC Motor.
 
system verilog
system verilogsystem verilog
system verilog
 
To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...
To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...
To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...
 
Matthew Hause Building Bridges between Systems and Software with SysML and UML
Matthew Hause Building Bridges between Systems and Software with SysML and UMLMatthew Hause Building Bridges between Systems and Software with SysML and UML
Matthew Hause Building Bridges between Systems and Software with SysML and UML
 
Session 8 assertion_based_verification_and_interfaces
Session 8 assertion_based_verification_and_interfacesSession 8 assertion_based_verification_and_interfaces
Session 8 assertion_based_verification_and_interfaces
 
Lot Completion Estimation Using Self-Configuring Equipment Model-based Applic...
Lot Completion Estimation Using Self-Configuring Equipment Model-based Applic...Lot Completion Estimation Using Self-Configuring Equipment Model-based Applic...
Lot Completion Estimation Using Self-Configuring Equipment Model-based Applic...
 
On an LAS-integrated soft PLC system based on WorldFIP fieldbus
On an LAS-integrated soft PLC system based on WorldFIP fieldbusOn an LAS-integrated soft PLC system based on WorldFIP fieldbus
On an LAS-integrated soft PLC system based on WorldFIP fieldbus
 

Similar to State monitoring configuration

Tools for Test-Driven Product Modeling
Tools for Test-Driven Product ModelingTools for Test-Driven Product Modeling
Tools for Test-Driven Product Modeling
Tim Geisler
 
Project FoX: A Tool That Offers Automated Testing Using a Formal Approach
Project FoX: A Tool That Offers Automated Testing Using a Formal ApproachProject FoX: A Tool That Offers Automated Testing Using a Formal Approach
Project FoX: A Tool That Offers Automated Testing Using a Formal Approach
Ivo Neskovic
 

Similar to State monitoring configuration (20)

Mod06 new development tools
Mod06 new development toolsMod06 new development tools
Mod06 new development tools
 
Development of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-BalancerDevelopment of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-Balancer
 
Efficient mobile automation
Efficient mobile automationEfficient mobile automation
Efficient mobile automation
 
Convert2rhel Development: Porting to the Action Framework
Convert2rhel Development: Porting to the Action FrameworkConvert2rhel Development: Porting to the Action Framework
Convert2rhel Development: Porting to the Action Framework
 
Autotools adaptation for integrating autotmatic unit tests and covering for K...
Autotools adaptation for integrating autotmatic unit tests and covering for K...Autotools adaptation for integrating autotmatic unit tests and covering for K...
Autotools adaptation for integrating autotmatic unit tests and covering for K...
 
Kirill Rozin - Practical Wars for Automatization
Kirill Rozin - Practical Wars for AutomatizationKirill Rozin - Practical Wars for Automatization
Kirill Rozin - Practical Wars for Automatization
 
Java 9
Java 9Java 9
Java 9
 
(2) c sharp introduction_basics_part_i
(2) c sharp introduction_basics_part_i(2) c sharp introduction_basics_part_i
(2) c sharp introduction_basics_part_i
 
Maf3 - Part 1
Maf3 - Part 1Maf3 - Part 1
Maf3 - Part 1
 
[ZigBee 嵌入式系統] ZigBee 應用實作 - 使用 TI Z-Stack Firmware
[ZigBee 嵌入式系統] ZigBee 應用實作 - 使用 TI Z-Stack Firmware[ZigBee 嵌入式系統] ZigBee 應用實作 - 使用 TI Z-Stack Firmware
[ZigBee 嵌入式系統] ZigBee 應用實作 - 使用 TI Z-Stack Firmware
 
Readme
ReadmeReadme
Readme
 
AdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutions
AdaCore Paris Tech Day 2016: Eric Perlade - Verification SolutionsAdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutions
AdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutions
 
Tools for Test-Driven Product Modeling
Tools for Test-Driven Product ModelingTools for Test-Driven Product Modeling
Tools for Test-Driven Product Modeling
 
Adding a BOLT pass
Adding a BOLT passAdding a BOLT pass
Adding a BOLT pass
 
Automating Software Communications Architecture (SCA) Testing with Spectra CX
Automating Software Communications Architecture (SCA) Testing with Spectra CXAutomating Software Communications Architecture (SCA) Testing with Spectra CX
Automating Software Communications Architecture (SCA) Testing with Spectra CX
 
Smart pos stepbystep-v2-0
Smart pos stepbystep-v2-0Smart pos stepbystep-v2-0
Smart pos stepbystep-v2-0
 
Appium Automation with Kotlin
Appium Automation with KotlinAppium Automation with Kotlin
Appium Automation with Kotlin
 
Functional and non-functional testing with IoT-Testware
Functional and non-functional testing with IoT-TestwareFunctional and non-functional testing with IoT-Testware
Functional and non-functional testing with IoT-Testware
 
Jenkins log monitoring with elk stack
Jenkins log monitoring with elk stackJenkins log monitoring with elk stack
Jenkins log monitoring with elk stack
 
Project FoX: A Tool That Offers Automated Testing Using a Formal Approach
Project FoX: A Tool That Offers Automated Testing Using a Formal ApproachProject FoX: A Tool That Offers Automated Testing Using a Formal Approach
Project FoX: A Tool That Offers Automated Testing Using a Formal Approach
 

More from RamnGonzlezRuiz2

More from RamnGonzlezRuiz2 (6)

Certification readiness strategy
Certification readiness strategyCertification readiness strategy
Certification readiness strategy
 
Mils architectural approach
Mils architectural approachMils architectural approach
Mils architectural approach
 
Assurance Cases
Assurance CasesAssurance Cases
Assurance Cases
 
Introduction to citadel
Introduction to citadelIntroduction to citadel
Introduction to citadel
 
Model based adaptation training
Model based adaptation trainingModel based adaptation training
Model based adaptation training
 
Adaptation-Engine traning
Adaptation-Engine traningAdaptation-Engine traning
Adaptation-Engine traning
 

Recently uploaded

Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 

Recently uploaded (20)

Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic Marks
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Air Compressor reciprocating single stage
Air Compressor reciprocating single stageAir Compressor reciprocating single stage
Air Compressor reciprocating single stage
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 

State monitoring configuration

  • 1. Module Configuring MILS Monitoring System State Monitoring Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 1
  • 2.  First level text  Second level text ● Third level text  Fourth level text  Fifth level text Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 2 Prerequisites
  • 3. API for Configuring a State Monitoring Application Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 3
  • 4.  Generates a monitor for every FDIR component  A sensor is generated for every input port of the component  MonitoringProperty LTL formulas are converted into KSS policies  Final C monitor library is generated for all the FDIR components Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 4 Monitoring Library Generator
  • 5. Toolset architecture Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 5
  • 6. ● void stmon_init(void); Initialize monitoring library. ● void stmon_fini(void); Finalize monitoring library. ● void stmon_reconfigure(void); Poll for reconfiguration commands from the configuration plane. ● void stmon_init_cmdline(int argc, char *argv[]); Initialize monitoring library with common command line arguments. Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 6 Generic API
  • 7. ● void stmon_set_adaptation_engine(const char *host, const char *port); Set adaptation engine host address. ● void stmon_set_context_awareness(const char *host, const char *port); Set context awareness host address. ● void stmon_set_configuration_plane(const char *host, const char *port); Set configuration plane host address. ● int stmon_get_configuration_plane_fd(void); Get configuration plane socket. May be used for reconfiguration polling. Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 7 CITADEL API
  • 8. ● void stmon_time_set(stmon_time_t time); Set current model time. Time must be monotonically increasing. ● stmon_time_t stmon_time_get(void); Get current model time.  STMON_TIME_MSEC(msec) — convert milliseconds to internal time.  STMON_TIME_SEC(sec) — convert seconds to internal time.  STMON_TIME_MIN(min) — convert minutes to internal time.  STMON_TIME_HOUR(hour) — convert hours to internal time.  STMON_TIME_DAY(day) — convert days to internal time. Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 8 Time API
  • 9. ● void update_<PACKAGE>_<COMPONENT>_<SENSOR>(<SENSOR_TYPE> value); Update sensor value.  <PACKAGE> — SLIM package name.  <COMPONENT> — FDIR component name.  <SENSOR> — input port name.  <SENSOR_TYPE> — input port type. Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 9 Sensor API
  • 10. ● <PACKAGE>_<COMPONENT> *new_<PACKAGE>_<COMPONENT>(void); Create an instance of a model. ● void free_<PACKAGE>_<COMPONENT>(<PACKAGE>_<COMPONENT> *model); Free an instance of a model. ● void check_<PACKAGE>_<COMPONENT>(<PACKAGE>_<COMPONENT> *model); Check all monitoring properties of a model, raising alarms if any violated.  <PACKAGE> — SLIM package name.  <COMPONENT> — FDIR component name. Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 10 Model API
  • 11. Example (SLIM model) package Model public system HeartbeatMonitor features heartbeat: in event port; prop: out event port { Alarm => true; MonitoringProperty => “always (time_since(heartbeat) <= 1 sec”; }; properties FDIR => true; end HeartbeatMonitor; 11
  • 12. Example (Initialization) int main(int argc, char *argv[]) { stmon_init_cmdline(argc, argv); Model_HeartbeatMonitor *mon = new_Model_HeartbeatMonitor(); /* MONITORING LOOP */ free_Model_HeartbeatMonitor(mon); return 0; } 12
  • 13. Example (Monitoring loop) while (true) { stmon_time_set(STMON_TIME_SEC(time(NULL))); if (system_alive()) update_Model_HeartbeatMonitor_heartbeat(); check_Model_HeartbeatMonitor(); stmon_reconfigure(); } 13
  • 14. Support sensor/alarm SLIM types ● boolean ● int ● real ● continuous ● clock ● enum(<NAME>...) ● (<TYPE>...) 14
  • 15. ● Arithmetic (+, -, *, /, %) ● Comparison (>, <, >=, <=, =, !=) ● Logical (and, or, xor, xnor, not, iff, imp, implies) ● Temporal (always, future, until, next, then) ● Time (time_since) ● Data (last_data, data) ● Event triggers (rise, fall, change) ● Time suffixes (msec, sec, min, hour, day) Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 15 Supported SLIM LTL operators
  • 16. [1] CITADEL D4.4 MILS Monitoring System [2] CITADEL D3.3 CITADEL Design Techniques to Specify, Verify, and Synthesize Policies for Run-Time Monitors [3] CITADEL D4.5 Integrated and tested Adaptive MILS Platform [4] CITADEL. D4.3 MILS adaptation system [5] Advanced Technical Module - State Monitoring. D6.6 Training Materials for Electronic Delivery Kaspersky Lab UK Module Configuring - Module Configuring - State Monitoring 16 Related reading