


WordPressを導入して世界を相手(笑)に公開していると、多少は攻撃とかが気になってくる
そこでWordPressのセキュリティチェック プラグインをインストールしてみた
WordPress Exploit Scanner
http://ocaoimh.ie/exploit-scanner/
サイトが乗っ取られてファイルが改ざんされていないかチェックする
WP Security Scan
http://semperfiwebdesign.com/plugins/wp-security-scan/
サイトに好ましくない設定がされていなかチェックする
WP Security Scanを使用してみた
管理画面のメニューに[Security]が追加されクリックするとサイトをスキャンしてサーバ情報やセキュリティ情報を表示してくれる
1 2 3 4 5 6 7 |
WordPress version: 2.8.5 You have the latest stable version of WordPress. Your table prefix should not be wp_. Click here to change it. Your WordPress version is successfully hidden. WordPress DB Errors turned off. WP ID META tag removed form WordPress core No user "admin". .htaccess exists in wp-admin/ |
当初は
Your table prefix should not be wp_. Click here to change it.
意外にも
adminが存在している
./wp-adminに.htaccessがない
と警告してくれた
取り敢ず./wp-admin/.htaccessを作成して認証とIP制限をかけた
またadminについてはお洒落なGUIツールを入れていないのでMySQLに直接更新をかけた
(くれぐれもバックアップを取ってから作業して下さい。DBを壊しても責任は負えません)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
[root@ns htpasswd]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7409 Server version: 5.0.45 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use wpdb_Mysite; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> show tables; +------------------------+ | Tables_in_wpdb_Mysite | +------------------------+ | wp_users | +------------------------+ 18 rows in set (0.01 sec) mysql> SELECT * FROM wp_users; +----+------------+ | ID | user_login | +----+------------+ | 1 | admin | | 2 | hogehoge | +----+------------+ 2 rows in set (0.00 sec) mysql> UPDATE wp_users SET user_login='hogeadmin' WHERE ID=1; Query OK, 1 row affected (0.12 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> SELECT * FROM wp_users; +----+------------+ | ID | user_login | +----+------------+ | 1 | hogeadmin | | 2 | hogehoge | +----+------------+ 2 rows in set (0.01 sec) mysql> quit Bye |
で、残っているYour table prefix should not be wp_. Click here to change it.はテーブル名の接頭辞を「wp_」以外にしなさいとのことらしいので後日とする
また、上記以外にも
WordPressのセキュリティをアップする11のポイント
http://coliss.com/articles/blog/wordpress/2853.html
を参考に
- wp-config.phpにランダムなキーを設定
- 管理画面へのアクセスはSSL経由で行う
も設定したので取り敢ず大丈夫かな