检测TAP层面extended漏洞方法

C.1、C.3

When motion is detected, turn on the ceiling lamp.
When motion is detected, if luminance is below 20 lux, turn on the floor lamp.
(1) only the ceiling lamp is turned on if initially there is at
least 20 lux luminance, or (2) both lamps are turned on if
luminance is below 20 lux 同平台会同时进行,

When the hall door is closed, if away mode, close garage door and set home mode. (arriving)
When the hall door is closed, if home mode, open the garage door. (leaving)
在一个平台通常是并行执行的。先arriving变为home mode,延迟door close事件,规则2能执行

在这里插入图片描述

从TAP层面如何检测extended

S1预期图:
||
ri,rj
ri,rj预期
if 8:00 am while Temperature < 20 , close window
if 8:00 am while humidity > 60% , open window
修复 if 8:00 am while Temperature < 20 and humidity > 60% ,让用户选择open、close window
并且原规则也要调整,调整为 humidity < 60%
或者不让用户选择,选择倾向于安全的行为,如关闭
有extend的两两出现的情况会不会F有冲突的情况。对于不extend的,把条件合并然后状态机是否会出现合并的情况
G (man = wolf -> !( X carry = w))
G (man = wolf -> !( X carry = g)) 这是对tmp

S2预期图:
|——————————|
ri,rj   ri,rj预期
if motion,开十分钟后关
if motion,发送消息,10分钟后开
if motion(共有trigger) while 如果有condition就是公共部分,如果没有就单condition
米家试验了,确实存在,因为顺序执行,发送消息会更好,能抵消开电源的时间


S3预期图:
|——————————|
ri   ri预期,rj,rj预期

S4
|——————————|
rj   ri,ri预期,rj预期
谁tmp谁的预期优先级大,要恢复tmp预期,如果是加入延迟的tmp那么是S1
8:45因为wet打开fan了15分钟关闭,9点打开风扇通风
第一种修复,先extend完再打开,可能在9点更想打开,wet属于更泛化,9点这种时间段属于具体的,所		以九点更应该打开风扇  extend的预期应该不包括结尾,完整进行开始和中间才能达到效果pyisical effect,打断开始和中间都会无effect    if 9:01 & fan.off,then on
第二种修复,if早9点 while r1 last trigger 10 min(加了latency的instantaneous也行),

S5预期图:
|————————|——————|
ri  rj  ri,rj预期
8:45因为wet打开fan了15分钟关闭,中途因为motion等10分钟后打开

S6预期图:
|————————|——————|
rj  ri  ri,rj预期

-------------------------------------------------------
S7预期图:  和S8像  Disordered Action Scheduling
|——————————|
ri,rj    rj预期
ri预期
人不在家关闭,

S8预期图:Disordered Action Scheduling,同时触发  由于短期的延迟波动
|————————————|————————|
ri,rj     ri预期    rj预期
攻击者只是delay了其中一条command,而没有delay整体如DDOS
motion detected ,turn on light 
motion detected, wait 1 min and turn off light
还有一种方式就是turn on light 10min,如果是多动作就不能合,因为会顺序执行
如果last trigger不对,因为可能是正常触发
property:light.off should always happen after light.on        light.off should finally happen after light.on  
人不在家,灯必须关闭。超时关闭,人不在家关闭
那如果人在家,无property咋办

S9预期图:Action overrinding
|—————————————|
ri,ri预期   rj,rj预期
如果阳台present,open阳台门
如果no motion detected,close all door
If @阳台门lock while no motion detected,then unlock 阳台门

Trigger-Inter:
if voice command , turn on TV
if TV on , turn off camera

Condition-Inter:
if not_present ,set away_mode
if door_opened while sleep_mode , turn on alarm
Rule 5 sets “away” mode when a member leaves, disabling Rule 6 to detect break-ins when another member is sleeping.

property: sleep mode,某盏灯不应该被打开
如果presence,turn on light
如果11点并且无人移动,进入sleep mode
if @light.on while 11:15(merge后可以是个时间段)&...,then turn off light

S10预期图:Action overrinding
|————————————|————————|
ri,ri预期    rj     rj预期

S11:
|————————————|————————|
rj        ri,ri预期 rj预期
present,after 10min turn on curling
ri: not present,turn off curling
违反turn off culing when no one home。if no one home ,turn off curling
如果是人在家冲突了,那应该是会违反温度相关的property


S12预期图: Action overrinding
|————————————|————————|
ri        ri预期    rj,rj预期


S13预期图:(Action overrinding,不同时触发)
|—————|———————|————————|
ri    rj    ri预期    rj预期

S14
|—————|———————|————————|
rj   ri    ri预期     rj预期

------------------------------------------------------------
Action Breaking
S15
|————————————————————|
ri,rj,rj预期         ri预期
if smoke,turn off the outlet(fan连接的排插)
if smoke,turn on fan 15min

S16
|————————————|————————|
ri,rj       rj预期    ri预期
一个温度上升,一个温度下降

S17
|————————————|————————|
ri       rj,rj预期    ri预期
ri和rj有触发关系
physical channel  window的打开使得ri不能达到预期30度关窗,这里要merge一下,如果是单纯on配off要merge,如果是运行固定时间关且这个不为直接操作设备就不merge

T.3、T.4:
When motion detected , turn on heater 15min 
When power high , turn off heater / notification

S18
|——————————|——————————|——————————|
ri        rj   rj预期     ri预期
smoke fan
而且状态机里是没有rj预期到ri预期这段的,那么想分析最好是从没影响的时候的规则层面进行

S19
|——————————|——————————|——————————|
rj        ri   rj预期     ri预期

S1预期图:
||
ri,rj
ri,rj预期


S2预期图:
|——————————|
ri,rj   ri,rj预期


S3预期图:
|——————————|
ri   ri预期,rj,rj预期


S4
|——————————|
rj   ri,ri预期,rj预期


S5预期图:
|————————|——————|
ri  rj  ri,rj预期


S6预期图:
|————————|——————|
rj  ri  ri,rj预期

-------------------------------------------------------
S7预期图:  和S8像  Disordered Action Scheduling
|——————————|
ri,rj    rj预期
ri预期


S8预期图:Disordered Action Scheduling,同时触发  由于短期的延迟波动
|————————————|————————|
ri,rj     ri预期    rj预期


S9预期图:Action overrinding
|—————————————|
ri,ri预期   rj,rj预期


S10预期图:Action overrinding
|————————————|————————|
ri,ri预期    rj     rj预期


S11:
|————————————|————————|
rj        ri,ri预期 rj预期


S12预期图: Action overrinding
|————————————|————————|
ri        ri预期    rj,rj预期


S13预期图:(Action overrinding,不同时触发)
|—————|———————|————————|
ri    rj    ri预期    rj预期


S14
|—————|———————|————————|
rj   ri    ri预期     rj预期

------------------------------------------------------------
Action Breaking
S15
|————————————————————|
ri,rj,rj预期         ri预期


S16
|————————————|————————|
ri,rj       rj预期    ri预期


S17
|————————————|————————|
ri       rj,rj预期    ri预期


S18
|——————————|——————————|——————————|
ri        rj   rj预期     ri预期


S19
|——————————|——————————|——————————|
rj        ri   rj预期     ri预期
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

q1uTruth

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值