{"id":86,"date":"2009-03-19T02:17:26","date_gmt":"2009-03-19T02:17:26","guid":{"rendered":"https:\/\/pgregg.com\/wp2\/?p=86"},"modified":"2009-03-19T02:17:26","modified_gmt":"2009-03-19T02:17:26","slug":"tinyurl-php-flaw","status":"publish","type":"post","link":"https:\/\/blog.pgregg.com\/blog\/2009\/03\/tinyurl-php-flaw\/","title":{"rendered":"TinyURL PHP &#8220;flaw&#8221; ?"},"content":{"rendered":"<p><a href=\"http:\/\/www.theregister.co.uk\/\">The Register<\/a> is running a story today <a href=\"http:\/\/www.theregister.co.uk\/2009\/03\/18\/tinyurl_misconfigured\/\">TinyURL, your configs are showing<\/a> which points out that TinyURL has a <a href=\"http:\/\/tinyurl.com\/php.php\">\/php.php<\/a> page displaying the contents of phpinfo().<\/p>\n<p><a href=\"http:\/\/preachsecurity.blogspot.com\/2009\/03\/fox-news-fail-on-twitter.html\">The article<\/a> then goes on to make some scary sounding claims from security consultant Rafal Los &#8220;Why would you want to run a web service as &#8216;Administrator&#8217; because if<br \/>\nI figure out a way to jack that service, I completely, 100% own that<br \/>\nmachine.&#8221; and &#8220;<span>More importantly&#8230; why is this server running as <span style=\"font-weight: bold; font-style: italic;\">ROOT:WHEEL<\/span>?!<\/span>&#8220;<\/p>\n<p>Sorry Rafal &#8211; but you appear to have no idea how web servers work, or all that much about (web) security.<\/p>\n<p>All unix based webservers start as root if they want to bind to the restricted (and default) port 80, after which they switch to the configured UID for request handling.&nbsp; So, right there, goes all Rafal&#8217;s claims about pwning the machine.<\/p>\n<p>Check your own server, the _SERVER and _ENV values will reflect the<br \/>\nstarting shell\/environment, which just happens to be root.&nbsp; In<br \/>\nother words, there is nothing wrong with the settings. Having said that, they do have register_globals turned on, which isn&#8217;t ideal &#8211; but it isn&#8217;t a gaping hole if the underlying php code is safely coded.<\/p>\n<p>Also to TinyURL&#8217;s credit, they are running <a href=\"http:\/\/www.hardened-php.net\/\">Suhosin patch<\/a> to harden their server.&nbsp; They&#8217;re also running the latest production PHP (which is more than I can say).&nbsp; Granted, they probably don&#8217;t want to be exposing phpinfo() &#8211; but this all just an overblown storm in a teacup.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Register is running a story today TinyURL, your configs are showing which points out that TinyURL has a \/php.php page displaying the contents of phpinfo(). The article then goes on to make some scary sounding claims from security consultant Rafal Los &#8220;Why would you want to run a web service as &#8216;Administrator&#8217; because if &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.pgregg.com\/blog\/2009\/03\/tinyurl-php-flaw\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;TinyURL PHP &#8220;flaw&#8221; ?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"1","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10],"tags":[81,90,100],"class_list":["post-86","post","type-post","status-publish","format-standard","hentry","category-php","tag-php-2","tag-security","tag-theregister"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pbQOUu-1o","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/posts\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":0,"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}