# 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