Hello,

In GSM the BS can force the mobile TE to run the call in unencrypted mode;
this feature is used, for example, to sniff GSM calls with IMSI
catchers; for more details see

http://en.wikipedia.org/wiki/IMSI-catcher

I was investigating this a bit in the log file fsogsmd.log and have some
kind of surprise and some questions:

A 'grep CPRI fsogsmd.log' after a fresh reboot shows that %CPRI=1 is
enabled, i.e. during a phone call the device will show if or if not
encryption takes place:

fsogsmd.log:2012-03-23T14:46:00.026356Z [INFO]  libfsotransport <0710:3>: SRC: 
"%CPRI=1" -> [ "OK" ]
fsogsmd.log:2012-03-23T14:46:55.872445Z [INFO]  libfsotransport <0710:3>: URC: 
[ "%CPRI: 1,2" ]

the meaning of "%CPRI: 1,2", is that: '1' is for GSM (ciphering enabled)
and the '2' for GPRS (ciphering state not applicable)

now I did some phone call (in/out) and always ciphering was shown and
enabled:

fsogsmd.log:2012-03-23T14:47:03.324784Z [INFO]  libfsotransport <0710:3>: URC: 
[ "%CPRI: 1,2" ]
fsogsmd.log:2012-03-23T14:48:33.408969Z [INFO]  libfsotransport <0710:3>: URC: 
[ "%CPRI: 1,2" ]
fsogsmd.log:2012-03-23T14:50:24.799359Z [INFO]  libfsotransport <0710:3>: URC: 
[ "%CPRI: 1,2" ]

now I let the FR suspending and waked it up again; and during the
re-init of the modem it is set to "do not show encryption" on call, i.e.
is is switched of with "%CPRI=0":

fsogsmd.log:2012-03-23T14:52:13.633599Z [INFO]  libfsotransport <0710:3>: SRC: 
"%CPRI=0" -> [ "OK" ]
fsogsmd.log:2012-03-23T14:54:09.952246Z [INFO]  libfsotransport <0710:3>: SRC: 
"%CPRI=0" -> [ "OK" ]

Why is this?

Another question is, when I try from userland to switch cipher
notification on again, it seems that this chat(1) does not work:

root@om-gta02:~# chat -vs < /dev/ttySAC0 > /dev/ttySAC0 '' 'AT%CPRI=1'

What I'm doing wrong here with chat(1)? 

I'm attaching as well an older thread from the comunity list from last
year;

In general I think that 

a) SHR should switch cipher notification to on
b) SHR should show during the call if the call is encrypted or not on
the screen (and not only in the log files);

any comments on this?

Thanks

        matthias


----- Forwarded message from Matthias Apitz <g...@unixarea.de> -----

Date: Tue, 5 Jul 2011 07:57:24 +0200
From: Matthias Apitz <g...@unixarea.de>
To: Timo Juhani Lindfors <timo.lindf...@iki.fi>
Cc: List for Openmoko community discussion <commun...@lists.openmoko.org>
Subject: Re: FR && non encrypted calls

El día Monday, July 04, 2011 a las 09:35:24AM +0300, Timo Juhani Lindfors 
escribió:

> Matthias Apitz <g...@unixarea.de> writes:
> > Is the FR capable to show that the call runs in non encrypted mode
> > because the BS forced the ME to this mode? The question is for Om2008.9
> > but as well valid for any other distribution running on the FR.
> 
> I think the GSM part (Calypso) delivers this information in the AT%CPRI
> message. With ogsmd (part of the python version of fso-frameworkd) I
> have lines like
> 
> Jul  3 11:57:43 ginger org.freesmartphone.GSM.Network.CypherStatus: enabled: 
> unknown
> 
> in /var/log/syslog.
> 
> om2008.9 does not use ogsmd afaik but gsmd.

I did some tests sending down AT-cmds with the 'chat' command
and watching the AT chatting in /var/log/messages:

Per default it is set to off:

root@om-gta02:~# chat -vs < /dev/ttySAC0 > /dev/ttySAC0 '' 'AT%CPRI?'

Jul  5 07:39:50 om-gta02 local2.info chat[1556]: send (AT%CPRI?^M)
Jul  5 07:39:50 om-gta02 user.notice root: AtChat :  ? : "%CPRI: 0" 
Jul  5 07:39:50 om-gta02 user.notice root: AtChat :  ? : "OK" 

Then I switched it on with:

root@om-gta02:~# chat -vs < /dev/ttySAC0 > /dev/ttySAC0 '' 'AT%CPRI=1'

which gives in the /var/log/messages:

Jul  5 07:41:37 om-gta02 local2.info chat[1557]: send (AT%CPRI=1^M)
Jul  5 07:41:37 om-gta02 user.notice root: AtChat :  ? : "OK" 

then I dialed a number:

Jul  5 07:43:49 om-gta02 user.notice root: AtChat :  T : "ATD089xxxxxxxx;" 
Jul  5 07:43:51 om-gta02 user.notice root: AtChat :  N : "+CSSI: 1" 
Jul  5 07:44:17 om-gta02 user.notice root: AtChat :  F : "OK" 
Jul  5 07:44:17 om-gta02 user.notice root: Modem : 
QModemCall::dialRequestDone() 
Jul  5 07:44:17 om-gta02 user.notice root: AtChat :  T : "AT+CLCC" 
Jul  5 07:44:17 om-gta02 user.notice root: AtChat :  F : "%CPRI: 1,2" 
Jul  5 07:44:17 om-gta02 user.notice root: AtChat :  F : "OK" 
Jul  5 07:44:17 om-gta02 user.notice root: Modem :  dialing was ok, we are 
connected 
Jul  5 07:44:23 om-gta02 user.notice root: Modem :  QModemCall::hangup() 
Jul  5 07:44:23 om-gta02 user.notice root: AtChat :  T : "AT+CHLD=1" 
Jul  5 07:44:23 om-gta02 user.notice root: Modem :  hangup groups 
Jul  5 07:44:23 om-gta02 user.notice root: AtChat :  F : "OK" 

as you see, one of the result code of the TE is "%CPRI: 1,2", where the
'1' is for GSM (ciphering enabled) and the '2' for GPRS (ciphering state
not applicable), see also page 167 for the values in
http://www.cartft.com/support_db/support_files/CTFPND-3_AT_Command_Reference.pdf

with a bit of tweaking, at least this information is visible in the log
files if the connection is ciphered or not.

HIH

        matthias
-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <g...@unixarea.de> - w http://www.unixarea.de/

_______________________________________________
Openmoko community mailing list
commun...@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community

----- End forwarded message -----

-- 
Matthias Apitz
e <g...@unixarea.de> - w http://www.unixarea.de/
UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5
_______________________________________________
Shr-devel mailing list
Shr-devel@lists.shr-project.org
http://lists.shr-project.org/mailman/listinfo/shr-devel

Reply via email to