The Security of Server-Side Includes

All these are code announcements in HTML documents, frequently written with PHP, that give instructions to the Web server.

A number of these instructions can tell the Web server to perform system commands and CGI scripts. You can get server hosting services through https://intergrid.com.au/.

Because developers are usually unaware of the security dangers, and therefore do not write their code accordingly, Web Masters should continue to keep a sharp eye on them.

Server-side includes are snippets of code that not only simplify Web site maintenance but can also make Internet site pages interactive.

Image result for servers

Image Source: Google

This and their ease to implement make them appealing to Web programmers, but the dangers of using them must be understood and prevented.

Employing server-side includes to show environment variables and file data ("#echo var=") poses no security risk; likewise, using the "#include" function, provided that the directory containing the added document is not Web-accessible.

Security issues can arise when utilizing server-side includes executing applications online server, especially when using the "#exec" function. A hacker will then be able to run controls to gain access and steal data, corrupt or even delete files.

It is safest to disable the "#exec" directive on the Web server, or at least limit its use to only trusted users. Obviously, it needs to be utilized only where absolutely required. Thus, program files can be kept from the way of the Web-accessible files.

Leave a Reply