Discussion:
[asterisk-users] is encrypted iax safe and secure?
Cavalera Claudio Luigi
2008-02-05 15:22:29 UTC
Permalink
Hello,
I'm doing some research concerning iax encryption, I haven't find any
clients (softphones or hardphones) which implement so I have not tested
it yet.

There was also this message on asterisk-security mailing list
http://archives.free.net.ph/message/20070507.101933.222987b2.en.html
which got no answers and this makes me think that this iax encryption is
not much interesting for the community.

Anyway, in iax specification there is this statement:
"Only the data portion of the messages are encoded."

Which are the consequences of this, is it true as stated on
http://www.voip-info.org/wiki/view/IAX+encryption
that
"The calling/called numbers are still passed in the clear over encrypted
IAX, so you are still vulnerable to traffic analysis."
?

If it's true how to deal with this?
Would you consider media payload encryption enough?
Maybe it's better to just forget about iax encryption and consider some
more general approach like using openvpn
http://www.voip-info.org/wiki/view/IAX_OpenVPN ?

This half-encrypted iax encryption doesn't make much sense to me,
therefore I think there's probably something I'm
missing/misunderstanding.

Best Regards,
Claudio


Internet Email Confidentiality Footer
-----------------------------------------------------------------------------------------------------
La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.

This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.
-----------------------------------------------------------------------------------------------------
Tilghman Lesher
2008-02-07 00:36:39 UTC
Permalink
Post by Cavalera Claudio Luigi
Hello,
I'm doing some research concerning iax encryption, I haven't find any
clients (softphones or hardphones) which implement so I have not tested
it yet.
There was also this message on asterisk-security mailing list
http://archives.free.net.ph/message/20070507.101933.222987b2.en.html
which got no answers and this makes me think that this iax encryption is
not much interesting for the community.
"Only the data portion of the messages are encoded."
Which are the consequences of this, is it true as stated on
http://www.voip-info.org/wiki/view/IAX+encryption
that
"The calling/called numbers are still passed in the clear over encrypted
IAX, so you are still vulnerable to traffic analysis."
?
If it's true how to deal with this?
Would you consider media payload encryption enough?
Maybe it's better to just forget about iax encryption and consider some
more general approach like using openvpn
http://www.voip-info.org/wiki/view/IAX_OpenVPN ?
This half-encrypted iax encryption doesn't make much sense to me,
therefore I think there's probably something I'm
missing/misunderstanding.
Is it important for you to conceal that a call was made from abc to xyz on
thus-and-such a date? Or do you merely need to conceal the content of a
call? You can already do traffic analysis and figure out that a call
occurred, just not what the endpoints are (even if you encrypted the entire
link). The only way to get around that is to continuously send random garbage
through the pipe at the same rate and consistency as would occur with a real
IAX2 call. And the endpoints are only as specific as the systems on either
end choose to make them. If you used some system of src/dst obfuscation, you
could conceal even that information, though repeated calls to various
destinations could still be paired and correlated.

IAX2 encryption is designed to obscure the same information as is obscured
when you encrypt a call over the PSTN -- the content is protected, but the
existence of such a call is not. Remember that a potential attacker will
always choose the weakest link, and will probably attack the audio stream
at a different location, if she cannot listen to the IP stream directly (such
as a true wiretap on an analog endpoint or breaking into one of the two
machines involved in the encryption). The idea is to make the IAX2 link
unattractive as a potential target of wiretapping (whereas before it would
have been the most obvious choice), thus forcing the attacker to choose a
different attack scenario.
--
Tilghman
Tim Panton
2008-02-07 11:11:19 UTC
Permalink
Post by Tilghman Lesher
Post by Cavalera Claudio Luigi
Hello,
I'm doing some research concerning iax encryption, I haven't find any
clients (softphones or hardphones) which implement so I have not tested
it yet.
There was also this message on asterisk-security mailing list
http://archives.free.net.ph/message/20070507.101933.222987b2.en.html
which got no answers and this makes me think that this iax
encryption is
not much interesting for the community.
"Only the data portion of the messages are encoded."
Which are the consequences of this, is it true as stated on
http://www.voip-info.org/wiki/view/IAX+encryption
that
"The calling/called numbers are still passed in the clear over encrypted
IAX, so you are still vulnerable to traffic analysis."
?
If it's true how to deal with this?
Would you consider media payload encryption enough?
Maybe it's better to just forget about iax encryption and consider some
more general approach like using openvpn
http://www.voip-info.org/wiki/view/IAX_OpenVPN ?
This half-encrypted iax encryption doesn't make much sense to me,
therefore I think there's probably something I'm
missing/misunderstanding.
Is it important for you to conceal that a call was made from abc to xyz on
thus-and-such a date? Or do you merely need to conceal the content of a
call? You can already do traffic analysis and figure out that a call
occurred, just not what the endpoints are (even if you encrypted the entire
link). The only way to get around that is to continuously send random garbage
through the pipe at the same rate and consistency as would occur with a real
IAX2 call. And the endpoints are only as specific as the systems on either
end choose to make them. If you used some system of src/dst
obfuscation, you
could conceal even that information, though repeated calls to various
destinations could still be paired and correlated.
IAX2 encryption is designed to obscure the same information as is obscured
when you encrypt a call over the PSTN -- the content is protected, but the
existence of such a call is not. Remember that a potential attacker will
always choose the weakest link, and will probably attack the audio stream
at a different location, if she cannot listen to the IP stream
directly (such
as a true wiretap on an analog endpoint or breaking into one of the two
machines involved in the encryption). The idea is to make the IAX2 link
unattractive as a potential target of wiretapping (whereas before it would
have been the most obvious choice), thus forcing the attacker to choose a
different attack scenario.
--
Tilghman
________________________
Also if you _really_ care about concealing the dialed number
you can do it just fine.

The simplest way is to have a single exten that takes _all_ encrypted
calls,
then once the call is up, dial 'onwards' with DTMF, the DTMF frames
would
be encrypted.

In fact IAX kinda supports this at the protocol level (although I
don't know of a working implementation
apart from the iAXy perhaps, but that doesn't do crypto...).

The NEW frame doesn't _have_ to contain a dialed number, the digits
can be sent later
(I forget the frametype), but later means within the encrypted
session :-)

Tim.
Kevin P. Fleming
2008-02-15 17:31:34 UTC
Permalink
Post by Tim Panton
The NEW frame doesn't _have_ to contain a dialed number, the digits
can be sent later
(I forget the frametype), but later means within the encrypted
session :-)
It's the DIAL command that you are thinking of. I'm considering
implementing this, but it has one major caveat: to really do the job
right, we wouldn't want any caller information (CLID or CNAM) to be in
the NEW message either, it would have to be added as IEs to the DIAL
command. Unfortunately no existing implementations are going to be
prepared to receive that information as part of DIAL, so they would
process this sort of call with an empty CLID and CNAM. We can of course
enhance chan_iax2 to understand this method of doing things, but it
won't be backward compatible with previous versions of Asterisk or any
other IAX2 clients.
--
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)
Steve Johnson
2008-02-15 18:57:46 UTC
Permalink
Of course *it would be nice if* the IAX2 authentication parameters
were also encrypted, so that there was no danger of a 3rd party
hijacking your connection and generating a bunch of extra charges.

S.
Post by Kevin P. Fleming
Post by Tim Panton
The NEW frame doesn't _have_ to contain a dialed number, the digits
can be sent later
(I forget the frametype), but later means within the encrypted
session :-)
It's the DIAL command that you are thinking of. I'm considering
implementing this, but it has one major caveat: to really do the job
right, we wouldn't want any caller information (CLID or CNAM) to be in
the NEW message either, it would have to be added as IEs to the DIAL
command. Unfortunately no existing implementations are going to be
prepared to receive that information as part of DIAL, so they would
process this sort of call with an empty CLID and CNAM. We can of course
enhance chan_iax2 to understand this method of doing things, but it
won't be backward compatible with previous versions of Asterisk or any
other IAX2 clients.
--
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Kevin P. Fleming
2008-02-18 15:12:59 UTC
Permalink
Post by Steve Johnson
Of course *it would be nice if* the IAX2 authentication parameters
were also encrypted, so that there was no danger of a 3rd party
hijacking your connection and generating a bunch of extra charges.
Can you elaborate? I don't see any way that a connection can be
'hijacked' as you put it.
--
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)
Cavalera Claudio Luigi
2008-02-13 15:55:43 UTC
Permalink
Post by Tilghman Lesher
Is it important for you to conceal that a call was made from
abc to xyz on
thus-and-such a date? Or do you merely need to conceal the
content of a
call?
I was thinking about concealing called and calling number in a generic
iax2 call, I hadn't even thinked about concealing the call itself. :-)

Another not so related question, during iax2 registration is "username"
Information Element always sent in clear?
I guess it is in clear since the first REGREQ even in the case of RSA or
MD5 based authentication.

Thanks,
Claudio


Internet Email Confidentiality Footer
-----------------------------------------------------------------------------------------------------
La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.

This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.
-----------------------------------------------------------------------------------------------------
Cavalera Claudio Luigi
2008-02-18 15:43:19 UTC
Permalink
-----Original Message-----
Kevin P. Fleming
Sent: Monday, February 18, 2008 4:13 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] is encrypted iax safe and secure?
Post by Steve Johnson
Of course *it would be nice if* the IAX2 authentication parameters
were also encrypted, so that there was no danger of a 3rd party
hijacking your connection and generating a bunch of extra charges.
Can you elaborate? I don't see any way that a connection can be
'hijacked' as you put it.
John Von Essen
2008-02-19 01:04:54 UTC
Permalink
Before I attempt to program a system like this, I wanted to see if: A)
its possible, and B) its too insanely difficult for a perl developer.

My office building has a dialer on the front door so people can call me
and gain access. The dialer on the door has a full keypad, and
basically just rings through to me, when I answer I can talk to the
person, they talk back, and if I want to let them in I hit 9 on my
phone - and the system unlocks the door.


Here's my dilemma, sometimes people need to get in when I'm not around.
The dialer can follow me, and go to my cell phone - but I dont always
answer that.

So I am wondering if its possible to build an interactive prompt/menu
system so when the dialer rings the number, the interactive system
runs, user must enter an account number, then pass code, and the system
verifies, if everything checks out, the system will then send the 9
tone back through, and the door will open.

Does this sound like something doable? I am very proficient Perl
developer, but need a push in the right direction.

Thanks
John
Tilghman Lesher
2008-02-19 06:25:19 UTC
Permalink
Post by John Von Essen
Before I attempt to program a system like this, I wanted to see if: A)
its possible, and B) its too insanely difficult for a perl developer.
My office building has a dialer on the front door so people can call me
and gain access. The dialer on the door has a full keypad, and
basically just rings through to me, when I answer I can talk to the
person, they talk back, and if I want to let them in I hit 9 on my
phone - and the system unlocks the door.
Here's my dilemma, sometimes people need to get in when I'm not around.
The dialer can follow me, and go to my cell phone - but I dont always
answer that.
So I am wondering if its possible to build an interactive prompt/menu
system so when the dialer rings the number, the interactive system
runs, user must enter an account number, then pass code, and the system
verifies, if everything checks out, the system will then send the 9
tone back through, and the door will open.
Does this sound like something doable? I am very proficient Perl
developer, but need a push in the right direction.
extensions.conf:
exten => s,1,Answer
exten => s,n,Read(account,account-prompt)
exten => s,n,Read(passcode,passcode-prompt)
exten => s,n,GotoIf(${ODBC_LOOKUP(${account},${passcode})}?granted)
exten => s,n,Playback(denied)
exten => s,n,Hangup
exten => s,n(granted),SendDTMF(123456789)
exten => s,n,Hangup

func_odbc.conf:
[LOOKUP]
dsn=mysql-asterisk
read=SELECT COUNT(*) FROM passcode_table WHERE account='${ARG1}' AND
passcode='${ARG2}'
--
Tilghman
John Von Essen
2008-02-21 14:44:11 UTC
Permalink
This may be a dumb question, but I have never done menus, how do I link
the below up to my phone number? For example, right now I route calls
to the SIP phone like so:

[ipcomms]
include = default
exten => 2155551212, 1, Dial(SIP/6000,20,tr)

where ipcomms is my context from sip.conf for origination, and 6000 is
my sip phone. So how do I connect that 215 number to the below menu
system?

Thanks
John
Post by Tilghman Lesher
exten => s,1,Answer
exten => s,n,Read(account,account-prompt)
exten => s,n,Read(passcode,passcode-prompt)
exten => s,n,GotoIf(${ODBC_LOOKUP(${account},${passcode})}?granted)
exten => s,n,Playback(denied)
exten => s,n,Hangup
exten => s,n(granted),SendDTMF(123456789)
exten => s,n,Hangup
[LOOKUP]
dsn=mysql-asterisk
read=SELECT COUNT(*) FROM passcode_table WHERE account='${ARG1}' AND
passcode='${ARG2}'
--
Tilghman
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Tilghman Lesher
2008-02-21 16:58:55 UTC
Permalink
Post by John Von Essen
This may be a dumb question, but I have never done menus, how do I link
the below up to my phone number? For example, right now I route calls
[ipcomms]
include = default
exten => 2155551212, 1, Dial(SIP/6000,20,tr)
where ipcomms is my context from sip.conf for origination, and 6000 is
my sip phone. So how do I connect that 215 number to the below menu
system?
Use a Goto:

Goto(s,1) or Goto(menucontext,s,1)
--
Tilghman
Loading...