Charles proxy internet connection still encrypted - proxy

I'm trying to use Charles with my phone but it just doesn't work. I tried with 2 differents phone, an iOS and an android and none of them are working..
Here is the step I followed for iOS : (I found them here)
1 - Help > SSL Proxying > Install Charles Root Certificate on a mobile device
2 - On the iPhone, Settings > Wi-Fi > my network > Configure Proxy > Manual And I wrote the IP address and Port that I just got with Charles
3 - I accept the message on Charles that said "a new device is attempting to connect"
4 - Then, on the iPhone, Settings > General > Profiles, I install the Charles Proxy CA
5 - Then, still on the iPhone, Settings > General > About > Certificates, I enable the root certificate
6 - It's supposed to be ready, so I make a test on google and all the contents are still encrypted..
If anyone know how to solve it, I'm listening :)

There are various reasons why you could not intercept the HTTPS Content:
Your app is using SSL-Pinning, which prevents MiTM apps like Charles Proxy or Proxyman intercepts the HTTPS Traffic. => If it's, there is no way to achive it, unless you have the pinned certificate
It seems that you tried to see the HTTPS content from google.com, but it doesn't work => Look like one of the steps is missing. Please double-check again.
If you're testing on Android devices, please make sure you add some config to network_security_config.xml file. Read more at https://docs.proxyman.io/debug-devices/android-device#android-setup-guide
Solution:
Follow the troubleshooting page to find out where the problem is:
You might try Proxyman - which has a built-in comprehensive guide to help you intercept HTTPS traffic from iOS or Android Device
If it's too complicated, you can try the automatic script for Android Emulators (Auto set HTTP Proxy, Install and Trust the certificate)
Disclaimer: I write Proxyman, and hope it helps you.

Related

How to install custom client certificate and Trust it while using fiddler/Charles

I am trying to debug one third party mobile application, specifically network calls, When I am using fiddler and charles proxy on the first network call itself. the app shows error that client certificate on the device is not trusted and ask me to switch to mobile network instead of wifi. also when I accept the risk using the same network. The app shows that there is no internet connection.
I think the app is able to detect that the ceritificate is not the orignal client cert. and thus throwing the warning. Can I download the website or app HTTPS certificate and put it in PC as well as iPhone just like I did for fiddler root certificate.
Same issue is happening with charles proxy also.
I see that you are using an iPhone, have you looked at About/Certificate Trust Settings and enabled the full trust switch after installing the (Charles) certificate?

Performance Testing for Hybird App

I am supposed to do a performance test for a Hybrid App.
First, from my adroid device i have modified the proxy settings by choosing Manual option and entered my system IP address as proxy server 192.168.1.10 and entered Port as 8080.
And then from Jmeter 3 i took Recording Controller Template from HTTPS Script Recorder I entered the port as 8080.
After Starting HTTPS Script Recorder when i opened my hybrid app it was not working. "Unfortunately we cannot find your account information". This means that Hybrid apps is not connecting internet through Proxy mode.
But i am able to get response from other apps installed in my android device.
I tried Neoload, Blazemeter as well https://guide.blazemeter.com/hc/en-us/articles/207420545-BlazeMeter-Proxy-Recorder-Mobile-and-web-.
But the same issue i faced every where.
Please provide me a solution to make the Hybird App work even after connecting internet through Proxy Mode.
Thanks
N Ali
You need to find out the main error using i.e. Logcat Command to narrow down the possible reasons as there could be too may of them.
The below hints are applicable for HTTPS traffic only, however I'm pretty sure that modern applications use HTTPS protocol.
You may need to use a 3rd-party application in order to set up HTTPS proxy, i.e. ProxyDroid
You will definitely need to install JMeter's self-signed certificate onto device so JMeter could decrypt and record secure traffic.
Locate ApacheJMeterTemporaryRootCA.crt under "bin" folder of your JMeter installation and transfer it to your android device (i.e. send it to yourself via the email)
Click at the attached certificate
Follow android system certificate installation dialog to get it set up
Be aware that JMeter's certificate has limited life time (7 days) so you won't be able to record secure traffic if it is expired.
More information:
HTTPS recording and certificates
Load Testing Mobile Apps Made Easy
In addition to Dimitri's answer reg JMeter, NeoLoad also has a similar CA certificate which needs to be added to the device.
You can locate this certificate from
C drive -> Users -> Username -> Appdata -> Roaming -> Neotys -> CA certificate
Copy this certificate to your device (or mail it to yourself) and install it either by directly selecting it or from the security settings.
Once the certificate is installed in the device, you should be able to record the HTTPs traffic from the application via proxy.
P.S. Ensure that you are able to view all hidden files coz by default Appdata is hidden.

Can't search app store while using Charles Proxy as proxy server

I'm using Charles on a Macbook Air to monitor wi-fi traffic on my iPhone. I have the Charles certificate installed and https traffic from my phone is showing up in the results. All good!
Only problem I'm having is that when I open the App Store app on my phone, I cannot use the search feature to find apps. When I enter some search terms, it just keeps spinning and never producing any results. Under the proxy settings in Charles, I added a few apple websites to bypass like mzstatic, phobos, anything.apple, but no luck. The phone still gets hung up searching for apps.
Any idea why Charles would shut down an App Store search?
Thanks!
If you've set up the phone with the correct Charles certificate it may be that the App Store App is using Certificate Pinning - much like Facebook. Certificate pinning prevents the usage of even a trusted proxy like Charles from monitoring their traffic.
For some reason, Apple blocks the App Store of being opened while using proxy listener.
The solution is pretty simple:
Proxy -> Recording Settings -> "Exclude" tab -> Add "*.apple.com" (or "itunes.apple.com", to be more specific).
In addition, make sure that under Proxy -> SSL Proxying Settings -> "SSL Proxying" tab, ":" or any domain including "apple.com" isn't there.
Now those network calls won't be recorded in Charles, but will open and work as usual.
As of February 21, 2021, I can browse the App Store with the following settings.
Proxy > SSL Proxy Settings... > SSL Proxying
Exclude
*.apple.com
*.mzstatic.com
Add *.apple.com:* to your SSL excluded sites to enable App Store traffic.
( Proxy -> SSL Proxying Settings )

Charles video playing unavailable

I'm testing an Andoird & IOS app which includes a feature that allows to watch videos.
The problem is - when I use Charles, with a proxy server and a hotspot with my laptop, the videos won't play.
Of course that the videos are playing when I'm not using Charles.
My suggestion is that Charles has some kind of a port limitation, and that's why I can't get the content of the video.
Does anyone have an idea how to solve this problem?
Thanks!
Since it is SSL traffic, you should not be allowed to sniff the traffic. The is the POINT of SSL.
To get around this, you need to break SSL on your phone. To do this you have to tell your phone to implicitly trust EVERYTHING that your PC is sending you. To do this you have to install your Charles SSL certificate as a root CA certificate.
THIS IS HIGHLY DANGEROUS AND ONCE YOU HAVE DONE THIS YOU SHOULD NOT TRUST YOUR BROWSER TO PROTECT YOU FROM HACKERS STEALING YOUR ONLINE BANKING DETAILS UNTIL YOU REMOVE YOUR THE CERTIFICATE.
Here is a tutorial on how to do this on an android phone :)
http://www.lornajane.net/posts/2014/install-charlesproxy-ca-certificate-on-android

Google Chrome doesn't trust mitmproxy's certfificates

I'm running mitmdump (from mitmproxy) on my Macbook Pro, and I'm connecting to the proxy through my Windows desktop PC.
However, Chrome (running on the PC) refuses to connect to so many sites because of the invalid certificates which mitmproxy provides.
Chrome throws the error: ERR::NET_CERT_AUTHORITY_INVALID
Here's what mitmdump shows:
But why? What's wrong with mitmproxy's certificates, why can't it just send back google's as if nothing happened?
I'd like to know how I can fix this and make (force) my desktop PC to connect to any website through my Macbook's mitmproxy.
Answering this question for people who may find this important now. To get the proxy working, you have to add the certificate as trusted in your browser.
For windows follow this: https://www.nullalo.com/en/chrome-how-to-install-self-signed-ssl-certificates/2/
For linux follow this: https://dev.to/suntong/using-squid-to-proxy-ssl-sites-nj3
For Mac-os follow this: https://www.andrewconnell.com/blog/updated-creating-and-trusting-self-signed-certs-on-macos-and-chrome/#add-certificate-to-trusted-root-authority
There are some additional details in the above links; tldr; import the certificate in your chrome://settings url and add the certificate as trusted. That shall do.
This will make your browser trust your self-signed certificate(mitm auto generated certificates too.)
The default certificates of mitmproxy is at ~/.mitmproxy/ directory.
Per the Getting Started page of the docs you add the CA by going to http://mitm.it while mitmproxy is running and selecting the operating system that you are using. This should solve your problem and will allow https sites to work with mitmproxy.
This is the expected behavior.
mitmproxy performes a Man-In-The-Middle attack to https connections by providing on-the-fly generated fake certificates to the client while it keeps communicating to the server over fully encrypted connection using the real certificates.
This way the communication between client and proxy can be decrypted. But the client has to actively approve using those fake certificates.
If that wasn't the case then SSL would be broken - which it isn't.
The whole story is very well explained here:
http://docs.mitmproxy.org/en/stable/howmitmproxy.html

Resources