LinuxMCE Forums
June 18, 2013, 10:53:12 pm GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1] 2
  Print  
Author Topic: Stop asterisk from being hijacked  (Read 2645 times)
greenhornet
Veteran
***
Posts: 59



View Profile
« on: April 23, 2009, 07:39:52 pm »

There is currently a lot of malicious activity being targeted at asterisk phone systems.  In the default settings, it's easy to find an unregistered extension and take over that extension.  In the case of LinuxMCE, the extension and the 'secret' registration password are the same.

It's fairly easy to throw random registration attempts at the box and wait for a good response.

blocking external SIP traffic with a firewall with not work because you would also be blocking legit registrations to SIP providers you have accounts with.

How can the 'secret' phone registration password be changed on devices like orbiter embedded phones so that when they're off, no one else can assume the role just by matching extension and password?

It's fairly easy to change the 'secret' on SIP devices but I cannot find the password location in the orbiter embedded devices.  Of course, one can change the EXTENSION password on the asterisk side by accessing the phone config but this will break service to the orbiter as it will no longer be able to register without the correct password.
Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2637


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #1 on: April 24, 2009, 09:42:20 am »

The device template #1759 needs to be changed to allow the addition of a password, and the simplephone app has to be changed accordingly.
Logged

nosebreaker
Guru
****
Posts: 202


View Profile
« Reply #2 on: April 24, 2009, 02:35:47 pm »

Well, could you use an access-list to only allow traffic from your phone provider?  Is that something that would work or would you need off-site extensions or something?  I'm not sure if LMCE uses iptables but it appears to have some sort of access-list control.
Logged
donpaul
Guru
****
Posts: 300


View Profile
« Reply #3 on: April 24, 2009, 09:48:55 pm »

Wow, what a HUGE vulnerability.
Logged
tschak909
LinuxMCE God
****
Posts: 5116

DOES work for LinuxMCE.


View Profile
« Reply #4 on: April 25, 2009, 02:42:25 am »

Indeed, anybody wanna help us fix it? or just gawk at it?

-Thom
Logged
dlewis
Guru
****
Posts: 401


View Profile
« Reply #5 on: April 25, 2009, 03:23:52 am »

A friend of mine from www.voipcoop.org suggested Fail2Ban to help with these types of security issues. Here is the info: http://www.voip-info.org/wiki/view/Fail2Ban+(with+iptables)+And+Asterisk

Let me know if you guys try to install/get it working
Logged
donpaul
Guru
****
Posts: 300


View Profile
« Reply #6 on: April 28, 2009, 04:59:54 am »

Indeed, anybody wanna help us fix it? or just gawk at it?

-Thom

LOL, I am trying.
Logged
greenhornet
Veteran
***
Posts: 59



View Profile
« Reply #7 on: May 03, 2009, 04:29:51 pm »

It should be noted that current versions of FreePBX / Trixbox have the ability to restrict registrations by ip/subnet.  This feature can be found on the extension settings page.
Solving this problem could be done by updating the version of FreePBX included.  I know that is not as simple as it sounds but it might be the best course of action.
Logged
dlewis
Guru
****
Posts: 401


View Profile
« Reply #8 on: May 03, 2009, 04:31:48 pm »

It should be noted that current versions of FreePBX / Trixbox have the ability to restrict registrations by ip/subnet.  This feature can be found on the extension settings page.
Solving this problem could be done by updating the version of FreePBX included.  I know that is not as simple as it sounds but it might be the best course of action.

Have you tried to update FreePBX within LinuxMCE?
Logged
tschak909
LinuxMCE God
****
Posts: 5116

DOES work for LinuxMCE.


View Profile
« Reply #9 on: May 03, 2009, 04:32:42 pm »

Good call, anyone want to take a crack at this?

-Thom
Logged
LegoGT
Regular Poster
**
Posts: 29


View Profile WWW
« Reply #10 on: May 03, 2009, 06:50:30 pm »

I've added an entry to /etc/hosts.allow for Asterisk and it seems to get the job done:

Code:
asterisk : proxy01.sipphone.com : allow
asterisk : 192.168.80. : allow
asterisk : localhost : allow
asterisk : ALL : deny

Before, I was able to easily connect the N800 SIP phone app from any external network and make dialed calls using default extension info (for example: 200,200). Now I can at least limit that access to specific hosts (or none at all) but I'm not sure if there are any security loopholes still open. Am I missing anything obvious by not trying to upgrade FreePBX and locking it down there?
Logged

A brain dump of my neverending projects: http://MediumRareBrain.com
dlewis
Guru
****
Posts: 401


View Profile
« Reply #11 on: May 03, 2009, 06:58:37 pm »

I've added an entry to /etc/hosts.allow for Asterisk and it seems to get the job done:

Code:
asterisk : proxy01.sipphone.com : allow
asterisk : 192.168.80. : allow
asterisk : localhost : allow
asterisk : ALL : deny

Before, I was able to easily connect the N800 SIP phone app from any external network and make dialed calls using default extension info (for example: 200,200). Now I can at least limit that access to specific hosts (or none at all) but I'm not sure if there are any security loopholes still open. Am I missing anything obvious by not trying to upgrade FreePBX and locking it down there?

I think it's still worth a try to upgrade FreePBX / Asterisk...
Logged
tschak909
LinuxMCE God
****
Posts: 5116

DOES work for LinuxMCE.


View Profile
« Reply #12 on: May 03, 2009, 07:50:28 pm »

I've added an entry to /etc/hosts.allow for Asterisk and it seems to get the job done:

Code:
asterisk : proxy01.sipphone.com : allow
asterisk : 192.168.80. : allow
asterisk : localhost : allow
asterisk : ALL : deny

Before, I was able to easily connect the N800 SIP phone app from any external network and make dialed calls using default extension info (for example: 200,200). Now I can at least limit that access to specific hosts (or none at all) but I'm not sure if there are any security loopholes still open. Am I missing anything obvious by not trying to upgrade FreePBX and locking it down there?

Can you open a ticket on trac.linuxmce, and attach the new hosts.allow, so we can graft it into the system?

-Thom
Logged
dlewis
Guru
****
Posts: 401


View Profile
« Reply #13 on: May 03, 2009, 07:54:23 pm »

We should omit the 'sipphone.com' aspect since that's custom...
Logged
tschak909
LinuxMCE God
****
Posts: 5116

DOES work for LinuxMCE.


View Profile
« Reply #14 on: May 03, 2009, 07:56:40 pm »

Good call, we'll make it part of the template. Some thought will need to be made.

Since we can reference the gateway host in the database once configured, we can have scripts automatically do an SNR on hosts.allow to close things up nicely.

-Thom
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!