home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Perl Security

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2457
Discussions: 200,970, Posts: 2,379,737, Members: 246,335
Old October 8th, 2002, 06:51 PM   Digg it!   #1 (permalink)
Real gangstas sip on Yacc
 
jkrohn's Avatar
 
Join Date: Oct 2001
Location: Suckas-ville
Posts: 4,552
Send a message via ICQ to jkrohn Send a message via AIM to jkrohn Send a message via Yahoo to jkrohn
Perl Security

I have taken on the process of providing an online application process for my employer.

As far as security for my perl backend, what should I have?

Setup:

They fill out an online form, submit via POST where the variables are put in a hash and emailed out to an account using sendmail with the info they passed in.

Security:
1) if they submit via GET, the script does nothing. Everything is conditional on POST
2) HTTP_REFERRER is restricted to our specific server.
3) Max lengths assigned to every variable coming in from the form.
4) each $value from $has{$key}=$value is checked agaisnt all checkes found here.

http://krohn.dhs.org:200/parse.txt

**Note, not my scripts but I did use his checking/stripping **

Anything else i'm missing? Other things I should be doing?

Jkrohn
__________________
Signatures blow hard
If your signature contains an ad of any kind, congratulations, you're on my ignore list.
jkrohn is offline   Reply With Quote
Old October 11th, 2002, 03:03 PM     #2 (permalink)
Junior Member
 
Join Date: Oct 2002
Posts: 19
Hi,

Did you use -T at the end of your shebang line? This also helps with security.


I'm not sure what form parsing you are using, but if I'm really paranoid about a script (sometimes I do scripting for a gaming club and the like and you gotta becareful with the 13 y/o busy bodies I dont use an html form, I put make the form as a subroutine of the script, spell out each variable specifcially (as opposed to processing generically all variables submitted like:

foreach ($FORM{'$variable'}) { print MAIL.. etc .. - I know this left is not a good example but hopefully you know what I mean.

Then I put the script into a small invisible footer frame and add the following to the header:

<script Language="JavaScript">
if (window == top) {
top.location.href = \"http://www.yoursitehere.com\";
}
</script>

and then add an anti-right click thing.. to make it difficult to obtain the Value's name..

I do that in addition to what you listed.. and only in my most paranoid state .. if it was just Joe Company Contact form, I would just do it your way. Anyway, i'm not sure my thing would help against a good hacker, but it always made me feel better.
wadeintothem is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3043)
Delete an OS (15)
Breaking: San Diego ACORN Document .. (10)
Nvidia GTX 260 problem (7)
Laptop with wireless problem. (12)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
windows vista security holes (17)
Internet Lost (5)
windows 7 problem (7)
Is the PSU I received dead? (13)
Point and Shoot Camera Suggestions. (6)
Print spooler problem (16)
Recent Discussions
Nvidia GTX 260 problem (7)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (37)
Delete an OS (15)
Steam ID's, Gamertags etc... (4)
Games, Cables, PCI cards, and more fo.. (6)
Dept. of HS: NSA 'Helped' Develop Vis.. (17)
Linksys WMP54GS wireless card problem.. (5)
windows vista security holes (17)
Help getting around port 80 for camer.. (5)
Skillsoft Network+ Study Software Que.. (10)
Browsers wont load websites (3)
help me pls laptop just stopped worki.. (0)
Open With ..... Win7 (3)
Laptop with wireless problem. (12)
Internet Lost (5)
virus blocking exe. files (1)
Point and Shoot Camera Suggestions. (6)
CPU fan stops spinning randomly (11)
Modern Warfare 2: Who Bought It? (65)
Is the PSU I received dead? (13)
Print spooler problem (16)
Kingston Bluetooth Dongle Driver (1)
Multiple Restarts Required at Boot (3)
webcam (0)
upgrade for hp a6101 (0)


All times are GMT -4. The time now is 07:40 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28