[Asterisk-bsd] Securing Asterisk with a DID

Frank Griffith glassdude45 at yahoo.com
Mon Aug 30 04:31:52 CDT 2010


Once again thanks for the advice. I am too much of a noob to understand what's 
happening here. This is an entry from the log file from this morning. The 
thieves tried again to use my server but since my provider as no credit on my 
account they are being rejected. Okay that's cool but now it appears that they 
are getting in through my asterisk server not through the DID #. Note I have 
"x"ed out the information I need to remain private in this entry. The IP address 
100.100.100.100 is actually my IP address from Comcast.

"","xxxxxxxxxx","011972599544327","default","xxxxxxxxxx","SIP/100.100.100.100-00000004","SIP/my_voip_provider-00000005","Hangup","","2010-08-30
 04:37:55",,"2010-08-30 04:37:58",3,0,"NO 
ANSWER","DOCUMENTATION","1283143075.4",""
 
Some of the log file entires show other outside IP addresses instead of my 
router's IP address. A couple of them actually show 127.0.0.1 which leads me to 
believe they have gotten access to my asterisk server. This boggle my mind 
because without the username and password how would asterisk allow them to make 
calls. I understand how they could do this using the DID because my dialplan was 
weak. But it now appears they did not use the DID # instead they hacked in 
through some method.




________________________________
From: Tim St. Pierre <tim at communicatefreely.net>
To: Asterisk on BSD discussion <asterisk-bsd at lists.digium.com>
Sent: Sun, August 29, 2010 11:37:38 PM
Subject: Re: [Asterisk-bsd] Securing Asterisk with a DID

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The IP address should tell you a lot.

If the IP address that the calls come from does not belong to your DID provider, 
then the call
didn't come in on your DID.

Some things you may want to look at -

In your sip.conf, before you declare any peers, what context are you pointing 
"anonymous" calls to?

If it still says default, anything in your default context is accessible to 
anyone from anywhere.

An easy way to fix this is to change it to something like "public", then create 
a public context
that only allows calls to extensions, or other places you want the public at 
large to be able to access.

Good luck!

- -Tim

Frank Griffith wrote:
> Thanks. I'm still a novice at hardening my asterisk system. I never had
> any trouble until recently. I think someone found my DID number and
> that's what the source of the hack is, not actually through my asterisk
> server. But the VOIP provider is convinced that's how it happened. But
> wouldn't the /var/log/asterisk/cdr-cvs/Master.csv file show which
> extension they used. And I'm not seeing any of the illegal calls being
> logged with an extension in my asterisk sip.conf file. They are logged
> with an IP address...which again I don't know how to interpret other
> than running a whois and seeing that alot of them originate from Amsterdam.
>  
>  
> ------------------------------------------------------------------------
> *From:* Tim St. Pierre <tim at communicatefreely.net>
> *To:* Asterisk on BSD discussion <asterisk-bsd at lists.digium.com>
> *Sent:* Sun, August 29, 2010 9:07:07 PM
> *Subject:* Re: [Asterisk-bsd] Securing Asterisk with a DID
> 
> You mean, you didn't before?
> 
> I wouldn't really call them a terrorist if there was nothing stopping
> them from dialing through your
> system.  Oppertunist, unscrupulous perhaps.  Terrorists generally try to
> cause mass destruction or
> panic in a large group of people.
> 
> At any rate, it isn't hard.
> 
> You could use vm_authenticate, which will authenticate based on the
> voice mail password, or just
> plain authenticate.
> 
> You should also do some pattern matching on the numbers that are input,
> before the call is sent back
> out.  Do you really need to call anywhere in the world, or just certain
> places?  You could restrict
> the destinations, which might save you if someone figures your password out.
> 
> -Tim
> 
> Frank Griffith wrote:
>> I have a DID with a VOIP provider which has worked pretty well. Until
>> some terrorist of some one of similar liking discovered it and used up
>> all my credits calling Israel, Morroco and Cuba. I would like to find
>> out how to be able to setup this DID so that only I could call into it
>> and access my service for making outside calls. I could disable this all
>> together but then that defeats my reason for needing the DID in the
>> first place. Is there a way to perhaps password protect this, that is
>> when I call in I have to enter a password before being allowed to dial
> out?
> 
> 
> 

- --
_____________________________________________________________________
- -- Bandwidth and Colocation Provided by http://www.api-digital.com --

Asterisk-BSD mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-bsd


- --
Tim St. Pierre
IP Voice technician
Communicate Freely
1-877-291-8647 x5101
sip:5101 at communicatefreely.net
tim at communicatefreely.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iJwEAQECAAYFAkx7J4IACgkQipVy80Kcc6sDDgQAg7KB5Ngbr5H7gB5LOPGCH+lh
1kzD+XCcoZcq4W8SY6uCTpVi5Jdua6DI8pdWMRRrkkMOPpbyp8/dgIBZuIFMQ+th
04/8W3K8gwWyiljLy1qCmFdklJO1g4LZYsXVqY4jsmWor2rEs17l1WnYUJnFEH+v
gmD6ROuwkUCqUBM0dM4=
=S16L
-----END PGP SIGNATURE-----

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Asterisk-BSD mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-bsd



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-bsd/attachments/20100830/e97c406a/attachment.htm 


More information about the Asterisk-BSD mailing list