11.07.2015 Views

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 13: Building Secure Remoted Components 351Parameter ManipulationParameter manipulation refers to the unauthorized modification of data sent betweenthe client <strong>and</strong> remote component. For example, an attacker can manipulate therequest message destined for the remote component by intercepting the messagewhile it is in transit.VulnerabilitiesVulnerabilities that can lead to parameter manipulation include:● Messages that are not digitally signed to provide tamperproofing● Message that are not encrypted to provide privacy <strong>and</strong> tamperproofingCountermeasuresCountermeasures that may be implemented to prevent successful parametermanipulation include:● Digitally sign the message. The digital signature is used at the recipient end toverify that the message has not been tampered with in transit.●Encrypt the message payload to provide privacy <strong>and</strong> tamperproofing.SerializationSerialization is the process of converting an object’s internal state to a flat stream ofbytes. The remoting infrastructure uses the serialization services of the .NETFramework to pass objects between client <strong>and</strong> server. It is possible for malicious codeto inject a serialized data stream to your server in order to coerce it into performingunintended actions. For example, malicious client-side code can initialize an objectthat, when de-serialized on the server, causes the server to consume server resourcesor execute malicious code.VulnerabilitiesThe main vulnerability that can lead to successful serialization attacks stems from thefact that the server trusts the serialized data stream <strong>and</strong> fails to validate the dataretrieved from the stream.CountermeasuresThe countermeasure that prevents successful serialization attacks is to validate eachitem of data as it is deserialized on the server. Validate each field for type, length,format, <strong>and</strong> range.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!