您当前的位置: 首页 > 

ThnPkm

暂无认证

  • 2浏览

    0关注

    98博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Nodejs ctf 基础

ThnPkm 发布时间:2022-07-23 16:27:29 ,浏览量:2

ctf-nodejs之一些小知识 | F1veseven Blog

目录

Nodejs语言缺点

大小写特性 

弱类型比较 

MD5的绕过

编码绕过

nodejs危险函数的利用

 nodejs危险函数-RCE bypass

字符拼接:

编码绕过:

模板拼接:

其他函数:

 CTFshow 例题 

web334

web335  

web336

web337 

Nodejs语言缺点 大小写特性 

toUpperCase() toLowerCase()

对于toUpperCase(): 字符"ı""ſ" 经过toUpperCase处理后结果为 "I""S" 对于toLowerCase(): 字符"K"经过toLowerCase处理后结果为"k"(这个K不是K)

弱类型比较 

大小比较:

console.log(1=='1'); //true 
console.log(1>'2'); //false 
console.log('1''3'); //true 
console.log('111'>'3'); //false 
console.log('asd'>1); //false

总结:数字与字符串比较时,会优先将纯数字型字符串转为数字之后再进行比较;而字符串与字符串比较时,会将字符串的第一个字符转为ASCII码之后再进行比较,因此就会出现第五行代码的这种情况;而非数字型字符串与任何数字进行比较都是false

数组比较:

console.log([]==[]); //false 
console.log([]>[]); //false
console.log([6,2]>[5]); //true 
console.log([100,2]            
关注
打赏
1660722558
查看更多评论
0.0386s