逆向小知识:SSLHandshake: Received fatal alert: certificate_unknown

简介: 逆向小知识:SSLHandshake: Received fatal alert: certificate_unknown

引言

Charles分析报文常遇到的问题:SSLHandshake: Received fatal alert: certificate_unknown

I SSLHandshake: Received fatal alert: certificate_unknown的解决方案

1.1 问题分析

现象:不采用Charles 代理的时候,可以正常访问,当使用Charles的时候报certificate_unknown

image.png

原因:由于https的cipher rc4不够安全,在charles 3.11中如果服务端只支持rc4就会报错SSLHandshake: Received fatal alert: handshake_failure

1.2 解决方案

  1. 获取二进制证书,并在手机去安装和信任cer

可以使用以下openssl命令来获取到服务器的公开二进制证书(以google为例):"openssl s_client -connect www.google.com:443 </dev/null 2>/dev/null | openssl x509 -outform DER > https.cer"

  1. 若还没解决问题,配置NSAppTransportSecurity信息允许http 连接,当然也包括允许https的RC4-SHA

这种https的SSL证书 属于不太安全的那种,如果一定要用Charles的话,只能将app的SSL验证放开,达到允许请求http的级别就可以抓包了。

<key>NSAppTransportSecurity</key>
 <dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
 </dict>

see also

目录
相关文章
|
Java
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
1105 0
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
|
3月前
|
网络安全
出现“Host key verification failed”错误--解决
遇到“Host key verification failed”错误,通常是因为远程主机密钥发生变化,与本地保存的信息不符。这种情况可能是远程主机系统更改或重装等原因导致的。解决方法是根据提示使用`ssh-keygen -f "/root/.ssh/known_hosts" -R "[10.61.0.152]:29022"`命令移除旧的密钥信息,然后重新尝试连接。
616 5
|
7月前
|
应用服务中间件 nginx Windows
[emerg] 15060#200: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket ......
[emerg] 15060#200: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket ......
206 0
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
124 0
|
7月前
|
NoSQL Redis
解决(error) ERR Errors trying to SHUTDOWN. Check logs.问题~
解决(error) ERR Errors trying to SHUTDOWN. Check logs.问题~
190 0
|
图形学 Android开发
Send Debug.NetworkRecordStart Error
Send Debug.NetworkRecordStart Error
90 1
使用errors.Wrapf()代替log.Error()
使用errors.Wrapf()代替log.Error()
58 0
|
关系型数据库 MySQL C++
Error:fatal error C1010: unexpected end of file while looking for precompiled head
Error:fatal error C1010: unexpected end of file while looking for precompiled head
117 0
|
安全 应用服务中间件 测试技术
Tomcat、Invalid message received with signature、AjpMessage.processHeader Invalid message
Tomcat、Invalid message received with signature、AjpMessage.processHeader Invalid message
204 0
|
数据库 C++
VS错误的解决解决:LINK fatal error LNK1000: Internal error during IncrBuildImage
VS错误的解决解决:LINK fatal error LNK1000: Internal error during IncrBuildImage
248 0