Go Back   Linux CentOS, Control Panel, Hot girl, TOP 10 GOOGLE, Server - System - Manager, Operation System, Thiet ke website, Hack war3, hack map, dota hacking > Dành cho webmaster > Xây dựng, quản trị diễn đàn > Invision board

Hack map cua war3 version 1.24e - co the chuyen tien
Hack gunz.2it.in mới update ngày 2/3/2010 (test by Admin)
Hướng dẫn Hack gold member tại quán net để mang về nhà
hack map dota cho war3 ver 1.24a, hackmap 1.24b, hack map 1.24c, hack dota 1.24d, hack map war3 1.24e, co the chuyen tien
crack windows 7 all version (using activators)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-01-2009
Banned
 
Join Date: Jan 2009
Location: Sierra Leone
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Dyncemume
Default Bảo mật IBF toàn tập

Tổng quan về bảo mật cho IBF gồm các phần chính sau :

- Đổi tên file cấu h́nh : conf_global.php

- Đổi tên file Login vào Control Panel : admin.php

- Giấu chuỗi index, đổi tên file index.php, và đổi tên thư mục Sources.(Cái này có thể ko cần làm)

- Thiết lập mật khẩu bảo vệ Control Panel : Security Password.

- Giới hạn số lần truy nhập Admin CP có User và Password sai.

- Xây dựng tường lửa bảo vệ.

- Mă hoá.

- Cập nhật và Fix lỗi thường xuyên.

Sau đây tôi sẽ hướng dẫn các bạn thực hiện các bước trên để có thể giúp các bạn bảo mật Diễn đàn một cách tốt nhất có thể. Công cụ để sửa code ở đây tôi dùng Macromedia Dreamweaver (Hỗ trợ t́m Text trong tất cả các file ở thư mục định sẵn).

1. Đổi tên file cấu h́nh conf_global.php :

T́m tất cả các file có chuỗi conf_global. thay bằng tên mà bạn muốn thay. Ví dụ tôi đổi tên file thành : config4r.php th́ tôi t́m conf_global. thay bằng config4r. (chú ư là có dấu . đấy nhé)

Sau đó bạn vào thư mục gốc của Forum đổi tên conf_global.php thành config4r.php là xong bước 1.

2. Đổi tên admin.php (ở đây tôi ví dụ là đổi thành file : 4rcp.php )

T́m tất cả các file có chuỗi admin. thay bằng 4rcp.

Sau đó vào thư mục gốc của Forum đổi tên admin.php thành 4rcp.php.

Đă xong bước 2

3. Đổi tên thư mục sources và giấu chuỗi Index. Và nếu muốn có thể đổi tên index.php

T́m tất cả các file có chuỗi sources thay bằng tên thư mục bạn muốn đổi. Ví dụ tôi đổi tên thư mục Source thành thư mục : code , tôi t́m tất cả các file có chuỗi sources thay thế bằng code

Sau đó đổi tên thư mục sources thành code .

Giấu chuỗi index :

T́m chuỗi index. ở tất cả các file rồi xoá đi. (Không điền ǵ vào ô Replace)

T́m chuỗi index.php ở tất cả các file rồi xoá đi.

Mở file config4r.php (là file conf_global.php cũ ), t́m đoạn $INFO['php_ext'] = 'php';

Thay bằng $INFO['php_ext'] = '';

Bây giờ là cách fix lỗi sau khi các bạn giấu index.php :

T́m tất cả file có chuỗi 4rcp. (nếu chưa đổi tên file admin.php th́ là admin. ) sau đó thay bằng 4rcp.php

Sau đó t́m tiếp 4rcp.phpphp thay bằng 4rcp.php

( Bạn có thể đổi tên index.php thành file khác, ví dụ như main.php theo cách sau :

Chúng ta tạo file .htaccess với nội dung như sau

DirectoryIndex main.php index.php index.php3 index.html

Save lại rồi Upload lên thư mục gốc của Forum.)



4. Thiết lập Security Password bảo vệ cho Admin CP.

Mở file 4rcp.php ( là file admin.php cũ ) sau đó t́m đoạn code sau :

$PassWord = "";

Thêm vào bên dưới :



$SPassWord = "matrix2k "; //Thay matrix2k bằng password của bạn ở đây.

T́m tiếp :

if ( empty($IN['password']) )

{

do_login("You must enter a password before proceeding");

}

Thêm vào bên dưới :

if ( empty($IN['password']) )

{

do_login("You must enter a security password before proceeding");

}

T́m tiếp :

if ($pass != $mem['password'])

{

do_login("The password entered did not match the one in our records");

}

Thêm vào bên dưới :

elseif ($SPassWord != $IN['spassword'])

{

do_login("The security password entered did not match the one in our records");

}

T́m tiếp :

$ADMIN->html .= $SKIN->add_td_row( array( "Your Forums Password:",

"<input type='password' style='width:100%' name='password' value=''>",

) );

Thêm dưới :

$ADMIN->html .= $SKIN->add_td_row( array( "Your Security Password:",

"<input type='password' style='width:100%' name='spassword' value=''>",

) );

Done ! Như vậy bạn đă tạo thêm một Password bảo vệ cho Forum của bạn khi Login vào Admin CP.



5. Giới hạn số lần nhập sai User và Pass khi đăng nhập vào Admin CP.

Mở file 4rcp.php (file admin.php) t́m đoạn sau :

//----------------------------------

// Attempt to get the details from the

// DB

//----------------------------------

Bổ sung ngay phía dưới :

require $root_path."sources/lib/emailer.php";



$this->email = new emailer();



Sau đó t́m tiếp ngay dưới :



if ( empty($mem['id']) )

{



Bổ sung thêm :

$ip_address=getenv("HTTP_X_FORWARDED_FOR");

if ($ip_address=="") {

$ip_address=getenv("REMOTE_ADDR");

}

$ip_hostname = @gethostbyaddr($ip_address);

$mail = $INFO['email_out'];

$this->email->message = "Cảnh báo !!! Có một ai đó đă cố gắng truy cập vào Admin CP của bạn!\n\nVới Username là : $username\nvà Password đă mă hoá MD5 là : $password (".md5($password).")\n\nĐịa chỉ IP của người đă cố gắng đăng nhập là : $ip_address\n Host là: $ip_hostname\n\nBạn có thể t́m được thông tin về người đă sử dụng IP này để truy cập vào Admin CP của bạn bằng địa chỉ sau [Thành viên phải đăng kư mới xem được link này. ] ";

$this->email->subject = "Cảnh báo : Có kẻ t́m cách xâm nhập Administration CP ";

$this->email->to = $mail;

$this->email->send_mail();

Bây giờ ta t́m tiếp :

if ($pass != $mem['password'])

{

Thêm dưới đó :

$ip_address=getenv("HTTP_X_FORWARDED_FOR");

if ($ip_address=="") {

$ip_address=getenv("REMOTE_ADDR");

}

$ip_hostname = @gethostbyaddr($ip_address);

$mail = $INFO['email_out'];

$this->email->message = "Cảnh báo !!! Có một ai đó đă cố gắng truy cập vào Admin CP của bạn!\n\nVới Username là : $username\nvà Password đă mă hoá MD5 là : $password (".md5($password).")\n\nĐịa chỉ IP của người đă cố gắng đăng nhập là : $ip_address\n Host là: $ip_hostname\n\nBạn có thể t́m được thông tin về người đă sử dụng IP này để truy cập vào Admin CP của bạn bằng địa chỉ sau [Thành viên phải đăng kư mới xem được link này. ] ";

$this->email->subject = "Cảnh báo : Có kẻ t́m cách xâm nhập Administration CP ";

$this->email->to = $mail;

$this->email->send_mail();

Done, như vậy bạn đă xong bước thứ 5. Từ bây giờ bất kỳ ai nhập Password đăng nhập Admin CP sai quá 3 lần, IBP của bạn sẽ gửi thư cảnh báo về cho bạn ngay.

Phù mỏi tay quá, mấy cái sau tôi chỉ giới thiệu qua thôi .

6. Xây dựng tường lửa.

Có rất nhiều loại tường lửa có thể sử dụng, nhưng ở đây tôi sẽ hướng dẫn bạn cách xây dựng m ột PHP Firewall thông qua .htpasswd (có thể đọc tham khảo bài bảo mật ACP của tôi)

Tạo file : baove.php với đoạn code sau :

<?php

global $_matrix2k_auth_passwd_file, $_matrix2k_auth_OK;

$_matrix2k_auth_passwd_file = ".htpasswd";

$_matrix2k_auth_OK = 0;

function _matrix2k_auth_die($str) {

?>

<html>

<head>

<title>Firewall protect for ACP Matrix 2K </title>

</head>

<body>

<center><h1>Firewall 1 protect for ACP IBF </h1>

<h2>Please Type your user and password to Login Firewall 2 or ACP Hi Hi ! </h2></center>

<center><h3><?php echo $str ?></h3></center>

</body>

</html>

<?php

exit(-1);

}

function _matrix2k_auth_check($us er, $password, $level) {

global $_matrix2k_auth_passwd_file;

@ $fp = fopen($_matrix2k_auth_passwd_file, "r");

if (!$fp) {

_matrix2k_auth_die("Cannot open password file!");

}

while (!feof ($fp)) {

$line = chop(fgets($fp));

list ($u, $p) = split(":", $line, 2);

if ($u == $user && (($level == 0 && $p == md5($password)) || ($level == 1 && $p == $password))) {

setcookie('matrix2k_auth_user', $u);

setcookie('matrix2k_auth_password', $p);

fclose($fp);

return 1;

}

}

fclose($fp);

return 0;

}

function _matrix2k_auth_form() {

?>

<html>

<head>

<title>Firewall protect for ACP Matrix 2K </title>

</head>

<body>

<center><h1>Firewall 1 protect for ACP IBF </h1>

<h2>Please Type your user and password to Login Firewall 2 or ACP Hi Hi ! </h2></center>

<center><form method="POST">

Username: <input type="text" name="matrix2k_auth_user">

Password: <input type="password" name="matrix2k_auth_password">

<input type="submit" value="Login">

</form></center>

</body>

</html>

<?php

exit(-1);

}

if ($_POST['matrix2k_auth_user'] && $_POST['matrix2k_auth_password']) {

$_matrix2k_auth_OK = _matrix2k_auth_check($_POST['matrix2k_auth_user'], $_POST['matrix2k_auth_password'], 0);

} else if ($_COOKIE['matrix2k_auth_user'] && $_COOKIE['matrix2k_auth_password']) {

$_matrix2k_auth_OK = _matrix2k_auth_check($_COOKIE['matrix2k_auth_user'], $_COOKIE['matrix2k_auth_password'], 1);

}

if (!$_matrix2k_auth_OK) {

_matrix2k_auth_form();

}

?>

Bây giờ tạo file : taopass.php với đoạn code sau :

<html>

<head>

<title>Encode Password to MD5</title>

</head>

<body>

<center><h1>Password Encoder using MD5 Hashing</h1>

<h2>To creat Password for your PHP file</h2></center>

<center><h3>

<?php

if ($_POST['password']) {

echo "Your password has been encoded as: ", md5($_POST['password']);

}

?>

</h3></center>

<center>

<form method="POST">

Enter your password: <input type="text" name="password">

<input type="submit" value="Encode">

</form>

</center>

</body>

</html>



Bạn hăy upload cả 2 file lên thư mục gốc của Forum và Run file taopass.php :

[Thành viên phải đăng kư mới xem được link này. ]

Nhập password bạn muốn Encode MD5, rồi Encode, Hăy copy lại doạn Password đă mă hóa của bạn lại.

Tạo file : .htpasswd trên thư mục chứa forum của bạn với nội dung sau :

User: đoạn password mă hóa

Ví dụ :

User: 098f6bcd4621d373cade4e832627b4f6

Bây giờ mở file : admin.php , ngay đầu của trang chèn đoạn code sau :

<?php include "baove.php";?>

Bây giờ hăy CHMOD file .htpasswd thành 004 ! Okie đă xong bước 6.

7. Mă hoá

Mă hoá th́ chúng ta dùng Tool, Tool tốt nhất là Zend code, nếu ko có bạn có thể xài PHPEncode cũng được. Hăy Search rồi Load tool về để encode các file php của bạn lại .

8. Cập nhật và Fix lỗi.

Các bạn phải cập nhật và Fix lỗi thường xuyên và liên tục. Dưới đây là một số lỗi đă công bố của IBP 1.3 và cách Fix :

*************************

Lỗi SQL Injection ở forum.php

*************************

T́m đoạn code :

if ( (!isset($sort_keys[$sort_key])) and (!isset($prune_by_day[$prune_value])) and (!isset($sort_by_keys[$sort_by])) )

Thay bằng :

if ( (!isset($sort_keys[$sort_key])) or (!isset($prune_by_day[$prune_value])) or (!isset($sort_by_keys[$sort_by])) )

*************************

Lỗi SQL Injection ở calendar.php

*************************

T́m trong file : sources/calendar.php đoạn code sau :

$this->chosen_month = ( ! intval($ibforums->input['m']) ) ?

$this->now_date['mon'] : $ibforums->input['m']; $this->chosen_year = ( ! intval($ibforums->input['y']) ) ?

$this->now_date['year'] : $ibforums->input['y'];

Thay bằng :

$this->chosen_month = ( ! intval($ibforums->input['m']) ) ?

$this->now_date['mon'] : intval($ibforums->input['m']); $this->chosen_year = ( ! intval($ibforums->input['y']) ) ?

$this->now_date['year'] : intval($ibforums->input['y']);

Chú ư : Các bạn phải CHMOD file và thư mục cho cẩn thận. CHMOD file là 604 hoặc 644, CHMOD thư mục là 701 hoặc 755.

Chúc các bạn bảo mật tốt Forum của ḿnh và bài viết trên đây của tôi giúp bạn chút phần nào
__________________
[i]place your advertisement[/i] [url=http://bottleoneexpress.com/]secretpage.hackingart.com[/url]
Reply With Quote
Reply

« Cài đặt IBF | - »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT +8. The time now is 01:51 AM.


© Diễn đàn HackingArt (HA) được xây dựng và phát triển bởi các thành viên.
+ Diễn đàn HackingArt là nơi trao đổi của các webmaster chuyên nghiệp.

Search Engine Friendly URLs by vBSEO 3.2.0