Permalink
Browse files

made STRICT and LOOSE shellcode detection options and better handling…

… of window object
  • Loading branch information...
urule99
urule99 committed Nov 12, 2010
1 parent 470e74f commit 118ca958231fea713317d9303b2d165f3e116835
Showing with 5 additions and 1 deletion.
  1. +2 −1 post.js
  2. +3 −0 pre.js
View
@@ -36,7 +36,8 @@ for (var i in this){
}
}
if (typeof this[i] == 'string' && i != 'documenttxt' && i != 'i' && i != 'txtzzz'){
if (escape(this[i]).match(/%u/)){
//if (escape(this[i]).match(/^(%u.{4})+(%..)*$/)){ //STRICT SHELLCODE DETECTION (disabled by default)
if (escape(this[i]).match(/%u/)){ //LOOSE SHELLCODE DETECTION (enabled by default)
var prelen = this[i].length;
if (prelen > 100){
this[i] = this[i].replace(/(.)\1{10}/g,'');
View
3 pre.js
@@ -406,6 +406,9 @@ var prompt = function(){ return 1; }
window.prompt = prompt;
var confirm = function(){ return 1; }
window.confirm = confirm;
window.top = window;
window.self = window;
window.window = window;
var Run = function(arg){
print("//warning CVE-2010-1885 possible hcp URL with Run access");
print ('/* Run arguments:');

0 comments on commit 118ca95

Please sign in to comment.