{"id":8809,"date":"2023-10-28T21:15:23","date_gmt":"2023-10-28T21:15:23","guid":{"rendered":"https:\/\/www.hexacorn.com\/blog\/?p=8809"},"modified":"2023-10-28T22:29:55","modified_gmt":"2023-10-28T22:29:55","slug":"beyond-the-good-ol-bashrc-entry-part-3","status":"publish","type":"post","link":"https:\/\/www.hexacorn.com\/blog\/2023\/10\/28\/beyond-the-good-ol-bashrc-entry-part-3\/","title":{"rendered":"Beyond the good ol&#8217; .bashrc entry\u2026 Part 3"},"content":{"rendered":"\n<p><strong>Update<\/strong><\/p>\n\n\n\n<p>After I posted it, <a href=\"https:\/\/twitter.com\/netspooky\">@netspooky<\/a> pinged me with some additional <a href=\"https:\/\/x.com\/netspooky\/status\/1718383158956007798?s=20\">info<\/a>. Apparently, this technique is known since at least 2019 and was demoed by <a href=\"https:\/\/twitter.com\/zer0pwn\">@zer0pwn<\/a> first. This <a href=\"https:\/\/mandconsulting.ca\/the-year-of-linux-on-the-desktop\/\">blog post<\/a> from MCG describes various offensive techniques focused on .desktop and .directory files.<\/p>\n\n\n\n<p><strong>Old Post<\/strong><\/p>\n\n\n\n<p>This entry is a courtesy of <a href=\"https:\/\/twitter.com\/malmoeb\">Stephan<\/a>, who has <a href=\"https:\/\/twitter.com\/malmoeb\/status\/1529577462530772996\">discovered<\/a> that .desktop files can be used for persistence as well. Apparently, an ElectroRAT malware is already using this trick in the wild as well.<\/p>\n\n\n\n<p>To modify a list of startup application, you can <a href=\"https:\/\/help.ubuntu.com\/stable\/ubuntu-help\/startup-applications.html.en\">follow these steps<\/a>: aka press ALT+F2 and type &#8216;gnome-session-properties&#8217; and enter.<\/p>\n\n\n\n<p>Once you add a new entry f.ex.:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2023\/10\/desktop1.png\"><img decoding=\"async\" loading=\"lazy\" width=\"443\" height=\"275\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2023\/10\/desktop1.png\" alt=\"\" class=\"wp-image-8810\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2023\/10\/desktop1.png 443w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2023\/10\/desktop1-300x186.png 300w\" sizes=\"(max-width: 443px) 100vw, 443px\" \/><\/a><\/figure>\n\n\n\n<p>you will find the following .desktop file in your user home .config\/autostart sub-directory:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2023\/10\/desktop2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2023\/10\/desktop2.png\" alt=\"\" class=\"wp-image-8811\" width=\"614\" height=\"301\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2023\/10\/desktop2.png 732w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2023\/10\/desktop2-300x147.png 300w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2023\/10\/desktop2-500x245.png 500w\" sizes=\"(max-width: 614px) 100vw, 614px\" \/><\/a><\/figure>\n\n\n\n<p>According to this <a href=\"https:\/\/x.com\/ashokkrishna99\/status\/1529722464963506176?s=20\">tweet<\/a>, you can modify the:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">NoDisplay=false<\/pre>\n\n\n\n<p>line to:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">NoDisplay=true<\/pre>\n\n\n\n<p>and this way the entry will &#8216;disappear&#8217; from the ALT+F2 GUI dialog box. As far as I can tell, this doesn&#8217;t work (tested on Ubuntu 22.04.1).<\/p>\n\n\n\n<p>In any case, add .config\/autostart directories to your DFIR analysis workflow.<\/p>\n\n\n\n<p>Once again, thanks to <a href=\"https:\/\/twitter.com\/malmoeb\">Stephan<\/a> who brought this to my attention. While we will probably never experience a true &#8216;year of linux on the desktop&#8217; phenomenon, it&#8217;s good to know what the existing, GUI-oriented, non-power-user-oriented Linux desktop experience brings to the table&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update After I posted it, @netspooky pinged me with some additional info. Apparently, this technique is known since at least 2019 and was demoed by @zer0pwn first. This blog post from MCG describes various offensive techniques focused on .desktop and &hellip; <a href=\"https:\/\/www.hexacorn.com\/blog\/2023\/10\/28\/beyond-the-good-ol-bashrc-entry-part-3\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[35,78],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/8809"}],"collection":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/comments?post=8809"}],"version-history":[{"count":8,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/8809\/revisions"}],"predecessor-version":[{"id":8822,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/8809\/revisions\/8822"}],"wp:attachment":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/media?parent=8809"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/categories?post=8809"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/tags?post=8809"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}