MKPortal Güvenlik Yaması Blog Ve Gallery Modülleri Mkp 1.1 Ve Mkp 1.0

bLoOdLusT1912

Kadim Üye
1 Ağu 2007
5,470
41
Aşağıdaki güvenlik riski MKPortal coderı meo tarafından bulunmuş ve yamanmıştır.
Ayrıca yine gallery modülünde bir risk vardır. Bunlar sadece riskli kodların engellenmesi için. Siz yinede yapın.

/mkportal/modules/blog/index.php dosyasını açın

function clean_template fonksiyonunu bulun:

function clean_template ($t="") {
$t = str_replace( "&#" , "", $t );
$t = str_replace( ">" , ">", $t );
$t = str_replace( "<" , "<", $t );
$t = str_replace( "<?" , "" , $t );
$t = str_replace( "?" , "" , $t );
$t = preg_replace( "/<script/i" , "" , $t );
$t = preg_replace( "/javascript/i" , "", $t );
$t = preg_replace( "/about/i" , "", $t );
$t = preg_replace( "/vbscript/i" , "", $t );
$t = preg_replace( "/alert/i" , "" , $t );
$t = preg_replace( "/onmouseover/i", "", $t );
$t = preg_replace( "/onclick/i" , "" , $t );
$t = preg_replace( "/onload/i" , "" , $t );
$t = preg_replace( "/onsubmit/i" , "" , $t );

return $t;
}

Bununla değişin
function clean_template ($t="") {
$t = str_replace( "&#" , "", $t );
$t = str_replace( ">" , ">", $t );
$t = str_replace( "<" , "<", $t );
$t = str_replace( "<?" , "" , $t );
$t = str_replace( "?" , "" , $t );
while( preg_match( "#script(.+?)/script#ies" , $t ) ) {
$t = preg_replace( "#script(.+?)/script#ies", "" , $t);
}
$t = preg_replace( "/javascript/i" , "", $t );
$t = preg_replace( "/about/i" , "", $t );
$t = preg_replace( "/vbscript/i" , "", $t );
$t = preg_replace( "/alert/i" , "" , $t );
$t = preg_replace( "/onmouseover/i", "", $t );
$t = preg_replace( "/onclick/i" , "" , $t );
$t = preg_replace( "/onload/i" , "" , $t );
$t = preg_replace( "/onsubmit/i" , "" , $t );

return $t;
}
Kaydedin

Aşağıdaki dosyayı açın:

/mkportal/modules/gallery/index.php

Bul:
$file = $_FILES['FILE_UPLOAD']['tmp_name'];
$file_name = $_FILES['FILE_UPLOAD']['name'];
$file_type = $_FILES['FILE_UPLOAD']['type'];
$peso = $_FILES['FILE_UPLOAD']['size'];
}
Altına ekle:
$check = @fopen($file, "r");
$check = @fread($check, filesize($file));
if (preg_match("/html/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/javascript/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/about/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/vbscript/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/alert/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/onmouseover/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/onclick/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/onload/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/onsubmit/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("#script(.+?)/script#ies", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/<?php/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
@fclose($check);
Kaydedin:


Bu Güvenlik Yaması M1.0 & M1.1 Kullananların Yapması Gerekmektedir.
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.