{"id":1974,"date":"2015-01-28T15:44:51","date_gmt":"2015-01-28T13:44:51","guid":{"rendered":"http:\/\/hasselba.ch\/blog\/?p=1974"},"modified":"2015-01-28T16:30:36","modified_gmt":"2015-01-28T14:30:36","slug":"raspberry-pi-vs-ibm-bluemix-10","status":"publish","type":"post","link":"https:\/\/hasselba.ch\/blog\/?p=1974","title":{"rendered":"Raspberry Pi vs. IBM Bluemix &#8211; 1:0"},"content":{"rendered":"<p>I had some time last night (the whole family had gone to bed early), so I spent some to look at the XPages integration into Bluemix. I found <a title=\"mybluemix.net: Greenwell Travel Expenses\" href=\"http:\/\/greenwellexpenses.mybluemix.net\/bluemix\/Expense-App-Design.nsf\/\" target=\"_blank\">the Greenwell Travel Expenses Demo:<\/a><\/p>\n<p><a href=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.24.41.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1977\" src=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.24.41-300x142.png\" alt=\"Bildschirmfoto 2015-01-28 um 10.24.41\" width=\"300\" height=\"142\" srcset=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.24.41-300x142.png 300w, https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.24.41-1024x484.png 1024w, https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.24.41.png 1094w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>But after clicking a link, the page returned an error:<\/p>\n<p><a href=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.00.21.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1975\" src=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.00.21-300x164.png\" alt=\"Bildschirmfoto 2015-01-28 um 10.00.21\" width=\"300\" height=\"164\" srcset=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.00.21-300x164.png 300w, https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.00.21.png 570w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Hmm&#8230;But I wanted to see the application!<\/p>\n<p>That&#8217;s why I checked, if the datasources are protected. <a title=\"Security: Fernsteuerbare DocumentDataSources\" href=\"https:\/\/hasselba.ch\/blog\/?p=495\" target=\"_blank\">I recommend this for years.<\/a> Fredrik Norling <a title=\"xpagedeveloper.com: How to prevent databaseName to change datasource\" href=\"http:\/\/www.xpagedeveloper.com\/2012\/how-to-prevent-databasename-to-change-datasource\" target=\"_blank\">wrote a little snippet<\/a> for this. Or better use the &#8222;<em>ignoreRequestParam<\/em>&#8222;. Then all your problems are gone.<\/p>\n<pre><code>http:\/\/greenwellexpenses.mybluemix.net\/bluemix\/Expense-App-Design.nsf\/teamExpenses.xsp?databaseName=homepage.nsf<\/code><\/pre>\n<p>Bingo! Unprotected!<\/p>\n<p><a href=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.15.29.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1976\" src=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.15.29-300x143.png\" alt=\"Bildschirmfoto 2015-01-28 um 10.15.29\" width=\"300\" height=\"143\" srcset=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.15.29-300x143.png 300w, https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.15.29-1024x487.png 1024w, https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.15.29.png 1094w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I now was able to see a little bit more of the application and to check the underlying environment. But then came the moment where my brain forced me to try out some things:<\/p>\n<p>First, I had to look again on the IP address in the error page: &#8222;<em>109.228.14.66<\/em>&#8222;. This is not an\u00a0 internal address. Let&#8217;s check it:<\/p>\n<p><a href=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.34.08.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1978\" src=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.34.08-300x207.png\" alt=\"Bildschirmfoto 2015-01-28 um 10.34.08\" width=\"300\" height=\"207\" srcset=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.34.08-300x207.png 300w, https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.34.08.png 576w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Not reachable. Whois for &#8222;<em>109.228.14.66<\/em>&#8220; ? &#8222;<em>Fasthosts Internet Limited<\/em>&#8222;. A provider in UK.<\/p>\n<p>A ping to &#8222;<em>greenwellexpenses.mybluemix.net<\/em>&#8220; returned &#8222;<em>75.126.81.6&#8243;<\/em>, which belongs to Softlayer. The server is allowed access other servers? Maybe the application can call me?<\/p>\n<p><a href=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.58.56.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1979\" src=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.58.56-300x195.png\" alt=\"Bildschirmfoto 2015-01-28 um 10.58.56\" width=\"300\" height=\"195\" srcset=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.58.56-300x195.png 300w, https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-10.58.56.png 606w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Yes, the application can:<\/p>\n<p><a href=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-11.09.41.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1980\" src=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-11.09.41-300x143.png\" alt=\"Bildschirmfoto 2015-01-28 um 11.09.41\" width=\"300\" height=\"143\" srcset=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-11.09.41-300x143.png 300w, https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-11.09.41-1024x488.png 1024w, https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Bildschirmfoto-2015-01-28-um-11.09.41.png 1093w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Unbenannt.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1982\" src=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Unbenannt-300x195.png\" alt=\"Unbenannt\" width=\"300\" height=\"195\" srcset=\"https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Unbenannt-300x195.png 300w, https:\/\/hasselba.ch\/blog\/wp-content\/uploads\/2015\/01\/Unbenannt.png 601w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Now I can try to DoS the application.\u00a0 Because the outgoing connection from the application waits for a response (think about &#8222;<em>telnet www.example.com 80<\/em>&#8222;), I can create a bunch of requests, and the server will quickly reach it&#8217;s limit.<\/p>\n<p>That&#8217;s why I created a simple bash script which makes HTTP request to the Bluemix instance. The script runs on a Raspberry Pi, to demonstrate the\u00a0<span id=\"result_box\" class=\"short_text\" lang=\"en\"><span class=\"hps\">low demand<\/span><\/span> of hardware requirements and to show how easy it is do make a DoS attack against a XPage application (if it is was not developed under security aspects).<\/p>\n<p>Here is a short video (the source of the bash script is NOT shown, but it has fewer then 10 lines of code):<\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.dailymotion.com\/embed\/video\/k4QQLf9zrHdhV19YTDU\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>This was a &#8222;friendly&#8220; attack. I have not done anything harmfull. And this is a demo app; if it is not secure, this is not a real problem. The application is available again ten minutes later.<\/p>\n<p>But last night I searched for some XPages servers in the WWW, and I found a lot of misconfigured systems: Error Page enabled, the &#8222;<em>Ignore request parameter<\/em>&#8220; is not set to &#8222;<em>true<\/em>&#8220; or at least the hack from Fredrik running. And the servers are allowed to access the whole internet&#8230; Dev&#8217;s and Admins should do their jobs better!<\/p>\n<p>If you plan to migrate your apps to the cloud, please learn more about security. Or hire some specialists with the knowledge and <span id=\"result_box\" class=\"short_text\" lang=\"en\"><span class=\"hps\">experience<\/span><\/span> in this sector. It is worth the time and the money.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had some time last night (the whole family had gone to bed early), so I spent some to look at the XPages integration into Bluemix. I found the Greenwell Travel Expenses Demo: But after clicking a link, the page &hellip; <a href=\"https:\/\/hasselba.ch\/blog\/?p=1974\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,81,74],"tags":[68,67,90,12,3],"class_list":["post-1974","post","type-post","status-publish","format-standard","hentry","category-security","category-web","category-xpages","tag-bluemix","tag-cloud","tag-security","tag-web","tag-xpages"],"_links":{"self":[{"href":"https:\/\/hasselba.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasselba.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasselba.ch\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasselba.ch\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hasselba.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1974"}],"version-history":[{"count":9,"href":"https:\/\/hasselba.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1974\/revisions"}],"predecessor-version":[{"id":1990,"href":"https:\/\/hasselba.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1974\/revisions\/1990"}],"wp:attachment":[{"href":"https:\/\/hasselba.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasselba.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasselba.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}