wordpress security optimization (basic)

Post on 13-Jul-2015

1.052 Views

Category:

Education

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

R-IDwayserioustohell@gmail.com

WORDPRESS

SECURITY

WORDPRESS SECURITY ON SERIOUS WAY

root-id

2

SECURITY

TECHNIQUE

BEBERAPA TEKNIK MENGAMANKAN WORDPRESS

3

root-id R-IDwayserioustohell@gmail.com

4Php Error Handling

Menangani masalah error pada file-file .php

Kesalahan/Error pada beberapa file php pada wordpress saat di akses via url akan menampilkan Informasi (Information Gathering) tentang wordpress kita.

Yaitu informasi tentang dimana path folder instalasi wordpress kita. Jika wordpress dihosting, maka pesan error akan menampilkan “Username Account” cPanel/hosting.

Oleh sebab itu masalah error pada file php ini adalah masalah yang cukup serius.

Penangan Masalah :

Tambahkan code:error_reporting(0);

Tepat dibawah code pembuka php yaitu:<?php

*Selain dengan menambahkan code secara manual seperti diatas, kita juga dapat menangani Error tersebut dengan configurasi denggan file .htaccess, yang akan kita bahas berikutnya.

root-id R-IDwayserioustohell@gmail.com

5

.htaccess SecurityTips Keamanan .htaccess

Apa Htaccess itu?

Htaccess merupakan ASCII file biasa yang bisa Anda buat melalui text editor seperti notepad atau simple text

Htaccess adalah file extensi tanpa nama. Ini bukan nama.Htaccess atau halaman yang berakhiran .Htaccess. ini hanya tertulis .Htaccess tanpa nama.

File ini akan memberikan dampak pada seluruh folder dan subfolder yang akan di load oleh Apache Server. Pada file inilah diletakan perintah untuk konfigurasi server. Untuk membuatnya Anda bisa membuka Text editor kemudian simpan halaman kosong tersebut dengan nama .htaccess.

File .htaccess sangat berguna dalam keamanan suatu web server. Begitu juga untuk melindungi wordpress kita.

root-id R-IDwayserioustohell@gmail.com

6

Custom Error Page

Customisasi Halaman Error Pada Wordpress

Customisasi dengan .htaccess

Secara default, halaman Error 404 pada wordpress adalah bawaan dari theme wordpress. Kitta dapat membuat tampilan halaman error sendiri.

Begitu juga dengan Error Forbiden 403, dan halaman lainnya.

Semua itu akan kita atur dengan Redirect pada settingan di .htaccess

root-id R-IDwayserioustohell@gmail.com

7SECURITY TESTING

Melakukan Pengecekan Celah Keamanan pada Wordpress

Vulnerable . . .?

Setelah kita melakukan instalasi dan pengamanan pada wordpress, kemudian kita akan melakukan Scanning/Mendeteksi celah keamanan/bug yang masih ada pada wordpress.

Disini saya akan melakukan scanning dengan Sebuah script dengan bahasa Pemograman rubby, tools ini sangat disukai para webmaster untuk melakukan Information Gathering dan Mendeteksi celah keamanan pada Wordpress.

Tools ini bernama WP-scan.

Dapat didownload di:http://code.google.com/p/wpscan/wiki/README

root-id R-IDwayserioustohell@gmail.com

LIST OF

VULNERABILITIES

DAFTAR CELAH KEAMANAN PADA FILE-FILE WORDPRESS

8

root-id R-IDwayserioustohell@gmail.com

9DAFTAR FILE DAN DIREKTORY YANG MENAMPILKAN PESAN ERROR:

1. /wp-settings.php

2. File-file pada /wp-admin/ :

admin-functions.phpmenu.phpmenu-header.phpoptions-head.phpupgrade-functions.php

3. File-file pada /wp-admin/includes/ :admin.phpclass-ftp-pure.phpclass-ftp-sockets.php

class-ftp.phpclass-wp-filesystem-direct.phpclass-wp-filesystem-ftpext.phpclass-wp-filesystem-ftpsockets.phpclass-wp-filesystem-ssh2.php

comment.phpcontinents-cities.phpFile.phpmedia.phpmisc.php

plugin-install.phpplugin.phptemplate.phptheme-install.phpupdate.php

upgrade.phpuser.php

4. /wp-includes/

5. File-File pada /wp-includes/ :canonical.phpclass-feed.phpclass.wp-scripts.phpclass.wp-styles.php

comment-template.phpdefault-embeds.phpdefault-filters.phpdefault-widgets.phpfeed-atom-comments.php

feed-atom.phpfeed-rdf.phpfeed-rss.phpfeed-rss2-comments.phpfeed-rss2.php

general-template.phpkses.phpmedia.phppost.phpregistration-functions.php

rss-functions.phprss.phpscript-loader.phpshortcodes.phptaxonomy.php

template-loader.phptheme.phpupdate.phpvars.phpwp-db.php

user.php

root-id R-IDwayserioustohell@gmail.com

PROOF

OF CONCEPT

MELAKUKAN PRAKTEK PENGAMANAN

10

root-id R-IDwayserioustohell@gmail.com

11TAMPILAN DEFAULT WORDPRESS 3.5

root-id R-IDwayserioustohell@gmail.com

12

Php Error Handling

/wp-settings.php

Tambahkan code :

error_reporting(0);

Setelah pembuka code php yaitu dibawah code :

<?php

root-id R-IDwayserioustohell@gmail.com

13SEBELUM

root-id R-IDwayserioustohell@gmail.com

14PENGAMANAN

root-id R-IDwayserioustohell@gmail.com

15SESUDAH

root-id R-IDwayserioustohell@gmail.com

16

Php Error Handling

File-file pada /wp-admin/ :

admin-functions.phpmenu.phpmenu-header.phpoptions-head.phpupgrade-functions.php

Tambahkan code :

error_reporting(0);

Setelah pembuka code php yaitu dibawah code :

<?php

root-id R-IDwayserioustohell@gmail.com

17SEBELUM

root-id R-IDwayserioustohell@gmail.com

18PENGAMANAN

root-id R-IDwayserioustohell@gmail.com

19SESUDAH

root-id R-IDwayserioustohell@gmail.com

20

.htaccess Security

File-file pada /wp-admin/includes/ :

admin.phpclass-ftp-pure.phpclass-ftp-sockets.phpclass-ftp.phpclass-wp-filesystem-direct.phpclass-wp-filesystem-ftpext.phpclass-wp-filesystem-ftpsockets.phpclass-wp-filesystem-ssh2.phpcomment.phpcontinents-cities.phpFile.phpmedia.phpmisc.phpplugin-install.phpplugin.phptemplate.phptheme-install.phpupdate.phpupgrade.phpuser.php

Buat file .htaccess dengan isi:

php_flag display_startup_errors offphp_flag display_errors offphp_flag html_errors offphp_flag log_errors onphp_flag ignore_repeated_errors offphp_flag ignore_repeated_source offphp_flag report_memleaks onphp_flag track_errors onphp_value docref_root 0php_value docref_ext 0php_value error_reporting -1php_value log_errors_max_len 0

root-id R-IDwayserioustohell@gmail.com

21SEBELUM

root-id R-IDwayserioustohell@gmail.com

22PENGAMANAN

root-id R-IDwayserioustohell@gmail.com

23PENGAMANAN

root-id R-IDwayserioustohell@gmail.com

24SESUDAH

root-id R-IDwayserioustohell@gmail.com

25

.htaccess Security

File-File pada /wp-includes/ :

canonical.php

class-feed.phpclass.wp-scripts.phpclass.wp-styles.phpcomment-template.phpdefault-embeds.php

default-filters.phpdefault-widgets.phpfeed-atom-comments.phpfeed-atom.phpfeed-rdf.php

Buat file .htaccess dengan isi seperti file .htaccess pada direktory /wp-admin/includes/, atau copy saja file tersebut.

feed-rss.phpfeed-rss2-comments.phpfeed-rss2.phpgeneral-template.phpkses.phpmedia.phppost.phpregistration-functions.phprss-functions.phprss.php

script-loader.phpshortcodes.phptaxonomy.phptemplate-loader.phptheme.phpupdate.phpvars.phpwp-db.phpuser.php

root-id R-IDwayserioustohell@gmail.com

26SEBELUM

root-id R-IDwayserioustohell@gmail.com

27PENGAMANAN

root-id R-IDwayserioustohell@gmail.com

28SESUDAH

root-id R-IDwayserioustohell@gmail.com

29

.htaccess Security

/wp-content/themes/namatheme

Buat file .htaccess dengan isi seperti file .htaccess pada direktory /wp-admin/includes/, atau copy saja file tersebut.

root-id R-IDwayserioustohell@gmail.com

30SEBELUM

root-id R-IDwayserioustohell@gmail.com

31PENGAMANAN

root-id R-IDwayserioustohell@gmail.com

32SESUDAH

root-id R-IDwayserioustohell@gmail.com

33

.htaccess Security

Full .htaccess security on /wordpress

root-id R-IDwayserioustohell@gmail.com

34

root-id R-IDwayserioustohell@gmail.com

35

Custom Error Page

Pertama, buatlah sebuah file .php dengan nama 403.php dan 404.php pada direktori /wordpress/, desain tampilannya sesuai selerera.

Setelah itu tambahkan code dibawah ini pada file .htaccess yang ada di direktori /wordpress/

Code:

#Custom Error PageErrorDocument 404 /wordpress/404.phpErrorDocument 403 /wordpress/403.php

R-IDwayserioustohell@gmail.com

root-id

36SEBELUM

R-IDwayserioustohell@gmail.com

root-id

37SEBELUM

R-IDwayserioustohell@gmail.com

root-id

38

root-id R-IDwayserioustohell@gmail.com

39

root-id R-IDwayserioustohell@gmail.com

40SESUDAH

root-id R-IDwayserioustohell@gmail.com

41

SECURITY TESTING

Melakuakn Tes Keamanan dengan WP-scan.Yang dijalankan pada Backtrack 5 R3

WP-SCAN dapat didownload di:http://code.google.com/p/wpscan/wiki/README

root-id R-IDwayserioustohell@gmail.com

42WP-SCAN TESTING (BEFORE SECURED)

root-id R-IDwayserioustohell@gmail.com

43WP-SCAN TESTING (BEFORE SECURED) 2

root-id R-IDwayserioustohell@gmail.com

44WP-SCAN TESTING (SECURED)

root-id R-IDwayserioustohell@gmail.com

fb.me/GoAhead.DoMore

@root_id

45

TERIMAKASIH

root-id R-IDwayserioustohell@gmail.com

top related