{"id":33,"date":"2014-05-08T08:43:17","date_gmt":"2014-05-08T08:43:17","guid":{"rendered":"https:\/\/hacksecproject.com\/?p=18"},"modified":"2018-11-23T17:02:02","modified_gmt":"2018-11-23T17:02:02","slug":"yahoo-unrestricted-file-upload-vulnerability-2","status":"publish","type":"post","link":"https:\/\/hacksecproject.com\/?p=33","title":{"rendered":"Yahoo! Unrestricted File Upload Vulnerability"},"content":{"rendered":"<p>Hi all,<\/p>\n<p>In this Write-Up i&#8217;ll explain how i was able to find an Unrestricted File Upload in <a title=\"https:\/\/reports-as.web.analytics.yahoo.com\/Login.vm\" href=\"https:\/\/reports-as.web.analytics.yahoo.com\/Login.vm\" target=\"_blank\" rel=\"noopener\">https:\/\/reports-as.web.analytics.yahoo.com\/<\/a><\/p>\n<p>This is the PoC i sent to Yahoo! Security.<\/p>\n<p>These are the steps to reproduce the issue:<br \/>\n1)Login at yahoo.com<!--more--><\/p>\n<p>2)Once logged in we have to go to <a title=\"https:\/\/reports-as.web.analytics.yahoo.com\/Login.vm\" href=\"https:\/\/reports-as.web.analytics.yahoo.com\/Login.vm\" target=\"_blank\" rel=\"noopener\">https:\/\/reports-as.web.analytics.yahoo.com\/Login.vm<\/a> and subsequently click on &#8220;Manage Scheduled Reports&#8221;<br \/>\n3)Now we have to click on the &#8220;Do you want to change your company logo that appears on HTML and PDF reports?&#8221; button.This section allows only the upload of images that have .gif, .jpg, .png extensions.I&#8217;ve found a way to bypass this restriction uploading a TXT file which is a.txt that contains the following content &#8220;Yahoo Server Unrestricted File Upload by Andrea Santese&#8221; and renaming it with a.txt.jpg<br \/>\nSo we have to upload this file and subsequently click on the &#8220;Upload&#8221; button.Once we uploaded it a message like this &#8220;Image file is uploaded successfully!&#8221; will appear,so the file is uploaded.I notice that the file we have uploaded is located at <a title=\"https:\/\/reports-as.web.analytics.yahoo.com\/servlet\/template\/LogoServer\" href=\"https:\/\/reports-as.web.analytics.yahoo.com\/servlet\/template\/LogoServer\" target=\"_blank\" rel=\"noopener\">https:\/\/reports-as.web.analytics.yahoo.com\/servlet\/template\/LogoServer<\/a><br \/>\nBut when we go to this link an error like the following will appear &#8221; The image \u201c<a title=\"https:\/\/reports-as.web.analytics.yahoo.com\/servlet\/template\/LogoServer\u201d\" href=\"https:\/\/reports-as.web.analytics.yahoo.com\/servlet\/template\/LogoServer\" target=\"_blank\" rel=\"noopener\">https:\/\/reports-as.web.analytics.yahoo.com\/servlet\/template\/LogoServer\u201d<\/a> cannot be displayed because it contains errors.&#8221;<br \/>\nThis error is due to the &#8220;Content-Type:image\/jpeg&#8221; that the Yahoo Server send to the client that makes a GET request to <a title=\"https:\/\/reports-as.web.analytics.yahoo.com\/servlet\/template\/LogoServer,so\" href=\"https:\/\/reports-as.web.analytics.yahoo.com\/servlet\/template\/LogoServer\" target=\"_blank\" rel=\"noopener\">https:\/\/reports-as.web.analytics.yahoo.com\/servlet\/template\/LogoServer\u00a0 <\/a>,so now we have to change it into &#8220;Content-Type:text\/html&#8221;.We can do this using a proxy like Burpsuite intercepting the response that the Yahoo Server send to the client and modifying on the fly the Content-Type into text\/html.So we have to configure our browser to use the bursuite proxy.Once configured we have to make a GET request to <a title=\"https:\/\/reports-as.web.analytics.yahoo.com\/servlet\/template\/LogoServer\" href=\"https:\/\/reports-as.web.analytics.yahoo.com\/servlet\/template\/LogoServer\" target=\"_blank\" rel=\"noopener\">https:\/\/reports-as.web.analytics.yahoo.com\/servlet\/template\/LogoServer<\/a>.Before deciding if we have to click on the &#8220;Forward&#8221; or &#8220;Drop&#8221; button,we have to right click on the Raw request and subsequently select &#8220;Do Intercept&#8221;&#8212;-&gt;&#8221;Response to this request&#8221;.Now we have to click on the &#8220;Forward&#8221; button.Once clicked on it we will have a response like the following:<br \/>\n&#8216;<br \/>\nHTTP\/1.1 200 OK<br \/>\nDate: Wed, 26 Mar 2014 10:32:01 GMT<br \/>\nP3P: policyref=&#8221;<a title=\"http:\/\/info.yahoo.com\/w3c\/p3p.xml\" href=\"http:\/\/info.yahoo.com\/w3c\/p3p.xml\" target=\"_blank\" rel=\"noopener\">http:\/\/info.yahoo.com\/w3c\/p3p.xml<\/a>&#8220;, CP=&#8221;CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV&#8221;<br \/>\nLast-Modified: Wed, 26 Mar 2014 10:32:02 GMT<br \/>\nExpires: Wed, 26 Mar 2014 10:32:02 GMT<br \/>\nAccept-Ranges: bytes<br \/>\nCache-Control: no-store, no-cache, must-revalidate, max-age=0, proxy-revalidate, no-transform, pre-check=0, post-check=0, prPragma: no-cache, private<br \/>\nConnection: close<br \/>\nContent-Type: image\/jpg<br \/>\nContent-Length: 57<\/p>\n<p>Yahoo Server Unrestricted File Upload by Andrea Santese<\/p>\n<p>&#8216;<\/p>\n<p>Now we have to change the Content-Type: image\/jpg into Content-Type: text\/html and subsequently click on the &#8220;Forward&#8221; button<\/p>\n<p>Now the content of the a.txt.jpg file will come up!<\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/FQru91tyyp4?rel=0\" width=\"480\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi all, In this Write-Up i&#8217;ll explain how i was able to find an Unrestricted File Upload in https:\/\/reports-as.web.analytics.yahoo.com\/ This is the PoC i sent to Yahoo! Security. These are the steps to reproduce the issue: 1)Login at yahoo.com<\/p>\n","protected":false},"author":2,"featured_media":30,"comment_status":"closed","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-33","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Yahoo! Unrestricted File Upload Vulnerability -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hacksecproject.com\/?p=33\" \/>\n<meta property=\"og:locale\" content=\"it_IT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Yahoo! Unrestricted File Upload Vulnerability -\" \/>\n<meta property=\"og:description\" content=\"Hi all, In this Write-Up i&#8217;ll explain how i was able to find an Unrestricted File Upload in https:\/\/reports-as.web.analytics.yahoo.com\/ This is the PoC i sent to Yahoo! Security. These are the steps to reproduce the issue: 1)Login at yahoo.com\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hacksecproject.com\/?p=33\" \/>\n<meta property=\"article:published_time\" content=\"2014-05-08T08:43:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-23T17:02:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hacksecproject.com\/wp-content\/uploads\/2018\/04\/Yahoo-Voices-Hacked.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"620\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Medu554\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Scritto da\" \/>\n\t<meta name=\"twitter:data1\" content=\"Medu554\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo di lettura stimato\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minuti\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/?p=33#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/?p=33\"},\"author\":{\"name\":\"Medu554\",\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/#\\\/schema\\\/person\\\/526444cfaef818c23a7b4e4519573689\"},\"headline\":\"Yahoo! Unrestricted File Upload Vulnerability\",\"datePublished\":\"2014-05-08T08:43:17+00:00\",\"dateModified\":\"2018-11-23T17:02:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/?p=33\"},\"wordCount\":516,\"image\":{\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/?p=33#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hacksecproject.com\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/Yahoo-Voices-Hacked.jpg\",\"articleSection\":[\"Uncategorized\"],\"inLanguage\":\"it-IT\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/?p=33\",\"url\":\"https:\\\/\\\/hacksecproject.com\\\/?p=33\",\"name\":\"Yahoo! Unrestricted File Upload Vulnerability -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/?p=33#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/?p=33#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hacksecproject.com\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/Yahoo-Voices-Hacked.jpg\",\"datePublished\":\"2014-05-08T08:43:17+00:00\",\"dateModified\":\"2018-11-23T17:02:02+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/#\\\/schema\\\/person\\\/526444cfaef818c23a7b4e4519573689\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/?p=33#breadcrumb\"},\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hacksecproject.com\\\/?p=33\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/?p=33#primaryimage\",\"url\":\"https:\\\/\\\/hacksecproject.com\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/Yahoo-Voices-Hacked.jpg\",\"contentUrl\":\"https:\\\/\\\/hacksecproject.com\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/Yahoo-Voices-Hacked.jpg\",\"width\":620,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/?p=33#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/hacksecproject.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Yahoo! Unrestricted File Upload Vulnerability\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/#website\",\"url\":\"https:\\\/\\\/hacksecproject.com\\\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hacksecproject.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"it-IT\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hacksecproject.com\\\/#\\\/schema\\\/person\\\/526444cfaef818c23a7b4e4519573689\",\"name\":\"Medu554\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29ba1a61e7548d882dbad311db32d5e08fdc44eee25a59452ea4ac5a94ed80b3?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29ba1a61e7548d882dbad311db32d5e08fdc44eee25a59452ea4ac5a94ed80b3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29ba1a61e7548d882dbad311db32d5e08fdc44eee25a59452ea4ac5a94ed80b3?s=96&d=mm&r=g\",\"caption\":\"Medu554\"},\"url\":\"https:\\\/\\\/hacksecproject.com\\\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Yahoo! Unrestricted File Upload Vulnerability -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hacksecproject.com\/?p=33","og_locale":"it_IT","og_type":"article","og_title":"Yahoo! Unrestricted File Upload Vulnerability -","og_description":"Hi all, In this Write-Up i&#8217;ll explain how i was able to find an Unrestricted File Upload in https:\/\/reports-as.web.analytics.yahoo.com\/ This is the PoC i sent to Yahoo! Security. These are the steps to reproduce the issue: 1)Login at yahoo.com","og_url":"https:\/\/hacksecproject.com\/?p=33","article_published_time":"2014-05-08T08:43:17+00:00","article_modified_time":"2018-11-23T17:02:02+00:00","og_image":[{"width":620,"height":400,"url":"https:\/\/hacksecproject.com\/wp-content\/uploads\/2018\/04\/Yahoo-Voices-Hacked.jpg","type":"image\/jpeg"}],"author":"Medu554","twitter_card":"summary_large_image","twitter_misc":{"Scritto da":"Medu554","Tempo di lettura stimato":"3 minuti"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hacksecproject.com\/?p=33#article","isPartOf":{"@id":"https:\/\/hacksecproject.com\/?p=33"},"author":{"name":"Medu554","@id":"https:\/\/hacksecproject.com\/#\/schema\/person\/526444cfaef818c23a7b4e4519573689"},"headline":"Yahoo! Unrestricted File Upload Vulnerability","datePublished":"2014-05-08T08:43:17+00:00","dateModified":"2018-11-23T17:02:02+00:00","mainEntityOfPage":{"@id":"https:\/\/hacksecproject.com\/?p=33"},"wordCount":516,"image":{"@id":"https:\/\/hacksecproject.com\/?p=33#primaryimage"},"thumbnailUrl":"https:\/\/hacksecproject.com\/wp-content\/uploads\/2018\/04\/Yahoo-Voices-Hacked.jpg","articleSection":["Uncategorized"],"inLanguage":"it-IT"},{"@type":"WebPage","@id":"https:\/\/hacksecproject.com\/?p=33","url":"https:\/\/hacksecproject.com\/?p=33","name":"Yahoo! Unrestricted File Upload Vulnerability -","isPartOf":{"@id":"https:\/\/hacksecproject.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hacksecproject.com\/?p=33#primaryimage"},"image":{"@id":"https:\/\/hacksecproject.com\/?p=33#primaryimage"},"thumbnailUrl":"https:\/\/hacksecproject.com\/wp-content\/uploads\/2018\/04\/Yahoo-Voices-Hacked.jpg","datePublished":"2014-05-08T08:43:17+00:00","dateModified":"2018-11-23T17:02:02+00:00","author":{"@id":"https:\/\/hacksecproject.com\/#\/schema\/person\/526444cfaef818c23a7b4e4519573689"},"breadcrumb":{"@id":"https:\/\/hacksecproject.com\/?p=33#breadcrumb"},"inLanguage":"it-IT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hacksecproject.com\/?p=33"]}]},{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/hacksecproject.com\/?p=33#primaryimage","url":"https:\/\/hacksecproject.com\/wp-content\/uploads\/2018\/04\/Yahoo-Voices-Hacked.jpg","contentUrl":"https:\/\/hacksecproject.com\/wp-content\/uploads\/2018\/04\/Yahoo-Voices-Hacked.jpg","width":620,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/hacksecproject.com\/?p=33#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hacksecproject.com\/"},{"@type":"ListItem","position":2,"name":"Yahoo! Unrestricted File Upload Vulnerability"}]},{"@type":"WebSite","@id":"https:\/\/hacksecproject.com\/#website","url":"https:\/\/hacksecproject.com\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hacksecproject.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"it-IT"},{"@type":"Person","@id":"https:\/\/hacksecproject.com\/#\/schema\/person\/526444cfaef818c23a7b4e4519573689","name":"Medu554","image":{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/secure.gravatar.com\/avatar\/29ba1a61e7548d882dbad311db32d5e08fdc44eee25a59452ea4ac5a94ed80b3?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/29ba1a61e7548d882dbad311db32d5e08fdc44eee25a59452ea4ac5a94ed80b3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/29ba1a61e7548d882dbad311db32d5e08fdc44eee25a59452ea4ac5a94ed80b3?s=96&d=mm&r=g","caption":"Medu554"},"url":"https:\/\/hacksecproject.com\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/hacksecproject.com\/index.php?rest_route=\/wp\/v2\/posts\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hacksecproject.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hacksecproject.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hacksecproject.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hacksecproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=33"}],"version-history":[{"count":2,"href":"https:\/\/hacksecproject.com\/index.php?rest_route=\/wp\/v2\/posts\/33\/revisions"}],"predecessor-version":[{"id":289,"href":"https:\/\/hacksecproject.com\/index.php?rest_route=\/wp\/v2\/posts\/33\/revisions\/289"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hacksecproject.com\/index.php?rest_route=\/wp\/v2\/media\/30"}],"wp:attachment":[{"href":"https:\/\/hacksecproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hacksecproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hacksecproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}