<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>phocean &#8211; Phocean.net</title>
	<atom:link href="/author/jc/feed" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Computer Security Blog</description>
	<lastBuildDate>Fri, 24 Feb 2017 21:17:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.10</generator>
	<item>
		<title>BeEF Docker</title>
		<link>/2017/02/24/beef-docker.html</link>
		<pubDate>Fri, 24 Feb 2017 21:17:51 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[BeEF]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Dockerfile]]></category>
		<category><![CDATA[Metasploit]]></category>
		<category><![CDATA[pentest]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://phocean.net/?p=2154</guid>
		<guid isPermaLink="false">http://phocean.net/?p=2154</guid>
		<description><![CDATA[Just a quick update to tell about a new Docker based on the phocean/msf image. https://hub.docker.com/r/phocean/beef/ https://github.com/phocean/dockerfile-beef It provides an image for the BeEF framework for XSS browser exploitation (http://beefproject.com/). Enjoy it!]]></description>
				<content:encoded><![CDATA[<p>Just a quick update to tell about a new Docker based on the phocean/msf image.</p>
<p><a href="https://hub.docker.com/r/phocean/beef/">https://hub.docker.com/r/phocean/beef/</a></p>
<p><a href="https://github.com/phocean/dockerfile-beef">https://github.com/phocean/dockerfile-beef</a></p>
<p>It provides an image for the BeEF framework for XSS browser exploitation (<a href="http://beefproject.com/">http://beefproject.com/</a>).</p>
<p>Enjoy it!</p>
]]></content:encoded>
			</item>
		<item>
		<title>TopIcons-plus for Gnome (v18)</title>
		<link>/2016/12/18/topicons-plus-for-gnome-v18.html</link>
		<comments>/2016/12/18/topicons-plus-for-gnome-v18.html#comments</comments>
		<pubDate>Sun, 18 Dec 2016 17:49:11 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[gnome-shell]]></category>
		<category><![CDATA[topicons-plus]]></category>

		<guid isPermaLink="false">http://phocean.net/?p=2148</guid>
		<guid isPermaLink="false">http://phocean.net/?p=2148</guid>
		<description><![CDATA[This is another off-topic post as it is not related to security. It has been awhile since I released the TopIcons-plus Gnome-Shell extension. I had not advertised it here because it was not really ready or stable, but now I believe it is taking shape. How is Topicons-plus useful ? The Gnome developers want to...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2016/12/18/topicons-plus-for-gnome-v18.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>This is another off-topic post as it is not related to security.</p>
<p>It has been awhile since I released the <a href="https://github.com/phocean/TopIcons-plus">TopIcons-plus Gnome-Shell extension</a>.</p>
<p>I had not advertised it here because it was not really ready or stable, but now I believe it is taking shape.</p>
<h2>How is Topicons-plus useful ?</h2>
<p>The Gnome developers want to kill system tray icons, which are displayed in what they call the legacy tray.</p>
<p>Such icons are familiar to everybody: messaging programs like RocketChat or Telegram, e-mail clients like Thunderbird, Dropbox, KeepassX, etc.</p>
<p>Gnome designers think such a design belongs to past, is flawed in many ways (status or menu?) and should be useless with modern environments with a dock and a powerful notification system.</p>
<p>I would not comment on that and I actually believe they are right.</p>
<p>However, the legacy tray they propose is horrible. It is hidden most of the time and you have to click to open it before accessing to your icons. It is very painful, and it is done on purpose, to clearly send a message that it should not be used anymore by application developers.</p>
<h2>Well, but what about the existing applications ?</h2>
<p>They are not going away all the sudden. As a user, I still need them.</p>
<p>And it is open-source, mostly developed on free time: developers are not going to re-implement everything just for the Gnome ecosystem&#8230;</p>
<p>That is where I think an extension like TopIcons-plus is useful. It removes the hassle of this legacy tray by bringing back the icons to the top bar, so they are always visible.</p>
<h2>Latest release</h2>
<p>It comes with extra features, like styling (opacity, desaturation, size) and positioning.</p>
<p>The <a href="https://github.com/phocean/TopIcons-plus/releases/tag/v18">latest release</a> should be in pretty good shape. If you don&#8217;t want to use the Github code, be patient: it should get validated on the <a href="https://extensions.gnome.org/extension/1031/topicons/">Gnome website</a> within the next days.</p>
<p>Enjoy!</p>
<div id="attachment_2149" style="width: 1930px" class="wp-caption aligncenter"><img class="wp-image-2149 size-full" src="http://phocean.net/wp-content/uploads/2016/12/Capture-décran-de-2016-12-18-14-35-20.png" width="1920" height="157" srcset="/wp-content/uploads/2016/12/Capture-décran-de-2016-12-18-14-35-20.png 1920w, /wp-content/uploads/2016/12/Capture-décran-de-2016-12-18-14-35-20-580x47.png 580w, /wp-content/uploads/2016/12/Capture-décran-de-2016-12-18-14-35-20-768x63.png 768w, /wp-content/uploads/2016/12/Capture-décran-de-2016-12-18-14-35-20-940x77.png 940w, /wp-content/uploads/2016/12/Capture-décran-de-2016-12-18-14-35-20-624x51.png 624w" sizes="(max-width: 1920px) 100vw, 1920px" /><p class="wp-caption-text">TopIcons-Plus v18, tray icons centered</p></div>
<div id="attachment_2149" style="width: 1930px" class="wp-caption aligncenter"><img class="wp-image-2149 size-full" src="http://phocean.net/wp-content/uploads/2016/12/Capture-décran-de-2016-12-18-14-35-20.png" width="1920" height="157" srcset="/wp-content/uploads/2016/12/Capture-décran-de-2016-12-18-14-35-20.png 1920w, /wp-content/uploads/2016/12/Capture-décran-de-2016-12-18-14-35-20-580x47.png 580w, /wp-content/uploads/2016/12/Capture-décran-de-2016-12-18-14-35-20-768x63.png 768w, /wp-content/uploads/2016/12/Capture-décran-de-2016-12-18-14-35-20-940x77.png 940w, /wp-content/uploads/2016/12/Capture-décran-de-2016-12-18-14-35-20-624x51.png 624w" sizes="(max-width: 1920px) 100vw, 1920px" /><p class="wp-caption-text">TopIcons-Plus v18, tray icons centered</p></div>
]]></content:encoded>
			<wfw:commentRss>/2016/12/18/topicons-plus-for-gnome-v18.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reducing the friction™ with social medias thanks to Netvibes</title>
		<link>/2016/11/27/reducing-the-friction-with-social-media-thanks-to-netvibes.html</link>
		<pubDate>Sun, 27 Nov 2016 12:31:20 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Defense]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[technology watch]]></category>

		<guid isPermaLink="false">http://phocean.net/?p=2134</guid>
		<guid isPermaLink="false">http://phocean.net/?p=2134</guid>
		<description><![CDATA[I have been a big fan of the &#8220;Reducing the friction&#8221; series of article published by Scott Lowe a while back. These articles consist in tips to automate or improve the smoothness of repeated professional tasks. If you haven&#8217;t, I recommend you to read them. Some are specific to the Mac OS X environments, but...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2016/11/27/reducing-the-friction-with-social-media-thanks-to-netvibes.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>I have been a big fan of the &#8220;<a href="http://blog.scottlowe.org/archives/">Reducing the friction</a>&#8221; series of article published by <a href="https://twitter.com/scott_lowe">Scott Lowe</a> a while back.</p>
<p>These articles consist in tips to automate or improve the smoothness of repeated professional tasks. If you haven&#8217;t, I recommend you to read them.</p>
<p>Some are specific to the Mac OS X environments, but most of time it is easy to find alternative stuff for Linux. By the way, I am thinking of sharing my own tips for Linux some day.</p>
<h2>The issues with technology watch</h2>
<p>Today, I will start with an article on how I tackled the issues I have with technology watching : too much information, too many sources, too much noise, too much time wasted&#8230; Hmm, yes, that&#8217;s a lot of issues!</p>
<p>Before, below are the sources that I used to visit plenty of times a day:</p>
<ul>
<li>RSS/Atom feeds, from <a href="http://www.feedly.com/">Feedly</a> with a few hundreds of sources.</li>
<li>Twitter</li>
<li>Reddit (most often /r/netsec, but also others)</li>
<li>Hacker News</li>
</ul>
<p>So my typical checks consisted in visiting these places subsequently, several times a day. With all the hassle of using different interfaces and the distractions that you can find there, it used to be very time costly and not really efficient.</p>
<p>Typically, I would save interesting topics there (&#8220;<em>like&#8221;</em> in Twitter, &#8220;<em>save</em>&#8221; for Feedly&#8230;) for a later check. Sometimes I would also use <a href="https://getpocket.com/">Pocket</a> to read them offline, or a simple PDF export.</p>
<p>As I already said, such a process with many tools is far from ideal and from the <em>Reduce the friction</em><img src="https://s.w.org/images/core/emoji/11/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> theory.</p>
<h2>Reducing the friction with Netvibes</h2>
<p><a href="https://www.netvibes.com">Netvibes</a> is a Web platform allowing to gather many kinds of contents within dashboards. It is in fact possible to use it as a news aggregator like Feedly, but it has much more capabilities.</p>
<p>First, it can handle sources from various technologies or social media actors (at least, major ones are supported):</p>
<ul>
<li>RSS/Atom</li>
<li>Twitter</li>
<li>Reddit</li>
<li>Facebook</li>
</ul>
<p>After adding some sources (they call them <em>applications</em>), you can get a classic feed view like below:</p>
<div id="attachment_2138" style="width: 590px" class="wp-caption aligncenter"><img class="size-medium wp-image-2138" src="http://phocean.net/wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-07-48-580x106.png" alt="Feed view on Netvibes" width="580" height="106" srcset="/wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-07-48-580x106.png 580w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-07-48-768x141.png 768w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-07-48-940x173.png 940w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-07-48-624x115.png 624w" sizes="(max-width: 580px) 100vw, 580px" /><p class="wp-caption-text">Feed view on Netvibes</p></div>
<div id="attachment_2138" style="width: 590px" class="wp-caption aligncenter"><img class="size-medium wp-image-2138" src="http://phocean.net/wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-07-48-580x106.png" alt="Feed view on Netvibes" width="580" height="106" srcset="/wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-07-48-580x106.png 580w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-07-48-768x141.png 768w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-07-48-940x173.png 940w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-07-48-624x115.png 624w" sizes="(max-width: 580px) 100vw, 580px" /><p class="wp-caption-text">Feed view on Netvibes</p></div>
<p>Nice! We now have a lot of stuff in one place and you can easily distinct what you have read or not (which is not easy to achieve in Twitter, for instance).</p>
<p>Then, similar to what <a href="https://ifttt.com">IFTT</a> offers, you can create automated actions easily.</p>
<p>Here are some of the supported triggers:</p>
<div id="attachment_2137" style="width: 590px" class="wp-caption aligncenter"><img class="size-medium wp-image-2137" src="http://phocean.net/wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-10-57-59-580x256.png" alt="Services supported by Netvibes" width="580" height="256" srcset="/wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-10-57-59-580x256.png 580w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-10-57-59-768x340.png 768w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-10-57-59-940x416.png 940w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-10-57-59-624x276.png 624w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-10-57-59.png 1192w" sizes="(max-width: 580px) 100vw, 580px" /><p class="wp-caption-text">Services supported by Netvibes</p></div>
<div id="attachment_2137" style="width: 590px" class="wp-caption aligncenter"><img class="size-medium wp-image-2137" src="http://phocean.net/wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-10-57-59-580x256.png" alt="Services supported by Netvibes" width="580" height="256" srcset="/wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-10-57-59-580x256.png 580w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-10-57-59-768x340.png 768w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-10-57-59-940x416.png 940w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-10-57-59-624x276.png 624w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-10-57-59.png 1192w" sizes="(max-width: 580px) 100vw, 580px" /><p class="wp-caption-text">Services supported by Netvibes</p></div>
<p>Based on a trigger like <em>marking</em> an article from within Netvibes, I can decide to send that article to Pocket or by e-mail for offline reading:</p>
<div id="attachment_2139" style="width: 590px" class="wp-caption aligncenter"><img class="size-medium wp-image-2139" src="http://phocean.net/wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-08-11-580x263.png" alt="Netvibes action" width="580" height="263" srcset="/wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-08-11-580x263.png 580w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-08-11-768x348.png 768w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-08-11-940x427.png 940w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-08-11-624x283.png 624w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-08-11.png 1503w" sizes="(max-width: 580px) 100vw, 580px" /><p class="wp-caption-text">Netvibes action</p></div>
<div id="attachment_2139" style="width: 590px" class="wp-caption aligncenter"><img class="size-medium wp-image-2139" src="http://phocean.net/wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-08-11-580x263.png" alt="Netvibes action" width="580" height="263" srcset="/wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-08-11-580x263.png 580w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-08-11-768x348.png 768w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-08-11-940x427.png 940w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-08-11-624x283.png 624w, /wp-content/uploads/2016/11/Capture-décran-de-2016-11-27-09-08-11.png 1503w" sizes="(max-width: 580px) 100vw, 580px" /><p class="wp-caption-text">Netvibes action</p></div>
<p>I have also another action: when a new post appears on a subreddit, I also send it to Pocket.</p>
<p>The possibilities, while not yet infinite, are huge.</p>
<p>You can do a lot with the free version, but for 2€ a month, you get content indexing to quickly find back some items in your feeds. I took this option, as it is useful but also as it is a way to support this project.</p>
<p>There is a premium offer, by far more expensive, but it is not really aimed to individual (analytics and collaborative features). See <a href="https://www.netvibes.com/fr/products">this page</a> for more information.</p>
<h2>Conclusion</h2>
<p>I have tried, I believe, all possible alternatives. Including integrating Feedly with IFFT, which is nice but does not solve the issue of reading many sources.</p>
<p>Netvibes is so far very interesting and powerful. It is not perfect, however.</p>
<p>Sometimes the interface is a little clumsy or cumbersome. I also miss a mobile application (for Android), even though the mobile HTML 5 interface is not that bad (http://mobile.netvibes.com).</p>
<p>Finally, I could not find a way to republish a dashboard feed as RSS, so that I could use a mobile reader. Let&#8217;s hope that this powerful tool will continue to improve, and for that I hope it gains in popularity.</p>
]]></content:encoded>
			</item>
		<item>
		<title>One more rant against the Linux Intel graphic driver</title>
		<link>/2016/10/09/one-more-rant-against-the-linux-intel-driver.html</link>
		<pubDate>Sun, 09 Oct 2016 21:21:04 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[System]]></category>

		<guid isPermaLink="false">http://phocean.net/?p=2123</guid>
		<guid isPermaLink="false">http://phocean.net/?p=2123</guid>
		<description><![CDATA[Some quick notes that may help random Linux users looking for similar issues. I am, like many, the unfortunate user of a laptop with Intel graphics (Thinkpad T460 to be precise). Why unfortunate? Because the graphic driver provided by Intel sucks. i915, as it is being called, really has been sucking for years, and it...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2016/10/09/one-more-rant-against-the-linux-intel-driver.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>Some quick notes that may help random Linux users looking for similar issues.</p>
<p>I am, like many, the unfortunate user of a laptop with Intel graphics (Thinkpad T460 to be precise). Why unfortunate? Because the graphic driver provided by Intel sucks.</p>
<p><em><strong>i915</strong></em>, as it is being called, really has been sucking for years, and it is known for that (just google it, if you don&#8217;t believe me).</p>
<p>For the sake of completeness, here is the exact model with which I experienced some issues:</p>
<pre>%  lspci
00:00.0 Host bridge: Intel Corporation Skylake Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07)
...</pre>
<h2>For performance, remove the X11 Intel driver</h2>
<p>First, its X11 module is generally under-performing under X11, so I just removed it to have X11 using <em>modsettings. </em>These are the instructions for Fedora (24), but you can virtually do something similar for any distribution:</p>
<pre>% dnf remove xorg-x11-drv-intel</pre>
<p>Do not worry, it just remove the X11 part of the driver, not the kernel driver itself.</p>
<p>Login, logout, job done: you should have less lags with desktop environments like gnome-shell.</p>
<h2>For stability, disable RC6</h2>
<p>I experienced frequent, daily freezes of my work session. The display would totally hang or display a blank screen, forcing me to cold reboot the computer.</p>
<p>Here is an extract of the <em>dmesg</em> kernel traces leading the the crash (it is a bit lengthy, but that may help people to find this post):</p>
<pre>oct. 06 11:00:25 localhost.localdomain kernel: [drm] RC6 on
oct. 06 11:00:44 localhost.localdomain kernel: [drm] RC6 on
oct. 06 11:01:01 localhost.localdomain kernel: [drm] RC6 on
oct. 06 11:01:25 localhost.localdomain kernel: [drm] RC6 on
oct. 06 11:01:43 localhost.localdomain kernel: [drm] RC6 on
oct. 06 11:02:01 localhost.localdomain kernel: [drm] RC6 on
oct. 06 11:02:22 localhost.localdomain kernel: [drm] RC6 on
oct. 06 11:04:08 localhost.localdomain kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe B (start=6364 end=6365) time 287 us, min 954, max 959, scanline start 950, end 967
oct. 06 11:13:58 localhost.localdomain kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe B (start=41777 end=41778) time 340 us, min 954, max 959, scanline start 946, end 967
oct. 06 11:20:18 localhost.localdomain kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe B (start=64583 end=64584) time 284 us, min 954, max 959, scanline start 946, end 964
oct. 06 11:20:33 localhost.localdomain kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=65517 end=65518) time 284 us, min 1073, max 1079, scanline start 1071, end 1091
oct. 06 11:28:27 localhost.localdomain kernel: [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
oct. 06 11:31:53 localhost.localdomain kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=106339 end=106340) time 285 us, min 1073, max 1079, scanline start 1066, end 1086
oct. 06 11:33:58 localhost.localdomain kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe B (start=113803 end=113804) time 287 us, min 954, max 959, scanline start 948, end 966
oct. 06 11:35:13 localhost.localdomain kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=118345 end=118346) time 285 us, min 1073, max 1079, scanline start 1062, end 1081
oct. 06 11:52:59 localhost.localdomain kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=182278 end=182279) time 282 us, min 1073, max 1079, scanline start 1064, end 1084
oct. 06 12:01:29 localhost.localdomain kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=212893 end=212894) time 284 us, min 1073, max 1079, scanline start 1068, end 1088
oct. 06 12:02:44 localhost.localdomain kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=217395 end=217396) time 282 us, min 1073, max 1079, scanline start 1068, end 1088
oct. 06 12:02:49 localhost.localdomain kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe B (start=217642 end=217643) time 247 us, min 954, max 959, scanline start 949, end 964
oct. 06 12:03:54 localhost.localdomain kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=221597 end=221598) time 281 us, min 1073, max 1079, scanline start 1067, end 1086
oct. 06 12:05:49 localhost.localdomain kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe B (start=228446 end=228447) time 290 us, min 954, max 959, scanline start 948, end 966
oct. 06 12:17:32 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:18:01 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:18:23 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:18:44 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:19:01 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:19:25 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:19:44 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:20:01 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:20:25 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:20:44 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:20:52 localhost.localdomain kernel: [drm] stuck on render ring
oct. 06 12:20:52 localhost.localdomain kernel: [drm] GPU HANG: ecode 9:0:0xfffffffe, in Xorg [2322], reason: Engine(s) hung, action: reset
oct. 06 12:20:52 localhost.localdomain kernel: [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
oct. 06 12:20:52 localhost.localdomain kernel: [drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI -&gt; DRM/Intel
oct. 06 12:20:52 localhost.localdomain kernel: [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
oct. 06 12:20:52 localhost.localdomain kernel: [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
oct. 06 12:20:52 localhost.localdomain kernel: [drm] GPU crash dump saved to /sys/class/drm/card0/error
oct. 06 12:20:52 localhost.localdomain kernel: drm/i915: Resetting chip after gpu hang
oct. 06 12:20:54 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:21:05 localhost.localdomain kernel: [drm] stuck on render ring
oct. 06 12:21:05 localhost.localdomain kernel: [drm] GPU HANG: ecode 9:0:0xfffffffe, in gnome-shell [2532], reason: Engine(s) hung, action: reset
oct. 06 12:21:05 localhost.localdomain kernel: drm/i915: Resetting chip after gpu hang
oct. 06 12:21:07 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:21:15 localhost.localdomain kernel: [drm] stuck on render ring
oct. 06 12:21:15 localhost.localdomain kernel: [drm] GPU HANG: ecode 9:0:0xfffffffe, in gnome-shell [2532], reason: Engine(s) hung, action: reset
oct. 06 12:21:15 localhost.localdomain kernel: drm/i915: Resetting chip after gpu hang
oct. 06 12:21:17 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:21:27 localhost.localdomain kernel: [drm] stuck on render ring
oct. 06 12:21:27 localhost.localdomain kernel: [drm] GPU HANG: ecode 9:0:0xfffffffe, in Xorg [2322], reason: Engine(s) hung, action: reset
oct. 06 12:21:27 localhost.localdomain kernel: drm/i915: Resetting chip after gpu hang
oct. 06 12:21:29 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:21:37 localhost.localdomain kernel: [drm] stuck on render ring
oct. 06 12:21:37 localhost.localdomain kernel: [drm] GPU HANG: ecode 9:0:0xfffffffe, in Xorg [2322], reason: Engine(s) hung, action: reset
oct. 06 12:21:37 localhost.localdomain kernel: drm/i915: Resetting chip after gpu hang
oct. 06 12:21:39 localhost.localdomain kernel: [drm] RC6 on
oct. 06 12:21:43 localhost.localdomain kernel: ------------[ cut here ]------------
oct. 06 12:21:43 localhost.localdomain kernel: WARNING: CPU: 0 PID: 1109 at drivers/gpu/drm/i915/intel_display.c:13533 intel_atomic_commit+0x13b8/0x1470 [i915]
oct. 06 12:21:43 localhost.localdomain kernel: pipe A vblank wait timed out
oct. 06 12:21:43 localhost.localdomain kernel: Modules linked in: tun nfnetlink_queue nfnetlink_log uas usb_storage xt_nat veth rfcomm ccm ipt_MASQUERADE nf_nat_masquerade_ipv4 xt_addrtype br_netfilter ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack dm_thin_pool dm_persistent_data dm_bio_prison loop ip_set nfnetlink ebtable_nat ebtable_broute bridge ip6table_raw ip6table_mangle ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_security iptable_raw iptable_mangle iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_security ebtable_filter ebtables ip6table_filter ip6_tables vmnet(O) ppdev parport_pc parport vboxpci(O) vboxnetadp(O) vboxnetflt(O) fuse vmw_vsock_vmci_transport vsock vmw_vmci vmmon(O) vboxdrv(O) cmac bnep cpufreq_stats vfat fat arc4 iTCO_wdt snd_soc_skl iTCO_vendor_support
oct. 06 12:21:43 localhost.localdomain kernel:  snd_soc_skl_ipc snd_hda_codec_hdmi snd_soc_sst_ipc intel_rapl snd_soc_sst_dsp x86_pkg_temp_thermal snd_hda_codec_realtek snd_hda_ext_core intel_powerclamp snd_hda_codec_generic coretemp snd_soc_sst_match kvm_intel snd_soc_core kvm snd_compress snd_pcm_dmaengine ac97_bus snd_hda_intel snd_hda_codec iwlmvm snd_hda_core mac80211 irqbypass intel_cstate intel_rapl_perf snd_hwdep snd_seq snd_seq_device btusb snd_pcm btrtl uvcvideo btbcm btintel videobuf2_vmalloc videobuf2_memops joydev bluetooth videobuf2_v4l2 iwlwifi i2c_i801 snd_timer videobuf2_core cfg80211 rtsx_pci_ms videodev memstick media mei_me mei shpchp thinkpad_acpi intel_pch_thermal snd soundcore rfkill wmi tpm_tis tpm nfsd auth_rpcgss nfs_acl lockd grace sunrpc xfs libcrc32c dm_crypt hid_logitech_hidpp hid_logitech_dj 8021q garp
oct. 06 12:21:43 localhost.localdomain kernel:  stp llc mrp i915 rtsx_pci_sdmmc mmc_core crct10dif_pclmul crc32_pclmul crc32c_intel e1000e i2c_algo_bit drm_kms_helper ghash_clmulni_intel drm serio_raw ptp pps_core rtsx_pci video fjes
oct. 06 12:21:43 localhost.localdomain kernel: CPU: 0 PID: 1109 Comm: systemd-logind Tainted: G     U  W  O    4.7.5-200.fc24.x86_64 #1
oct. 06 12:21:43 localhost.localdomain kernel: Hardware name: LENOVO 20FNCTO1WW/20FNCTO1WW, BIOS R06ET42W (1.16 ) 09/20/2016
oct. 06 12:21:43 localhost.localdomain kernel:  0000000000000286 0000000018e0c148 ffff8800d283b850 ffffffffb63daaaf
oct. 06 12:21:43 localhost.localdomain kernel:  ffff8800d283b8a0 0000000000000000 ffff8800d283b890 ffffffffb60a0b0b
oct. 06 12:21:43 localhost.localdomain kernel:  000034dd00000000 ffff88040f607000 0000000000000000 0000000000000000
oct. 06 12:21:43 localhost.localdomain kernel: Call Trace:
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb63daaaf&gt;] dump_stack+0x63/0x84
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb60a0b0b&gt;] __warn+0xcb/0xf0
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb60a0b8f&gt;] warn_slowpath_fmt+0x5f/0x80
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb60e4483&gt;] ? finish_wait+0x53/0x70
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffc05046a8&gt;] intel_atomic_commit+0x13b8/0x1470 [i915]
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb60e46e0&gt;] ? prepare_to_wait_event+0xf0/0xf0
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffc0380ba7&gt;] drm_atomic_commit+0x37/0x60 [drm]
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffc03e21e8&gt;] restore_fbdev_mode+0x238/0x260 [drm_kms_helper]
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffc03e45d4&gt;] drm_fb_helper_restore_fbdev_mode_unlocked+0x34/0x80 [drm_kms_helper]
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffc03e464d&gt;] drm_fb_helper_set_par+0x2d/0x50 [drm_kms_helper]
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffc051ea4a&gt;] intel_fbdev_set_par+0x1a/0x60 [i915]
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb645a6b6&gt;] fb_set_var+0x236/0x460
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb60e4004&gt;] ? __wake_up+0x44/0x50
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb67ea562&gt;] ? down_write+0x12/0x40
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb64caabb&gt;] ? tty_unthrottle+0x3b/0x60
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb645074f&gt;] fbcon_blank+0x30f/0x350
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb64db0b2&gt;] do_unblank_screen+0xd2/0x1a0
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb64d0ef6&gt;] vt_ioctl+0x4f6/0x1270
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb64c537a&gt;] tty_ioctl+0x35a/0xc50
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb625f909&gt;] ? dput+0xd9/0x260
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb625b4b2&gt;] do_vfs_ioctl+0xa2/0x5d0
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb60be9b8&gt;] ? task_work_run+0x88/0xb0
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb625ba59&gt;] SyS_ioctl+0x79/0x90
oct. 06 12:21:43 localhost.localdomain kernel:  [&lt;ffffffffb67ec572&gt;] entry_SYSCALL_64_fastpath+0x1a/0xa4
oct. 06 12:21:43 localhost.localdomain kernel: ---[ end trace 9f62268cfd97b6cb ]---</pre>
<p>As seen above, it would always happen after a while and when the graphic chip goes to the RC6 power saving mode.</p>
<p>After searching on different forum and wikis, I applied the proposed solution of completly disabling the RC6 mode. Add the part in <span style="color: #ff0000;">red</span> to the kernel options in your grub configuration file:</p>
<pre>%  cat /etc/default/grub 
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/root rd.luks.uuid=luks-a9d14a0e-6c22-4976-919a-d216bd69d563 rd.lvm.lv=fedora/swap resume=/dev/dm-2 quiet splash <span style="color: #ff0000;"><strong>i915.enable_rc6=0</strong></span>"
GRUB_DISABLE_RECOVERY="true"</pre>
<p>Then, just rebuild grub and reboot. If you are on a UEFI system (as root):</p>
<pre class="prettyprint"><code><span class="pln">grub2</span><span class="pun">-</span><span class="pln">mkconfig </span><span class="pun">-</span><span class="pln">o </span><span class="pun">/</span><span class="pln">boot</span><span class="pun">/</span><span class="pln">efi</span><span class="pun">/</span><span class="pln">EFI</span><span class="pun">/</span><span class="pln">fedora</span><span class="pun">/</span><span class="pln">grub</span><span class="pun">.</span><span class="pln">cfg</span></code></pre>
<p><span style="text-decoration: underline;">Or</span>, for legacy BIOS:</p>
<pre class="prettyprint"><code><span class="com">grub2-mkconfig -o /boot/grub2/grub.cfg</span></code></pre>
<p>Finally reboot and you are done.</p>
<p>There is a caveat however, as it will probably cause some battery drain. With <em>Powertop</em>, I measured a consumption increase of around 6 W (8 to 13W), which caused my battery life to drop from approximately 10h to 5h30.</p>
<p>Still enough and a acceptable price to pay to work reliably without risking a complete system hang.</p>
<p>But, if I had to buy a computer personally, I would make sure that it has an nvidia card. Yeah, I know that there proprietary blob has its caveats too, but from what I heard it is probably more stable.</p>
<p>Graphic drivers have always been a problem for &#8220;Linux on the desktop&#8221;.</p>
<h2>References</h2>
<ul>
<li>https://wiki.archlinux.org/index.php/intel_graphics</li>
<li>https://wiki.gentoo.org/wiki/Intel</li>
</ul>
]]></content:encoded>
			</item>
		<item>
		<title>Metasploit framework docker image now published on Docker Hub</title>
		<link>/2016/06/28/metasploit-framework-docker-image-now-published-on-docker-hub.html</link>
		<pubDate>Tue, 28 Jun 2016 20:56:32 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Dockerfile]]></category>
		<category><![CDATA[Metasploit]]></category>

		<guid isPermaLink="false">http://phocean.net/?p=2117</guid>
		<guid isPermaLink="false">http://phocean.net/?p=2117</guid>
		<description><![CDATA[I pushed the image on Docker Hub, so that deploying it is now as easy as: docker pull phocean/msf It is an automatic build based on the Github repository. It means that the image is built by Docker, not by me. For this task, they simply have a read access to the Dockerfile on Github....<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2016/06/28/metasploit-framework-docker-image-now-published-on-docker-hub.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>I pushed the image on <a href="https://hub.docker.com/r/phocean/msf/">Docker Hub</a>, so that deploying it is now as easy as:</p>
<pre>docker pull phocean/msf</pre>
<p>It is an automatic build based on the <a href="https://github.com/phocean/dockerfile-debian-metasploit">Github repository</a>.</p>
<p>It means that the image is built by Docker, not by me. For this task, they simply have a read access to the Dockerfile on Github.</p>
<p>Thus, you may place in this image the same level of trust than the one you have in Docker (I cannot interfere in the process and mess with the image).</p>
<p>I say it because I am myself reluctant of installing third-party images. While I prefer to rebuild everything from Dockerfiles, I am fine with automatically built images if I am in a hurry and for non sensitive data.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Site going to full TLS</title>
		<link>/2016/06/03/site-going-to-full-tls.html</link>
		<pubDate>Fri, 03 Jun 2016 21:08:43 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://phocean.net/?p=2112</guid>
		<guid isPermaLink="false">http://phocean.net/?p=2112</guid>
		<description><![CDATA[Hi dear subscribers, Thanks to let&#8217;s encrypt, the site is now going to be accessible only through HTTPS. It also concern the RSS/ATOM feeds. So please update your links and RSS agregators so that you still receive news! Thanks, &#8212; phocean]]></description>
				<content:encoded><![CDATA[<p>Hi dear subscribers,</p>
<p>Thanks to <a href="https://letsencrypt.org/">let&#8217;s encrypt</a>, the site is now going to be accessible only through HTTPS.</p>
<p>It also concern the RSS/ATOM feeds.</p>
<p>So please update your links and RSS agregators so that you still receive news!</p>
<p>Thanks,</p>
<p>&#8212; phocean</p>
]]></content:encoded>
			</item>
		<item>
		<title>Msf docker image now in REMnux!</title>
		<link>/2016/05/12/msf-docker-image-now-in-remnux.html</link>
		<pubDate>Thu, 12 May 2016 17:50:14 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Metasploit]]></category>
		<category><![CDATA[REMnux]]></category>

		<guid isPermaLink="false">http://phocean.net/?p=2108</guid>
		<guid isPermaLink="false">http://phocean.net/?p=2108</guid>
		<description><![CDATA[Just a quick note to say that I am very happy about this Metasploit docker image being useful to some people, according to the feedback I got. And Lenny was kind enough to integrate it into his Linux distro, REMnux, well known among reversing people. He also came up with very good suggestions and helped...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2016/05/12/msf-docker-image-now-in-remnux.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>Just a quick note to say that I am very happy about this <a href="https://github.com/phocean/dockerfile-debian-metasploit">Metasploit docker image</a> being useful to some people, according to the feedback I got.</p>
<p>And <a href="https://twitter.com/lennyzeltser">Lenny</a> was kind enough to integrate it into his Linux distro, <a href="https://remnux.org/">REMnux</a>, well known among reversing people. He also came up with very good suggestions and helped me to bring some improvements, so many thanks to him.</p>
<p>Don&#8217;t miss reading his blog article on how to use the image in REMnux : <a href="https://zeltser.com/metasploit-framework-docker-container/"><em>&#8220;Run Metasploit Framework as a Docker Container Without Installation Pains&#8221;</em></a>.<br />
Stay tuned ;-)</p>
]]></content:encoded>
			</item>
		<item>
		<title>Lessons learned with Docker, Nodejs apps and volumes</title>
		<link>/2016/05/06/the-quest-for-a-secure-nodejs-app-docker-container.html</link>
		<pubDate>Fri, 06 May 2016 17:05:01 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Defense]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Dockerfile]]></category>
		<category><![CDATA[Etherpad]]></category>
		<category><![CDATA[Nodejs]]></category>

		<guid isPermaLink="false">http://phocean.net/?p=2099</guid>
		<guid isPermaLink="false">http://phocean.net/?p=2099</guid>
		<description><![CDATA[Context I have kept playing with Docker recently, just for fun and to learn. It is very powerful, but still young. It quickly shows some limit when it comes to security or persistence. There are some workarounds, yet more or less complex, more or less hacky. Indeed, I had some issues with Etherpad, which is...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2016/05/06/the-quest-for-a-secure-nodejs-app-docker-container.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<h2>Context</h2>
<p>I have kept playing with Docker recently, just for fun and to learn.</p>
<p>It is very powerful, but still young. It quickly shows some limit when it comes to security or persistence. There are some workarounds, yet more or less complex, more or less hacky.</p>
<p>Indeed, I had some issues with Etherpad, which is a Nodejs application, and its integration into Docker.</p>
<p>Initially, I made something quite simple, so my Dockerfile ended like that:</p>
<pre>USER etherpad
CMD ["node","/opt/etherpad-lite/node_modules/ep_etherpad-lite/node/server.js"]</pre>
<p>Thus, I simply start the app with a low privileges user.</p>
<p>It worked, but I had two issues:</p>
<ol>
<li>Docker was not able to stop it nicely. Instead, it timed out after 10 sec and finally killed the app and the container altogether.</li>
<li>No persistence of any kind, of course.</li>
</ol>
<p>I decided to tackle these two issues to understand what was going on behind.</p>
<h2>The PID 1 issue</h2>
<p>I could not understand immediately the first issue: why was Docker unable to terminate the container properly?</p>
<p>After wandering a few hours on wrong paths (trying to get through with Nodejs nodemon or supervisor), I finally found some good articles, explaining that Docker misses an init system to catch signals, wich causes some issues with applications started with a PID = 1, which cannot be killed, or with Bash (the shell doesn&#8217;t handle transmitted signals.</p>
<p>I am not going to repeat poorly what has already been explained very well, so I encourage you to read this two excellent posts:</p>
<ul>
<li><a href="https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/">The PID 1 zombie reaping problem</a></li>
<li><a href="https://medium.com/@gchudnov/trapping-signals-in-docker-containers-7a57fdda7d86#.wqy8msjbk">Trapping signals in Docker containers</a></li>
</ul>
<p>You will also find a lot of bug reports in the Docker github about this issue, and a lot of hacky or overkilling solutions.</p>
<p>In my opinion, the most elegant solution among them is to use a launcher program, very simple and dedicated to catch and handle signal.</p>
<p>I chose to use <a href="https://github.com/yelp/dumb-init">Dumb-init</a>, as it is well packaged (there are plenty of options) and seems to be well maintained.</p>
<p>So, after installing Dump-init in the Dockerfile, the CMD line should now look like this:</p>
<pre>USER etherpad
CMD ["dumb-init","node","/opt/etherpad-lite/node_modules/ep_etherpad-lite/node/server.js"]</pre>
<p>And indeed, as expected, <em>docker stop</em> now works flawlessly.</p>
<h2>Volume permissions</h2>
<p>This is where I had the toughest issue, although it is supposed to be straightforward with volumes.</p>
<p>Volumes enable to share files or folders between host and containers, or between containers solely. There are plenty of possibilities, nicely illustrated on this blog:</p>
<ul>
<li><a href="https://kvaes.wordpress.com/2016/02/11/docker-storage-patterns-for-persistence/">Docker: storage patterns for persistence</a></li>
</ul>
<p>And it works very well&#8230;. as long as you application runs as root.</p>
<p>In my case, for instance, Etherpad runs with a low privileged user, which is highly recommended. At startup, it creates a sqlite database, etherpad.db,  in its ./var folder.</p>
<p>Mounting a volume, of any kind, over the ./var folder, would result in a folder with root only permissions. Subsequently, of course, the launch of Etherpad from the CMD command would fail miserably.</p>
<p>Simple solutions like <em>chown</em> in the Dockerfile don&#8217;t work, because they apply <em>before</em> the mount. The <em>mount</em> occurs at runtime and works like a standard Linux <em>mount:</em> it is created by the docker daemon, with <em>root</em> permissions, over possibly existing data.</p>
<p>My solution was to completely change the way Etherpad is started. I now use an external script which is started at runtime:</p>
<ol>
<li>First, it applies the appropriate permissions to the mounted volume with <em>chown,</em></li>
<li>Then, it starts Etherpad with a low privileged user thanks to a <em>su</em> hack.</li>
</ol>
<p>So now the Dockerfile ends with:</p>
<pre>VOLUME /opt/etherpad-lite/var
ADD run-docker.sh ./bin/
CMD ["./bin/run-docker.sh"]</pre>
<p>And here is the script:</p>
<pre>#!/bin/bash

chown -R etherpad:etherpad /opt/etherpad-lite/var
su etherpad -s /bin/bash -c  "dumb-init node /opt/etherpad-lite/node_modules/ep_etherpad-lite/no
de/server.js"</pre>
<p>I use a data volume for persistency, so the run command looks like this:</p>
<pre>docker run -d --name etherpad -p 80:9001 -v etherpad:/opt/etherpad-lite/var -t debian-etherpad</pre>
<p>Far from being ideal, but it works. I really hope some features are coming to bring more options in this area, especially in the Dockerfile.</p>
<h2>Some final thoughts</h2>
<p>Globally, we can still hope a lot of improvements in security, because when I look at many Dockerfiles around, I see two behaviors:</p>
<ul>
<li>A lot of people don&#8217;t care and everything is happily running as root, from unauthenticated third-party images or binaries&#8230;</li>
<li>Some people do care but end up with dirty hacks, because there is no other way to do so.</li>
</ul>
<p>It is scary and so far from the Linux philosophy. Let&#8217;s wait for the enhancements to come.</p>
<p>You can find the complete <em>updated</em> Dockerfile on <a href="https://github.com/phocean/dockerfile-debian-etherpad/blob/master/Dockerfile">this github page</a>.</p>
<p>While we are on this topic, have a look to <a href="http://blog.labianchin.me/2016/02/15/docker-tips-and-tricks">this nice post with some nice tips and tricks</a> for Docker.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Small improvements to the Metasploit-framework Dockerfile</title>
		<link>/2016/05/03/small-improvements-to-the-metasploit-framework-dockerfile.html</link>
		<pubDate>Tue, 03 May 2016 20:36:38 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Dockerfile]]></category>
		<category><![CDATA[Metasploit]]></category>

		<guid isPermaLink="false">http://phocean.net/?p=2094</guid>
		<guid isPermaLink="false">http://phocean.net/?p=2094</guid>
		<description><![CDATA[I made a few improvements (at least, I think they are) to the metasploit-frameword Dockerfile : A volume from the container /root/.msf4 to $HOME/.msf4, so that you can benefit from your customized prompt, scripts and modules anytime and have persistence on them. In other words, just manage them on your host and they will be...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2016/05/03/small-improvements-to-the-metasploit-framework-dockerfile.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>I made a few improvements (at least, I think they are) to the <a href="/2016/04/27/metasploit-dockerfile.html">metasploit-frameword Dockerfile</a> :</p>
<ul>
<li>A <a href="https://docs.docker.com/engine/userguide/containers/dockervolumes/">volume</a> from the container <em>/root/.msf4</em> to <em>$HOME/.msf4</em>, so that you can benefit from your customized prompt, scripts and modules anytime and have persistence on them. In other words, just manage them on your host and they will be readily available to the <em>msf</em> container.</li>
<li>A volume from the container <em>/tmp/data</em> to the host <em>/tmp/msf</em>, so that you can get access to dump files and stuff like that.</li>
<li><em><a href="https://tmux.github.io/">Tmux</a></em> window manager tool, so that you can easily navigate between <em>msfconsole,</em> bash and other sessions.</li>
<li><em><a href="https://nmap.org/">nmap</a></em> network scanner, just because sometimes it may be useful (along with its <em>ncat</em>).</li>
<li><a href="http://www.nasm.us/"><em>nasm,</em></a> to support your custom encoders.</li>
</ul>
<p>It is all up-to-date in <a href="https://github.com/phocean/dockerfile-debian-metasploit">its github repo</a>. I will keep adjusting it, if I feel something is missing.</p>
<p>I hope I did it the right way, let me know what you think!</p>
]]></content:encoded>
			</item>
		<item>
		<title>Metasploit Dockerfile</title>
		<link>/2016/04/27/metasploit-dockerfile.html</link>
		<comments>/2016/04/27/metasploit-dockerfile.html#comments</comments>
		<pubDate>Wed, 27 Apr 2016 18:26:10 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Dockerfile]]></category>
		<category><![CDATA[Metasploit]]></category>
		<category><![CDATA[pentest]]></category>

		<guid isPermaLink="false">http://phocean.net/?p=2088</guid>
		<guid isPermaLink="false">http://phocean.net/?p=2088</guid>
		<description><![CDATA[Hey, Managing updates and dependencies of a Metasploit installation have definitely been too much trouble and repetitive. Instead of keeping reproducing boring installation steps every x months, I decided to build a Dockerfile for once. I chose Debian for its good compromise between features, stability and lightness. I am aware of the Kali Dockerfile, that...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2016/04/27/metasploit-dockerfile.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>Hey,</p>
<p>Managing updates and dependencies of a Metasploit installation have definitely been too much trouble and repetitive.</p>
<p>Instead of keeping reproducing boring installation steps every <em>x</em> months, I decided to build a <em>Dockerfile</em> for once.</p>
<p>I chose Debian for its good compromise between features, stability and lightness. I am aware of the Kali Dockerfile, that I could have used as a base. But:</p>
<ul>
<li> It is a definitely over-killing image (more than 1 GB) and, at this cost, it does not come with a fully-featured Metasploit (no database connection, for instance).</li>
<li>I like keeping minimal and controlled stuff. In other words, I like doing things on my own.</li>
</ul>
<p>So, this Debian-based Metasploit container comes with:</p>
<ul>
<li>all dependencies installed,</li>
<li>automatic updates at startup,</li>
<li>a connection with the local Postgres database,</li>
<li>an improved prompt with timestamping and sessions/jobs status.</li>
</ul>
<p>You can find it on <a href="https://github.com/phocean/dockerfile-debian-metasploit">my github</a>.</p>
<p>If you have any trouble or suggestion on how to improve it, please let me know. Enjoy it and go ahead if you want to fork it!</p>
<p><img class="aligncenter size-medium wp-image-2092" src="http://phocean.net/wp-content/uploads/2016/04/msf-580x320.png" alt="Docker running msf" width="580" height="320" srcset="/wp-content/uploads/2016/04/msf-580x320.png 580w, /wp-content/uploads/2016/04/msf-624x344.png 624w, /wp-content/uploads/2016/04/msf.png 715w" sizes="(max-width: 580px) 100vw, 580px" /></p>
<p><img class="aligncenter size-medium wp-image-2092" src="http://phocean.net/wp-content/uploads/2016/04/msf-580x320.png" alt="Docker running msf" width="580" height="320" srcset="/wp-content/uploads/2016/04/msf-580x320.png 580w, /wp-content/uploads/2016/04/msf-624x344.png 624w, /wp-content/uploads/2016/04/msf.png 715w" sizes="(max-width: 580px) 100vw, 580px" /></p>
]]></content:encoded>
			<wfw:commentRss>/2016/04/27/metasploit-dockerfile.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
