Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

How safe is my perl cgi website?

by Nik (Initiate)
on Jul 05, 2004 at 18:44 UTC ( [id://371957]=perlquestion: print w/replies, xml ) Need Help??

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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: How safe is my perl cgi website?
by b10m (Vicar) on Jul 05, 2004 at 21:18 UTC

    As far as I can remember, Nik jumped in the Chatterbox some time ago with a story that someone "hacked" into the server he had his website on due to poorly written scripts and asked for help. Asking is -IMHO- not a bad idea, but as usual, some people have problems with this way of asking.

    Nik, maybe you could post the script that you feel worried about, so we could check it and make recommendations? Even parts of the script would help, I think (of course, take out passwords and other "private" information).

    That would take out the fun for some people, but I believe it's even better, cause then "we" could even spot problems that some evil h4x0r might hit by lucky guessing.

    --
    b10m

    All code is usually tested, but rarely trusted.
Re: How safe is my perl cgi website?
by davido (Cardinal) on Jul 06, 2004 at 03:52 UTC

    Asking others to find security problems for you by hacking into your site -- a site that you already brought to its knees once with security problems, and a site that you already know currently still has at least a couple -- is a bad idea.

    Telling us there exist problems, and suggesting we might find them if we try is just asking for more trouble than you can deal with.

    But even more important than that, you seem to believe that security exists through obscurity. That is to say, if the security problem is not announced, it must therefore be pretty secure. It's not. Though the dozen or so people who read your post with enough ambition to actually look at the site may or may not find the issue after casual looking, that doesn't tell you anything about what the 300 million other people on the Internet may be able to find.

    Security isn't a matter of being lucky enough that people don't find the flaw. It's a matter of taking care to prevent flaws from being accessible.


    Dave

Re: How safe is my perl cgi website?
by tstock (Curate) on Jul 05, 2004 at 19:27 UTC
    It's not too hard to test for command injection, SQL injection or cross site scripting "potential". As to actually being able to exploit the vulnerability, that probably depends on the penetration tester experience. You're better safe than sorry, don't depend on "security through obscurity" and cross your "t"s, dot your "i"s.

    • use taint mode
    • sanitize your external inputs and accept only what you expect to get (numbers, strings, specific sizes, etc)
    • use placeholders for SQL values
    • use system(), exec() in list context
    • have your design and code reviewed by a peer
    • implement good audit logs and backups (update)

    Tiago
Re: How safe is my perl cgi website?
by dws (Chancellor) on Jul 05, 2004 at 19:02 UTC

    Can you find [flaws and vulnerabilities] by just looking at the html output?

    You can find hints by looking for HTML forms and the fields they contain. If some fields look like they might hold things like database field names or email addresses, they're a natural candidate to attempt to hack. If they hold things like object IDs, people will try faking a form submit with a different object ID, just to see if they can view or modify other data.

Re: How safe is my perl cgi website?
by Joost (Canon) on Jul 06, 2004 at 09:08 UTC
    Nik, if I was hosting your website and saw this post I'd kick you off the server. Now this is not the first time you've basically invited people to destroy your site (and likely cost your hosting company a lot of time and money in the process). In fact, looking at your posts here, you seem far too eager to give out dangerous information about yourself to anyone who asks (and to a lot more who don't). Now why is that? It can't be ignorance, since you've been hacked because of this kind of actions before, so the only reason I can see is that you want people to go in and mess up your machine - unless it's not yours ofcourse.

    Now please go away and stop inviting people to commit crimes. If you really want people to try and hack your site, you hire someone and give them a watertight contract, so they won't get sued by you or your hosting company. Letting someone check the code will likely be more effective, though I don't think you actually CARE about any security risks.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: How safe is my perl cgi website?
by roju (Friar) on Jul 05, 2004 at 22:14 UTC
Re: How safe is my perl cgi website?
by diotalevi (Canon) on Jul 05, 2004 at 19:59 UTC

    Do not approve the parent node.

    Your question is out of line. By asking whether we can find the holes you are asking us to look at what you linked to and see if we can hack it. That's an invitation to do something illegal (for most people, I expect). I've considered your node to encourage people to not approve your node.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: How safe is my perl cgi website?
by sweetblood (Prior) on Jul 05, 2004 at 21:35 UTC
    You've already aswered the question yourself. If you found securty issues someone else will. I doubt you are as skilled at hacking as others, so you can bet someone else will find your holes.

    I would not recommend however, broadcasting your web address and the fact that you have security issues anyway. Much less a place were the level of technical achievment amoung it's users is so high. You may unwittingly be suggesting a challenge.

    Cheers

    Sweetblood

Re: How safe is my perl cgi website?
by ambrus (Abbot) on Jul 06, 2004 at 15:55 UTC
Re: How safe is my perl cgi website?
by Anonymous Monk on Jul 05, 2004 at 23:07 UTC
Re: How safe is my perl cgi website?
by dfaure (Chaplain) on Jul 06, 2004 at 13:23 UTC
    the question is if you dont know the source code can you find securuty flaws and vulnerabilities in the cgi script?!?!?

    You'd better try asking your question here, where it's the purpose...

    ____
    HTH, Dominique
    My two favorites:
    If the only tool you have is a hammer, you will see every problem as a nail. --Abraham Maslow
    Bien faire, et le faire savoir...

Re: How safe is my perl cgi website?
by heroin_bob (Sexton) on Jul 06, 2004 at 18:00 UTC
    If you're looking to see if a user can find your security flaws, there are numerous security firms out there one can hire that will perform this type of service, depending on how serious you are. They most certainly aren't cheap, but effective.

    More to the point, if you already know the problem, why haven't you corrected it?
    ~hb
    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-19 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found