Sven Morgenroth Explains & Demos Same-origin Policy and How to Circumvent it
Watch episode #550 of Enterprise Security Weekly in which Sven Morgenroth, our Security Researcher, talks about Same Origin Policy, its origin, how it works as a security measure, various incorrect implementation issues and dangers. The show includes slides and a demo of four exploits that abuse mistakes developers make when circumventing SOP.
Your Information will be kept private.
Stay up to date on web security trends
Your Information will be kept private.
Sven Morgenroth of Netsparker gave a technical presentation entitled ‘How to Circumvent the SOP and How to Get Hacked in the Process' during episode #550 of Paul’s Security Weekly. The presentation was about the Same-origin Policy (SOP), one of the most important security policies in web browsers, and during the presentation Sven explained:
- The origin of SOP and how it works, during which he also noted that SOP isn't a single, standardized policy because it has developed over time.
- Why Web developers tend to hate SOP. Hint, it makes life inconvenient for them. Developers want to bypass the SOP to let their web application from a different origin (including domains <> subdomains communication) communicate with each other without having to deal with the intrications of SOP.
- Why SOP is a good security measure, but why it also comes with a cost. On the positive side, it is restrictive, and those restrictions can be lifted to allow web applications from different origins to communicate. The problem is allowing websites from other origins to access your data. There are different ways to achieve this, but all of them can create further problems if improperly implemented.
- JSON with Padding (a way to format JSON to include it with a script tag),
- Cross Origin Resource Sharing (CORS),
- Setting document.domain to the value of the main domain, and the postMessage API.