sqlmap inject via parameters in soap body?

4.2k views Asked by At

The soap body is like blow :

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <actions xmlns="http://....com">
            <data>
                {"name":"test","age" : "10"}
            </data>
        </actions>
    </soap:Body>
</soap:Envelope>

How can I inject via parameter like name or age using sqlmap?
If not, can I use HttpRequest(in Java) or something like that to do what sqlmap do ?

1

There are 1 answers

0
orange On

First,By intercepting the HTTP request with a proxy, then add * with the value, finaly it maybe like this

POST /uri HTTP/1.1
Host: example.com
Content-Length: 366
SOAPAction: http://
Content-Type: text/xml; charset=UTF-8
Accept: */*
DNT: 1
Accept-Encoding: gzip, deflate
Accept-Language: en-XA,en-US;q=0.8,en;q=0.6
Connection: close

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
    <actions xmlns="http://....com">
        <data>
            {"name":"test*","age" : "10*"}
        </data>
    </actions>
</soap:Body>

Save the whole HTTP request to a text file(test.txt in my following example) ,try sqlmap -r test.txt