{"id":6495,"date":"2019-07-01T22:35:40","date_gmt":"2019-07-01T22:35:40","guid":{"rendered":"http:\/\/www.hexacorn.com\/blog\/?p=6495"},"modified":"2019-07-01T22:49:28","modified_gmt":"2019-07-01T22:49:28","slug":"taskhost-exe-arg0-its-other-arguments","status":"publish","type":"post","link":"https:\/\/www.hexacorn.com\/blog\/2019\/07\/01\/taskhost-exe-arg0-its-other-arguments\/","title":{"rendered":"taskhost.exe $(Arg0) &#038; its other arguments"},"content":{"rendered":"\n<p>While looking at Sysmon logs on Windows 7 I noticed a strange process entry that had the following properties:<\/p>\n\n\n\n<ul><li>service.exe &#8211; as a parent process<\/li><li>taskhost.exe &#8211; as an image<\/li><li>$(Arg0) &#8211; as a command line argument<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0_2.png\"><img decoding=\"async\" loading=\"lazy\" width=\"401\" height=\"414\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0_2.png\" alt=\"\" class=\"wp-image-6497\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0_2.png 401w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0_2-291x300.png 291w\" sizes=\"(max-width: 401px) 100vw, 401px\" \/><\/a><\/figure>\n\n\n\n<p>Anytime you see a placeholder \/ reference like this you start wondering whether it is a bug or a feature.<\/p>\n\n\n\n<p>After grepping all .exe and .dll files under Windows directory I couldn&#8217;t find any references to $(Arg0). Only after grepping all files I finally came across the following task entry:<\/p>\n\n\n\n<ul><li>c:\\WINDOWS\\System32\\Tasks\\Microsoft\\Windows\\RAC<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0.png\"><img decoding=\"async\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0.png\" alt=\"\" class=\"wp-image-6496\" width=\"500\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0.png 792w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0-258x300.png 258w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0-768x892.png 768w\" sizes=\"(max-width: 792px) 100vw, 792px\" \/><\/a><\/figure>\n\n\n\n<p>After looking at other Task XML files I noticed there are other variants of such command line argument under the &lt;data&gt; field <br>&#8211; &#8211; as far as I know they are not reported anywhere on the dedicated Task Scheduler interface or in Autoruns:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0_3.png\"><img decoding=\"async\" loading=\"lazy\" width=\"632\" height=\"503\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0_3.png\" alt=\"\" class=\"wp-image-6498\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0_3.png 632w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0_3-300x239.png 300w\" sizes=\"(max-width: 632px) 100vw, 632px\" \/><\/a><\/figure>\n\n\n\n<p>Other entries found:<\/p>\n\n\n\n<ul><li>SYSTEM<ul><li>Microsoft\\Windows\\CertificateServicesClient\\SystemTask<\/li><\/ul><ul><li>Microsoft\\Windows\\Customer Experience Improvement Program\\UsbCeip<\/li><\/ul><\/li><li>USER<ul><li>Microsoft\\Windows\\CertificateServicesClient\\UserTask<\/li><\/ul><\/li><li>&lt;![CDATA[KEYROAMING]]&gt;<ul><li>Microsoft\\Windows\\CertificateServicesClient\\UserTask-Roam<\/li><\/ul><\/li><li>&lt;![CDATA[$(Arg0)]]&gt;<ul><li>Microsoft\\Windows\\SideShow\\GadgetManager<\/li><\/ul><\/li><li>![CDATA[$(Arg1)]]<ul><li>Microsoft\\Windows\\Media Center\\MediaCenterRecoveryTask<\/li><li>Microsoft\\Windows\\Media Center\\ObjectStoreRecoveryTask<\/li><li>Microsoft\\Windows\\Media Center\\PvrRecoveryTask<\/li><li>Microsoft\\Windows\\Media Center\\PvrScheduleTask<\/li><li>Microsoft\\Windows\\Media Center\\SqlLiteRecoveryTask<\/li><\/ul><\/li><li>PageNotZero<ul><li>Microsoft\\Windows\\MemoryDiagnostic\\CorruptionDetector<\/li><\/ul><\/li><li>Decompression<ul><li>Microsoft\\Windows\\MemoryDiagnostic\\DecompressionFailureDetector<\/li><\/ul><\/li><li>&lt;![CDATA[Logon]]&gt;<ul><li>Microsoft\\Windows\\Offline Files\\Logon Synchronization<\/li><\/ul><\/li><li>$(Arg0)<ul><li>Microsoft\\Windows\\RAC\\RacTask<\/li><li>Microsoft\\Windows\\Task Manager\\Interactive<\/li><\/ul><\/li><\/ul>\n\n\n\n<p>So, if you come across weird command line arguments used by taskhost.exe, the Tasks folder is a place to look at. Note that CDATA notation which I left intact (copied directly from the files) will not be present in the logs. As such, if you see e.g. &#8216;taskhost.exe KEYROAMING&#8217; it is coming from the following entry:<\/p>\n\n\n\n<ul><li>Microsoft\\Windows\\CertificateServicesClient\\UserTask-Roam<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0_4.png\"><img decoding=\"async\" loading=\"lazy\" width=\"368\" height=\"410\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0_4.png\" alt=\"\" class=\"wp-image-6500\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0_4.png 368w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2019\/07\/taskhost_arg0_4-269x300.png 269w\" sizes=\"(max-width: 368px) 100vw, 368px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>While looking at Sysmon logs on Windows 7 I noticed a strange process entry that had the following properties: service.exe &#8211; as a parent process taskhost.exe &#8211; as an image $(Arg0) &#8211; as a command line argument Anytime you see &hellip; <a href=\"https:\/\/www.hexacorn.com\/blog\/2019\/07\/01\/taskhost-exe-arg0-its-other-arguments\/\">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":[79],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/6495"}],"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=6495"}],"version-history":[{"count":2,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/6495\/revisions"}],"predecessor-version":[{"id":6501,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/6495\/revisions\/6501"}],"wp:attachment":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/media?parent=6495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/categories?post=6495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/tags?post=6495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}