{"id":26305,"date":"2022-06-28T20:10:02","date_gmt":"2022-06-28T16:10:02","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/167608\/anydesk709-filewrite.txt"},"modified":"2022-07-12T08:46:34","modified_gmt":"2022-07-12T04:16:34","slug":"anydesk-7-0-9-arbitrary-file-write-denial-of-service","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/anydesk-7-0-9-arbitrary-file-write-denial-of-service\/","title":{"rendered":"AnyDesk 7.0.9 Arbitrary File Write \/ Denial Of Service"},"content":{"rendered":"<p dir=\"ltr\"># Exploit Title: AnyDesk allow arbitrary file write by symbolic link attack lead to denial-of-service attack on local machine<br \/>\n# Google Dork: [if applicable]\n# Date: 24\/5\/2022<br \/>\n# Exploit Author: Erwin Chan<br \/>\n# Vendor Homepage: https:\/\/anydesk.com\/en<br \/>\n# Software Link: https:\/\/anydesk.com\/en<br \/>\n# Version: 7.0.9<br \/>\n# Tested on: Windows 11<\/p>\n<p dir=\"ltr\">It was found that AnyDesk (version 7.0.9) was vulnerable to arbitrary file<br \/>\nwrite by symbolic link attack leading to denial-of-service attack on local<br \/>\nmachine. It was noted that two functions were affected.<\/p>\n<p dir=\"ltr\">*Affected function A*<br \/>\nWhen there was a remote connection come in, a directory under AppData of<br \/>\ncurrent user (without admin privilege) and a &#8220;ad.trace&#8221; file (i.e.,<br \/>\n&#8220;C:\\Users\\&lt;user&gt;\\AppData\\Roaming\\AnyDesk&#8221;) will be created by &#8220;AnyDesk.exe&#8221;<br \/>\nwith &#8220;NT Authority\\SYSTEM&#8221; privilege.<\/p>\n<p dir=\"ltr\">*Affected function B*<br \/>\nAfter a connection was made, local or remote user could use the chat room.<br \/>\nThe chat log was written to folder<br \/>\n&#8220;C:\\Users\\&lt;user&gt;\\AppData\\Roaming\\AnyDesk\\chat\\&#8221; by &#8220;AnyDesk.exe&#8221; with &#8220;NT<br \/>\nAuthority\\SYSTEM&#8221; privilege. Or the local user (without admin privilege)<br \/>\ncould change the location of the chat log to anywhere that he\/she has<br \/>\n&#8220;Modify&#8221; privilege.<\/p>\n<p dir=\"ltr\">*Vulnerability Summary*<br \/>\nSince the directories (i.e., &#8220;C:\\Users\\&lt;user&gt;\\AppData\\Roaming\\AnyDesk\\&#8221;,<br \/>\n&#8220;C:\\Users\\&lt;user&gt;\\AppData\\Roaming\\AnyDesk\\chat\\&#8221;) were assigned with<br \/>\n&#8220;Modify&#8221; privilege for current user, current user could modify the entire<br \/>\ndirectory. With this setup, an unprivileged user is able to achieve<br \/>\narbitrary file write by creating a symbolic link to a privileged location<br \/>\n(e.g., C:\\Windows\\System32). As a result, a malicious user could<br \/>\npotentially deny any service by overwriting the configuration or system<br \/>\nfile of applications such as Anti Virus solutions. It was noted that the<br \/>\nfile content could be manipulated in affected function B such that a low<br \/>\nprivileged user could write an arbitrary file to an arbitrary location.<\/p>\n<p dir=\"ltr\">*Affected function A: Exploit steps by local user (without admin privilege)*<\/p>\n<p dir=\"ltr\">1. Remove the directory &#8220;C:\\Users\\&lt;user&gt;\\AppData\\Roaming\\AnyDesk&#8221;<br \/>\n2. Create symbolic link of &#8220;ad.trace&#8221; file to a privileged location<br \/>\n(e.g., C:\\Windows\\System32\\test.file) (PoC binary could be found here:<br \/>\nhttps:\/\/github.com\/googleprojectzero\/symboliclink-testing-tools\/blob\/main\/CreateSymlink\/CreateSymlink_readme.txt<br \/>\n)<\/p>\n<p dir=\"ltr\">1. Connect to local machine (target machine) from a remote machine.<br \/>\nAfter the connection was initiated, the content of &#8220;ad.trace&#8221; file would be<br \/>\nwritten to target file (e.g., C:\\Windows\\System32\\test.file)<\/p>\n<p dir=\"ltr\">*Affected function B: Exploit steps by local user (without admin privilege)*<\/p>\n<p dir=\"ltr\">1. edit username of remote connector<\/p>\n<p dir=\"ltr\">1. Establish a AnyDesk connection from remote. Enter arbitrary text into<br \/>\nthe chat box. Mark down the filename of chat log<\/p>\n<p dir=\"ltr\">1. Remove the directory &#8220;C:\\Users\\&lt;user&gt;\\AppData\\Roaming\\AnyDesk\\chat&#8221;<br \/>\n2. Create symbolic link of chat log file (e.g., 657584961.txt) to a<br \/>\nprivileged location (e.g., C:\\Windows\\test.conf) (PoC binary could be found<br \/>\nhere:<br \/>\nhttps:\/\/github.com\/googleprojectzero\/symboliclink-testing-tools\/blob\/main\/CreateSymlink\/CreateSymlink_readme.txt<br \/>\n)<\/p>\n<p dir=\"ltr\">1. Open the chat room and enter arbitrary content into it. After that,<br \/>\nthe content of chat room would be written to target file (e.g.,<br \/>\nC:\\Windows\\test.conf)<\/p>\n<p dir=\"ltr\">Please let me know if any detail need further. Thanks<\/p>\n<p dir=\"ltr\">Regards,<br \/>\nErwin<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: AnyDesk allow arbitrary file write by symbolic link attack lead to denial-of-service attack on local machine # Google Dork: [if applicable] # Date: 24\/5\/2022 # Exploit Author: Erwin Chan # Vendor Homepage: https:\/\/anydesk.com\/en # Software Link: https:\/\/anydesk.com\/en # Version: 7.0.9 # Tested on: Windows 11 It was found that AnyDesk (version 7.0.9) &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-26305","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/26305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=26305"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/26305\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=26305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=26305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=26305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}