% t6 u* \ p1 Q7 U简单介绍一下这篇文章吧。 0 C* u0 v0 f+ N7 R8 w. ]' k# \ & w( }4 h5 o3 D+ Y/ U开启WP错误记录功能 - s9 X: ~7 [- U; W* |2 U只需要修改wp-config.php的如下几行:" `. g2 f" i0 J! e/ m; b) l
5 p) O- k# O j0 h$ {3 t4 [& t5 Y6 e
@ini_set('log_errors','On'); @ini_set('display_errors','Off'); @ini_set('error_log','/home/example.com/logs/php_error.log');SQL 注入扫描 , ^: X5 G. a% K8 X) l4 U# P9 @# P, M5 Q' m
[07-Dec-2012 02:40:49] WordPress database error 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 'WHERE id = -1\'' at line 1 for query SELECT text, author_id, date FROM WHERE id = -1\'- X# H0 ~. T) C \ U; z4 o
[07-Dec-2012 02:40:50] WordPress database error 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 'WHERE id = 999999.9 UNION ALL SELECT 0x31303235343830303536--' at line 1 for query SELECT text, author_id, date FROM WHERE id = 999999.9 UNION ALL SELECT 0x31303235343830303536-- 3 h8 ^8 s4 b2 u% P5 C. s( {[07-Dec-2012 02:40:53] WordPress database error 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 'WHERE id = 999999.9 UNION ALL SELECT 0x31303235343830303536,0x313032353438303035' at line 1 for query SELECT text, author_id, date FROM WHERE id = 999999.9 UNION ALL SELECT 0x31303235343830303536,0x31303235343830303536-- ( V( a) E; K) g% }0 g3 `+ R上面的日志就是在暴力猜解表的列数,那个巨大的十六进制值会被解析成null。 + Z& s8 c3 b% e" _* y& E# T
SQL盲注扫描+ m" H/ D+ Z( ^, }* G
攻击者使用了类似"waitfor delay"和"benchmark"这样的函数来盲注。- _5 P8 w& }( S* f
0 A' G2 ~7 N8 S: s6 C" \
[07-Dec-2012 02:43:21] WordPress database error 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 'WHERE id = -1; if (1=1) waitfor delay \'00:00:05\'--' at line 1 for query SELECT text, author_id, date FROM WHERE id = -1; if (1=1) waitfor delay \'00:00:05\'-- 0 o) n3 U1 N# I$ c[07-Dec-2012 02:43:27] WordPress database error 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 'WHERE id = -1 and if(1=1,BENCHMARK(8623333,MD5(0x41)),0)' at line 1 for query SELECT text, author_id, date FROM WHERE id = -1 and if(1=1,BENCHMARK(8623333,MD5(0x41)),0)- _1 [( }: ~3 J9 W( l) a7 `: X! e! e
Google一下大规模扫描, I7 z7 ~/ n& }, ~- a7 T! R; l* n' }
sub google() { my @list; my $key = $_[0]; for (my $i=0; $i<=400; $i+=10){ my $search = ("http://www.google.com/search?q=".&key($key)."&num=100&filter=0&start=".$i); my $res = &search_engine_query($search); while ($res =~ m/<a href="\"?http:\/\/([^">\"]*)\//g) { if ($1 !~ /google/){ my $link = $1; my @grep = &links($link); push(@list,@grep); } } } return @list; 5 o. D8 `3 u) e8 `
9 v* Y1 g. K6 [8 j( gCocoa总结:文章比较简单,但是从日志来检测攻击貌似是目前流行的一个方向。 + T) H8 A! Q0 ?1 b3 A5 W) w