TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What is libinjection and why did it catch in prod?

1 点作者 readline_prompt超过 1 年前
I have a backend python app running on Google Cloud Run. There are also a few sql injection rules placed in my load balancer &#x2F; network security. Here was my original WAF rule:<p>`evaluatePreconfiguredWaf(&#x27;sqli-v33-stable&#x27;, {&#x27;sensitivity&#x27;: 1})`<p>Our client told us that all of the sudden they could not update a specific piece of data that had a certain word in it (it&#x27;s a Japanese address, in Kanji). We checked through the load balancer logs and we found that this waf rule: owasp-crs-v030301-id942100-sqli was the one that was called from our network security policy.<p>We then set the policy waf rules to:<p>`evaluatePreconfiguredWaf(&#x27;sqli-v33-stable&#x27;, {&#x27;sensitivity&#x27;: 1, &#x27;opt_out_rule_ids&#x27;: [&#x27;owasp-crs-v030301-id942100-sqli&#x27;]})`<p>And it passed without any issue. We made sure that the change was reflected by also changing our priority level on this particular policy, and the log confirmed that by showing us the new priority level on all passing POST&#x2F;GET requests.<p>The description for 942100-sqli is: SQL Injection Attack Detected via libinjection.<p>I was curious, why did it first let it pass and successfully insert the data but then caught it as a SQL injection when our client tried to update it? (there was about a month in time difference between inserting and trying to update).<p>I can assume that maybe GCP updated somethings on their end, influencing the sqli rule, but another weird part of it is that it works all the time on our staging cloud run. It has the same settings as our prod (including the initial sqli rules mentioned above). In staging, we can insert &#x2F; update the same data with the same kanji without any issues.<p>Although it seems to have been solved by opting out of that specific rule, I wanted to ask why this was? Why did it start to catch it all of the sudden and why doesn&#x27;t it work &#x2F; catch the same things on staging? What is libinjection?<p>(cloud armor link: https:&#x2F;&#x2F;cloud.google.com&#x2F;armor&#x2F;docs&#x2F;waf-rules)

暂无评论

暂无评论