SOAP(Simple Object Access Protocol)은 XML 포맷에서 데이터를 캡슐화하는데 사용되는 메시지 기반 통신 기술이다. 이 기술은 동일한 시스템이나 아키텍처뿐만 아니라 다른 기종의 시스템이나 아키텍처 사이에도 메시지를 전송하고 정보를 공유하는데 사용된다.
이 기술은 웹서비스에서 주로 사용되고, 브라우저로 접근 가능한 웹 애플리케이션의 내용 부분에도 사용된다.
또한 백엔드 애플리케이션 컴포넌트 사이에서 통신을 할때에도 SOAP 기술이 사용된다.
XML이 인터프리터 언어이기때문에 SOAP은 잠재적으로 코드 삽입에 대한 취약점을 가지고 있다.
XML 요소는 문법적으로 < > / 와 같은 메타 문자를 이용해서 표현한다.
사용자가 이런 문자가 포함된 데이터를 SOAP 메시지에 삽입한다면 공격자는 메시지의 구조와 애플리케이션의 로직을 추론하거나 원하지 않은 영향을 일으킬 수 있다.
1. Create a SOAP Request
1단계: operation 갯수가 몇개인가? 4
<wsdl:operation /> 갯수를 확인한다.
2단계: getFirstNameRequest 메서드의 파라메터인 id의 type은 무엇인가? int
<wsdl:message name="getFirstNameRequest">
<wsdl:part name="id" type="xsd:int"/>
</wsdl:message>
3단계: 요청을 인터셉트해서 유효한 계정을 위한 유효한 메소드 SOAP request 요청하도록 한다.
POST http://192.168.79.136:8080/WebGoat3/services/SoapRequest HTTP/1.1
Host: 192.168.79.136:8080
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Firefox/24.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: ko-kr,ko;q=0.8,en-us;q=0.5,en;q=0.3
Referer: http://192.168.79.136:8080/WebGoat3/attack?Screen=39&menu=1900
Cookie: JSESSIONID=CFE033520918CFA20616E2E25452C0D7; ASPSESSIONIDSABAQQBQ=OEBNDGPCDODOHGHMAJOEFFBB; ASPSESSIONIDQARARSBS=OLIDFCBDNBIHFJPGOIHHLHHA; ASPSESSIONIDSARAQSBT=GPMNGFBDIONONEADJMAFIOAK
Authorization: Basic Z3Vlc3Q6Z3Vlc3Q=
Connection: keep-alive
Content-Type: text/html
SOAPAction:
Content-Length: 400
SUBMIT=Press+to+generate+an+HTTP+request
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:getFirstName SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://lessons">
<id xsi:type="xsd:int">101</id>
</ns1:getFirstName>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
2. WSDL Scanning
서비스화면은 해당고객의 고객의 이름과 로그인 카운트만 출력하도록 작성되어 있다.
고객의 credit 번호를 출력되도록 요청을 위조한다.
[Submit]을 클릭하고 요청데이터를 tampering 한다.
field 자리를 getCreditCard 로 변경하여 요청을 전송한다.
3. Web Service SAX Injection
패스워들 변경하는 요청을 전송한다.
전송되는 요청을 Tampering하여 다른 사용자의 패스워드도 같이 변경되도록 요청을 위조한다.
owasp</password><id xsi:type='xsd:int'>199</id><password xsi:type='xsd:string'>owasp
4. Web Service SQL Injection
OWASP WebGoat: AJAX Security 솔루션 비디오 보기
- LAB: Client Side Filtering [View | Download]
- LAB: DOM-Based cross-site scripting [View | Download]
- DOM Injection [View | Download]
- Same Origin Policy Protection [View | Download]
- XML Injection [View | Download]
- JSON Injection [View | Download]
- Silent Transactions Attacks [View | Download]
- Insecure Client Storage [View | Download]
- Dangerous Use of Eval [View | Download]
'보안 > 웹 해킹_보안' 카테고리의 다른 글
List of tools for static code analysis (0) | 2013.04.08 |
---|---|
[WebGoat 5.4-18] Admin Functions (0) | 2013.04.07 |
[WebGoat 5.4-16] Session Management Flaws (0) | 2013.04.07 |
[WebGoat 5.4-15] Parameter Tampering (0) | 2013.04.07 |
[WebGoat 5.4-14] Malicious Execution (0) | 2013.04.07 |