Faster and more efficient phishing detection in M92
2021-07-21 01:58:00 Author: www.blogger.com(查看原文) 阅读量:83 收藏

tag:blogger.com,1999:blog-2471378914199150966.post-89719107507485607382021-07-20T09:58:00.004-07:002021-07-20T10:11:17.187-07:00Faster and more efficient phishing detection in M92<div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-4BU0lSpgH3g/YPcBQ2o2QcI/AAAAAAAABnA/-7gMuWNFmWw9Gak6NF-mG-OW958qmScEACLcBGAsYHQ/s1999/image1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="830" data-original-width="1999" height="266" src="https://1.bp.blogspot.com/-4BU0lSpgH3g/YPcBQ2o2QcI/AAAAAAAABnA/-7gMuWNFmWw9Gak6NF-mG-OW958qmScEACLcBGAsYHQ/w640-h266/image1.png" width="640" /></a></div><br /><div><br /></div><br /><i>Keeping Chrome users safe as they browse the web is crucially important to Chrome; in fact, security has always been one of our four <a href="https://www.chromium.org/developers/core-principles">core principles</a>. In some cases, security can come at the expense of performance. In our next post in <a href="https://blog.chromium.org/search/label/the%20fast%20and%20the%20curious">The Fast and the Curious</a> series, we are excited to share how improvements to our phishing detection algorithms keeps users safe online. With these improvements, phishing detection is now <b>50 times faster and drains less battery</b>.</i><br /><br /><h2 style="text-align: left;">Phishing detection</h2>Every time you navigate to a new page, Chrome evaluates a collection of signals about the page to see if it matches those of phishing sites. To do that, we compare the color profile of the visited page - that’s the range and frequency of the colors present on the page - with the color profiles of common pages. For example in the image below, we can see that the colors are mostly orange, followed by green and then a touch of purple. <br /><br /><br /><a href="https://1.bp.blogspot.com/-LM3Ymd5pd5U/YPcCQdCFZkI/AAAAAAAABnI/GuSBfvCx5R4w5VfGFoVpKMOKcf4kOTeSACLcBGAsYHQ/s1386/image3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="920" data-original-width="1386" height="424" src="https://1.bp.blogspot.com/-LM3Ymd5pd5U/YPcCQdCFZkI/AAAAAAAABnI/GuSBfvCx5R4w5VfGFoVpKMOKcf4kOTeSACLcBGAsYHQ/w640-h424/image3.jpg" width="640" /></a><br /><br /><br />If the site matches a known phishing site, Chrome warns you to protect your personal information and prevent you from exposing your credentials.<div><br /></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Y2wKKKEehng/YPcCiIU1c_I/AAAAAAAABnQ/8pWOTs4gXqscZxe8DtS7VbqJmYbsNgemACLcBGAsYHQ/s909/image7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="509" data-original-width="909" height="358" src="https://1.bp.blogspot.com/-Y2wKKKEehng/YPcCiIU1c_I/AAAAAAAABnQ/8pWOTs4gXqscZxe8DtS7VbqJmYbsNgemACLcBGAsYHQ/w640-h358/image7.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div><i>What you will see if a phishing attempt is detected</i><br /><br />To preserve your privacy, by default Chrome's <a href="https://safebrowsing.google.com/">Safe Browsing</a> mode never sends any images outside the browser. While this is great for privacy, it means that your machine has to do all the work to analyze the image. <br /><br />Image processing can often generate heavy workloads because analyzing the image requires an evaluation of each pixel in what is commonly known as a “pixel loop.” Some modern monitors display upwards of 14 million pixels, so even simple operations on each of those pixels can add up to a lot of CPU use! For phishing detection, the operation that takes place on each pixel is the counting of its basic colors.<br /><br />Here is what this looks like. The counts are stored in an associative data structure called a hashmap. For each pixel, we extract its RGB color values and store the counts in one of 3 different hashmaps -- one for each color.<br /><br /><br /><a href="https://1.bp.blogspot.com/-BXXsKJlC-_U/YPcCynGwN9I/AAAAAAAABnY/MgR3-sUhI-MdJ3HczePx3oRcOQoulSlPgCLcBGAsYHQ/s1386/image2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="921" data-original-width="1386" height="426" src="https://1.bp.blogspot.com/-BXXsKJlC-_U/YPcCynGwN9I/AAAAAAAABnY/MgR3-sUhI-MdJ3HczePx3oRcOQoulSlPgCLcBGAsYHQ/w640-h426/image2.jpg" width="640" /></a><br /><br /><br /><h2 style="text-align: left;">Making it more efficient</h2>Adding one item to a hashmap is fast, but we have to do this for millions of pixels. We try to avoid reducing the number of pixels to avoid compromising the quality of the analysis. However, the computation itself can be improved. <br /><br />Our improvements to the pipeline look like this:</div><div><ul style="text-align: left;"><li>The code now avoids keeping track of RGB channels in three different hashmaps and instead uses only one to index by color. Three times less counting!</li><li>Consecutive pixels are summed before being counted in the hashmap. For a site with a uniform background color, this can reduce the hashmap overhead to almost nothing.</li></ul>Here is what the counting of the colors looks like now. Notice how there are significantly fewer operations on the hashmap:<br /><br /><br /><a href="https://1.bp.blogspot.com/-tXOqeIjnhLs/YPcDF0ZIvkI/AAAAAAAABng/G5ZOvgMv_CAyDND5_mRo52bez6jeaaJ7ACLcBGAsYHQ/s1386/image5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="921" data-original-width="1386" height="426" src="https://1.bp.blogspot.com/-tXOqeIjnhLs/YPcDF0ZIvkI/AAAAAAAABng/G5ZOvgMv_CAyDND5_mRo52bez6jeaaJ7ACLcBGAsYHQ/w640-h426/image5.jpg" width="640" /></a><br /><br /><br /><h2 style="text-align: left;">How much faster did this get?</h2>Starting with M92, Chrome now executes image-based phishing classification up to <b>50 times faster</b> at the 50th percentile and <b>2.5 times faster</b> at the 99th percentile. On average, users will get their phishing classification results after <b>100 milliseconds, instead of 1.8 seconds</b>.<br /><br />This benefits you in two ways as you use Chrome. First and foremost, using less CPU time to achieve the same work improves general performance. Less CPU time means less battery drain and less time with spinning fans.</div><div><br /></div><div>Second, getting the results faster means Chrome can warn you earlier. The optimization brought the percentage of requests that took more than 5 seconds to process from 16.25% to less than 1.6%. This speed improvement makes a real difference in security - especially when it comes to stopping you from entering your password in a malicious site!</div><div><br /></div><div>Overall, these changes achieve a reduction of almost 1.2% of the total CPU time used by all Chrome renderer processes and utility processes.</div><div><br />At Chrome’s scale, even minor algorithm improvements can result in major energy efficiency gains in aggregate. Here’s to many more centuries of CPU time saved!<br /><br />Stay tuned for many more performance improvements to come!<br /><br />Posted by Olivier Li Shing Tat-Dupuis, Chrome Developer<br /><br /><i>Data source for all statistics: <a href="https://www.google.com/chrome/privacy/whitepaper.html#usagestats">Real-world data</a> anonymously aggregated from Chrome clients.</i></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><br />Chromium Bloghttps://www.blogger.com/profile/06394244468194711527[email protected]

文章来源: http://www.blogger.com/feeds/2471378914199150966/posts/default/8971910750748560738
如有侵权请联系:admin#unsafe.sh