Source:
public void scan() { final HttpMessage originalMsg = getBaseMsg(); String originalSoapAction = SoapAction.extractFrom(originalMsg); if (originalSoapAction == null) { return; } List<SoapAction> soapActions; try { soapActions = getTable().getSourceSoapActions(originalSoapAction); } catch (DatabaseException e) { LOG.warn("Could not retrieve SOAP actions from the database. Stopping scan.", e); return; } if (soapActions == null || soapActions.isEmpty()) { LOG.info( "Skipping " + getName() + " because no actions were found. (URL: " + originalMsg.getRequestHeader().getURI().toString() + ")"); return; } for (SoapAction soapAction : soapActions) { if (isStop()) { return; } HttpMessage msg = getNewMsg(); if (originalSoapAction.trim().equals(soapAction.getAction())) { if (LOG.isDebugEnabled()) { LOG.debug( "Ignoring matching actions: " + originalSoapAction + " : " + soapAction.getAction()); } continue; } HttpRequestHeader header = msg.getRequestHeader(); boolean isSoapVersionOne = false; if (originalMsg.getRequestHeader().getHeader("SOAPAction") != null) { header.setHeader("SOAPAction", soapAction.getAction()); isSoapVersionOne = true; } else { header.setHeader( HttpHeader.CONTENT_TYPE, "application/soap+xml;charset=UTF-8;action=" + soapAction.getAction()); } try { sendAndReceive(msg); } catch (IOException e) { LOG.warn("Could not send modified SOAP request."); return; } ResponseType code = scanResponse(msg, originalMsg); String otherAlertInfo = " SOAP version 1." + (isSoapVersionOne ? "1." : "2.") + "\nOriginal SOAP Action: " + originalSoapAction + "\nSpoofed SOAP Action: " + soapAction.getAction(); raiseAlert(msg, code, otherAlertInfo); if (code == ResponseType.SOAPACTION_IGNORED || code == ResponseType.SOAPACTION_EXECUTED) { return; } } }

Target:
public void scan() { final HttpMessage originalMsg = getBaseMsg(); String originalSoapAction = SoapAction.extractFrom(originalMsg); if (originalSoapAction == null) { return; } List<SoapAction> soapActions; try { soapActions = getTable().getSourceSoapActions(originalSoapAction); } catch (DatabaseException e) { LOG.warn("Could not retrieve SOAP actions from the database. Ignoring message.", e); return; } if (soapActions == null || soapActions.isEmpty()) { LOG.info( "Ignoring " + getName() + " because no actions were found. (URL: " + originalMsg.getRequestHeader().getURI().toString() + ")"); return; } for (SoapAction soapAction : soapActions) { if (isStop()) { return; } HttpMessage msg = getNewMsg(); if (originalSoapAction.trim().equals(soapAction.getAction())) { if (LOG.isDebugEnabled()) { LOG.debug( "Ignoring matching actions: " + originalSoapAction + " : " + soapAction.getAction()); } continue; } HttpRequestHeader header = msg.getRequestHeader(); boolean isSoapVersionOne = false; if (originalMsg.getRequestHeader().getHeader("SOAPAction") != null) { header.setHeader("SOAPAction", soapAction.getAction()); isSoapVersionOne = true; } else { header.setHeader( HttpHeader.CONTENT_TYPE, "application/soap+xml;charset=UTF-8;action=" + soapAction.getAction()); } try { sendAndReceive(msg); } catch (IOException e) { LOG.warn("Could not send modified SOAP request."); return; } ResponseType code = scanResponse(msg, originalMsg); String otherAlertInfo = Constant.messages.getString( MESSAGE_PREFIX + "alertInfo", isSoapVersionOne ? "1" : "2", originalSoapAction, soapAction.getAction()); raiseAlert(msg, code, otherAlertInfo); if (code == ResponseType.SOAPACTION_IGNORED || code == ResponseType.SOAPACTION_EXECUTED) { return; } } }