LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-28-2004, 06:06 PM   #1
kdepa
Member
 
Registered: Feb 2004
Posts: 73

Rep: Reputation: 15
Getting the Source of a CGI Script


A friend of mine claimed to have retrieved the source code to a proxy CGI script that I run off of my webserver. I have strong doubts about his abilities to get anything except for the HTML source of the page. Do any of you know if it is possible to get the source of a perl CGI script when it is hosted off of a webserver? The Permissions are chmod 755 (-rwxr-xr-x).
 
Old 04-28-2004, 07:07 PM   #2
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
I don't think so. CGI is server side scripting and only outputs html to the browser. If he had seen your CGI script, either you have some problem with config of your server or he had broken into your computer, in that case you have some security issue. Otherwise a CGI script as PHP script can't be seen by someone browsing the net.
 
Old 04-28-2004, 08:49 PM   #3
kdepa
Member
 
Registered: Feb 2004
Posts: 73

Original Poster
Rep: Reputation: 15
Thats pretty much what I figured. I checked the server logs, and there weren't any suspicious login attempts - actually NO login attempts whatsoever, so I'm assuming he did not get in that way - I also use port forwarding on my server (just port 80) so there wasnt a way to SSH into the machine. Thanks for the help!
 
Old 04-30-2004, 07:00 AM   #4
lrt2003
Member
 
Registered: Mar 2004
Distribution: Fedora 10
Posts: 182

Rep: Reputation: 30
ask him to show you what he found....
 
Old 04-30-2004, 07:19 PM   #5
Inexactitude
Member
 
Registered: Oct 2003
Distribution: Slackware 12.2, Ubuntu 9.04
Posts: 477

Rep: Reputation: 30
You probably don't have much to worry about here, your friend is probably just trying to brag to you. As far as I know, there aren't any source leak exploits in the current version of apache (assuming that's tahw you use).
 
Old 04-30-2004, 07:37 PM   #6
kdepa
Member
 
Registered: Feb 2004
Posts: 73

Original Poster
Rep: Reputation: 15
Yeah he probably is. I asked him today if what he "found" worked, and it doesnt, apparently. I think he just got the html source and thinks that that's the entire cgi script's source - which it clearly isn't. Also, he probably thought it would go to the IP address listed in the source. That, however, is impossible because its a non-routable address. (10.0.0.x) Oh well. Just wanted to make sure that I did not have any major security leaks! Again, thanks very much for the help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM
python cgi script and premature end of script headers Neruocomp Programming 1 07-28-2005 11:43 AM
SSH in a CGI script michedlp Programming 7 04-16-2004 10:58 AM
Non performing CGI script Bill Barrington Linux - Networking 1 05-17-2003 01:03 PM
how to set cgi script willl_hunting Linux - Newbie 3 03-20-2001 09:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration