I've spent the last two years building cgi scripts and have made many security mistakes along the way :)
I remember there being a CGI security FAQ, I think by Selena Sol, but can't remember.
How about working out criteria for rating a script's security level, and then create a 'Perl Monks security Meditation' for the overall security.
Things to look at would be whether they are safe from:
- manipulation of Query String and POST data (Level 1: 'may you live in interesting times')
- HTTP header spoofing - ie fake HTTP_REFERER, cookies etc (Level 2: 'may you come to the attention of those in power')
- data read/write access by other users on server (Level 3: 'sleep soundly, for you have peace in your heart')
- IP spoofing (Level 4: 'secure zen master')
Eg, if a script parses input data well, but relies on a valid HTTP_REFERER as a check, it would get a 'level one' rating. The infamous formmail can be used to relay e-mail if you fake/omit the HTTP_REFERER, but parses input data OK, so it would get a 'level one' rating.
I'm sure there are other criteria, but that's my .02
cLive ;-)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.