Archive for the ‘InfoSec Reading Materials’ Category

Secure PHP Configuration

Thursday, March 8th, 2007

A Month of PHP Bugs was launched March 1. If you missed last week’s editorial about this initiative, you can read it on the WindowsIT Pro web site at the URL below. Be sure to also read the related news item “5 Vulnerabilities Kick Off Month of PHP Bugs,” which you can link to from the Security News and Features section below.
http://www.windowsitpro.com/Article/ArticleID/95328

So far, Stefan Esser has posted several interesting vulnerabilities on his Month of PHP Bugs site, some of which you can avoid by specific practices. If you use PHP on your server, then you need to examine its configuration to make sure you’re not overly exposing aspects of the engine, which could in turn expose your entire system and possibly other parts of your network.

If your Web system is closed (i.e., you don’t allow others to upload or create any files), your potential security risks are more limited than if it’s open. Either way, you need to take precautions to ensure that certain functions aren’t usable unless you intend for them to be used.

One example is that PHP can allow the use of the exec and shell_exec functions, which essentially let you run OS commands and retrieve the output. I’ve used the shell-exec function to good advantage. I had an account with a Web hosting company, which had a server that would frequently slow to a crawl, making nearly all access impossible. I grew tired of the support staff’s vague explanations and decided to investigate the problem myself.

With the help of the shell_exec function (and a few others), I could use PHP to look at a lot of the server’s operational characteristics. I discovered the bottleneck, contacted support, and alluded to the problem. I figure the support team members scratched their heads for a couple months wondering how I knew what was happening before they finally wised up and disabled the shell_exec function.

In another example, I signed up for a blog at a popular site, which will remain unnamed here. I wanted specific blog functionality that wasn’t available, so I went to work on a way around the limitations. I discovered that this site too allowed dangerous functions to operate. With a little work, I could navigate nearly the entire server disk subsystem at will, read configuration files, discover path information, and then manipulate my blog to gain the functionality I wanted by using the information I had gathered to enable my custom scripts to run. Eventually, the site staff figured out what was happening and disabled many dangerous functions.

In addition to exec and shell-exec, some dangerous PHP functions are suexec, passthru, proc_open, proc_close, proc_get-status, proc_nice, proc_terminate, system, popen, pclose, dl, ini_set, virtual, set_time_limit, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, and escapeshellarg. Go to this URL for other potentially dangerous functions:
http://www.phpbuilder.com/manual/features.safe-mode.functions.php

You can disable functions by adding (or editing) a line in your php.ini file like this:
disable_functions = “shell_exec, suexec, passthru”

More help for configuring PHP can be found at these URLs:

Ayman Hourieh’s Blog
http://aymanh.com/checklist-for-securing-php-configuration

WEB-DOT-DEV–PHP Configuration
http://www.webdotdev.com/nvd/server-side/php/php-configuration.html

PHP Manual
http://us2.php.net/manual/en/security.php

PHP Security Consortium’s PhpSecInfo
http://phpsec.org/projects/phpsecinfo/

Finally, a good resource with lots of other links (including books) is available at the PHP Security Consortium’s Web site:
http://phpsec.org/library/

Secure PHP Configuration by Mark Joseph Edwards, News Editor, mark at ntsecurity / net

Five Myths About Black Hats

Monday, February 26th, 2007

Five Myths About Black Hats

Original article at:
http://www.darkreading.com/document.asp?doc_id=118169&print=true

From Matthew Broderick’s teenage phone phreak in the 1983 movie “WarGames” to today’s Russian mafia don, the image of the computer hacker has undergone some radical changes over the years.
Really, though — just who are these people, and why do they do what they do?

Over the last several weeks, we here at Dark Reading have been asking that very question. But instead of asking security “experts,” we went straight to the horse’s mouths — the black hats themselves. In a survey of 116 individuals who spend at least part of every day trying to break into systems they’re not authorized to access, we received a lot of feedback from people who don’t fit either the image of the pimply-faced script kiddie or the hardened criminal. And, for the most part, they’re anxious to break both stereotypes. “Black hats are not as scary as they get portrayed in movies and at the Defcon convention,” says Caseo, an IT security officer for a regional investment firm. “And most of them aren’t teens or twenty-year-olds living in their parents’ basement.”

At the same time, however, many self-described “black hats” also offer a very different perspective than today’s security experts and IT staffers. In our survey, we had several respondents who said that information should be available to anyone with the skills to access it. Several others suggested that corporations and governments are much greater threats to security than individual black hats. And we even heard from a few individuals who admit to stealing and selling data from their victims. With such a diversity of views and opinions expressed in the survey and in subsequent interviews with respondents, it was difficult to find a simple, comprehensive way to relay all of the data we collected.

(more…)

NIST Releases Security Guide for Managers

Wednesday, November 15th, 2006

This guide is specifically written for top level security/info management (CSOs, CIOs etc). It addresses the requirements of various security policies and laws, such as Clinger-Cohen Act (CCA) and FISMA.

Grab a copy from: http://csrc.nist.gov/publications/nistpubs/800-100/sp800-100.pdf

Some Good Security and Audit Resourcers

Wednesday, November 15th, 2006

I’ve been scouring through my old notes for resources on some audit and security related resources and I bumped into these:

Auditnet Security Management
http://www.auditnet.org/SecurityMgmt.htm

Ask the Auditor: Who is Responsible for Information Security?
http://www.itcinstitute.com/display.aspx?ID=1823
Security Benchmark
http://www.securitybenchmark.com/

IT Audit Checklist for Risk Management Now Available!

Wednesday, November 15th, 2006

Dan Swanson’s latest white paper is now available at ITCI.
The IT Audit Checklist for Risk Management offers:

  • 80 specific checklist items to help assess your audit-readiness
  • Clarification on what auditors want to see
  • Tips on how to effectively communicate with an auditor
  • Pointers on audit preparation, testing, and reporting

You can grab a copy @
http://www.itcinstitute.com/display.aspx?id=2499

Note: A brief registration is required to download the “free” paper.

NIST Issues Three Security-Related Draft Publications

Wednesday, September 6th, 2006

The National Institute of Standards and Technologies released three new drafts of security-related special publications today. They cover e-mail security, intrusion detection and prevention, and securing Web services and applications.

The first is called “Guidelines on Electronic Mail Security,” an update to SP 800-45 released in 2002. The guide includes policy suggestions for deploying and configuring e-mail servers, training employees on security, and applying encryption. NIST will accept public comments on this publication at sp800-45a@nist.gov until Oct. 6.

The second publication is titled “Guide to Intrusion Detection and Prevention Systems.” It provides assistance to agencies for designing, implementing, configuring, securing, monitoring and maintaining IDP systems for an entire enterprise and smaller divisions. It also provides guidance for different network-based IDP systems. NIST will take comments at 800-94comments@nist.gov until Oct. 20.

The third publication, “Guide to Secure Web Services,” deals with Web services security, specifically in applications. It also details security features in Extensible Markup Language; Simple Object Access Protocol; and the Universal Description, Discovery and Integration protocol and related open standards. NIST will accept comments at 800-95comments@nist.gov until Oct. 30.

NIST Issues Guidelines for Sanitizing Used Media

Sunday, September 3rd, 2006

The National Institute of Standards and Technology (NIST) has released Special Publication 800-88, “Guidelines for Media Sanitation.” The draft guide addresses sanitation techniques for magnetic, optical, electrical and other media types. NIST is careful to note that the “guide is intended to assist organizations and system owners in making practical sanitation decisions based on the type of information on their system media. It does not, and cannot, specifically address all known types of media however; the described draft sanitation decision process can be applied universally to all forms of media and categorizations of information.”
http://www.fcw.com/article95849-08-30-06-Web&printLayout
http://csrc.nist.gov/publications/nistpubs/800-88/SP800-88_Aug2006.pdf
(more…)

TechNewsWorld Magazine — Spotlight on Security Available for Download

Wednesday, August 23rd, 2006

TechNewsWorld “Spotlight on Security” is now available in PDF format.

Cover Story
 Exclusive Interview with F-Secure CRO Mikko Hypponen

Also In This Issue
 Is Your Data Security Tough Enough?
 Super 6 Antivirus Product Lines
 Is Biometrics Tech Ready for Prime Time?
 The Thrills and Chills of Remote-Access Software

And much, much more… 

Registration is required. Grab a copy @ TechNewsWorld Magazine