CVE-2022-23835: A security analysis of Visual Voicemail
Visual Voicemail (VVM) systems send IMAP server credentials via SMS in response to a status request. An attacker who briefly intercepts SMS traffic or has SMS permissions can obtain these credentials and then access the victim's voicemail persistently, without further SMS access.
Published on gitlab.com
Initial commit
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
Visual Voicemail (VVM) lets a phone download and present voicemails in an application instead of dialling a number and listening to them serially. It was first introduced by iOS, and Android added support in Android 6.0. There is an open standard for VVM, primarily governed by OMTP, but many carriers introduce their own tweaks.
Architecturally, VVM is a combination of SMS and an IMAP server. SMS provides a command and control channel: a client can activate, deactivate and request VVM status by sending an SMS to the carrier, and the carrier sends sync messages to the client when a new voicemail arrives. The voicemails themselves are retrieved and managed through an IMAP server, where each voicemail is really an email with an audio attachment.
The findings in this write-up were filed as CVE-2022-23835 and with CERT/CC as Case VU#383864. The author tested a proof of concept against T-Mobile USA and AT&T USA. Verizon Wireless USA was not fully tested, but the same proof of concept can be used to check it. MVNOs typically reuse the same VVM infrastructure as their parent network, so findings for a parent carrier likely apply to its MVNOs.
Setup
The precondition for the attack is short-lived access to a victim's SMS: hijacking the SIM card, man-in-the-middle of the cell tower, or a rogue application with SMS access. The author's own client for mainline mobile Linux, vvmd, contains the logic to process and capture T-Mobile USA, AT&T USA and VZW USA VVM credentials.
All client VVM SMS messages go to a specific number, called the VVM Destination Number in the write-up. There are three types of client-originated SMS: activation (request activation of VVM for a client number), deactivation (request deactivation), and status (request the status of the VVM subscription). When a client sends any of these, the carrier responds with all the credentials needed to log into the IMAP server: username, password and server host name.
From the OMTP specification, section [redacted], a status message from the carrier to the client has a structure similar to:
//VVM:STATUS:st=N;rc=0;srv=1:[redacted];tui=123;dn=999;ipt=143;spt=25;u=[redacted];pw=32u4yguetrr34;lang=eng|fre;g_len=25;vs_len=15;pw_len=4-6;smtp_u=[redacted];smtp_pw=48769463wer;pm=Y;gm=N;vtc=D;vt=1
The key attributes are u=[redacted] (the username), pw=32u4yguetrr34 (the password) and srv=1:[redacted] (the IMAP server to access).
Finding it
The problem is that the carrier sends the IMAP credentials in an SMS. Anyone who can read that SMS for a moment obtains the username, password and server host name, and can then log into the victim's voicemail over the internet. The SMS command and control channel is designed to be transparent to the user, so the message carrying the credentials is hidden from the normal messaging interface on several platforms, which makes the theft hard to notice.
Exploitation
Step 1: Obtain the credentials SMS
The attacker needs to see the carrier's response to an activation or status SMS. The author lists several ways to get there.
Malicious application. While using the Android AT&T VVM application, it asked for access to SMS and then sent the activation SMS. There was no user notification of the received SMS, which appears to be intentional behaviour: certain messages do not show up in the AOSP SMS/MMS messaging application. The VVM application nonetheless received the credentials and logged in. The author was also able to subscribe and unsubscribe from T-Mobile by sending the activation and deactivation SMS to the T-Mobile VVM Destination Number through the AOSP SMS/MMS messaging application. Based on this, the author believes a malicious application with SMS permissions on Android can access or eavesdrop the VVM credentials, or send an SMS to obtain them.
The author is unfamiliar with iOS and its application permissions, so does not know whether a standard iOS application can access SMS the same way, but suspects spyware similar to Pegasus would be able to capture VVM credentials.
On mainline mobile Linux with the Modem Manager stack, VVM SMSes are treated as ordinary text messages. Some distributions, such as postmarketOS, limit SMS read and write access via Polkit, but many do not, so applications with user access can gain SMS permissions and the credentials. vvmd stores VVM credentials in an ordinary text file in the user's home folder, so anyone with access to that folder can steal them.
Rogue cell tower. SMS has no client authentication, so the author assumes a rogue cell tower (for example a stingray) can man-in-the-middle SMS to gain the credentials.
SIM hijacking / "Evil Maid". A malicious actor can hijack the SIM card for a minute, limited by the time to swap the SIM and the round trip of two SMS messages, and will have access to the credentials.
Step 2: Read the carrier response for the target network
Each carrier formats the response differently. The examples below use fictitious credentials.
T-Mobile USA. SMS command and control deviates slightly from the specification. The client-originated messages are:
Activate:dt=6
Deactivate:dt=6
STATUS:dt=6
The VVM Destination Number is 127, and the carrier response looks like:
//VVM:STATUS:st=R;rc=0;srv=e3.vvm.mstore.msg.t-mobile.com;ipt=148;u=12065550100;pw=secure_pw;lang=1|2|3|4;g_len=180;vs_len=10;pw_len=4-9”
Here u=12065550100 is the username, pw=secure_pw is the password and srv=e3.vvm.mstore.msg.t-mobile.com is the IMAP server.
AT&T USA. AT&T obfuscates its VVM authentication but otherwise follows the same protocol. The VVM Destination Number is 94183567. On Android, AT&T's VVM is only supported through its proprietary application. On setup or status request, the Android client sends the following SMS, presumably the activation or status message:
GET?c=ATTV:Pixel 3a/11:4.4.0.10183&v=1.0&l=2065550100&AD
In this message Pixel 3a is the model number, 11 is Android 11, 4.4.0.10183 is the AT&T Visual Voicemail version, 1.0 is the VVM version (the author is not sure) and 2065550100 is the subscriber's own number. The author did not find a way to unsubscribe from VVM through the AT&T Android VVM application.
The carrier response is in the form:
vvm.mobile.att.net:5400?f=0&v=1010&m=2065550100&p=XFNXW1JUUlFcWTc2NTQ4&P=XFNXW1JUUlFcWTc2NTQ4&S=I&s=5433&i=143/993&t=4:2065550100:A:CMSGROUP024121413
Here m=2065550100 is the username, p=XFNXW1JUUlFcWTc2NTQ4 is the password and vvm.mobile.att.net is the IMAP server.
The AT&T password is numerical only (7 to 15 numbers) and is obfuscated in two steps: it is Base64 encoded, and then the first 10 numerical values are passed through a substitution cipher, while the last 5 stay plaintext. The lookup table, based on position, is:
Decoded | Position
| 1 2 3 4 5 6 7 8 9 10 11-15
----------------------------------------
0 | X T Q ^ Z S U U _ Y 00000
1 | Y U P _ [ R T T ^ X 11111
2 | Z V S \ X Q W W ] [ 22222
3 | [ W R ] Y P V V \ Z 33333
4 | \ P U Z ^ W Q Q [ ] 44444
5 | ] Q T [ _ V P P Z \ 55555
6 | ^ R W X \ U S S Y _ 66666
7 | _ S V Y ] T R R X ^ 77777
8 | P \ Y V R [ ] ] W Q 88888
9 | Q ] X W S Z \ \ V P 99999
The substitution depends on the digit's position: a 1 in the first position is Y, but a 1 in the fifth position is R; a 7 in the third position is V, but in the ninth position it is X. An example de-obfuscation:
Base64_decode(XFNXW1JUUlFcWTc2NTQ4)=\SW[RTRQ\Y76548
Lookup_table(\SW[RTRQ\Y76548)=476587743176548
An implementation of the decoder is referenced in vvmd at src/vvmutil.c. The author notes the deobfuscation method may have changed, but it was correct as of July 2021.
Verizon Wireless USA. VZW uses a slightly modified form of OMTP referred to as vvm3. The VVM Destination Number is 900080006200, and the client sends:
STATUS
The carrier response is in the form:
Here u=[redacted] is the username, pw=redacted is the password, srv=ch1lv.imsvm.com is the server and vmg_url=https://vmg.vzw.com/VMGIMS/VMServices is a URL that may be needed to activate VVM initially but is not necessary once it is activated. There is no way to deactivate VVM on VZW USA.
Step 3: Log into the IMAP server
The VVM IMAP server is a standard IMAP server, and all voicemails are emails with attachments. The specification, section 2.10.3, shows an example voice message:
Return-Path: <>
Received: from msuic1 ([redacted]) by MIPS.SITE1 (MIPS Email Server)
id 45879DD300000196 for [redacted]; Tue, 19 Dec 2006 12:12:09 +0200
subject: voice mail
MIME-Version: 1.0 (Voice Version 2.0)
Message-Id: <31.24.2326006@msu31_24>
Content-Type: Multipart/ voice-message; boundary="------------Boundary-00=_90NIQYRXFQQMYJ0CCJD0"
From: [redacted]
To: [redacted]
Content-Duration: 17
Message-Context: voice-message
Date: Tue, 19 Dec 2006 10:12:09 +0000 (UTC)
--------------Boundary-00=_90NIQYRXFQQMYJ0CCJD0
Content-Type: Text/Plain
Content-Transfer-Encoding: 7bit
click on attachment
--------------Boundary-00=_90NIQYRXFQQMYJ0CCJD0
Content-Type: audio/amr
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="vm.amr"
Content-Duration: 17
[message attachment]
--------------Boundary-00=_90NIQYRXFQQMYJ0CCJD0--
vm.amr is the actual voicemail; the attachment is omitted for brevity but is base64 encoded. More examples are in the vvmd unit tests.
AT&T uses standard IMAP SSL on port 993 with Digest-MD5 authentication. T-Mobile uses standard IMAP SSL on port 993 with Plain authentication. Both carriers' IMAP servers listen on the open internet and authenticate with username and password, so SIM or SMS access is not needed to log in once the credentials are known. VZW only allows access to its IMAP server from its mobile network, so a VZW (or MVNO) SIM is required to reach VZW voicemails.
Root cause
The design flaw is that the carrier delivers the IMAP username and password to the handset in an SMS, a channel with no client authentication. The SMS command and control architecture is intentionally hidden from the user, so the credential-bearing message is not visible in the normal messaging interface on Android or iOS. Because the IMAP server is reachable over the internet with only a username and password, the SMS is the single point at which the secret is exposed, and once it is captured the attacker no longer needs SMS or SIM access.
Impact
After the initial exploitation, the VVM IMAP server is accessible over the internet (though it may require the carrier's mobile internet, as with VZW), and only username and password are needed. SIM or SMS access is no longer required. The attacker has full access to the victim's VVM, the same access the victim has, and there is no indication to the victim that someone else has access. Android leaves voicemails on the IMAP server until the client deletes them, so any voicemails on the client are accessible to the attacker. vvmd deletes all voicemails after processing to reduce the risk of others downloading them; the iPhone's behaviour is unknown to the author.
The attack is often completely stealthy: on Android and iOS the victim will have no idea, and on mainline mobile Linux devices will only see a cryptic SMS. It is extremely difficult or impossible for the victim to change the VVM credentials to prevent unauthorised access. None of the activation, deactivation or status SMSes appear in the AT&T or T-Mobile usage web portals, and the author would be surprised if VZW showed them. On Android, SMS sent or received by the AOSP dialer does not appear in the AOSP Message app, and the AT&T VVM app says it will send SMSes and to ignore them. On iOS, none of these SMSes appear in the iMessage application. On the Pinephone Modem Manager stack, all status SMSes show up as regular SMS (in Chatty, mmcli and so on), but a user unfamiliar with VVM SMSes will likely not know what is happening.
Persistence is a problem. To the author's knowledge, T-Mobile does not change the VVM password for an account and has no mechanism to change it; it would not surprise the author if the password had not changed since the account was opened. AT&T only changes the password if a user manually changes it in the Android VVM application. The author does not know how often VZW changes it but saw no mechanism in Android or iOS to change it. The author found no way to change the password on the carriers' websites, saw no change when the IMEI associated with the SIM changed (despite the carrier knowing), and found no way to change it on an iPhone or in the Android AOSP dialer. The AT&T Android VVM application does allow changing the password (numerical, 7 to 15 digits), and vvmd does not support changing it.
Fix
The write-up does not describe a fix applied by any carrier. What it documents is the absence of a remedy: no vendor had reached out to the author or CERT/CC as of writing, and the carriers' own tools offer little or no way to rotate the VVM password.
Variants to test
- Other carriers and MVNOs. Send the carrier's activation or status SMS to its VVM Destination Number and inspect the reply.
- AT&T-style obfuscation. If the password field looks like Base64, decode it and apply the positional substitution table.
- IMAP reachability. Take captured credentials and connect to the advertised server on port 993 from outside the carrier network.
- Password rotation. Try changing the VVM password through the carrier website, the handset dialler and the VVM application, then log in with the old credentials.
- Visibility of the SMS. Check the messaging app, the carrier usage portal and the device logs after an activation or status exchange.
What happened, in plain words
Visual Voicemail (VVM) is the feature that lets your phone show your voicemails as a list inside an app, like emails, instead of making you dial a number and listen to them one after another. Apple's iOS introduced it, and Android added support in Android 6.0. There is an open standard for how it should work, mainly governed by an industry group called OMTP, but many mobile carriers add their own changes on top.
Under the surface, VVM is built from two ordinary pieces of internet plumbing:
- SMS, the short text messages your phone sends and receives. Here SMS is used as a control channel: the phone texts the carrier to switch voicemail on, switch it off, or ask for its status, and the carrier texts back when a new voicemail arrives.
- An IMAP server, which is the same kind of server that holds email. Each voicemail is really an email with an audio file attached.
The problem this write-up describes is simple to state: when the phone asks the carrier for VVM status, the carrier texts back the username and password for that IMAP mailbox, in a plain SMS. Anyone who can read that one text message for a moment gets the keys to the victim's voicemail. After that, they can log in over the internet from anywhere, and they no longer need the phone or the SIM card at all.
The findings were filed as CVE-2022-23835 (CVE is a public catalogue number for a known security flaw) and with CERT/CC, a publicly funded team that helps coordinate vulnerability reports, as Case VU#383864. The author tested a proof of concept against T-Mobile USA and AT&T USA. Verizon Wireless USA was not fully tested, but the same proof of concept can be used to check it. MVNOs (smaller carriers that rent a big carrier's network) typically reuse the same VVM infrastructure as their parent network, so findings for a parent carrier likely apply to its MVNOs too.
Setup
The only precondition for the attack is short-lived access to a victim's SMS. That could be hijacking the SIM card (the small chip that identifies your phone to the network), a man-in-the-middle position at the cell tower (secretly sitting between the phone and the network and relaying messages), or a rogue application on the phone that has permission to read SMS.
The author's own client for mainline mobile Linux, vvmd, contains the logic to process and capture T-Mobile USA, AT&T USA and VZW USA VVM credentials. A "client" here just means the app on the phone that talks to the carrier and the mail server.
All client VVM SMS messages go to a specific number, called the VVM Destination Number in the write-up. There are three types of client-originated SMS:
- Activation: request activation of VVM for a client number.
- Deactivation: request deactivation of VVM for a client number.
- Status: request the status of the VVM subscription for a client number.
When a client sends any of these, the carrier responds with all the credentials needed to log into the IMAP server: username, password and server host name. Think of it as texting a shop "what is my locker combination?" and the shop texting the combination back in the clear.
From the OMTP specification, section [redacted], a status message from the carrier to the client has a structure similar to:
//VVM:STATUS:st=N;rc=0;srv=1:[redacted];tui=123;dn=999;ipt=143;spt=25;u=[redacted];pw=32u4yguetrr34;lang=eng|fre;g_len=25;vs_len=15;pw_len=4-6;smtp_u=[redacted];smtp_pw=48769463wer;pm=Y;gm=N;vtc=D;vt=1
Line by line, in plain words:
//VVM:STATUS:marks the start of a VVM status message, so the phone knows what kind of text this is.st=Nis a status code.rc=0is a return code.srv=1:[redacted]is the address of the IMAP server to connect to.tui=123is a telephone user interface setting.dn=999is a destination number.ipt=143andspt=25are port numbers (the numbered doors a server listens on).u=[redacted]is the username.pw=32u4yguetrr34is the password.lang=eng|frelists languages.g_len=25,vs_len=15andpw_len=4-6describe expected lengths of fields.smtp_u=[redacted]andsmtp_pw=48769463werare credentials for the outgoing mail server.pm=Y,gm=N,vtc=Dandvt=1are further flags.
The key attributes are u=[redacted] (the username), pw=32u4yguetrr34 (the password) and srv=1:[redacted] (the IMAP server to access). All the credentials in this document are fictitious.
Finding it
The problem is that the carrier sends the IMAP credentials in an SMS. Anyone who can read that SMS for a moment obtains the username, password and server host name, and can then log into the victim's voicemail over the internet. The SMS command and control channel is designed to be transparent to the user, so the message carrying the credentials is hidden from the normal messaging interface on several platforms, which makes the theft hard to notice. A useful comparison: it is like a bank that mails your card PIN to your house in an envelope with no seal, and then makes sure the envelope never appears in your letterbox where you would see it.
Exploitation
Step 1: Obtain the credentials SMS
The attacker needs to see the carrier's response to an activation or status SMS. The author lists several ways to get there.
Malicious application. While using the Android AT&T VVM application, it asked for access to SMS and then sent the activation SMS. There was no user notification of the received SMS, which appears to be intentional behaviour: certain messages do not show up in the AOSP SMS/MMS messaging application (AOSP is the open-source base that many Android builds are built from). The VVM application nonetheless received the credentials and logged in. The author was also able to subscribe and unsubscribe from T-Mobile by sending the activation and deactivation SMS to the T-Mobile VVM Destination Number through the AOSP SMS/MMS messaging application. Based on this, the author believes a malicious application with SMS permissions on Android can access or eavesdrop the VVM credentials, or send an SMS to obtain them. In everyday terms: an app you install can quietly read the text that contains your voicemail password.
The author is unfamiliar with iOS and its application permissions, so does not know whether a standard iOS application can access SMS the same way, but suspects spyware similar to Pegasus would be able to capture VVM credentials. Spyware is software that secretly monitors a device and reports back to whoever planted it.
On mainline mobile Linux with the Modem Manager stack, VVM SMSes are treated as ordinary text messages. Some distributions, such as postmarketOS, limit SMS read and write access via Polkit (a system that decides which programs may perform which privileged actions), but many do not, so applications with user access can gain SMS permissions and the credentials. vvmd stores VVM credentials in an ordinary text file in the user's home folder, so anyone with access to that folder can steal them. That is like keeping your house key in a labelled drawer that any visitor can open.
Rogue cell tower. SMS has no client authentication, so the author assumes a rogue cell tower (for example a stingray, a device that pretends to be a legitimate tower) can man-in-the-middle SMS to gain the credentials. "No client authentication" means the network does not check that the phone it is talking to is really your phone; anyone who can imitate the network side can sit in the middle.
SIM hijacking / "Evil Maid". A malicious actor can hijack the SIM card for a minute, limited by the time to swap the SIM and the round trip of two SMS messages, and will have access to the credentials. The name "Evil Maid" comes from the idea of someone briefly getting physical access to your device while you are out of the room.
Step 2: Read the carrier response for the target network
Each carrier formats the response differently. The examples below use fictitious credentials.
T-Mobile USA. SMS command and control deviates slightly from the specification. The client-originated messages are:
Activate:dt=6
Deactivate:dt=6
STATUS:dt=6
Line by line:
Activate:dt=6tells the carrier to switch VVM on for this number;dt=6is a device-type value the carrier expects.Deactivate:dt=6tells the carrier to switch VVM off.STATUS:dt=6asks the carrier for the current VVM status, which is the message that triggers the credentials reply.
The VVM Destination Number is 127, and the carrier response looks like:
//VVM:STATUS:st=R;rc=0;srv=e3.vvm.mstore.msg.t-mobile.com;ipt=148;u=12065550100;pw=secure_pw;lang=1|2|3|4;g_len=180;vs_len=10;pw_len=4-9”
Line by line:
//VVM:STATUS:marks a VVM status reply.st=Ris the status code.rc=0is the return code.srv=e3.vvm.mstore.msg.t-mobile.comis the IMAP server address.ipt=148is a port number.u=12065550100is the username.pw=secure_pwis the password.lang=1|2|3|4lists language codes.g_len=180,vs_len=10andpw_len=4-9describe expected field lengths.
Here u=12065550100 is the username, pw=secure_pw is the password and srv=e3.vvm.mstore.msg.t-mobile.com is the IMAP server.
AT&T USA. AT&T obfuscates its VVM authentication but otherwise follows the same protocol. "Obfuscates" means it disguises the password rather than protecting it properly; anyone who knows the disguise can undo it. The VVM Destination Number is 94183567. On Android, AT&T's VVM is only supported through its proprietary application. On setup or status request, the Android client sends the following SMS, presumably the activation or status message:
GET?c=ATTV:Pixel 3a/11:4.4.0.10183&v=1.0&l=2065550100&AD
Line by line:
GET?starts the request, like a web address asking for something.c=ATTV:Pixel 3a/11:4.4.0.10183identifies the client: the app name, the phone model, the Android version and the app version.v=1.0is the VVM version (the author is not sure).l=2065550100is the subscriber's own phone number.ADis a trailing marker.
In this message Pixel 3a is the model number, 11 is Android 11, 4.4.0.10183 is the AT&T Visual Voicemail version, 1.0 is the VVM version (the author is not sure) and 2065550100 is the subscriber's own number. The author did not find a way to unsubscribe from VVM through the AT&T Android VVM application.
The carrier response is in the form:
vvm.mobile.att.net:5400?f=0&v=1010&m=2065550100&p=XFNXW1JUUlFcWTc2NTQ4&P=XFNXW1JUUlFcWTc2NTQ4&S=I&s=5433&i=143/993&t=4:2065550100:A:CMSGROUP024121413
Line by line:
vvm.mobile.att.net:5400is the server address and port.f=0is a flag.v=1010is a version value.m=2065550100is the username (the subscriber's number).p=XFNXW1JUUlFcWTc2NTQ4is the obfuscated password.P=XFNXW1JUUlFcWTc2NTQ4repeats the same value.S=Iis a flag.s=5433is another value.i=143/993lists port numbers.t=4:2065550100:A:CMSGROUP024121413carries further routing information.
Here m=2065550100 is the username, p=XFNXW1JUUlFcWTc2NTQ4 is the password and vvm.mobile.att.net is the IMAP server.
The AT&T password is numerical only (7 to 15 numbers) and is obfuscated in two steps: it is Base64 encoded, and then the first 10 numerical values are passed through a substitution cipher, while the last 5 stay plaintext. Base64 is a way of writing any data using only letters, digits and a couple of symbols; it is not encryption, just a different alphabet. A substitution cipher swaps each character for another according to a fixed table. The lookup table, based on position, is:
Decoded | Position
| 1 2 3 4 5 6 7 8 9 10 11-15
----------------------------------------
0 | X T Q ^ Z S U U _ Y 00000
1 | Y U P _ [ R T T ^ X 11111
2 | Z V S \ X Q W W ] [ 22222
3 | [ W R ] Y P V V \ Z 33333
4 | \ P U Z ^ W Q Q [ ] 44444
5 | ] Q T [ _ V P P Z \ 55555
6 | ^ R W X \ U S S Y _ 66666
7 | _ S V Y ] T R R X ^ 77777
8 | P \ Y V R [ ] ] W Q 88888
9 | Q ] X W S Z \ \ V P 99999
How to read it: the left column is the real digit. The columns 1 to 10 show what that digit looks like when it sits in that position of the password. Columns 11 to 15 show that the last five digits are left as themselves. So the substitution depends on the digit's position: a 1 in the first position is Y, but a 1 in the fifth position is R; a 7 in the third position is V, but in the ninth position it is X. An example de-obfuscation:
Base64_decode(XFNXW1JUUlFcWTc2NTQ4)=\SW[RTRQ\Y76548
Lookup_table(\SW[RTRQ\Y76548)=476587743176548
Line by line:
Base64_decode(XFNXW1JUUlFcWTc2NTQ4)=\SW[RTRQ\Y76548turns the Base64 text back into the disguised password string.Lookup_table(\SW[RTRQ\Y76548)=476587743176548applies the table above to recover the real numerical password.
An implementation of the decoder is referenced in vvmd at src/vvmutil.c. The author notes the deobfuscation method may have changed, but it was correct as of July 2021.
Verizon Wireless USA. VZW uses a slightly modified form of OMTP referred to as vvm3. The VVM Destination Number is 900080006200, and the client sends:
STATUS
That single word asks the carrier for the VVM status, which triggers the credentials reply. The carrier response is in the form:
Line by line:
//VZWVVM:STATUS:marks a Verizon VVM status reply.st=Ris the status code.rc=0is the return code.srv=ch1lv.imsvm.comis the server address.ipt=143is a port number.u=[redacted]is the username.pw=redactedis the password.lang=1,2,3,4,5,6,7,8lists language codes.g_len=60,vs_len=10andpw_len=4-7describe expected field lengths.dev_t=5is a device type.vmg_url=https://vmg.vzw.com/VMGIMS/VMServicesis a web address used for activation.
Here u=[redacted] is the username, pw=redacted is the password, srv=ch1lv.imsvm.com is the server and vmg_url=https://vmg.vzw.com/VMGIMS/VMServices is a URL that may be needed to activate VVM initially but is not necessary once it is activated. There is no way to deactivate VVM on VZW USA.
Step 3: Log into the IMAP server
The VVM IMAP server is a standard IMAP server, and all voicemails are emails with attachments. The specification, section 2.10.3, shows an example voice message:
Return-Path: <>
Received: from msuic1 ([redacted]) by MIPS.SITE1 (MIPS Email Server)
id 45879DD300000196 for [redacted]; Tue, 19 Dec 2006 12:12:09 +0200
subject: voice mail
MIME-Version: 1.0 (Voice Version 2.0)
Message-Id: <31.24.2326006@msu31_24>
Content-Type: Multipart/ voice-message; boundary="------------Boundary-00=_90NIQYRXFQQMYJ0CCJD0"
From: [redacted]
To: [redacted]
Content-Duration: 17
Message-Context: voice-message
Date: Tue, 19 Dec 2006 10:12:09 +0000 (UTC)
--------------Boundary-00=_90NIQYRXFQQMYJ0CCJD0
Content-Type: Text/Plain
Content-Transfer-Encoding: 7bit
click on attachment
--------------Boundary-00=_90NIQYRXFQQMYJ0CCJD0
Content-Type: audio/amr
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="vm.amr"
Content-Duration: 17
[message attachment]
--------------Boundary-00=_90NIQYRXFQQMYJ0CCJD0--
Line by line:
Return-Path: <>andReceived: ...are headers that record where the message came from and which server handled it.subject: voice mailis the subject line.MIME-VersionandMessage-Ididentify the message format and give it a unique ID.Content-Type: Multipart/ voice-message; boundary=...says the message has several parts, separated by the boundary string.From:andTo:are the sender and recipient addresses.Content-Duration: 17says the recording is 17 seconds long.Message-Context: voice-messagelabels it as a voicemail.Date:is when it was sent.- The first boundary section has
Content-Type: Text/Plainand the textclick on attachment, a human-readable note. - The second boundary section has
Content-Type: audio/amr,Content-Transfer-Encoding: base64andContent-Disposition: attachment; filename="vm.amr", which is the audio file itself, encoded as Base64 text. - The closing boundary ends the message.
vm.amr is the actual voicemail; the attachment is omitted for brevity but is base64 encoded. More examples are in the vvmd unit tests.
AT&T uses standard IMAP SSL on port 993 with Digest-MD5 authentication. T-Mobile uses standard IMAP SSL on port 993 with Plain authentication. SSL is the encryption layer that protects the connection; Digest-MD5 and Plain are two ways of proving your password to the server. Both carriers' IMAP servers listen on the open internet and authenticate with username and password, so SIM or SMS access is not needed to log in once the credentials are known. VZW only allows access to its IMAP server from its mobile network, so a VZW (or MVNO) SIM is required to reach VZW voicemails.
Root cause
The design flaw is that the carrier delivers the IMAP username and password to the handset in an SMS, a channel with no client authentication. "Confidentiality" here means keeping the contents secret from anyone who can listen. The SMS command and control architecture is intentionally hidden from the user, so the credential-bearing message is not visible in the normal messaging interface on Android or iOS. Because the IMAP server is reachable over the internet with only a username and password, the SMS is the single point at which the secret is exposed, and once it is captured the attacker no longer needs SMS or SIM access. In other words, the whole security of the mailbox rests on one text message that the user never sees.
Impact
After the initial exploitation, the VVM IMAP server is accessible over the internet (though it may require the carrier's mobile internet, as with VZW), and only username and password are needed. SIM or SMS access is no longer required. The attacker has full access to the victim's VVM, the same access the victim has, and there is no indication to the victim that someone else has access. Android leaves voicemails on the IMAP server until the client deletes them, so any voicemails on the client are accessible to the attacker. vvmd deletes all voicemails after processing to reduce the risk of others downloading them; the iPhone's behaviour is unknown to the author.
The attack is often completely stealthy: on Android and iOS the victim will have no idea, and on mainline mobile Linux devices will only see a cryptic SMS. It is extremely difficult or impossible for the victim to change the VVM credentials to prevent unauthorised access. None of the activation, deactivation or status SMSes appear in the AT&T or T-Mobile usage web portals, and the author would be surprised if VZW showed them. On Android, SMS sent or received by the AOSP dialer does not appear in the AOSP Message app, and the AT&T VVM app says it will send SMSes and to ignore them. On iOS, none of these SMSes appear in the iMessage application. On the Pinephone Modem Manager stack, all status SMSes show up as regular SMS (in Chatty, mmcli and so on), but a user unfamiliar with VVM SMSes will likely not know what is happening.
Persistence is a problem. To the author's knowledge, T-Mobile does not change the VVM password for an account and has no mechanism to change it; it would not surprise the author if the password had not changed since the account was opened. AT&T only changes the password if a user manually changes it in the Android VVM application. The author does not know how often VZW changes it but saw no mechanism in Android or iOS to change it. The author found no way to change the password on the carriers' websites, saw no change when the IMEI associated with the SIM changed (despite the carrier knowing), and found no way to change it on an iPhone or in the Android AOSP dialer. The AT&T Android VVM application does allow changing the password (numerical, 7 to 15 digits), and vvmd does not support changing it. "Persistence" means the attacker keeps access after the initial trick is over, because the password never changes.
Fix
The write-up does not describe a fix applied by any carrier. What it documents is the absence of a remedy: no vendor had reached out to the author or CERT/CC as of writing, and the carriers' own tools offer little or no way to rotate the VVM password. "Revoked" means the carrier can cancel a credential so it stops working.
Variants to test
- Other carriers and MVNOs. Send the carrier's activation or status SMS to its VVM Destination Number and inspect the reply.
- AT&T-style obfuscation. If the password field looks like Base64, decode it and apply the positional substitution table.
- IMAP reachability. Take captured credentials and connect to the advertised server on port 993 from outside the carrier network.
- Password rotation. Try changing the VVM password through the carrier website, the handset dialler and the VVM application, then log in with the old credentials.
- Visibility of the SMS. Check the messaging app, the carrier usage portal and the device logs after an activation or status exchange.
Glossary
- AOSP: the open-source base of Android that many phone makers build their systems from.
- Base64: a way of writing any data using only letters, digits and a few symbols; it is not encryption.
- Carrier: the company that provides your mobile phone service.
- CERT/CC: a publicly funded team that helps coordinate vulnerability reports between researchers and vendors.
- Client: the app on the phone that talks to the carrier and the mail server.
- Confidentiality: keeping the contents of a message secret from anyone who can listen.
- CVE: a public catalogue number for a known security flaw.
- Digest-MD5: a way of proving your password to a mail server without sending it in full.
- Evil Maid: an attack where someone briefly gets physical access to your device while you are away.
- IMAP: the protocol used by email programs to read and manage mail on a server.
- IMEI: the unique number that identifies a phone's hardware to the network.
- Man-in-the-middle: secretly sitting between two parties and relaying their messages while reading them.
- MIME: the format that lets an email carry several parts, such as text and an audio attachment.
- MVNO: a smaller carrier that rents a big carrier's network and often reuses its infrastructure.
- OMTP: the industry group whose open standard describes how VVM should work.
- Obfuscation: disguising data so it is not obvious, without actually protecting it.
- Persistence: keeping access after the initial trick is over.
- Polkit: a system that decides which programs may perform which privileged actions.
- Port: a numbered door on a server that a particular service listens on.
- Proof of concept: a working demonstration that an attack is possible.
- Rogue cell tower: a fake tower that pretends to be the real network to intercept phone traffic.
- SIM: the small chip that identifies your phone to the mobile network.
- SMS: short text messages sent over the mobile network.
- Spyware: software that secretly monitors a device and reports back to whoever planted it.
- SSL: the encryption layer that protects a connection between a client and a server.
- Stingray: a device that imitates a cell tower to intercept phone traffic.
- Substitution cipher: a disguise that swaps each character for another according to a fixed table.
- VVM: Visual Voicemail, the feature that shows voicemails as a list in an app.
- VVM Destination Number: the specific phone number that handles VVM control SMSes.
vvmd: the author's client for mainline mobile Linux that processes VVM credentials.