How I Hacked My Apartment Building

Jose Casanova
Oct 24, 2015 · 2 min read

TL;DR: Built an app with Twilio that responds with an audio recording of a dial tone.

The intercom machine at my building allows visitors to dial the apartment owner in order to unlock the lobby door.

The issue with this machine is that it only allows one phone number to be programmed to it per apartment. This is problematic because I live with two other roommates.

In the spirit of home automation, I wanted to have the ability to get into my apartment without my wallet/phone. So what did I do? I hacked it!

The way the intercom works is that you dial the apartment owner and once the person answers they have to dial the number 6 to unlock the door for the visitor.

I created a simple Sinatra app that uses the Twilio API. When the number (assigned by Twilio) is called, it sends a Webhook to the server and it responds with an audio recording. The audio recording is of the dial tone that the intercom needs in order to allow it to unlock the door.

Here is a video of it in action.

The code is really straight forward. Check it out here:

I’ve open sourced the code too, you can check it out here.

PS: I removed this hack from my building after this post. I don’t want to put my neighbors at risk of such a security flaw. :)


Originally published at Jose Casanova’s Thoughts.

Jose Casanova

Written by

josecasanova.com

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade