Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Securing CGI scripts

by Fingo (Monk)
on Apr 01, 2002 at 05:28 UTC ( #155709=perlquestion: print w/replies, xml ) Need Help??

Fingo has asked for the wisdom of the Perl Monks concerning the following question:

I am working on a site based on the CGI.pm module which will allow a large amount of user interaction. What are some techniques for securing against hackers? Are there any good reasources on the web or in print that I should read?



Thanks,
Max

2002-04-01 Edit by Corion : Tamed the runaway pre tag

Replies are listed 'Best First'.
Re: Securing CGI scripts
by rob_au (Abbot) on Apr 01, 2002 at 05:45 UTC
Re: Securing CGI scripts
by grep (Monsignor) on Apr 01, 2002 at 05:33 UTC
(podmaster) Re: Securing CGI scripts
by PodMaster (Abbot) on Apr 01, 2002 at 06:50 UTC
Re: Securing CGI scripts
by cjf (Parson) on Apr 01, 2002 at 10:22 UTC

    The Essential CGI Security Practices thread gives a good overview of... Essential CGI Security Practices ;-). Make sure to read all the replies in the thread as well.

Re: Securing CGI scripts
by brianarn (Chaplain) on Apr 01, 2002 at 19:26 UTC
    I do like a lot of the online resources, including Ovid's tutorial, but sometimes I'm really pedantic and like to have an actual book in front of me.

    I'd recommend CGI Programming with Perl, 2nd Ed from O'reilly (please forgive me, but I can't remember the author ATM). Chapter 9 is about security, including taint checking with -T. It also gives some great general advice, and demonstrates various styles of creating your CGI scripts (such as using the CGI module via a functional or OOP style interface, or having CGI generate your HTML versus using a here doc)

    ~Brian
Re: Securing CGI scripts
by Sinister (Friar) on Apr 01, 2002 at 14:57 UTC
    One of the more simple tricks, of the base security features is running perl with the -T switch (which means perlTaint on.) This forces you to have your programs review all input, whenever it is going to do something (d/r)isky ;^)

    er formait hyarya.
    "Field experience is something you don't get until just after you need it."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://155709]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2020-10-20 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (210 votes). Check out past polls.

    Notices?