This likely happened in September or October of last year. At the time, our company's project needed to pass the Level 3 Classified Protection assessment (DJCP Level 3). A scan identified issues with the cipher suites. Here, I am documenting the troubleshooting process and my subsequent reflections.
Security Issues and Their Reproduction Process
nmap --script ssl-enum-ciphers -p 443 xxx.xxx.cn
This section primarily uses nmap to enumerate all the cipher suites supported by the corresponding https server. How is this enumeration performed? Through cipher suite negotiation? What is the utility of this enumeration? It can help identify potential security issues, enabling further security research. What specific security issues might be discovered? Is https truly secure? These topics will be explored in follow-up articles.
It is currently known that the http server is nginx.
Related Attempts and Solutions
nginxconfiguration changes: disabled TLS 1.2 in favor of TLS 1.3, and allowed only known secure cipher suites.
However, even after the configuration was successfully applied, the security issues persisted. The nmap scan results and warnings remained unchanged.
At this point, I suspected that the
nginxconfiguration might not be taking effect. I then spun up a separate container to runnginxin isolation. Testing in the production environment showed no issues, but accessing via the external network still revealed the security problems. This was very puzzling: why did local self-testing pass while external access still showed vulnerabilities? Was there some hidden interception in the network transmission path? Was there another middleware in front ofnginx?By this stage, I was fairly certain there was definitely another middleware in front of
nginx. But what exactly was it? I asked the unhelpful ops team, but they had no idea. Sigh. It was probably another Alibaba Cloud product, most likely anLB. I asked if anLBwas being used, and the answer was no. What else could it be? I remembered that a few months ago, we had purchased aWAF. It was likely theWAFcausing the issue. I tried disabling theWAF, and the security issues disappeared. Problem solved. It turned out to be a misconfiguration in theWAF: TLS 1.2 cipher suites had not been disabled, and no restrictions were applied. Sigh. If you don't know how to configure it, just ask. Later, the ops team shifted the blame onto theWAFproduct itself, and I had to communicate with customer support myself. Eventually, we completed the product upgrade and proper configuration.... What else is there to say?
Some Thoughts
Looking at the entire troubleshooting process, it is essentially a continuous process of pinpointing the issue, narrowing down from a broad scope to a specific one. Since local host address testing with nmap revealed no security issues, but testing via the external network did, we can isolate the middleware preceding nginx. At the same time, this confirms that the nginx security configuration is effective and problem-free. The next step is to determine what exactly exists before nginx. However, there is a somewhat incompetent colleague in the operations team handling this. When asked, they cannot provide a clear explanation and may not even know which products a data packet passes through when entering the server. Therefore, we have to make educated guesses. Typically, there would be an LB, or possibly other products. We need to check Alibaba Cloud-related products and ask about them one by one, which should resolve the issue.
The entire process had quite a few flaws. Excluding uncontrollable external human factors, the initial approach was somewhat aimless, like a headless fly. We should have first clarified the troubleshooting logic, proceeding step by step with logical deduction: if this is true, then that is false; if this is certain, then that is not. Practical success in quickly identifying the root cause is usually underpinned by subtle theoretical insights. Let us keep this in mind and proceed with utmost caution.
Comments (0)
No comments yet. Be the first to leave one!