DLEVIET - DataLife Engine Support Home Page

DataLife Engine Support » DataLife Engine » Tips » Protect DLE script from running third-party scripts

Protect DLE script from running third-party scripts

  • Author: admin;  
  • Views: 2540;  
  • Date: 15 November 2010;  
Protect DLE script from running third-party scripts

Protect DLE script from running third-party scripts
Защита папок скрипта от запуска сторонних скриптов


Source: celsoft

Dear friends,

In this small article, we would like to talk about how you can improve your site security. As we know the greatest threat to website are encapsulated by an attacker on server PHP shell.


What is it? This is a PHP script that can run on your server, respectively, to make any changes to the files writable, or can do many things. For example: read contents of configuration files and thus obtain direct access to the database. How can shell get on your server? There are many ways: vulnerability in DLE script or third party modules, other vulnerable party scripts on server or server software...
Main feature cannot put shell files in any folder on server. So it can do that in writeable folders on server, and in DataLife Engine, there folders are /uploads/ and /templates/, as well as all sub-folders in them. These folders should be writable, because you can upload in them through a script legal content, files, pictures, edit in Admin panel templates, and more. So, attacker can put and run shell scripts in these folders, from there, it can access to Datalife Engine and others script on your host. Can I protect these folders without deny access to these folders? It is possible, and not hard enough.

So, you need to put in folders /uploads/ and /templates/ file .htaccess file with the following contents:

php_flag engine  off



This line disables the PHP interpreter when trying to access PHP files located in these folders, as well as in all subfolders. Therefore, even in the case of filling in these folders are files with malicious PHP code, they become utterly useless to attacker, cannot run and executed by the server.


Unfortunately, not all hosting providers allow you to manage this option through .htaccess file, but we has anoter solution, so if your server is not working above method, then place in these folders .htaccess file with content:

<FilesMatch "\.(php|php3|php4|php5|php6|phtml|phps)$|^$">
   Order allow,deny
   Deny from all
</FilesMatch>


This code prohibits the direct access to PHP files in those folders.

That's all, these simple manipulation will increase the security of your site, even if there is a serious vulnerability in a third-party modules and scripts.
We encourage you to Register or Login to website under your name.

zeeko

Posted 17 November 2010 13:47 Register: 14.03.2010
Thank you Friend! but when put .htaccess in upload folder it Prevents photos from showing!!

Michael

Posted 19 November 2010 13:01 Register: 14.03.2010
now a days
the lots of popup in this site is very annoying
i rarely visit

Download123.us

Posted 21 November 2010 18:55 Register: 31.10.2010
Thanks wink

Pakistan

Posted 24 November 2010 10:50 Register: 2.03.2010
Michael,
there is no way to monetize this site so admin have got this method. I suggest member to give few $ per month so this site will not show any popunders , and also it will motivate the admin to post more stuff related to DLE
Information
Members of Guest cannot leave comments.

Pagerank Update

    Updates Yandex SEO
    13.04.2012
    16.02.2012
    04.02.2012
    Updates Yandex search
    17.05.2012
    15.05.2012
    12.05.2012
    Updates Yandex Catalogue
    18.05.2012
    16.05.2012
    11.05.2012
    Updates Google
    03.05.2012
    06.02.2012
    08.11.2011

Find us on Facebook

Poll

How do you know DataLife Engine Support?

Search Engine
Other DLE Support websites
Forum
Friends
Others

Sponsor

Calendar

«    May 2012    »
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
Contact us in social network

Facebook

Twitter