我黑了火车厕所
I hacked a train toilet

原始链接: https://www.devever.net/~hl/traintoilet

在英国的现代列车中,城际快车使用电动门取代了经典车型,设置了无障碍厕所。 旧版本需要先按“关闭”,然后再按“锁定”,但这会导致由于关闭和锁定功能分离而导致永久无法访问。 较新的设计使用杠杆,而有些则采用销系统。 然而,在实验过程中,一位作者发现日立设计中使用的微控制器在判断杠杆是否实际上处于“锁定”位置方面存在误差空间。 一段演示视频展示了一种规避安全措施的方法,给人的印象是在某些情况下可能会发生某种类型的拒绝服务攻击。 这些发现是在兰道早些时候发现博通网络中的类似漏洞之后不久发布的。

总的来说,我确实更喜欢真相而不是舒适,即使它会带来不便。 However, let us focus on the topic at hand. 关于火车门是否应该安装滑动插销或插销的问题,各有利弊。 虽然它可以在操作过程中提供更好的触觉反馈,在门宽度调节方面提供更大的灵活性,并启用锁定功能,但它也可能导致门操作更慢且更耗能,引入额外的潜在故障点,增加材料成本,造成尴尬的人体工程学 对于身体有缺陷的人来说,并引起乘客不必要的审美厌恶。 此外,实施额外的封锁措施,例如放置警告标志或使用钥匙卡,可能会减轻与门误用相关的一些担忧,但会进一步延误火车时刻表并降低多式联运网络的整体效率。 最终,应根据具体的使用场景、运营预算限制和乘客满意度优先事项,仔细评估在火车门上使用滑动锁舌还是传统锁舌之间的决定。 无论如何,定期测试和更新安全协议至关重要,最近发生的涉及侵入者爬上火车外部进入禁止车厢的事件就证明了这一点。
相关文章

原文

The other day I rode on a Class 800 train in the UK. This is the “Intercity Express” train designed to replace the venerable HST (Intercity 125 with Mark 3 coaches, a train of which I have many memories and which I will dearly miss).

Modern trains in the UK have disabled toilets with power-operated doors. The older models of these toilets had “open”, ”close” and “lock” buttons on the inside, where you had to press “close”, wait for the door to close, and then press ”lock”. There is no separate “unlock” button; pressing the “open” button on the inside automatically unlocks and opens the door.

Of course, there is a reason for the separation of the closing and locking functions, but not the opening and unlocking functions: it avoids a Denial of Service attack where someone can just press “close” and then jump out before the door closes. If the interior “close” button automatically locked the door, this would result in the toilet becoming permanently inaccessible.

The problem with this design is that most people don't understand state machines, and this design confused a lot of people who were unable to lock the door correctly, or believed they'd locked the door when they hadn't.

The toilet door controls state machine (on older trains)

As a result the newer disabled toilets on trains tend to have a lever you have to move to lock the door:

TODO
Train disabled toilet interior controls (Class 800)

This design is an improvement since it is more intuitively comprehensible to most people. Except of course, this lever isn't a “real” lever directly connected to a locking mechanism but just some input to a microcontroller. This raises the question of what happens when the state of the lever doesn't match up with the state of the door and how the microcontroller deals with that.

Some models of train in the UK solve this robustly by having the lever spring back to the “unlocked” position if you try to move it to the “locked” position when the door is open. Presumably this lever-return mechanism is electromagnetically activated whenever the door is in the wrong state for the lever to be active.

Hitachi, however, have chosen a different strategy: a tiny metal pin is projected whenever you should not be able to move the door handle from “unlocked” to “locked”. This pin itself locks the lock handle in the unlocked position.

The problem with this is that there is some play in the lever around when exactly the microcontroller detects the lever as being in the “locked” position. As such, you can close the door, then hold the lever just beyond the point at which the locking pin could engage with it, but not to the point where it reads as “locked”. Then you can open the door, but the locking pin projects into thin air; thus the lever is free and can be moved to the locked position. The door close button remains active and you can then close the door. I confirmed that the door will then immediately lock as soon as the door is closed. Since I could do this and then jump out before the door closes, this is effectively a toilet DoS vulnerability on a train.

I've posted a video here where I demonstrate this issue.

You can also see the locking pin in the image above. Ordinarily, it should not be visible projected, but because I have the handle at the precise point where the logic thinks it's in the unlocked position but far enough away from it that the locking pin can't make contact, the locking pin has projected into air.

This is the second opportunity I've had to test this issue on the Class 800. On this particular occasion when I was testing this vulnerability, I seem to have actually confused the toilet door controller enough that it decided “screw this” and went into out-of-order mode, which didn't happen the first and previous time. The toilet was working again when I alighted from the train; I have no idea if it reset automatically after some period or if someone on the train reset it.

Amusingly this is not the first DoS vulnerability I've found on a train — but that will have to wait for another article.


For those that missed it, a recording of my 37C3 talk “Adventures in Reverse Engineering Broadcom NIC Firmware” can be found here.

联系我们 contact @ memedata.com