diff --git a/core/main/client/browser.js b/core/main/client/browser.js index bbc4979d0..321d5f0c4 100644 --- a/core/main/client/browser.js +++ b/core/main/client/browser.js @@ -49,7 +49,7 @@ beef.browser = { * @example: beef.browser.isIE8() */ isIE8: function() { - return !!window.XMLHttpRequest && !window.chrome && !window.opera && !window.getComputedStyle && !!document.documentMode && !!window.XDomainRequest && !window.performance; + return !!window.XMLHttpRequest && !window.chrome && !window.opera && !!document.documentMode && !!window.XDomainRequest && !window.performance; }, /** @@ -57,7 +57,7 @@ beef.browser = { * @example: beef.browser.isIE9() */ isIE9: function() { - return !!window.XMLHttpRequest && !window.chrome && !window.opera && !window.getComputedStyle && !!document.documentMode && !!window.XDomainRequest && !!window.performance; + return !!window.XMLHttpRequest && !window.chrome && !window.opera && !!document.documentMode && !!window.XDomainRequest && !!window.performance; }, /** diff --git a/core/main/client/net/xssrays.js b/core/main/client/net/xssrays.js index f680c9ea9..183c8cfa5 100644 --- a/core/main/client/net/xssrays.js +++ b/core/main/client/net/xssrays.js @@ -106,7 +106,7 @@ beef.net.xssrays = { // util function. Print string to the console only if the debug flag is on and the browser is not IE. printDebug:function(log) { - if (this.debug && !beef.browser.isIE()) { + if (this.debug && (!beef.browser.isIE6() && !beef.browser.isIE7() && !beef.browser.isIE8())) { console.log("[XssRays] " + log); } }, @@ -188,6 +188,13 @@ beef.net.xssrays = { if (target.search.length > 0) { target.search = target.search.slice(1); target.search = target.search.split(/&|&/); + + if(beef.browser.isIE() && target.pathname.charAt(0) != "/"){ //the damn IE doesn't contain the forward slash in pathname + var pathname = "/" + target.pathname; + }else{ + var pathname = target.pathname; + } + var params = {}; for (var i = 0; i < target.search.length; i++) { target.search[i] = target.search[i].split('='); @@ -204,20 +211,20 @@ beef.net.xssrays = { } if (this.vectors[i].url) { if (target.port == null || target.port == "") { - beef.net.xssrays.printDebug("Starting XSS on GET params of [" + target.href + "], passing url [" + target.protocol + '//' + target.hostname + target.pathname + "]"); - this.run(target.protocol + '//' + target.hostname + target.pathname, 'GET', this.vectors[i], params, true);//params + beef.net.xssrays.printDebug("Starting XSS on GET params of [" + target.href + "], passing url [" + target.protocol + '//' + target.hostname + pathname + "]"); + this.run(target.protocol + '//' + target.hostname + pathname, 'GET', this.vectors[i], params, true);//params } else { - beef.net.xssrays.printDebug("Starting XSS on GET params of [" + target.href + "], passing url [" + target.protocol + '//' + target.hostname + ':' + target.port + target.pathname + "]"); - this.run(target.protocol + '//' + target.hostname + ':' + target.port + target.pathname, 'GET', this.vectors[i], params, true);//params + beef.net.xssrays.printDebug("Starting XSS on GET params of [" + target.href + "], passing url [" + target.protocol + '//' + target.hostname + ':' + target.port + pathname + "]"); + this.run(target.protocol + '//' + target.hostname + ':' + target.port + pathname, 'GET', this.vectors[i], params, true);//params } } if (this.vectors[i].path) { if (target.port == null || target.port == "") { - beef.net.xssrays.printDebug("Starting XSS on URI PATH of [" + target.href + "], passing url [" + target.protocol + '//' + target.hostname + target.pathname + "]"); - this.run(target.protocol + '//' + target.hostname + target.pathname, 'GET', this.vectors[i], null, true);//paths + beef.net.xssrays.printDebug("Starting XSS on URI PATH of [" + target.href + "], passing url [" + target.protocol + '//' + target.hostname + pathname + "]"); + this.run(target.protocol + '//' + target.hostname + pathname, 'GET', this.vectors[i], null, true);//paths } else { - beef.net.xssrays.printDebug("Starting XSS on URI PATH of [" + target.href + "], passing url [" + target.protocol + '//' + target.hostname + ':' + target.port + target.pathname + "]"); - this.run(target.protocol + '//' + target.hostname + ':' + target.port + target.pathname, 'GET', this.vectors[i], null, true);//paths + beef.net.xssrays.printDebug("Starting XSS on URI PATH of [" + target.href + "], passing url [" + target.protocol + '//' + target.hostname + ':' + target.port + pathname + "]"); + this.run(target.protocol + '//' + target.hostname + ':' + target.port + pathname, 'GET', this.vectors[i], null, true);//paths } } } @@ -372,11 +379,20 @@ beef.net.xssrays = { /* * ++++++++++ create the iFrame that will contain the attack vector ++++++++++ */ - var iframe = document.createElement('iframe'); + if(beef.browser.isIE()){ + try { + var iframe = document.createElement('