{"id":112431,"date":"2023-12-22T21:10:32","date_gmt":"2023-12-22T19:10:33","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/mayhem-ataka-iskazhayushhaya-bity-v-pamyati-dlya-obhoda-autentifikaczii-v-sudo-i-openssh"},"modified":"2023-12-22T21:10:32","modified_gmt":"2023-12-22T19:10:33","slug":"mayhem-ataka-iskazhayushhaya-bity-v-pamyati-dlya-obhoda-autentifikaczii-v-sudo-i-openssh","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/mayhem-ataka-iskazhayushhaya-bity-v-pamyati-dlya-obhoda-autentifikaczii-v-sudo-i-openssh","title":{"rendered":"Mayhem \u2014 an attack that corrupts bits in memory to bypass authentication in sudo and OpenSSH","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Researchers from Worcester Polytechnic Institute (USA) have presented a new type of Mayhem attack, using a bit distortion method in dynamic RAM called Rowhammer to change the values of variables in the stack, which are used in a program as flags to determine the success of authentication and security checks. Practical examples of the attack have been demonstrated for bypassing authentication in SUDO, OpenSSH, and MySQL, as well as altering the outcome of security checks in the OpenSSL library.    <\/p>\n<p>An attack can be applied to applications where checks involve comparing values against zero. Example of vulnerable code:       int auth = 0;     \u2026 \/\/ verification code that changes the auth value in case of successful authentication     if(auth != 0)        return AUTH_SUCCESS;     else        return AUTH_FAILURE;      <\/p>\n<p>In the context of this example, a successful attack only requires corrupting any bit in memory that corresponds to the 32-bit variable auth in the stack. Once any bit of the variable is corrupted, its value will no longer be zero, and the conditional operator will determine that authentication has been successfully passed. Such verification patterns are quite common in applications and can be found in SUDO, OpenSSH, MySQL, and OpenSSL.       <center><img decoding=\"async\" alt=\"Mayhem - an attack that distorts bits in memory to bypass authentication in sudo and OpenSSH\" src=\"\/wp-content\/uploads\/2023\/12\/ef5dd9463837514f055f9f2610652fb9.png\" style=\"display:block;margin: 0 auto;\" \/><\/center>      <\/p>\n<p>The attack can also be applied to comparisons like \u2018if(auth == 1)\u2019, but in this case, executing it becomes more complicated as it requires altering not just any bit out of 32, but the last bit. This method can also be used to influence variable values in processor registers, as the contents of registers may be temporarily dumped into the stack during context switching, function calls, or signal handlers. During the time the register values are in memory, one can inject distortions into this memory, and the altered value will be restored in the register.        <center><img decoding=\"async\" alt=\"Mayhem - an attack that distorts bits in memory to bypass authentication in sudo and OpenSSH\" src=\"\/wp-content\/uploads\/2023\/12\/089c4ea98448b638ba630e55821fc32f.png\" style=\"display:block;margin: 0 auto;\" \/><\/center>      <\/p>\n<p>The bit distortion uses a modification of the RowHammer attack class. Since DRAM memory consists of a two-dimensional array of cells, each made up of a capacitor and a transistor, continuously reading the same area of memory causes voltage fluctuations and anomalies that lead to a slight loss of charge in neighboring cells. If the read intensity is high, a neighboring cell may lose a significant amount of charge, and the next refresh cycle may not restore its original state, resulting in a change to the data stored in that cell. To protect against RowHammer, chip manufacturers have added a Target Row Refresh (TRR) mechanism, which blocks cell distortion in specific cases but does not safeguard against all potential attack variants.       <\/p>\n<p>To protect against the Mayhem attack, it is recommended to use checks for matches rather than assessing differences from zero or matches with one, utilizing a random seed with non-zero octets. In this case, to set the desired variable value, it is necessary to distort a significant number of bits precisely, which is unrealistic, unlike distorting a single bit. Example of non-vulnerable code:       int auth = 0xbe406d1a;     \u2026 \/\/ verification code that sets the auth value to 0x23ab8701 upon successful authentication     if(auth == 0x23ab8701)        return AUTH_SUCCESS;     else        return AUTH_FAILURE;      <\/p>\n<p>The specified protection method has already been implemented by the developers of sudo and included in the release 1.9.15 as a patch for the CVE-2023-42465 vulnerability. A code prototype for executing the attack is planned to be published after fixes are made to major vulnerable projects.<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=60334\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438\u0437 \u0412\u0443\u0441\u0442\u0435\u0440\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u0438\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0438\u0442\u0443\u0442\u0430 (\u0421\u0428\u0410) \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0430\u0442\u0430\u043a\u0438 Mayhem, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u0438\u0442\u043e\u0432 \u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 Rowhammer \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u0441\u0442\u0435\u043a\u0435, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u043b\u0430\u0433\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0430\u0442\u0430\u043a\u0438 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 SUDO, OpenSSH \u0438 MySQL, [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":112432,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-112431","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438\u0437 \u0412\u0443\u0441\u0442\u0435\u0440\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u0438\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0438\u0442\u0443\u0442\u0430 (\u0421\u0428\u0410) \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0430\u0442\u0430\u043a\u0438 Mayhem, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u0438\u0442\u043e\u0432 \u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 Rowhammer \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/mayhem-ataka-iskazhayushhaya-bity-v-pamyati-dlya-obhoda-autentifikaczii-v-sudo-i-openssh\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47Mayhem \u2014 \u0430\u0442\u0430\u043a\u0430, \u0438\u0441\u043a\u0430\u0436\u0430\u044e\u0449\u0430\u044f \u0431\u0438\u0442\u044b \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 sudo \u0438 OpenSSH | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438\u0437 \u0412\u0443\u0441\u0442\u0435\u0440\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u0438\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0438\u0442\u0443\u0442\u0430 (\u0421\u0428\u0410) \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0430\u0442\u0430\u043a\u0438 Mayhem, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u0438\u0442\u043e\u0432 \u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 Rowhammer \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/mayhem-ataka-iskazhayushhaya-bity-v-pamyati-dlya-obhoda-autentifikaczii-v-sudo-i-openssh\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-12-22T19:10:33+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-12-22T19:10:33+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Mayhem - an attack that distorts bits in memory to bypass authentication in sudo and OpenSSH | ProHoster","description":"Researchers from Worcester Polytechnic Institute (USA) have introduced a new type of Mayhem attack that uses Rowhammer bit distortion in dynamic RAM to alter variable values.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/mayhem-ataka-iskazhayushhaya-bity-v-pamyati-dlya-obhoda-autentifikaczii-v-sudo-i-openssh","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47Mayhem \u2014 \u0430\u0442\u0430\u043a\u0430, \u0438\u0441\u043a\u0430\u0436\u0430\u044e\u0449\u0430\u044f \u0431\u0438\u0442\u044b \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 sudo \u0438 OpenSSH | ProHoster","og:description":"\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438\u0437 \u0412\u0443\u0441\u0442\u0435\u0440\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u0438\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0438\u0442\u0443\u0442\u0430 (\u0421\u0428\u0410) \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0430\u0442\u0430\u043a\u0438 Mayhem, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u0438\u0442\u043e\u0432 \u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 Rowhammer \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432.","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/mayhem-ataka-iskazhayushhaya-bity-v-pamyati-dlya-obhoda-autentifikaczii-v-sudo-i-openssh","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2023-12-22T19:10:33+00:00","article:modified_time":"2023-12-22T19:10:33+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":[],"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/112431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=112431"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/112431\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/112432"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=112431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=112431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=112431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}