Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My custom monitoring program (probably not as advanced, it only does some light monitoring) accepts a text message back to shutdown the machine.

Not perfect but can work well as a line of defence.



That's cool. How does it work? Is the text message just via email, and the server can accept an email back with a specific command?


Servers are with Gandi - which has a hosting API. So... SMS gateway via some shared hosting I have had for ages. This calls a script which figures out which server I mean and uses the API to shut it down.

I did used to use Twilio until they dropped international text messaging etc.


What are you using instead of Twilio now?


A shared hosting account which has a free (5 credits a month) SMS gateway included - I think it is reselling txtlocal.co.uk (who look quite good, but I haven't gotten round to trying them out directly yet).

It was kinda thrown together in a few minutes after Twilio flaked :)


I'm not an expert in this things, but can't sms messages be spoofed quite easily?


I presumed they can be :) so my systems needs a text like this:

<machine nickname> <passcode>

It is on my todo list to improve this at some point - but not had chance yet.


I have a similar system, but instead of a plain passcode, I have a (simple, and probably not very secure) hashing method that I can do in my head.

My message looks like this: <machine> <hashed passcode> <number>

The passcode is "hashed" with the number. When the server receives the message, it adds the number to a deny-list. That way, the number is only good for one use.

Also, the number has to conform to a certain pattern. I might change that to a pre-generated list of valid numbers, but for the moment, I can work out a valid number with pen and paper.

Not perfect, but I think it's good enough.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: