Internet Productivity Suite: Open Source Security - Trust Internet Productivity Suite's open source architecture to give you the best security and productivity applications available. Collaborating with thousands of developers, Guardian Digital security engineers implement the most technologically advanced ideas and methods into their design.
Hacks From Pax: PHP Web Application Security, Part II
Another common cause of PHP application holes is improper sanitization of user provided data. For example, if you allow a user to fill out a form and then pass data from a field on that form to a function like system() or exec() the data could contain something malicious, like an ; rm -rf * command tacked onto it.
- Never trust user provided data.
- Beware functions that launch system commands, think long and hard about checking any data that is passed to them.
Another related but common security flaw in PHP applications is a SQL injection vulnerability. The magic_quotes_gpc option can mitigate this, but as with register_globals you should not assume this setting is on.
For example, in your PHP script you might ask the user for a user id and password, and then check for the user by passing the database a query.
SELECT * FROM users WHERE name='$username' AND pass='$password';
However, if the user logging in is malicious and devious, he may enter the following as his password:
' OR '1'='1
This causes your query to become:
SELECT * FROM users WHERE name='known_user' AND pass='' OR '1'='1';
The user has just logged in with no password, and your application has been penetrated. To avoid this, check for the status of magic_quotes_gpc() using the ini_get() function and if it is disabled, pass all user input that must be included in a query through addslashes(). This will escape the single or double quotes in the user input with backslashes, thereby thwarting the attempted SQL injection attack.
- Use magic_quotes_gpc, but don't assume it is on or depend on it.
- The addslashes() function should be used on user data passed to SQL queries.
- Again, you simply cannot trust user provided data.
The PHP online manual contains an entire chapter on PHP security. It's an excellent resource, and goes into much more detail on the PHP security issues I've discussed in this article. Until next time, stay secure, and don't blindly trust any user provided data.
Read Entire Article:
features/features/hacks-from-pax-php-web-application-security
LinuxSecurity.com Feature Extras:
Linux File & Directory Permissions Mistakes - One common mistake Linux administrators make is having file and directory permissions that are far too liberal and allow access beyond that which is needed for proper system operations. A full explanation of unix file permissions is beyond the scope of this article, so I'll assume you are familiar with the usage of such tools as chmod, chown, and chgrp. If you'd like a refresher, one is available right here on linuxsecurity.com.
Introduction: Buffer Overflow Vulnerabilities - Buffer overflows are a leading type of security vulnerability. This paper explains what a buffer overflow is, how it can be exploited, and what countermeasures can be taken to prevent the use of buffer overflow vulnerabilities.
Getting to Know Linux Security: File Permissions - Welcome to the first tutorial in the 'Getting to Know Linux Security' series. The topic explored is Linux file permissions. It offers an easy to follow explanation of how to read permissions, and how to set them using chmod. This guide is intended for users new to Linux security, therefore very simple. If the feedback is good, I'll consider creating more complex guides for advanced users. Please let us know what you think and how these can be improved.
Take advantage of our Linux Security discussion
list! This mailing list is for general security-related questions and comments.
To subscribe send an e-mail to
Thank you for reading the LinuxSecurity.com weekly security newsletter. The purpose of this document is to provide our readers with a quick summary of each week's most relevant Linux security headline.
Debian | ||
Debian: New amd64 packages fix several bugs | ||
11th, August, 2005
Updated package. advisories/debian/debian-new-amd64-packages-fix-several-bugs |
||
Debian: New fetchmail packages fix arbitrary code execution | ||
12th, August, 2005
Updated package. advisories/debian/debian-new-fetchmail-packages-fix-arbitrary-code-execution |
||
Debian: New Mozilla packages fix frame injection spoofing vulnerability | ||
15th, August, 2005
Updated package. advisories/debian/debian-new-mozilla-packages-fix-frame-injection-spoofing-vulnerability-61745 |
||
Debian: New heartbeat packages fix insecure temporary files | ||
15th, August, 2005
Updated package. advisories/debian/debian-new-heartbeat-packages-fix-insecure-temporary-files-70055 |
||
Debian: New clamav packages fix several problems | ||
16th, August, 2005
Updated package. advisories/debian/debian-new-clamav-packages-fix-several-problems |
||
Debian: New Mozilla packages fix frame injection spoofing vulnerability | ||
17th, August, 2005
Updated package. advisories/debian/debian-new-mozilla-packages-fix-frame-injection-spoofing-vulnerability-61745 |
||
Fedora | ||
Fedora Core 4 Update: system-config-bind-4.0.0-28_FC4 | ||
11th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-system-config-bind-400-28fc4-11-50-00-120066 |
||
Fedora Core 3 Update: system-config-bind-4.0.0-28 | ||
11th, August, 2005
Updated package. advisories/fedora/fedora-core-3-update-system-config-bind-400-28-11-50-00-120067 |
||
Fedora Core 4 Update: system-config-netboot-0.1.24-1_FC4 | ||
11th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-system-config-netboot-0124-1fc4-11-51-00-120068 |
||
Fedora Core 3 Update: system-config-netboot-0.1.24-1_FC3 | ||
11th, August, 2005
Updated package. advisories/fedora/fedora-core-3-update-system-config-netboot-0124-1fc3-11-52-00-120069 |
||
Fedora Core 4 Update: lam-7.1.1-7.FC4 | ||
11th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-lam-711-7fc4-11-53-00-120070 |
||
Fedora Core 3 Update: lam-7.1.1-7.FC3 | ||
11th, August, 2005
Updated package. advisories/fedora/fedora-core-3-update-lam-711-7fc3-11-53-00-120071 |
||
Fedora Core 3 Update: vim-6.3.086-0.fc3 | ||
11th, August, 2005
Updated package. advisories/fedora/fedora-core-3-update-vim-63086-0fc3-11-55-00-120072 |
||
Fedora Core 4 Update: vim-6.3.086-0.fc4 | ||
11th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-vim-63086-0fc4-11-55-00-120073 |
||
Fedora Core 4 Update: evolution-data-server-1.2.3-2.fc4 | ||
15th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-evolution-data-server-123-2fc4-17-10-00-120087 |
||
Fedora Core 4 Update: audit-1.0.2-3.FC4 | ||
15th, August, 2005
This update fixes several problems where the audit system is used on systems with SE Linux disabled, it provides a sample CAPP configuration, adds new auditd config option to keep all logs instead of rotating them, and does some sanity checks on some rules before sending them to the kernel. advisories/fedora/fedora-core-4-update-audit-102-3fc4-17-10-00-120088 |
||
Fedora Core 3 Update: evolution-2.0.4-6 | ||
15th, August, 2005
Fix for SITIC Vulnerability Advisory SA05-001 advisories/fedora/fedora-core-3-update-evolution-204-6-17-11-00-120089 |
||
Fedora Core 4 Update: evolution-2.2.3-2.fc4 | ||
15th, August, 2005
Fix for SITIC Vulnerability Advisory SA05-001 advisories/fedora/fedora-core-4-update-evolution-223-2fc4-17-12-00-120090 |
||
Fedora Core 4 Update: mc-4.6.1a-0.11.FC4 | ||
15th, August, 2005
This update cotains the new official release of the GNU/Midnight Commander 4.6.1. advisories/fedora/fedora-core-4-update-mc-461a-011fc4-17-12-00-120091 |
||
Fedora Core 3 Update: mc-4.6.1-1.FC3 | ||
15th, August, 2005
This update cotains the new official release of the GNU/Midnight Commander 4.6.1. advisories/fedora/fedora-core-3-update-mc-461-1fc3-17-13-00-120092 |
||
Fedora Core 3 Update: system-config-netboot-0.1.26-1_FC3 | ||
15th, August, 2005
Updated package. advisories/fedora/fedora-core-3-update-system-config-netboot-0126-1fc3-17-14-00-120093 |
||
Fedora Core 3 Update: vim-6.3.086-0.fc3.1 | ||
15th, August, 2005
CAN-2005-2368 This update is supposed to fix GTK2 dependency problems of the vim-6.3.086-0.fc3 package. advisories/fedora/fedora-core-3-update-vim-63086-0fc31-17-15-00-120094 |
||
Fedora Core 3 Update: kdeaddons-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdeaddons-342-0fc31-17-16-00-120095 |
||
Fedora Core 3 Update: kdeadmin-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdeadmin-342-0fc31-17-17-00-120096 |
||
Fedora Core 3 Update: kdeartwork-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdeartwork-342-0fc31-17-18-00-120097 |
||
Fedora Core 3 Update: kdebindings-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdebindings-342-0fc31-17-18-00-120098 |
||
Fedora Core 3 Update: kdebase-3.4.2-0.fc3.2 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdebase-342-0fc32-17-19-00-120099 |
||
Fedora Core 3 Update: kdeedu-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdeedu-342-0fc31-17-19-00-120100 |
||
Fedora Core 3 Update: kdegames-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdegames-342-0fc31-17-20-00-120101 |
||
Fedora Core 3 Update: kdegraphics-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdegraphics-342-0fc31-17-21-00-120102 |
||
Fedora Core 3 Update: kde-i18n-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kde-i18n-342-0fc31-17-21-00-120103 |
||
Fedora Core 3 Update: kdelibs-3.4.2-0.fc3.2 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdelibs-342-0fc32-17-22-00-120104 |
||
Fedora Core 3 Update: kdemultimedia-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdemultimedia-342-0fc31-17-23-00-120105 |
||
Fedora Core 3 Update: kdenetwork-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdenetwork-342-0fc31-17-24-00-120106 |
||
Fedora Core 3 Update: kdepim-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdepim-342-0fc31-17-24-00-120107 |
||
Fedora Core 3 Update: kdesdk-3.4.2-0.fc3.2 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdesdk-342-0fc32-17-25-00-120108 |
||
Fedora Core 3 Update: kdetoys-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdetoys-342-0fc31-17-26-00-120109 |
||
Fedora Core 3 Update: kdeutils-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdeutils-342-0fc31-17-26-00-120110 |
||
Fedora Core 3 Update: kdevelop-3.2.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdevelop-322-0fc31-17-27-00-120111 |
||
Fedora Core 3 Update: kdewebdev-3.4.2-0.fc3.1 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-kdewebdev-342-0fc31-17-28-00-120112 |
||
Fedora Core 3 Update: koffice-1.4.1-0.FC3.2 | ||
15th, August, 2005
update to 1.4.1 advisories/fedora/fedora-core-3-update-koffice-141-0fc32-17-28-00-120113 |
||
Fedora Core 4 Update: xpdf-3.00-20.FC4.2 | ||
15th, August, 2005
A flaw was discovered in Xpdf in that an attacker could construct a carefully crafted PDF file that would cause Xpdf to consume all available disk space in /tmp when opened. advisories/fedora/fedora-core-4-update-xpdf-300-20fc42-17-29-00-120114 |
||
Fedora Core 3 Update: xpdf-3.00-10.6.FC3 | ||
15th, August, 2005
A flaw was discovered in Xpdf in that an attacker could construct a carefully crafted PDF file that would cause Xpdf to consume all available disk space in /tmp when opened. advisories/fedora/fedora-core-3-update-xpdf-300-106fc3-17-30-00-120115 |
||
Fedora Core 3 Update: arts-1.4.2-0.fc3.2 | ||
15th, August, 2005
update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-arts-142-0fc32-17-30-00-120116 |
||
Fedora Core 3 Update: kdeedu-3.4.2-0.fc3.2 | ||
15th, August, 2005
Ben Burton notified the KDE security team about several tempfile handling related vulnerabilities in langen2kvtml, a conversion script for kvoctrain. advisories/fedora/fedora-core-3-update-kdeedu-342-0fc32-17-31-00-120117 |
||
Fedora Core 3 Update: arts-1.4.2-0.fc3.3 | ||
15th, August, 2005
Update to KDE 3.4.2 advisories/fedora/fedora-core-3-update-arts-142-0fc33-17-32-00-120118 |
||
Fedora Core 4 Update: kdepim-3.4.2-0.fc4.3 | ||
15th, August, 2005
This update should fix a bug which caused kmail saves attachments as zero-sized files advisories/fedora/fedora-core-4-update-kdepim-342-0fc43-17-33-00-120119 |
||
Fedora Core 4 Update: epiphany-1.6.5-1 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-epiphany-165-1-01-23-00-120132 |
||
Fedora Core 4 Update: system-config-netboot-0.1.26-1_FC4 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-system-config-netboot-0126-1fc4-01-24-00-120133 |
||
Fedora Core 3 Update: kdbg-2.0.0-0.fc3.1 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-3-update-kdbg-200-0fc31-01-24-00-120134 |
||
Fedora Core 4 Update: doxygen-1.4.4-0.fc4.1 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-doxygen-144-0fc41-01-25-00-120135 |
||
Fedora Core 4 Update: kdbg-2.0.0-0.fc4.1 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-kdbg-200-0fc41-01-26-00-120136 |
||
Fedora Core 4 Update: kdeedu-3.4.2-0.fc4.2 | ||
18th, August, 2005
Ben Burton notified the KDE security team about several tempfile handling related vulnerabilities in langen2kvtml, a conversion script for kvoctrain. The script must be manually invoked. advisories/fedora/fedora-core-4-update-kdeedu-342-0fc42-01-26-00-120137 |
||
Fedora Core 3 Update: ncpfs-2.2.4-4.FC3.1 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-3-update-ncpfs-224-4fc31-01-27-00-120138 |
||
Fedora Core 3 Update: gaim-1.5.0-1.fc3 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-3-update-gaim-150-1fc3-01-28-00-120139 |
||
Fedora Core 4 Update: gaim-1.5.0-1.fc4 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-gaim-150-1fc4-01-29-00-120140 |
||
Fedora Core 3 Update: system-config-bind-4.0.0-30 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-3-update-system-config-bind-400-30-01-29-00-120141 |
||
Fedora Core 4 Update: system-config-bind-4.0.0-30_FC4 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-system-config-bind-400-30fc4-01-30-00-120142 |
||
Fedora Core 3 Update: pcre-4.5-3.1 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-3-update-pcre-45-31-01-31-00-120143 |
||
Fedora Core 4 Update: tar-1.15.1-8.FC4 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-tar-1151-8fc4-01-31-00-120144 |
||
Fedora Core 4 Update: gstreamer-plugins-0.8.8-9 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-gstreamer-plugins-088-9-01-32-00-120145 |
||
Fedora Core 4 Update: vnc-4.1.1-10.1 | ||
18th, August, 2005
This package disables the render patch, which was causing problems when using the loadable X module. advisories/fedora/fedora-core-4-update-vnc-411-101-01-33-00-120146 |
||
Fedora Core 3 Update: netpbm-10.28-1.FC3.2 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-3-update-netpbm-1028-1fc32-01-33-00-120147 |
||
Fedora Core 4 Update: metacity-2.10.3-1 | ||
18th, August, 2005
This update of metacity fixes the behavior of minimized transient dialogs for some applications. advisories/fedora/fedora-core-4-update-metacity-2103-1-01-34-00-120148 |
||
Fedora Core 4 Update: cups-1.1.23-15.1 | ||
18th, August, 2005
These updated packages fix a problem handling PDF files that could have security implications. advisories/fedora/fedora-core-4-update-cups-1123-151-01-35-00-120149 |
||
Fedora Core 3 Update: cups-1.1.22-0.rc1.8.6 | ||
18th, August, 2005
These updated packages fix a problem handling PDF files that could have security implications. advisories/fedora/fedora-core-3-update-cups-1122-0rc186-01-35-00-120150 |
||
Fedora Core 4 Update: pygtk2-2.6.2-0.fc4.1 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-pygtk2-262-0fc41-01-36-00-120151 |
||
Fedora Core 4 Update: shadow-utils-4.0.7-10.FC4 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-shadow-utils-407-10fc4-01-37-00-120152 |
||
Fedora Core 4 Update: netpbm-10.28-1.FC4.2 | ||
18th, August, 2005
Updated package. advisories/fedora/fedora-core-4-update-netpbm-1028-1fc42-01-37-00-120153 |
||
Gentoo | ||
Gentoo: Gaim Remote execution of arbitrary code | ||
15th, August, 2005
Gaim is vulnerable to a buffer overflow which could lead to the execution of arbitrary code or to a Denial of Service. |
||
Gentoo: AWStats Arbitrary code execution using malicious Referrer information | ||
16th, August, 2005
AWStats fails to validate certain log input, which could lead to the execution of arbitrary Perl code during the generation of the statistics. |
||
Gentoo: Xpdf, Kpdf, GPdf Denial of Service vulnerability | ||
16th, August, 2005
Xpdf, Kpdf and GPdf may crash as a result of a Denial of Service vulnerability. |
||
Gentoo: bluez-utils Bluetooth device name validation vulnerability | ||
17th, August, 2005
Improper validation of Bluetooth device names can lead to arbitrary command execution. |
||
Red Hat | ||
RedHat: Critical: Adobe Acrobat Reader security update | ||
16th, August, 2005
Updated acroread packages that fix a security issue are now available. This update has been rated as having critical security impact by the Red Hat Security Response Team. advisories/red-hat/redhat-critical-adobe-acrobat-reader-security-update-90817 |
||