Go Down

Topic: Alarm system and radio transmission (Read 1 time) previous topic - next topic



for my alarm system, I am planning to
- use a PIR
- use a reed switch (NO=normallyopened,and used with pulll up)
- send signal to base station

Base station evaluates the signal then

As a matter of security, and that is the important thing for me of course, I need to know how secure the following technique/idea is:
- sending a "OK"-signal all 3 secs (not with delay, but see Arduino - BlinkWithoutDelay) that is encrypted with a rolling code (e.g. keeloq)
- if any kind of alarm happens (PIR gets high OR reed gets switched) then send a "ALARM"-signal and stop sending the "OK"-signal (actually not necessary, but I think it is better anyway)
- base station wants to get a "OK"-signal all 5 secs (even if it is sent all 3secs, maybe some dont reach the recv) and decrypting it -> check ok
- if not received a "ok" signal  OR received a "alarm"signal -> Alarm! by switching a relay with a siren

What do you think is this secure and do you have any impreovement?
Thank you
using Arduino Uno Rev 3


Secure in what sense? From people hacking the wireless link? What if people just bypass your sensors with a wire?


Secure in what sense?

At all, that's why I tried to describe the situation.

From people hacking the wireless link?
for example

What if people just bypass your sensors with a wire?
I forgot to mention the system is inside the building. However you could, if you know exactly where everything is placed, work carefully and bypass with a wire.
using Arduino Uno Rev 3


Who are we trying to keep out?  I can tell you none of the thieves and home invaders in our neighborhood would be able to hack the wireless link even if it was non-coded, unencrypted, and I posted the instructions on the front door!  They might try to cut a wire, so you should make sure that would set off the alarm.  As with adding a wire to bypass a sensor I would again consider this beyond their level of expertise.

On the other hand if you are trying to keep out foreign spies or electrical engineers you are going to need all the help you can get.


I'm a security guy by trade and although my specialty isn't physical security (I am currently sharpening those skills with a side project), defending against those who would defeat encryption is right up my alley.  I see an immediate problem with what you described.  Encryption is only viable if one cannot easily determine a pattern.  I don't need to know your key if you send the same encrypted message repeatedly.  This is especially bad when that repeated message is an "OK" message.  If I wanted to defeat this wireless alarm sensor, I'd monitor the normal condition and try to figure out the rolling code, which honestly shouldn't be that hard.  I could probably even build an arduino based device to drop in some hidden place on your premises somewhere and figure it out for me :)

Wireless security is a very tough endeavor.  You're putting messages out into the world for anyone who is listening.  There's no way for you to know if/when someone actually is listening, so they have all the time in the world to figure out your encryption mechanism.  Your goal in something like this is to make it take them so long that they become disinterested, their listening device/method is discovered, or they move on to an attack method that gets them caught.  For the determined and clever thief, that will probably not happen before they compromise the system.  This category of attacker is your worst enemy when it comes to wireless security... but they are few and far between.  The fact that you're considering wireless in the first place means that you are probably not a target for those folks.  Never say never, of course.

Ultimately, it comes down to how much risk you're willing to accept and how much time and money you're willing to spend to overcome the unacceptable.  IMHO, moving to a wired solution has some entry cost but in the long run will save you money and, perhaps more importantly, time.  While it's certainly possible to defeat even the best wired system, it does present a hurdle that will discourage many would-be attackers.  For those reasons, I absolutely recommend moving to a wired solution.

That's off my chest, so I can speak to your actual question a bit :).  Again, this is not a recommendation... but if you simply must use wireless then try to incorporate another factor besides the rolling key.  Add something to your message that makes it harder to identify a pattern.  A good example solution to this problem is to pad your messages with a pre-shared long list of unique phrases.  Another version of that concept would be to use a long list of unique messages that all mean ok or fault.  Throw in some nonsense (although *not* random) messages at irregular intervals that are ignored by the receiving end.  randomize the interval at which valid messages are sent (while keeping it within your expected max length between OK status messages).  encrypt each of those with your rolling key.  If you do all of those things, identifying a pattern and imitating it will be very difficult.  If you really want to get crazy you can do all sorts of things to further increase that difficulty.  Just remember to stay away from published standards and methods. 

I know that sounds like a lot, and it's still nowhere near what I would consider highly secure... but it should get you started down the path of really hardening your system.  Take away an attacker's ability to use the "1337 hax0r" crap they can download off the internet like any other idiot and you will eliminate 99% of your threats.  Then you just have to stall, confuse, and discourage the other 1% long enough to catch them :)

Go Up