Koozali.org: home of the SME Server

Sail system broken into - how to improve security?

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Sail system broken into - how to improve security?
« on: May 20, 2010, 11:17:42 PM »
Just had a system broken into by a crew scanning from a couple of Romanian IP addresses using a scanning utility (sipvicious?) + dictionaries and a lot of determination over the past 3 weeks. The bottom of the line is: they finally got in a couple of days ago and the result was some $AU1,200 worth of calls to mobiles phones in North Korea, all done in less than 20 minutes.  After getting hold of a roaming extension, they issued the Unknown SIP command 'PUBLISH' from an IP address in Romania .Luckily, the SIP provider used in this instance monitors traffic, and kills the trunk if their system detects more than 100 overseas calls or 300 local calls over a 1 hour period. 

The system in question  has been hardened to the best of my abilities, meaning very strong passwords which could be a pain since extension passwords are used to retrieve voicemail.  The Romanian boys are still at it over the past two days with massive dictionary attacks, and more recently attempts at login direct onto the SIP provider as well as scanning for extensions, generating some 8-10 kbps of traffic non-stop.  I just decided to kill asterisk for a while, bad for the nerves... All is now quiet.

Question: would it be worthwhile adding alwaysauthreject=yes to the sip.conf?
How to make it stick?

Any advice re securing this system would be appreciated.

Thanks.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Sail system broken into - how to improve security?
« Reply #1 on: May 21, 2010, 07:28:30 AM »
So how did they actually get in Chris?  Did they guess a password?

   

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: Sail system broken into - how to improve security?
« Reply #2 on: May 21, 2010, 08:38:42 AM »
First, they scanned:
Apr 22 14:51:59 NOTICE[4862] chan_sip.c: Registration from '"125"<sip:125@60.xxx.xxx.xxx>' failed for '86.105.36.194' - ACL error (permit/deny)
Apr 22 14:51:59 NOTICE[4862] chan_sip.c: Registration from '"admin"<sip:admin@60.xxx.xxx.xxx>' failed for '86.105.36.194' - ACL error (permit/deny)
Apr 22 14:51:59 NOTICE[4862] chan_sip.c: Registration from '"127"<sip:127@60.xxx.xxx.xxx>' failed for '86.105.36.194' - ACL error (permit/deny)
Apr 22 14:51:59 NOTICE[4862] chan_sip.c: Registration from '"info"<sip:info@60.xxx.xxx.xxx>' failed for '86.105.36.194' - ACL error (permit/deny)
Apr 22 14:51:59 NOTICE[4862] chan_sip.c: Registration from '"128"<sip:128@60.xxx.xxx.xxx>' failed for '86.105.36.194' - ACL error (permit/deny)

and gave up after a while.

Then starting at 1, ending at 10,000:
May  7 03:16:17 NOTICE[4862] chan_sip.c: Registration from '"4999"<sip:4999@60.xxx.xxx.xxx>' failed for '221.122.76.204' - ACL error (permit/deny)
May  7 03:16:17 NOTICE[4862] chan_sip.c: Registration from '"5002"<sip:5002@60.xxx.xxx.xxx>' failed for '221.122.76.204' - ACL error (permit/deny)
May  7 03:16:17 NOTICE[4862] chan_sip.c: Registration from '"5006"<sip:5006@60.xxx.xxx.xxx>' failed for '221.122.76.204' - ACL error (permit/deny)
May  7 03:16:17 NOTICE[4862] chan_sip.c: Registration from '"5007"<sip:5007@60.xxx.xxx.xxx>' failed for '221.122.76.204' - ACL error (permit/deny)

They knew my extension numbers, picked one and went for passwords:

May  7 03:17:18 NOTICE[4862] chan_sip.c: Registration from '"5004" <sip:5004@60.xxx.xxx.xxx>' failed for '221.122.76.204' - Wrong password
May  7 03:17:19 NOTICE[4862] chan_sip.c: Registration from '"5004" <sip:5004@60.xxx.xxx.xxx>' failed for '221.122.76.204' - Wrong password
May  7 03:17:19 NOTICE[4862] chan_sip.c: Registration from '"5004" <sip:5004@60.xxx.xxx.xxx>' failed for '221.122.76.204' - Wrong password
May  7 03:17:19 NOTICE[4862] chan_sip.c: Registration from '"5004" <sip:5004@60.xxx.xxx.xxx>' failed for '221.122.76.204' - Wrong password

Then the kill:
May  7 03:19:38 NOTICE[4862] chan_sip.c: Registration from '"5004" <sip:5004@60.xxx.xxx.xxx>' failed for '221.122.76.204' - Wrong password
May  7 03:19:42 NOTICE[4862] chan_sip.c: Peer '5004' is now UNREACHABLE!  Last qualify: 0
May  7 03:20:23 NOTICE[4862] chan_sip.c: Peer '5004' is now REACHABLE! (463ms / 3000ms)
May  7 03:20:23 NOTICE[4862] chan_sip.c: Unknown SIP command 'PUBLISH' from '83.45.193.109'

This was just a test run, they did not use the system. They went away until:
May 13 00:38:38 NOTICE[4862] chan_sip.c: Registration from '"5000" <sip:5004@60.xxx.xxx.xxx>' failed for '69.162.112.97' - Wrong password
May 13 00:38:38 NOTICE[4862] chan_sip.c: Registration from '"5001" <sip:5004@60.xxx.xxx.xxx>' failed for '69.162.112.97' - Wrong password
May 13 00:38:38 NOTICE[4862] chan_sip.c: Registration from '"5002" <sip:5004@60.xxx.xxx.xxx>' failed for '69.162.112.97' - Wrong password
May 13 00:38:38 NOTICE[4862] chan_sip.c: Registration from '"5003" <sip:5004@60.xxx.xxx.xxx>' failed for '69.162.112.97' - Wrong password

later:
May 13 07:14:59 NOTICE[4862] chan_sip.c: Unknown SIP command 'PUBLISH' from '83.37.18.249'
May 13 07:15:01 NOTICE[4862] chan_sip.c: Unknown SIP command 'PUBLISH' from '83.37.18.249'

The worrying part is that 5003 was my own extension, set for internal only, while 5004 was an account for a remote phone (laptop).
They got in all the same it seems. 

Then:
May 16 01:13:54 NOTICE[4862] chan_sip.c: Unknown SIP command 'PUBLISH' from '83.45.198.117'
May 16 01:13:57 NOTICE[4862] chan_sip.c: Unknown SIP command 'PUBLISH' from '83.45.198.117'

But no call recorded anyway, and no call made.  Then the kill:
May 18 03:56:19 NOTICE[4862] chan_sip.c: Unknown SIP command 'PUBLISH' from '93.112.68.71'
[snip]
May 18 04:01:19 NOTICE[4862] chan_sip.c: Unknown SIP command 'PUBLISH' from '93.112.68.71'
May 18 04:01:29 NOTICE[4862] chan_sip.c: Peer '5004' is now UNREACHABLE!  Last qualify: 569
May 18 04:01:32 WARNING[4862] chan_sip.c: Maximum retries exceeded on transmission ODE0NmZlODA3YWZlNTVjMjFiZjIwOWEwZTIzN2FhNGU. for seqno 2 (Critical Response)
May 18 04:01:32 WARNING[4862] chan_sip.c: Hanging up call ODE0NmZlODA3YWZlNTVjMjFiZjIwOWEwZTIzN2FhNGU. - no reply to our critical packet.

This where the ISP disconnected the line after 100 overseas calls.

It gets worse, I have another 2 systems using same ISP, They have been attacked over past few days, same IP addresses, same technique.  I just got at them in time ...
On one of the box, they already have made a test run from a local extension. (Phew....).  The ISP told me there is a lot of attacks lover past few weeks, all targeting Asterisks, all from rogue telcos in Asia and East Europe.

- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline ldkeen

  • *
  • 403
  • +0/-0
Re: Sail system broken into - how to improve security?
« Reply #3 on: May 21, 2010, 10:49:26 AM »
Yeah, someone's been having a sniff around my box as well:

Code: [Select]
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"540096345"<sip:540096345@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"1531608485"<sip:1531608485@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"100"<sip:100@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"101"<sip:101@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"info"<sip:info@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"test"<sip:test@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"postmaster"<sip:postmaster@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"sales"<sip:sales@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"service"<sip:service@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"support"<sip:support@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"marketing"<sip:marketing@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"manager"<sip:manager@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"market"<sip:market@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"server"<sip:server@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"spam"<sip:spam@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"user"<sip:user@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"data"<sip:data@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"cpanel"<sip:cpanel@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"trixbox"<sip:trixbox@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"news"<sip:news@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"fax"<sip:fax@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"postfix"<sip:postfix@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"owner"<sip:owner@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"client"<sip:client@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"operator"<sip:operator@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"asterisk"<sip:asterisk@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"oracle"<sip:oracle@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"temp"<sip:temp@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"jobs"<sip:jobs@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found
[May 18 02:18:54] NOTICE[20981] chan_sip.c: Registration from '"shop"<sip:shop@xxx.xxx.xxx.xxx>' failed for '122.225.62.74' - No matching peer found

I have pretty good passwords on the few remote extn's that I have, so I hope that covers me.
Lloyd

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Sail system broken into - how to improve security?
« Reply #4 on: May 21, 2010, 11:35:35 AM »
I have pretty good passwords on the few remote extn's that I have, so I hope that covers me.
Lloyd

I suggest you to check and pay attention..

as Chris stated..
Quote
The system in question  has been hardened to the best of my abilities, meaning very strong passwords which could be a pain since extension passwords are used to retrieve voicemail

so it seems that strong password aren't strong enough

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Sail system broken into - how to improve security?
« Reply #5 on: May 21, 2010, 11:46:07 AM »
The PUBLISH commands are, I'm pretty sure, just something coming off the far end SIP agent they are using.  PUBLISH is a regular SIP request (see RFC3903).  In any event, Astrerisk does not have support in it for PUBLISH, so it just errors when it receives one. 

Quote
The worrying part is that 5003 was my own extension, set for internal only, while 5004 was an account for a remote phone (laptop).
They got in all the same it seems.

It doesn't matter if your extension is set for internal or not.  Internal/external simply turns on Asterisk's nat processor (nat=yes).  It doesn't stop SIP packets, which is usually all these guys are interested in; they often don't care about flowing voice - just triggering phone calls to premium rate accounts that they own.

So they guessed your password.  That is very unlikely with a random digits-and-characters password like the ones that Sail generates for you, but it is quite possible with a purely numeric password (which, reading between the lines, is what you were using) because with a good internet link they can fire in literally thousands of registration attempts and it costs them nothing. 

I have never seen anyone gain access using a Sail randomly generated password (that's not to say it couldn't happen, but it is much harder to crack) but I have seen quite a few where numeric passwords are being used, I have seen a lot where the password matches the extension number. 

You asked what more you should do.

You should move to a mixed numeric/alpha password of at least 8 characters. Also, I don't know why you have associated voicemail password with the extension registration password.  This is very dangerous because with that setup every phone user knows a password which could be used by an attacker to register and compromise the system.  You really should change that as soon as possible. 

You should consider using ACLs to prevent log-ins from IP addresses you don't authorize (see permit/deny in sip.conf).  The more recent releases of Sail generate ACLs automatically for you whenever you create a local extension.

You should add the line allowguest=no to your sip.conf header if it isn't already there (later releases of Sail have this anyway).

Your suggestion to include alwaysauthreject=yes is a good idea.  I have already requested that it be included in the next Sail point release. It may cut down dictionary attacks on a particular extension number and that must ba a good thing. 

The moral here is to use the Sail generated passwords and ACLs or, if you are running an older release of Sail or your extensions were defined a while ago, then make sure you manually set strong mixed character-and-numeric passwords and add ACL checking.

Kind Regards and commiserations.

Jeff
« Last Edit: May 21, 2010, 11:48:00 AM by SARK devs »

Offline ldkeen

  • *
  • 403
  • +0/-0
Re: Sail system broken into - how to improve security?
« Reply #6 on: May 21, 2010, 12:03:48 PM »
Hmm. I was under the impression that only the remote extensions were vulnerable. I have local some extensions that are still using 4 digit number passwords. Better get crackin.

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: Sail system broken into - how to improve security?
« Reply #7 on: May 21, 2010, 12:35:48 PM »
Thanks Jeff,

Quote
"because with a good internet link they can fire in literally thousands of registration attempts and it costs them nothing"

 And they do... Thanks for comments, you are correct, it is an oldish" version of Sail, and I am/was using all numerical passwords. On the version I use, passw for mail are the same as passw for extensions AFAICT - never worried about it, I thought local extension were safe...  I think I better upgrade all boxes before going back online, the mothers are hammering hard as soon as I go online, no point tempting the devil hey?  Good news is that in Australia, the regulator have instructed all ISP to charge only their costs for fraudulent calls.  I am getting around 60% discount....
Regards

Lloyd, better get this box ofline until you fix it - they move fast....  One of them has figured out I have two services, the second being Pennytel.  He was trying to get onto Pennytel direct after I hardened all passwords for extension and deleted the external one.

Stephano, I only hardened the passwords after the fact unfortunately.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline ldkeen

  • *
  • 403
  • +0/-0
Re: Sail system broken into - how to improve security?
« Reply #8 on: May 21, 2010, 12:50:18 PM »
I have an extension 5008 - IDEFISK. Can I delete it?

guest22

Re: Sail system broken into - how to improve security?
« Reply #9 on: May 22, 2010, 06:00:58 PM »
Hi guys,

[lengthy mail warning]

I wanted to share some thoughts on this topic and the way we use telephony in general.

In traditional telephony, a telephone is 'hooked up' to both a telephone number and a user at the same time. So at your house, you have a telephone and a number, and the whole family can pick up the phone. This is by design due to the 'fixed copper wire'
telephone systems.

Now today with VoIP, we are in a converged world, where the 'old school' copper wire system is no longer needed and thus the mandatory connection between house, number and telephone.

In strongly feel that the user and device (telephone) should be seperate and independent of each other. So, hot desking comes in to place. But next to hot desking also user ACL's. This will lead to the following 'rules':

1. A device as just a piece of hardware/software that can register and that's it. Only emergency numbers are allowed.

2. A user should be able to walk up to any device and log on with a PIN number.

3. Based on the user, a ACL level is being set, which determines what the user can do.

Back in 2005, I've created my own dialplan and AGI scripts so my Asterisk system was
'Hot Desk' and user ACL enabled. I've used the internal Asterisk database to set the following (example where 9011) is the extension of the device. So an extension is always a piece of hardware/software with no rights (except emergency numbers).

[database show]
/device_hotdesk/9011                              : 5501
/device_tech/9011                                 : SIP
/user_acl/9011                                    : 7
/user_hotdesk/9011                                : 1

Let me explain the details (as far as I can remember, doing this from memory)

/device_hotdesk/9011                              : 9011
This entry tells asterisk that the device known as extension '9011' in Asterisk is in use by user 5501

/device_tech/9011                                 : SIP
This entry tells asterisk what technology to use when dialing within the AGI script

/user_acl/9011                                    : 7
This entry tells asterisk what user ACL is set (ranging from 0 to 9, where 0 is only emergency calls). The various ACL contexts are included (include=>) per ACL/context

/user_hotdesk/9011                                : 1
This entry tells asterisk if the device/extension 9011 is in use by a user as a hot desk device. This is required to log off a previous device used by the user

So what has this to do with security?

Well, I don;t care for a device being registered to my Asterisk box. With the above way, I can use VERY strong passwords for device registration, for that will only happen once or with new devices. Security measure 1.

For a user to be able to log on to a device, they have to dial the 'log on' extension, as an expample '100'. Then they are greeted with an IVR that will request the user to enter his user PIN. If accepted, the device will be 'attached' to the user and the correct ACL/Contexts will be included for this user. Security measure 2 (PIN), Security measure 3 (Log on extension), security measure 4 (Correctly respond to IVR)

In order to prevent automatic brute force attacks on user PIN's. A very simple security question can be asked (random questions) on which the user will always know the answer, and punch some digits. e.g. How many sun''s are there, or how many states do the USA have. Security measure 5.

So instead of registering a device and have all rights, the above will require (in an easy way) 5 security measures to prevent unauthorized access to your dialplan and trunks. Next to this, you have real hot desking including MWI. I even demonstrated it on using Citrix and SUN Ray. A device MAC was 'attached' to a work desk computer MAC (in the asterisk database). The windows logon script passed username and password to Asterisk, where a script would logon the device with the correct credentials and voila, MWI went on for there were messages waiting for user 5011.

I should have the old dialplan somewhere but again it was back in 2005.

Am I making any sence?

guest

ps. A device will never be called, so 9011 is just a device, a user is called and one would dial 5501 to reach the user.

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Sail system broken into - how to improve security?
« Reply #10 on: May 22, 2010, 11:56:32 PM »
@RequestedDeletion

This is way off topic.  If you want to discuss hot-desking then please start a new thread.  Also you may want to read here

http://sarkpbx.com/twiki/bin/view/Main/DocChapter2526

to see what is already available.

Kind Regards

S

guest22

Re: Sail system broken into - how to improve security?
« Reply #11 on: May 23, 2010, 12:25:35 AM »
Obviously you mis interpreted my post. It was not about Hot Desking for I know how to do that incl. MWI and all attached. It was about how to improve security. Including user ACL, security questions and separate devices/extensions from what a real user can do.

I was replying to the question raised by Chris on how SECURITY can be improved, and I'm a bit disappointed in your 'defensive' reply on this forum. Hot Desking is a natural result of seperating devices and users. Hence the mechanism of separating devices and users.
Are my thoughts interfering with your commercial Hot Desking feature?

I am not off topic, and excuse me for not accepting your company reply on a contribs.org forum. There are many out there that may have an opinion or some thoughts on this. Maybe even people that want to implement the 5 security step mechanism. Wasn't that the question raised by Chris????

I will look up the old AGI script and dialplan and share it with all. Is that OK with you? I rather see you guys picking up on this and implement it, for it would take you about 1 day to implement it.

Regards,
guest

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: Sail system broken into - how to improve security?
« Reply #12 on: May 23, 2010, 06:36:01 AM »
I am not off topic, and excuse me for not accepting your company reply on a contribs.org forum. There are many out there that may have an opinion or some thoughts on this. Maybe even people that want to implement the 5 security step mechanism. Wasn't that the question raised by Chris????

HF, I really think that it would be better starting a new topic.  Whilst what you are discussing is of interest, it is clouding the current discussion.
Thanks.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: Sail system broken into - how to improve security?
« Reply #13 on: May 23, 2010, 08:05:05 AM »
Hello Sark Devs (Jeff / Sam).

I have Sail installed on general purposes production boxes as opposed to dedicated box to save hardware costs and power... From my reading, I think the best bet now is for me to uninstall the current version installed on these boxes, we are talking of smeserver-asterisk-1.2.20-8 and sail-2.2.1-587 (yes, I know...). 

Before doing this, I propose to delete all extensions (not that many anyway) and trunks, then move:
/home/e-smith/db/selintra
/var/lib/asterisk/sounds/usergreeting*  (not used antway)
/var/log/asterisk/cdr-csv/Master.csv
/var/spool/asterisk/voicemail .(don't care...)
Somewhere safe, I will use the db later to restore configs with aelmerge.tgz

Then install latest Asterisk (asterisk-1.4.28) from sources and Sail  sail-2.4.1-23

Then Setup trunks and extension with new password and all the nice security features you have added to the system since 2007...

Finally, add a custom template top add alwaysauthreject=yes to sip.cong and figure out how to use ACL checking.  I will NOT allow any remote extensions at this stage.

Does this make sense?

Thanks for advise and regards
chris



- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline gippsweb

  • ****
  • 232
  • +0/-0
    • Wots I.T.?
Re: Sail system broken into - how to improve security?
« Reply #14 on: May 24, 2010, 03:19:49 AM »
I've also created a custom firewall template and have been blocking the ip addresses that come up in the logs as per http://wiki.contribs.org/Firewall