Yuri Slobodyanyuk Blog on Information Security 2024年09月12日
Disabling SSL Deep inspection proxy in Fortigate should be easier
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文记录了在 Fortigate 80C 上使用 SSL Deep Inspection 功能时遇到的问题,并提供了解决方案。问题发生在客户在 LAN 中添加了一个备份设备,该设备使用 POP3S 协议与云服务器通信。Fortigate 拦截了 SSL Deep Inspection 过程中的通信,并向云服务器呈现了自身的 SSL 证书,导致备份设备无法使用其自身的 SSL 证书,最终导致通信失败。解决方法是禁用 SSL Inspection 功能,从而允许备份设备正常使用其 SSL 证书与云服务器通信。

🤔 Fortigate 80C 在使用 SSL Deep Inspection 功能时,会拦截 POP3S、SMTPS 和 IMAPS 证书,导致备份设备无法使用其自身的 SSL 证书与云服务器通信。

💡 该问题可以通过禁用 SSL Inspection 功能来解决,但这可能导致安全漏洞,需要权衡利弊。

🔧 可以尝试使用其他方法解决问题,例如使用不同的备份设备,或者配置 Fortigate 以允许备份设备使用其自身的 SSL 证书。

⚠️ 由于 Fortigate 80C 版本较老,可能存在其他未知问题,建议升级到最新版本以获得最佳性能和安全保障。

🚧 备份设备使用 POP3S 协议与云服务器通信,如果安全性要求较高,建议使用更安全的协议,例如 HTTPS 协议。

This one can be filed under Fortinet ‘undocumented/unwanted’ feature rather than bug.The case in question: Fortigate 80C , firmware 4 something, all  subscriptions are up-to-date, no crazy configurations, all looks fine... Until client adds to his LAN some back-up device that works by gathering data from clients installed on PCs and then pushes updates from behind Fortigate to the Internet residing cloud storage.

The problem with it occurred on install of the backup box and its reason also was clear as vodka - the backup box uses POP3s protocol (POP3 encrypted with SSL using certificates) to communicate with cloud servers and when this communication is passing the Fortigate, the Fortigate intercepts it for SSL Deep inspection (man-in-the-middle) and presents to the cloud servers its own (i.e. Fortigate) SSL certificate, thus preventing the bakup box to use its own SSL certificate.  The remote cloud servers, of course, refuse to accept it.

So, what’s the fuss? Just disable SSL inspection and that’s it, no ? According to the Fortinet yes, http://kb.fortinet.com/kb/microsites/microsite.do?cmd=displayKC&externalId=FD31820   “ FortiGate Intercepts POP3S, SMTPS and IMAPS certificates “ . But the real life says no.

First, the document above lists commands that Fortigate 80C didn’t recognize, ok , no big deal. We tried to remove any protection profile from hosts in question, add protection profile with HTTPS inspection disabled - still nada .

In the end, as the client didn’t really need this feature at all, we just disabled SSL inspection for good, and it finally did the job.

The steps and output from the device are below.

FGT80C # get firewall ssl setting

caname : Fortinet_CA_SSLProxycert-cache-capacity : 100cert-cache-timeout : 10no-matching-cipher-action: bypassproxy-connect-timeout: 30session-cache-capacity: 500session-cache-timeout: 20ssl-dh-bits : 1024ssl-max-version : tls-1.0ssl-min-version : ssl-3.0ssl-send-empty-frags: enable

Get the statistics/diagnostics info about SSL Proxy in Fortigate:

FGT80C # diagnose test application ssl 0

SSL Proxy Test Usage1: Dump Memory Usage2: Drop all connections3: Display PID4: Display connection stat5: Toggle AV Bypass mode6: Display memory statistics44: Display info per connection11: Display connection TTL list12: Clear the SSL certificate cache13: Clear the SSL session cache14: Display PKey file checksum15: Clear the SSL server name cache99: Restart proxySSL Proxy stats:

FGT80C # diagnose test application ssl 4

Current connections (all proxies) = 12/8048Running time (HH:MM:SS:usec) = 57:21:06.569388Bytes sent = 499 (kb)Bytes received = 909 (kb)Error Count (alloc) = 0Error Count (accept) = 0Error Count (bind) = 0Error Count (connect) = 0Error Count (read) = 0Error Count (write) = 0Error Count (retry) = 0Error Count (poll) = 0Error Count (unhandled state) = 0Error Count (SSL handshake) = 0Error Count (SSL internal) = 0Last Error = 0IPC Connection Count = 1IPC Hand-off Count = 7838IPC Packet Sent Count = 0IPC Error Count (connect) = 0IPC Error Count (handoff) = 0IPC Error Count (send) = 0IPC Error Count (socketpair) = 0IPC Error Count (timeout) = 0Client cipher failure = 0Server cipher failure = 0SSL decryption failure = 0SSL internal error = 0SSL public key too big = 0Total Connections Proxied = 0Web request backlog drop = 0Web response backlog drop = 0AV Bypass is offDrop on backlog is onAccounting is off

This one is important, it shows connections under SSL inspectionHere 13.43.12.77 is remote cloud server (sanitized) and 192.168.10.150 is backup box in LAN.

FGT80C# diagnose test application ssl 44

Current https connections = 0Current imaps connections = 0proxy=pop3s id=8070 clt=45(r=0, w=0) srv=46(r=1, w=0) c:192.168.10.150:36905 -> s:13.43.12.77:995 c2s/s2c=0/0 state=SSL_CONTINUE_SETUP_STATE duration=0 expire=3541proxy=pop3s id=8069 clt=43(r=0, w=0) srv=44(r=1, w=0) c:192.168.10.150:56246 -> s:13.43.12.77:995 c2s/s2c=0/0 state=SSL_CONTINUE_SETUP_STATE duration=0 expire=3540proxy=pop3s id=8068 clt=41(r=0, w=0) srv=42(r=1, w=0) c:192.168.10.150:56245 -> s:13.43.12.77:995 c2s/s2c=0/0 state=SSL_CONTINUE_SETUP_STATE duration=0 expire=3401proxy=pop3s id=8067 clt=26(r=0, w=0) srv=27(r=1, w=0) c:192.168.10.150:36902 -> s:13.43.12.77:995 c2s/s2c=0/0 state=SSL_CONTINUE_SETUP_STATE duration=0 expire=3399proxy=pop3s id=8039 clt=24(r=0, w=0) srv=25(r=1, w=0) c:192.168.10.150:40980 -> s:13.43.12.77:995 c2s/s2c=0/0 state=SSL_CONTINUE_SETUP_STATE duration=0 expire=2625proxy=pop3s id=8032 clt=35(r=0, w=0) srv=36(r=1, w=0) c:192.168.10.150:39432 -> s:13.43.12.77995 c2s/s2c=0/0 state=SSL_CONTINUE_SETUP_STATE duration=0 expire=2424proxy=pop3s id=8029 clt=28(r=0, w=0) srv=29(r=1, w=0) c:192.168.10.150:39429 -> s:13.43.12.77:995 c2s/s2c=0/0 state=SSL_CONTINUE_SETUP_STATE duration=0 expire=2415Current pop3s connections = 12Current smtps connections = 0Current ftps connections = 0

FGT80C # diagnose test application ssl 5

SSL AV Bypass is now on

FGT80C3909621311 # diagnose test application ssl 4

Current connections (all proxies) = 12/8048Running time (HH:MM:SS:usec) = 57:22:37.346514Bytes sent = 499 (kb)Bytes received = 909 (kb)Error Count (alloc) = 0Error Count (accept) = 0Error Count (bind) = 0Error Count (connect) = 0Error Count (read) = 0Error Count (write) = 0Error Count (retry) = 0Error Count (poll) = 0Error Count (unhandled state) = 0Error Count (SSL handshake) = 0Error Count (SSL internal) = 0Last Error = 0IPC Connection Count = 1IPC Hand-off Count = 7839IPC Packet Sent Count = 0IPC Error Count (connect) = 0IPC Error Count (handoff) = 0IPC Error Count (send) = 0IPC Error Count (socketpair) = 0IPC Error Count (timeout) = 0Client cipher failure = 0Server cipher failure = 0SSL decryption failure = 0SSL internal error = 0SSL public key too big = 0Total Connections Proxied = 0Web request backlog drop = 0Web response backlog drop = 0AV Bypass is onDrop on backlog is onAccounting is off

FGT80C3909621311 # diagnose test application ssl 44

Current https connections = 0Current imaps connections = 0Current pop3s connections = 0Current smtps connections = 0Current ftps connections = 0

Follow me on https://www.linkedin.com/in/yurislobodyanyuk/ not to miss what I publish on Linkedin, Github, blog, and more.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Fortigate SSL Deep Inspection POP3S 备份设备 安全
相关文章