Solved

How do I hide a script name in a variable?

Posted on 2002-04-16
3
124 Views
Last Modified: 2013-12-25
I have a form that hackers are infiltrating. I want a way to "hide" the action= attribute of the form so that when they save my form to their computer to run scripts off of, it won't be able to find it.

OK, so now that I know that won't work - what can I do to the perl file so that it rejects anyone NOT coming from the correct server?
0
Comment
Question by:trulygreat
3 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6953668
You can try this:
http://www.dynamicdrive.com/dynamicindex9/encrypter.htm

but they will have to be pretty lame to not be able to figure it out. You cannot do security from the client side.  You have to stop them on the server, bu modifying the script to detect unauthorized requests, or require a logonid and password managed from the database.

Cd&
0
 
LVL 2

Expert Comment

by:jpoesen
ID: 6956694
You can have your script parse your environment variables and act upon those.

a few interesting ones :
AUTH_TYPE
REMOTE_ADDR
REMOTE_HOST
REMOTE_IDENT
REMOTE_USER

HTTP_REFERER is also interesting.

usage :
$ENV(var)

example:
visitorIP = $ENV('REMOTE_ADDR')

Hope this is enough for your problem.
jpoesen
0
 
LVL 18

Accepted Solution

by:
mgfranz earned 80 total points
ID: 6959901
Or set a session variable when a page prior to the from is loaded, (if you are on IIS), then check that variable in the form processing page.  If there, continue, else reject.

If ENV variable do not work for you, try a cookie that has the date/time of visit set in the page just prior to the form being loaded, then check this cookie in the form processing page for date/time up to -20 minutes, if false, reject.

Another way would be to write a cookie with the name of the form processing page in the cookie, since it is tied to your server, this make for a viable alternative.

Or, just process the form in the parent page;

<%
formVal = Request("action")

If formVal = "Do It" Then
    do this...
    Load the processing portin of the page
ElseIf formVal = "" Then
    do that
    Load the Form portion of the page
Else
End If

<form method=post>
...
<submit button name="action" value="Do It">

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Read about why website design really matters in today's demanding market.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now