
CVE-2017-11427용 데모
기본 환경
$ sudo apt-get install libxml2-dev libxslt1-dev
$ sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
데모:
$ git clone https://github.com/CHYbeta/CVE-2017-11427-DEMO.git
$ cd CVE-2017-11427-DEMO
$ source venv/bin/active
$ cd vuln_saml
$ python index.py
계정:
username: user_evil
password: iamuser1
email: [email protected]
username: user_normal
password: iamuser2
email: [email protected]
먼저 user_evil로 로그인합니다. Burp로 SAMLResponse 필드 값을 캡처합니다.

Action -> send to repeater를 선택하여 준비합니다.
그런 다음 Forward를 눌러 user_evil이 인증에 성공하게 합니다.

위의 SAMLResponse 필드 값을 먼저 URL 디코딩하고, 줄 바꿈을 제거한 후 base64 디코딩합니다. 디코딩된 XML 파일에서 emailAddress와 를 로 수정합니다. 즉, 원래 인증 사용자의 이메일 사이에 주석을 삽입합니다.
Attribute[email protected]<!-- -->.evil
그런 다음 수정된 XML을 base64 인코딩하고 URL 인코딩하여 원래 SAMLResponse 값을 대체하고 새로운 세션을 얻습니다.

이 새로운 세션으로 로그인합니다.

user.email이 [email protected]으로 변경되었으며, user_normal로 성공적으로 로그인되었습니다.