Activity Stream
48,167 MEMBERS
6844 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 9 of 9
  1.     
    #1
    Moderator
    NewEraCracker's Avatar

    Default Secure php file execution NOW!

    I've found a problem with the execution of files with unknown extensions.

    To see the server is vulnerable upload a file named bug.php.kkk and see if it executes:
    Code: 
    <?php echo "bugged"; ?>
    If you see just "bugged" while executing it, your server IS NOT secured. If you see ALL text (including the php tags) in the browser or in the downloaded file, your server seems to be secure.

    This is caused by:

    "Files can have more than one extension, and the order of the extensions is normally irrelevant. (...) Care should be taken when a file with multiple extensions gets associated with both a MIME-type and a handler. This will usually result in the request being handled by the module associated with the handler."
    See:
    Code: 
    http://httpd.apache.org/docs/2.2/mod/mod_mime.html#multipleext
    http://www.php.net/manual/en/install.windows.apache2.php
    How to fix:

    Find in configuration:
    Code: 
    AddHandler application/x-httpd-php .php
    Replace with:
    Code: 
    <FilesMatch \.php$>
    SetHandler application/x-httpd-php
    </FilesMatch>
    Regards,
    NewEraCracker
    NewEraCracker Reviewed by NewEraCracker on . Secure php file execution NOW! I've found a problem with the execution of files with unknown extensions. To see the server is vulnerable upload a file named bug.php.kkk and see if it executes: <?php echo "bugged"; ?> If you see just "bugged" while executing it, your server IS NOT secured. If you see ALL text (including the php tags) in the browser or in the downloaded file, your server seems to be secure. This is caused by: "Files can have more than one extension, and the order of the extensions is normally Rating: 5
    Trusted: Dom, l0calh0st, 0ccul7, robert420
    Find all threads started by NewEraCracker

  2.   Sponsored Links

  3.     
    #2
    Banned
    Website's:
    HotWallpapers.me AustraliaFlood.net VirtualUpload.net
    Thanks pal

  4.     
    #3
    (╯?□?)╯︵ ┻━┻
    Website's:
    Xenu.ws WarezLinkers.com SerialSurf.com CracksDirect.com
    lol, badly configured web servers ftw
    Projects:
    WCDDL - The Professional DDL Script
    Top Secret Project: In Development - ZOMG
    ImgTrack - Never Have Dead Images Again!

  5.     
    #4
    Banned
    Website's:
    SKDown.Net WarezGuru.Org RARdownload.net
    try this

    Code: 
    <FilesMatch "\.(inc|php|php3|php4|php5|php6|phtml|phps)$">
    </FilesMatch>
    AddType text/html .php
    always use suphp. ALWAYS

  6.     
    #5
    Moderator
    NewEraCracker's Avatar
    A friend has posted this in cPanel forum. It has instructions to secure apache with SuPHP.
    http://forums.cpanel.net/f145/defaut...tml#post934442

    I changed to this configuration in a shared server:

    /usr/local/apache/conf/php.conf
    Code: 
    # This file was automatically generated by the Cpanel PHP Configuration system
    # If you wish to change the way PHP is being handled by Apache on your system,
    # use the /usr/local/cpanel/bin/rebuild_phpconf script or the WHM interface.
    #
    # Manual edits of this file will be lost when Apache is updated.
    
    
    # SuPHP configuration for PHP5
    LoadModule suphp_module modules/mod_suphp.so
    suPHP_Engine on
    AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
    #<Directory />
    #    suPHP_AddHandler application/x-httpd-php5
    #</Directory>
    <FilesMatch \.php(|5|4|3|2)$>
        suPHP_AddHandler application/x-httpd-php5
    </FilesMatch>
    <FilesMatch \.phtml$>
        suPHP_AddHandler application/x-httpd-php5
    </FilesMatch>
    
    # End of autogenerated PHP configuration.
    Trusted: Dom, l0calh0st, 0ccul7, robert420
    Find all threads started by NewEraCracker

  7.     
    #6
    Member
    Website's:
    Elite.SO Defendos.com Motionite.com
    Goodwork

    Defendos BETA3 Released! Thread - Official Website

  8.     
    #7
    Member
    Website's:
    RapsUnderground.com
    Nice N.E.C .

    Helped me .

  9.     
    #8
    Member
    This is great tutor and one must make this change on their server.

    I have already done that on my server was suggested by DC tech guy

    + 1 Neweracracker...Helpful post !

  10.     
    #9
    Moderator
    NewEraCracker's Avatar
    Here is another helpful post about another apache issue. a must see:
    http://www.besthostingforums.com/showthread.php?t=99170
    Trusted: Dom, l0calh0st, 0ccul7, robert420
    Find all threads started by NewEraCracker

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. how to unlock pdf secure file
    By jillbert in forum Technical Help Desk Support
    Replies: 3
    Last Post: 15th Nov 2012, 09:49 AM
  2. How to secure RDP??
    By Jiung in forum Technical Help Desk Support
    Replies: 6
    Last Post: 9th Aug 2012, 09:55 PM
  3. Replies: 8
    Last Post: 8th Dec 2010, 05:02 AM

Tags for this Thread

BE SOCIAL