[MOD-2293] iOS: SSL Pinning / HTTPS module not working for wildcard-certificates
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-10-18T07:04:34.000+0000 |
Affected Version/s | n/a |
Fix Version/s | https 2.0.1, https 1.1.4 |
Components | Https |
Labels | HTTPS, Module, SSL |
Reporter | Rodolfo Perottoni |
Assignee | Jan Vennemann |
Created | 2016-08-31T04:48:44.000+0000 |
Updated | 2018-08-06T17:49:19.000+0000 |
Description
I don't know who else to contact in regards of this critical issue, so I'm opening this ticket to report a problem that has a important impact on an app that uses the HTTPs module. We've recently tested our app against MITM attacks and found out that all the packets exchanged from the app to the servers are traceable and not encrypted. This is a serious issue because the app is breaching agreements between several data providers / parties.We believe that you can understand the gravity of this problem and that it must be resolved. According your Terms and Conditions for your Team Account Plan purchased last year, a VIP support was offered. Therefore we expect your team to address this issue urgently. The code below used within our App creates a Security Manager for HTTP requests:
var https = require('appcelerator.https');
var securityManager = https.createX509CertificatePinningSecurityManager([
{
url: "https://*.server.com/",
serverCertificate: "certificate_server1.der"
},
{
url: "https://*.server2.com/",
serverCertificate: "certificate_server2.der"
}
]);
Both certificates point to a *wildcard* domain because the app consume different API's (depends on the version of the app that the user has downloaded).
All the HTTPClient objects are being created like this:
var xhr = Ti.Network.createHTTPClient({
validatesSecureCertificate : true,
tlsVersion : Titanium.Network.TLS_VERSION_1_0,
securityManager: securityManager,
timeout: 120000,
autoEncodeUrl: false
});
This code works correctly. Now if we change the URLs of the Security Manager to:
var securityManager = https.createX509CertificatePinningSecurityManager([
{
url: "https://google.com",
serverCertificate: "certificate_server1.der"
},
{
url: "https://google.com",
serverCertificate: "certificate_server2.der"
}
]);
Everything still works normally. Correct me if I'm wrong, but I don't think that's normal.
From my understanding, it appears the securityManager and my HTTPClient objects are not working as they are supposed to.
Find attached 2 images of requests that I've sent to the server being tracked through Fiddler (via Proxy). I should not be able to see the content of these packets.
Fiddler is being able to capture my packets and forward them to my server without any problem. Also, here's a link that guides you on how to configure Fiddler:
http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/ConfigureForiOS
Attachments
File | Date | Size |
---|---|---|
faceboo.der | 2016-09-05T02:18:55.000+0000 | 1875 |
goog.der | 2016-09-05T02:18:55.000+0000 | 8251 |
image002 copy.png | 2016-08-31T04:53:27.000+0000 | 893555 |
image003 copy.png | 2016-08-31T04:53:27.000+0000 | 201091 |