Penn State

Web Conference 2005

Writing PHP for ITS/ASET Web services

Security Controls and Practices

<- Back - Using Sessions|Up |Using Penn State WebAccess - Next ->

General Security Concerns for Web Applications

PHP programming and security go hand-in-hand. Usually not the same hand and too often not yours. But there are a few things you should consider to make your programming efforts more secure.

  1. Security is the WHOLE PICTURE, not just a certificate on a server. Don't be lulled to complacency at the sign of a "secure server." Security includes protecting all of the vectors by which data and systems can be attacked and compromised.

  2. The only totally safe computer is one unplugged from the network, turned off, stored in 10-foot-thick concrete and buried at the bottom of the ocean...ok, so there are tradeoffs with security and functionality.

  3. Least Privilege

  4. The Web server has one identity: one that is controlled by the PHP code that is written by anyone who has write access to Web space. It can be triggered by and is possibly exploitable by anyone in the world anonymously.

  5. Check your data at the door. When using user supplied data, including CGI parameters, Cookies, the Referer URL and the like, check it before using it in places where it can cause problems. Experts at system intrusion can send large amounts of data or invalid values in the least expected places.

  6. If you can't build a brick house, tie your shoelaces... Learn about good security and programming practices. Be vigilant and security-minded. You will outrun most others and won't be the bear's lunch.

Practical security

Security lesson review

  1. Learn about security concerns of the GET vs POST method.

  2. Learn about Email abuse issues with mail forms.

  3. Learn about SQL injection.

  4. Learn about sensitivity of cookies and session management.

<- Back - Using Sessions|Up |Using Penn State WebAccess - Next ->

If you have any questions, feel free to ask me.

Content by: Jeff D'Angelo <jcd@psu.edu> © 2005

See the source for this page

Last update on: Mon Jun 29, 2009, 10:50:17 PM