QQ1. Explain attacks using HTML5. How can it be secured?
- HTML5 features like Web Storage, WebSockets, PostMessage, Geolocation expand attack surface.
- Client-side storage abuse (LocalStorage/IndexedDB) can lead to data theft via XSS.
- WebSockets are vulnerable to CSWSH and DoS without proper authentication and encryption (wss).
- PostMessage API requires strict validation of `event.origin` and `event.data` to prevent XSS.
Answer: HTML5 introduced a wealth of new features designed to enhance web application functionality, performance, and user experience. However, these powerful capabilities also expanded the web's attack surface, presenting new security challenges if not implemented and configured correctly. Attackers can leverage various HTML5 features to compromise data, execute malicious code, or degrade service quality. One significant area of vulnerability arises from **Client-Side Storage mechanisms**, including W...