Pervent User To Run Perl File
Apr 19, 2009How can pervent users ro run scripts start with #!/usr/bin/perl in anywhere.
Its a big security issue for run shell.
How can pervent users ro run scripts start with #!/usr/bin/perl in anywhere.
Its a big security issue for run shell.
I'm build Plesk Panel for Linux and Presence Builder, I don't want my user can upload their website to hosting via File Manager. How can I do it...
View 2 Replies View RelatedI would like to dissable from executing perl scripts on user accounts.
For example,now user can upload perl script for example with name script.pl:
Code:
#!/usr/bin/perl -w
print "Hello World!";
I would like to block it via mod_security - I don't want to allow running perl scripts with .pl extension at all. Is it possible for Apache 1.x?
I'm getting a internal 500 on a test perl file that I placed inside cgi-bin
This is a cpanel box with suphp enabled ....
Running programs named Perl with Heavy CPU usage, with the ownership of user apache.
We found the problem on Fedora 3 and Fedora 6.
In our case, it was the result of a Trojan activity.
Quick Solution
Check the cron jobs of user apache
crontab -u apache -e
*/1 * * * * perl /tmp/.tmp/tmpfile
delete the cronjob entry.
Also delete the file /tmp/.tmp/tmpfile
also added "apache" to the file /etc/cron.deny
That's all
Problem and solution in detail....
We have a perl script that is located under cgi-bin/yabb/
Everytime it's loaded is causing an error 500, suexec logs shows everything correct but error_log shows this: ...
i use the following perl script(created by me) to save server load every 30 minutes to a log file i just keep it running in the background(probably would be more effective using cron)
#!/usr/bin/perl
while(1) {
$w = `w`;
#print $w;
$w =~ /load average: (.+)
/;
$log = $1;
my ($sec, $min, $hour, $mday, $mon, $year) = localtime;
my $rightnow = sprintf("%04d-%02d-%02d %02d:%02d:%02d ", $year + 1900, $mon + 1, $mday, $hour, $min, $sec);
$log = $rightnow . ": " . $log ."
";
open (OUTFILE, ">>top_logfile.txt");
print OUTFILE "$log
";
close (OUTFILE);
#sleep for 30 minutes
sleep(1800);
}
I use cpanel license, i enable phpsux on my server, but user can send email without smtp address.
how can pervent user for send mail without smtp?
I dont like users can run following code him .htaccess. How can do it?
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
Options +FollowSymLinks
Options +FollowSymLinks
How do you set user premissions on a file on a server or database?
View 3 Replies View Relatedis there a way to stop the quota.user files from being created? They're taking up a lot of diskspace.
View 3 Replies View RelatedWe have a website under httpdocs/. We can change/delete files with a ftp user : "ftpold". All is ok. We must create another ftp access for another company which can access only to httpdocs directory (not to logs/, error_docs/...).
So we have create a ftp access in Plesk. But with this ftp connexion, we can not update/delete files ou update rights.
So we decide to change rights on the files/directories under httpdocs with the new ftp access :
httpdocs# chown -R ftpnewsacln *
The is no errors but the files:directories are always with the old ftp user :
httpdocs# ls -l
ftpold psacln ... libs/
ftpold pscln ... index.php
Why ? How can i create another ftp access ?
I use Basic Auth to limit access to a web site. This seems to work ok. I noticed though in the logs that the logged in user is not logged:
80.....188 - - [16/Jul/2013:09:56:29 +0200] "GET ..." 200 1844 "...." " ...
I would expect the second - to be replaced by the logged in user. The doc says, the user is logged if the document is protected. I do protect the whole directory using directory match. Without log in I fail to retrieve the document in question.
i have plesk 11.5.3 on Linux centOS 6, I created a ftp user on a domain folder, I need to deny this user to read a specific file .php, how can I do?
View 7 Replies View RelatedCan't get it working, I want to set up a cron job for a domain user, but seems that there's a problem to find the php executable. The command is:
Code:
/usr/bin/php/ -f /var/www/vhosts/thedomain.com/httpdocs/test.php
But the report says
-: /usr/bin/php/: No such file or directoryClick to expand...
I'm trying to configure Apache logs to split logs files for every virtual host on the server
for example: {site1 .com} => copy access_log to /home/site1/public_html/logs {site2 .com} => copy access_log to /home/site2/public_html/logs .. {site3 .com} => copy access_log to /home/site3/public_html/logs
i want to also to make sure is the logs files updated in the real time
operating system is CentOs6, with Apache and cPanel
I have problem:
Searching /root....
Found cpmove-clanpz.tar.gz!
Moving Packge to /root/cprestore/cpmove-clanpz.tar.gz
Extracting tarball....window.scroll(0,175);...............
Done
Extracting Domain....Done
Sorry, the copy failed. Unable to find the cpanel user file. Is the archive missing (cwd: /root/cprestore loaded cpmove-clanpz/cp/clanpz)?
checked 4 files.....
1. /scripts/pkgacct username...
2. Transfer backup to new server
3. /scripts/restorepkg username
4. this error
I thought I knew enough about my .htaccess stuff to do this, but I can't seem to work it out. What I want to do is if a user visits domain.com/folder, we check to see if the folder exists. If so, show as normal (IE domain.com/support)
If a user visits domain.com/dynamicusername (dynamicusername is not a physical folder), redirect to dynamicusername.domain.com
Say I have 2 websites and they all use file.php which is located on mainserver.com/file.php.
I want to use the file like this:
website1.com/file.php
website2.com/file.php
When i was running top -cd2 command following scripts are taking high cup uses on server. But when we are go home directory we didn't find any thing.
24489 "User Name" 20 0 6732 5084 1164 S 8.0 0.2 11:00.69 /usr/bin/perl -w hnc.cgi
26456 "User Name" 20 0 6876 5080 1164 S 8.0 0.2 7:23.47 /usr/bin/perl -w hnc.cgi
32569 "User Name" 20 0 6748 5056 1164 S 7.5 0.2 8:57.30 /usr/bin/perl -w hnc.cgi
update us why this script are running under some particular users and what the application of this script.
I have a website is written by Perl language. I donnt know how to run it.
I installed Activeperl 5.0 and IIS is running. I have heared someone who told me that need to install a software as Emperl/ html-emperl, is it right?
How do you install perl on a centos 5?
View 3 Replies View Relatedi have big problem all Forums in my server hacked by perl symlink see all config.php by shell perl in .txt by include
i solve it by make perl permission 000 but all thing in cpanel stop cause cpanel by perl
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!
Is this going to be a reinstall job?
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.
View 5 Replies View RelatedI 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?
I've been trying to figure this out for about the past week and haven't had any success.
Can't locate funcs.pl in @INC (@INC contains: lib/perl . /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl) at ./terr.pl line 28.
I'm trying to run perl magick.
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
Tasks: 150 total, 7 running, 143 sleeping, 0 stopped, 0 zombie
Cpu(s): 76.9% us, 23.1% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 1026224k total, 604068k used, 422156k free, 61396k buffers
Swap: 1052248k total, 140736k used, 911512k free, 233200k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12825 apache 25 0 6752 2040 936 R 33 0.2 1556:57 perl
15338 apache 25 0 7592 4068 1324 R 33 0.4 545:03.58 perl
5817 apache 25 0 6996 4052 1240 R 33 0.4 520:37.18 perl
27139 apache 25 0 6404 4068 1248 R 33 0.4 197:40.96 perl
29176 apache 25 0 7964 4092 1272 R 33 0.4 523:40.92 perl
14785 apache 25 0 7392 4088 1272 R 31 0.4 1158:41 perl
27420 root 16 0 3248 1000 760 R 1 0.1 0:00.04 top
27441 qmaild 16 0 4736 752 604 S 0 0.1 0:00.01 qmail-smtpd
1 root 16 0 1956 96 64 S 0 0.0 0:06.83 init
2 root RT 0 0 0 0 S 0 0.0 0:04.04 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:00.56 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:02.36 migration/1
5 root 34 19 0 0 0 S 0 0.0 0:00.47 ksoftirqd/1
6 root 5 -10 0 0 0 S 0 0.0 0:00.12 events/0
7 root 5 -10 0 0 0 S 0 0.0 0:00.05 events/1
8 root 9 -10 0 0 0 S 0 0.0 0:00.00 khelper
9 root 15 -10 0 0 0 S 0 0.0 0:00.00 kacpid
24 root 5 -10 0 0 0 S 0 0.0 0:00.00 kblockd/0
25 root 5 -10 0 0 0 S 0 0.0 0:00.00 kblockd/1
44 root 15 0 0 0 0 S 0 0.0 0:24.16 pdflush
26 root 15 0 0 0 0 S 0 0.0 0:00.00 khubd
46 root 13 -10 0 0 0 S 0 0.0 0:00.00 aio/0
47 root 13 -10 0 0 0 S 0 0.0 0:00.00 aio/1
45 root 15 0 0 0 0 S 0 0.0 2:45.50 kswapd0
193 root 25 0 0 0 0 S 0 0.0 0:00.00 kseriod
308 root 15 0 0 0 0 S 0 0.0 4:29.19 kjournald
1393 root 6 -10 1968 4 0 S 0 0.0 0:00.02 udevd
1912 root 6 -10 0 0 0 S 0 0.0 0:00.00 kauditd
1976 root 7 -10 0 0 0 S 0 0.0 0:00.00 kmirrord
1995 root 22 0 0 0 0 S 0 0.0 0:00.00 kjournald
1996 root 15 0 0 0 0 S 0 0.0 0:01.55 kjournald
1997 root 20 0 0 0 0 S 0 0.0 0:00.00 kjournald
2769 root 15 0 2908 244 176 S 0 0.0 2:48.00 syslogd
2773 root 16 0 3348 196 140 S 0 0.0 0:00.00 klogd
2783 root 16 0 3092 272 208 S 0 0.0 0:08.25 irqbalance
2798 named 16 0 50760 4492 1408 S 0 0.4 2:59.58 named
2852 root 15 0 2664 260 104 S 0 0.0 0:00.13 smartd
2861 root 16 0 5220 380 264 S 0 0.0 0:15.04 sshd
[root@cl-t058-280cl tmp]#
I am suffering with perl scripts attack. Please help me to resolve this issue.
How do I trace what user this is?
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