Protect web content

Reply

Join Date: Dec 2006
Posts: 3
Reputation: webdevelopa is an unknown quantity at this point 
Solved Threads: 0
webdevelopa webdevelopa is offline Offline
Newbie Poster

Protect web content

 
0
  #1
Feb 21st, 2007
Hi All,

I am a web developer and I am lately becoming fairly security conscious.

So two questions for you and any help appreciated.

1)I have my hesitations about my web code being revealed to everyone through the "view page source" feature of web browsers. Apparently the source review may reveal quite a few hints that affect security. Is there a way to prevent people from seeing this?

2)Being a web developer (especially PHP) I would like to know how I can restrict my programs to run on specific domains only. In this way if someone steals my code he can not deploy it on his server.


Thanks for your help all

peter
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,210
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 165
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: Protect web content

 
0
  #2
Feb 21st, 2007
Selfish, aren't we?

If your page code is going to run on a user's browser, it must be in source form. The browser itself needs source code. It's an interpreter. The code is never compiled.

If your code won't run on any domain except yours, it won't run on anyone else's ISP, so nobody except people who subscribe to your own ISP could display it.

Also, anyone smart enough to hijack your code could also fix any trick you use to restrict its use.

What I suggest is to put your copyright info in a comment, or on the web page itself. If the info is in a comment, the pirate might not notice it, and then you have proof of piracy when you see your copyright notice on his page in source code mode. Print the screen and see a lawyer. He'll get all the money, but the offender will have to stop using your work.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

Re: Protect web content

 
0
  #3
Feb 21st, 2007
1)I have my hesitations about my web code being revealed to everyone through the "view page source" feature of web browsers. Apparently the source review may reveal quite a few hints that affect security. Is there a way to prevent people from seeing this?
- Don't implement any kind of security using javascript, implement it at the server. The source for serverside scripts is never shown in a View Source, and can't be seen unless your server is compromised or you have lax protection/errors there.

2)Being a web developer (especially PHP) I would like to know how I can restrict my programs to run on specific domains only. In this way if someone steals my code he can not deploy it on his server.
As MidiMagic said; if someone steals your code, they're clearly going to remove any protection you've added to it.

In PHP you've got very little hope of effective code protection, but even if you have a compiled program, it's going to be crackable in some way or another.

Better to just be proud if people want to use your creations than to spend too much effort getting tied up in trying to make them inpenetrable.
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

Re: Protect web content

 
0
  #4
Feb 21st, 2007
But... I suppose this is about the best sort of protective means you'll get with protecting interpretted code:

http://en.wikipedia.org/wiki/Obfuscation
http://en.wikipedia.org/wiki/Obfuscated_code


http://www.raizlabs.com/software/phpobfuscator/
Last edited by MattEvans; Feb 21st, 2007 at 2:10 pm.
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 1
Reputation: uritah is an unknown quantity at this point 
Solved Threads: 0
uritah uritah is offline Offline
Newbie Poster

Re: Protect web content

 
0
  #5
Feb 22nd, 2007
webdevelopa,

I agree with mattevans. I just want to add up that doing is not the only thing you can do. You may add encoding and encryption to your payload and mix it with obfuscation. That will provide a further layer of protection. There are a couple of tools out there that you could use for this. The one I have been using with success is webarmour. You can find it at: http://www.nesicon.com/webarmour. It does obfuscation and encoding and also supports other cool features such as blocking out browsers, check if they support activex or shockwave, protecting your images with right click and others... Last time I checked they were offering a free trial so I was able to fully test my stuff before I bought it. Hope this helps you out.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1373 | Replies: 4
Thread Tools Search this Thread



Tag cloud for HTML and CSS
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC