{"id":318738,"date":"2021-02-27T21:00:38","date_gmt":"2021-02-27T21:00:38","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=318738"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=318738","title":{"rendered":"HackTheBox. \u041f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 Academy. RCE \u0432 Laravel \u0438 LPE \u0447\u0435\u0440\u0435\u0437 composer"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/695\/082\/63b\/69508263be456036aca56aa5df9c077b.png\" width=\"576\" height=\"357\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e&nbsp;\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=\"noopener noreferrer nofollow\">HackTheBox<\/a>. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0445\u043e\u0442\u044c \u043a\u043e\u043c\u0443-\u0442\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0418\u0411. <\/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<details class=\"spoiler\">\n<summary>\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<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0443\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0438 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0441\u0444\u0435\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u044f \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u0445:<\/p>\n<ul>\n<li>\n<p>PWN;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f (Crypto);<\/p>\n<\/li>\n<li>\n<p>c\u0435\u0442\u0435\u0432\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 (Network);<\/p>\n<\/li>\n<li>\n<p>\u0440\u0435\u0432\u0435\u0440\u0441&nbsp;(Reverse Engineering); <\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u0435\u0433\u0430\u043d\u043e\u0433\u0440\u0430\u0444\u0438\u044f&nbsp;(Stegano);<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0438\u0441\u043a \u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044f WEB-\u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439;<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0434\u043e\u0431\u0430\u0432\u043e\u043a \u043a \u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 <em>\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u043a\u0440\u0438\u043c\u0438\u043d\u0430\u043b\u0438\u0441\u0442\u0438\u043a\u0435,<\/em>&nbsp;<em>\u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u043c\u0430\u043b\u0432\u0430\u0440\u0438 \u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043e\u043a<\/em>, <em>\u0430\u0442\u0430\u043a\u0430\u0445 \u043d\u0430 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0442\u0438, \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043f\u0435\u043d\u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u043e\u0432<\/em>.<\/p>\n<p>\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=\"noopener noreferrer nofollow\">\u043a\u0430\u043d\u0430\u043b<\/a> \u0432 Telegram \u0438 \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 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 <a href=\"https:\/\/t.me\/RalfHackerPublicChat\" rel=\"noopener noreferrer nofollow\">\u0418\u0438\u041a\u0411<\/a>. \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 \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 href=\"https:\/\/t.me\/hackerralf8\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430<\/a>).<\/p>\n<\/div>\n<\/details>\n<h2>Recon<\/h2>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0438\u043c\u0435\u0430\u0435\u0442 IP \u0430\u0434\u0440\u0435\u0441 10.10.10.215, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0432 \/etc\/hosts.<\/p>\n<pre><code class=\"bash\">10.10.10.215    academy.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&nbsp;\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.<\/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<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5e5\/628\/e33\/5e5628e3332ba159e3bfbe70af33d575.png\" width=\"1352\" height=\"395\"><figcaption><\/figcaption><\/figure>\n<p>\u0418\u043c\u0435\u0435\u043c SSH, Apache \u0438 MySQL. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0431\u0435\u0440\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 \u0432\u0435\u0431\u0435, \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c gobuster.<\/p>\n<pre><code class=\"bash\">gobuster dir -t 128 -u http:\/\/academy.htb -w \/usr\/share\/wordlists\/dirbuster\/directory-list-lowercase-2.3-medium.txt --timeout 30s<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d9b\/1c3\/556\/d9b1c355656eff61bb2312161736c9d0.png\" width=\"453\" height=\"161\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0430\u0434\u043c\u0438\u043d\u0430, \u043d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u042f \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e \u0447\u0435\u0440\u0435\u0437 Burp. \u0418 \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440.<\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d54\/f48\/936\/d54f489369fe022efba1cb6d8db6efb4.png\" width=\"603\" height=\"247\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0418\u0437\u043c\u0435\u043d\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 roleid \u043d\u0430 1, \u0438 \u043d\u0430\u0448\u0430 \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0441\u0442\u0430\u043d\u0435\u0442 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439. \u0412 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u043d\u0435\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043d\u0430\u0439\u0434\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u0434\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4ab\/940\/627\/4ab9406279f740c645dd53d7edbac980.png\" width=\"813\" height=\"331\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \/etc\/hosts.<\/p>\n<pre><code class=\"bash\">10.10.10.215 &nbsp;&nbsp;&nbsp;dev-staging-01.academy.htb<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043f\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9bd\/b84\/d55\/9bdb84d556bed99b97f885c75e972781.png\" width=\"1314\" height=\"614\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u041d\u0430\u0441 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 Laravel, \u043a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0438\u0437 \u043e\u0448\u0438\u0431\u043a\u0438. <\/p>\n<h2>&nbsp;Entry Point<\/h2>\n<p>\u041f\u043e\u0438\u0449\u0435\u043c \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u044b, \u0438 \u043d\u0430\u0439\u0434\u0435\u043c \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u043b\u044f metasploit.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e65\/a37\/7ad\/e65a377ad1849860035217fbdf7f06af.png\" width=\"981\" height=\"189\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a2a\/784\/270\/a2a784270eb472649dec3be0b7e5e9c1.png\" width=\"866\" height=\"372\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d APP_KEY, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9b3\/dd2\/d2e\/9b3dd2d2eeb018662bba8ddce261528f.png\" width=\"603\" height=\"119\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/012\/e13\/981\/012e139816417d5be79c442c756d37f6.png\" width=\"799\" height=\"209\"><figcaption><\/figcaption><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7bf\/f4a\/cd3\/7bff4acd3a2f343d4e7e35d85547d5a5.png\" width=\"541\" height=\"98\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\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.<\/p>\n<pre><code class=\"bash\">python3 -c \"import pty; pty.spawn('\/bin\/sh')\" \/bin\/bash<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/62c\/9e0\/3f8\/62c9e03f83ba490b87eefe6f945742a2.png\" width=\"447\" height=\"68\"><figcaption><\/figcaption><\/figure>\n<h2>USER<\/h2>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c LinPEAS \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0434\u043a\u0438 \u043d\u0430 \u0445\u043e\u0441\u0442\u0435.&nbsp;\u0412\u044b\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0444\u0430\u0439\u043b .env.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/50a\/310\/b8a\/50a310b8a9766d9d066b1819e2823960.png\" width=\"344\" height=\"129\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a42\/fdf\/2ee\/a42fdf2eebd06ef1f9c62b96bbb495e0.png\" width=\"599\" height=\"66\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u0430\u0440\u043e\u043b\u044c.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/231\/867\/ddf\/231867ddf51ebc8dadf11982eb930454.png\" width=\"490\" height=\"265\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0421\u043f\u0440\u044d\u0439\u0438\u043c \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u0443 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"bash\">cme ssh academy.htb -u users.txt -p 'mySup3rP4s5w0rd!!'<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/de1\/a80\/bc6\/de1a80bc6284d418f75c2a0301b92d79.png\" width=\"719\" height=\"82\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0418 \u0431\u0435\u0440\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e9e\/a6f\/49b\/e9ea6f49bb499153d43a0f8409e52c25.png\" width=\"475\" height=\"82\"><figcaption><\/figcaption><\/figure>\n<h2>USER 2<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0441\u043e\u0441\u0442\u043e\u0438\u043c \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 adm, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0447\u0438\u0442\u0430\u0442\u044c \u043b\u043e\u0433\u0438. \u042f \u043d\u0430\u0447\u0430\u043b \u0441 \u0444\u0430\u0439\u043b\u0430 &nbsp;auth.log, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0442\u0430\u043c \u043d\u0435 \u043d\u0430\u0448\u0435\u043b. \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u043a \u0444\u0430\u0439\u043b\u0430 audit.log, \u043f\u043e\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043b \u0432\u044b\u0432\u043e\u0434, \u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0438\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u0438 \u0442\u0443\u0442 \u0436\u0434\u0430\u043b \u0443\u0441\u043f\u0435\u0445.<\/p>\n<pre><code class=\"bash\">cat * | grep comm | grep -v '\/usr\/lib\/systemd\/systemd|apparmor_parser'<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/551\/1c4\/ac6\/5511c4ac61612e93890f164bdd5cfc0f.png\" width=\"976\" height=\"97\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b su \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u043e\u043b\u044c.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b59\/dc5\/79e\/b59dc579e6d60c9e33c7039c2a82a571.png\" width=\"248\" height=\"200\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0421\u043d\u043e\u0432\u0430 \u0441\u043f\u0440\u044d\u0438\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<pre><code class=\"bash\">cme ssh academy.htb -u users.txt -p 'mrb3n_Ac@d3my!'<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4d6\/c95\/2ec\/4d6c952ecba7abfc1cbdc89db8bc3ecb.png\" width=\"722\" height=\"130\"><figcaption><\/figcaption><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e45\/c71\/84a\/e45c7184a584080374cae00e8c62a568.png\" width=\"362\" height=\"51\"><figcaption><\/figcaption><\/figure>\n<h2>ROOT<\/h2>\n<p>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0443\u0434\u043e\u0435\u0440\u0430 \u0432\u0438\u0434\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 composer \u0441 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u044f\u043c\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7a5\/11b\/d62\/7a511bd624dbe19474d4393fd97f7ebf.png\" width=\"823\" height=\"115\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0422\u0443\u0442 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0442\u0435\u0445\u043d\u0438\u043a\u0430 GTFOBins. <a href=\"https:\/\/gtfobins.github.io\/gtfobins\/composer\/#shell\" rel=\"noopener noreferrer nofollow\">\u0422\u0430\u043c<\/a> \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c LPE \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e composer.<\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/28c\/c8b\/63b\/28cc8b63b8d7b45dca0b8c1ee3752c63.png\" width=\"814\" height=\"187\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a6c\/db2\/07f\/a6cdb207f488f817c3f6f4363b7fa854.png\" width=\"652\" height=\"207\"><figcaption><\/figcaption><\/figure>\n<p>\u0423 \u043d\u0430\u0441 root! <\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/542622\/\"> https:\/\/habr.com\/ru\/post\/542622\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e&nbsp;\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=\"noopener noreferrer nofollow\">HackTheBox<\/a>. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0445\u043e\u0442\u044c \u043a\u043e\u043c\u0443-\u0442\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0418\u0411. <\/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<details class=\"spoiler\">\n<summary>\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<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0443\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0438 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0441\u0444\u0435\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u044f \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u0445:<\/p>\n<ul>\n<li>\n<p>PWN;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f (Crypto);<\/p>\n<\/li>\n<li>\n<p>c\u0435\u0442\u0435\u0432\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 (Network);<\/p>\n<\/li>\n<li>\n<p>\u0440\u0435\u0432\u0435\u0440\u0441&nbsp;(Reverse Engineering); <\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u0435\u0433\u0430\u043d\u043e\u0433\u0440\u0430\u0444\u0438\u044f&nbsp;(Stegano);<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0438\u0441\u043a \u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044f WEB-\u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439;<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0434\u043e\u0431\u0430\u0432\u043e\u043a \u043a \u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 <em>\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u043a\u0440\u0438\u043c\u0438\u043d\u0430\u043b\u0438\u0441\u0442\u0438\u043a\u0435,<\/em>&nbsp;<em>\u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u043c\u0430\u043b\u0432\u0430\u0440\u0438 \u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043e\u043a<\/em>, <em>\u0430\u0442\u0430\u043a\u0430\u0445 \u043d\u0430 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0442\u0438, \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043f\u0435\u043d\u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u043e\u0432<\/em>.<\/p>\n<p>\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=\"noopener noreferrer nofollow\">\u043a\u0430\u043d\u0430\u043b<\/a> \u0432 Telegram \u0438 \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 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 <a href=\"https:\/\/t.me\/RalfHackerPublicChat\" rel=\"noopener noreferrer nofollow\">\u0418\u0438\u041a\u0411<\/a>. \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 \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 href=\"https:\/\/t.me\/hackerralf8\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430<\/a>).<\/p>\n<\/div>\n<\/details>\n<h2>Recon<\/h2>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0438\u043c\u0435\u0430\u0435\u0442 IP \u0430\u0434\u0440\u0435\u0441 10.10.10.215, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0432 \/etc\/hosts.<\/p>\n<pre><code class=\"bash\">10.10.10.215    academy.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&nbsp;\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.<\/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<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0418\u043c\u0435\u0435\u043c SSH, Apache \u0438 MySQL. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0431\u0435\u0440\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 \u0432\u0435\u0431\u0435, \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c gobuster.<\/p>\n<pre><code class=\"bash\">gobuster dir -t 128 -u http:\/\/academy.htb -w \/usr\/share\/wordlists\/dirbuster\/directory-list-lowercase-2.3-medium.txt --timeout 30s<\/code><\/pre>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0430\u0434\u043c\u0438\u043d\u0430, \u043d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u042f \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e \u0447\u0435\u0440\u0435\u0437 Burp. \u0418 \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440.<\/p>\n<figure class=\"bordered full-width\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0418\u0437\u043c\u0435\u043d\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 roleid \u043d\u0430 1, \u0438 \u043d\u0430\u0448\u0430 \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0441\u0442\u0430\u043d\u0435\u0442 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439. \u0412 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u043d\u0435\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043d\u0430\u0439\u0434\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u0434\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \/etc\/hosts.<\/p>\n<pre><code class=\"bash\">10.10.10.215 &nbsp;&nbsp;&nbsp;dev-staging-01.academy.htb<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043f\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u041d\u0430\u0441 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 Laravel, \u043a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0438\u0437 \u043e\u0448\u0438\u0431\u043a\u0438. <\/p>\n<h2>&nbsp;Entry Point<\/h2>\n<p>\u041f\u043e\u0438\u0449\u0435\u043c \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u044b, \u0438 \u043d\u0430\u0439\u0434\u0435\u043c \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u043b\u044f metasploit.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d APP_KEY, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\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.<\/p>\n<pre><code class=\"bash\">python3 -c \"import pty; pty.spawn('\/bin\/sh')\" \/bin\/bash<\/code><\/pre>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<h2>USER<\/h2>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c LinPEAS \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0434\u043a\u0438 \u043d\u0430 \u0445\u043e\u0441\u0442\u0435.&nbsp;\u0412\u044b\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0444\u0430\u0439\u043b .env.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u0430\u0440\u043e\u043b\u044c.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0421\u043f\u0440\u044d\u0439\u0438\u043c \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u0443 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"bash\">cme ssh academy.htb -u users.txt -p 'mySup3rP4s5w0rd!!'<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0418 \u0431\u0435\u0440\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<h2>USER 2<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0441\u043e\u0441\u0442\u043e\u0438\u043c \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 adm, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0447\u0438\u0442\u0430\u0442\u044c \u043b\u043e\u0433\u0438. \u042f \u043d\u0430\u0447\u0430\u043b \u0441 \u0444\u0430\u0439\u043b\u0430 &nbsp;auth.log, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0442\u0430\u043c \u043d\u0435 \u043d\u0430\u0448\u0435\u043b. \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u043a \u0444\u0430\u0439\u043b\u0430 audit.log, \u043f\u043e\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043b \u0432\u044b\u0432\u043e\u0434, \u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0438\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u0438 \u0442\u0443\u0442 \u0436\u0434\u0430\u043b \u0443\u0441\u043f\u0435\u0445.<\/p>\n<pre><code class=\"bash\">cat * | grep comm | grep -v '\/usr\/lib\/systemd\/systemd|apparmor_parser'<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b su \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u043e\u043b\u044c.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0421\u043d\u043e\u0432\u0430 \u0441\u043f\u0440\u044d\u0438\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<pre><code class=\"bash\">cme ssh academy.htb -u users.txt -p 'mrb3n_Ac@d3my!'<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<h2>ROOT<\/h2>\n<p>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0443\u0434\u043e\u0435\u0440\u0430 \u0432\u0438\u0434\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 composer \u0441 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u044f\u043c\u0438.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0422\u0443\u0442 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0442\u0435\u0445\u043d\u0438\u043a\u0430 GTFOBins. <a href=\"https:\/\/gtfobins.github.io\/gtfobins\/composer\/#shell\" rel=\"noopener noreferrer nofollow\">\u0422\u0430\u043c<\/a> \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c LPE \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e composer.<\/p>\n<figure class=\"bordered full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0423 \u043d\u0430\u0441 root! <\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/542622\/\"> https:\/\/habr.com\/ru\/post\/542622\/<\/a><br \/><\/br><\/br><\/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-318738","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/318738","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=318738"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/318738\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=318738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=318738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=318738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}