{"id":2131,"date":"2016-08-17T21:30:00","date_gmt":"2016-08-17T20:30:00","guid":{"rendered":"https:\/\/ulrichard.ch\/blog\/?p=2131"},"modified":"2016-08-17T21:30:00","modified_gmt":"2016-08-17T20:30:00","slug":"running-hostile-software-in-a-container","status":"publish","type":"post","link":"https:\/\/ulrichard.ch\/blog\/?p=2131","title":{"rendered":"Running hostile software in a container"},"content":{"rendered":"<p>Remember Skype, the once popular phone software? I used it a lot when we were traveling in South America, and international calls were insanely expensive. But I stopped using it when it was acquired by Microsoft, and they switched from a P2P model to centralized servers. From what I could observe, it gradually worsened from there, and I really thought I wouldn&#8217;t have to use it ever again. That was until somebody decided that we had to use Skype for Business instead of XMPP at work. There are a plethora of better alternatives. The one I use the most these days is <a href=\"https:\/\/tox.chat\/\" target=\"_blank\" rel=\"noopener\">Tox<\/a>.<\/p>\n<p>I use the Windows Workstation only for things that I can&#8217;t do on Linux. There is not much that falls into this category, besides VisualStudio compiling projects that involve MFC. There is <a href=\"https:\/\/linux.slashdot.org\/story\/07\/08\/26\/1312256\/skype-linux-reads-password-and-firefox-profile\" target=\"_blank\" rel=\"noopener\">Skype<\/a> for Linux, but there is no official Skype for Business for Linux. So for a moment it looked like the Windows machine got a second task. But running an <a href=\"http:\/\/www.oklabs.net\/skype-reverse-engineering-the-long-journey\/\" target=\"_blank\" rel=\"noopener\">obfuscated<\/a> <a href=\"https:\/\/linux.slashdot.org\/story\/07\/08\/26\/1312256\/skype-linux-reads-password-and-firefox-profile\" target=\"_blank\" rel=\"noopener\">malicious<\/a> binary blob from Microsoft with known <a href=\"http:\/\/www.technobuffalo.com\/2013\/07\/11\/microsoft-gave-the-nsa-direct-backdoor-access-to-outlook-skype\/\" target=\"_blank\" rel=\"noopener\">backdoors<\/a>, that is online all the time on an <a href=\"https:\/\/www.gnu.org\/proprietary\/malware-microsoft.html\">operating system<\/a> that <a href=\"https:\/\/www.eff.org\/deeplinks\/2016\/08\/windows-10-microsoft-blatantly-disregards-user-choice-and-privacy-deep-dive\" target=\"_blank\" rel=\"noopener\">can not be secured<\/a> makes me uneasy. So I looked for a way to run it securely on Linux. The first thing I found was an open source implementation of the reverse engineered proprietary protocol as a plugin for Pidgin. That sounded good, but it didn&#8217;t work unfortunately. The second option was a closed source clone from <a href=\"http:\/\/tel.red\/\" target=\"_blank\" rel=\"noopener\">tel.red<\/a>. They provide their own apt repository with regular updates. That&#8217;s quite good actually, if you don&#8217;t care about closed source software, and the security of your device and data in general.<\/p>\n<p>I learned about docker a while back, but only used it marginally so far. This was the first real use I had for it, so I started learning more about it. Copying and adapting a docker file is a lot easier than the articles I read so far made me believe. I found a couple of <a href=\"https:\/\/binfalse.de\/2016\/01\/04\/docker-jail-for-skype\/\" target=\"_blank\" rel=\"noopener\">sites<\/a> <a href=\"https:\/\/github.com\/tomparys\/docker-skype-pulseaudio\" target=\"_blank\" rel=\"noopener\">about<\/a> <a href=\"https:\/\/index.docker.io\/u\/tomparys\/skype\/\" target=\"_blank\" rel=\"noopener\">packing<\/a> <a href=\"https:\/\/github.com\/tomparys\/docker-skype-pulseaudio\/blob\/master\/Dockerfile\" target=\"_blank\" rel=\"noopener\">Skype<\/a> <a href=\"https:\/\/www.dustri.org\/b\/running-skype-in-docker.html\" target=\"_blank\" rel=\"noopener\">into<\/a> a docker container, but none for Skype for Business. So I took <a href=\"https:\/\/github.com\/tomparys\/docker-skype-pulseaudio\" target=\"_blank\" rel=\"noopener\">one of the former ones<\/a> and adapted it. To use my container, just follow these easy steps:<\/p>\n<pre>git clone https:\/\/github.com:ulrichard\/docker-skype-business\ncd docker-skype-business\nsudo docker build -t skype .\nsudo docker run -d -p 55555:22 <code class=\"language-bash\">--name skype_container<\/code> skype\nssh-copy-id -p 55555 docker@localhost\nssh -X -p 55555 docker@localhost sky<\/pre>\n<p>The password for ssh-copy-id is &#8220;docker&#8221;.<\/p>\n<p>Then log into sky with your credentials. You can do this every time, or you can store a configured copy of the container as follows:<\/p>\n<p><code class=\"language-bash\">docker commit skype_container skype_business<\/code><\/p>\n<p>The next time, you just run it with:<\/p>\n<pre>sudo docker run -d -p 55555:22 <code class=\"language-bash\">skype_business<\/code>\nssh -X -p 55555 docker@localhost sky<\/pre>\n<p>I left some pulseaudio stuff from the original container at least in the README file. I don&#8217;t intend to use it for anything but receiving chat messages. But if you want to, feel free to experiment and report back.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Remember Skype, the once popular phone software? I used it a lot when we were traveling in South America, and international calls were insanely expensive. But I stopped using it when it was acquired by Microsoft, and they switched from a P2P model to centralized servers. From what I could observe, it gradually worsened from [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,1,10],"tags":[204,247],"class_list":["post-2131","post","type-post","status-publish","format-standard","hentry","category-software","category-uncategorized","category-work","tag-skype","tag-windows"],"_links":{"self":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2131"}],"version-history":[{"count":0,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2131\/revisions"}],"wp:attachment":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}