Charles' HTTPS packet capture method and principle, download and install ssl/https certificate

From: https://zhubangbang.com/charles-https-packet-capture-method-and-principle.html

Charles in this article is adapted to windows/MAC/IOS/Android to avoid packet capture HTTPS failure and garbled characters;

The version used is V4.1.2, and the principles of other versions are similar;

If charles does not configure the SSL general certificate;

It will lead to the failure of domain name crawling/garbled characters of the HPPPTS protocol;

Now there are more and more SSL, many blogs are on SSL, and payment-related industries are more basic configuration;

Charles configures an SSL certificate, which is very simple to calculate and simple to operate;

First analyze what we need to do?

Step 1: Install Charles' CA certificate on the computer (required)

Charles needs to download and install the ssl/https certificate, because charles is used as an intermediate filter. For the specific principle, please refer to the usage tutorial of the packet capture tool charles

In this way, you can access https resources on the PC side, and the principle of windows/MAC is the same;

Step 2: SSL capture settings of charles on the computer (required)

Charles does not capture ssl by default, so even after you install the certificate, Charles does not capture Https information by default, you need to set the domain name to be captured in the SSL proxy;

Of course, if you want to grab HTTPS-related resources on the mobile phone, you need the third step below;

(You don’t know how to capture ordinary HTTP on mobile phone, please click on charles mobile phone capture settings)

Step 3: Install the SSL certificate on the mobile phone;

Regardless of IOS/Android, an SSL certificate needs to be installed. The principle is that the SSL certificate of the mobile phone is connected with the charles SSL certificate on the computer;

****************************Specific operation method**************** ****************

Step 1: Install an SSL certificate on your computer

Select "Help" -> "SSL Proxying" -> "Install Charles Root Certificate", if security protection is set, the account password of the system will be entered.

image

Will let you start installing charles certificate operation;

image

All the way to the next step;

The second step is to configure SSL to crawl the domain name;

You can configure it separately, you must see a domain name you want to grab, right-click on "SSL proxying: Enabled", then the domain name you have set up can be grabbed by accessing it again; the settings are as shown below

image

I personally don't like this kind of setting; it needs to be configured one by one every time, which is very painful;

You can see my configuration above, the "SSL proxying: Enableed" configuration is gray by default, this is because I have made general settings; I have set all HTTPS protocols to allow capture;

My settings are as follows;

First find proxy – SSL Proxying Settings;

image

Then select Enable SSL Proxying, because the location configuration of charles supports wildcards, so you can set a "*" in the HOST, and the port is not written;

image

If you need to configure a specific domain name, it is also filled in here;

When configuring a specific domain name, the general port is 443 (the usual SSL is 443);

In this way, you can happily grab HTTPS content;

Step 3: Install the SSL certificate on the mobile phone (if you need to grab the HTTPS website accessed by the mobile phone, you need to do this setting, but if you do not need the mobile phone to grab HTTPS, there is no need to install it)

Similar to the above, it is also SSL Proxying under HTLP, select "Install Charles Root Certificate on a Mobile Device or remote Browser" (install the SSL certificate on a mobile device or remote browser)

image

Then you will see a pop-up window prompting you what to do

configure your device to use charles as its HTTP proxy on 192.168.10.108.8888,then browse to chls.pro/ssl to download and install the certificate

It probably means that you can set up an HTTP proxy for the wifi information on your phone, and the content is 192.168.10.108.8888; then browse chls.pro/ssl with a browser to download and install the certificate;

image

My version is V4.1.2, so if you are of another version, the prompt information may be different;

If you also want to use the V4.1.2 version, you can check the Charles crack version free download and installation tutorial for installation;

For the settings of grabbing ordinary HTTP on charles' mobile phone, please refer to "Charles mobile phone packet capture settings" here is only grabbing HTTPS;

The above 192.168.10.108.8888 is the IP of my computer and the port that is set and set, which is subject to your actual situation;

When you complete the wifi delegation of the mobile phone as charles as the proxy;

Open the browser on the phone and visit chls.pro/ssl; then it will jump to a place where the description file is installed;

charles_proxying_phone

Just install it directly;

Mine has already been installed, so I won't show it anymore

Well, let's go and see now, HTTPS can be captured normally;

In the previous chapter, visit the https capture record of my own blog

image

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325238429&siteId=291194637