Welcome Guest ( Log In | Register )




Collapse

Top Submitters

· NickTheGreek (127)
·  (127)
· www.yourforum.gr (61)
· nickpar (20)
· Big (1)

Collapse

Random Tutorials

replace spaces in filenames with underscores

Tutorial name: replace spaces in filenames with underscores
Submitted by: NickTheGreek


Collapse

Announcments


Welcome to Tutorial System!

Courtesy of www.gr8webservices.com & www.forumsandmore.com



Print this Tutorial 

How To: WHM/cPanel Hardening & Security - The Basics - Part 3

Tutorial Information
Name: How To: WHM/cPanel Hardening & Security - The Basics - Part 3
Submitter: NickTheGreek
Category: cPanel Tutorials
Submitted: 22 Sep 2012
Updated: 22 Sep 2012
Views: 262
Rating: This tutorial is unrated.
How To: WHM/cPanel Hardening & Security - The Basics - Part 3
View All Tutorials By This Member
View Discussion Topic
Description:
continued
Tutorial Instructions
CSF (ConfigServer Firewall) Server Test



After you have done all of this like in section 6.4 it recommends that you run a server test with CSF. Below is some things that I encountered with my test and how to fix them.

1. Firewall Check
a. The below options failed.
Check csf SMTP_BLOCK option
Check csf LF_SCRIPT_ALERT option
Check csf PT_ALL_USERS option
Check csf SAFECHAINUPDATE option

b. How to fix it.

CODE
cd
nano /etc/csf/csf.conf
hit Ctrl+w
Type in SMTP_BLOCK and hit enter
repeat this until u see SMTP_BLOCK="0", then change "0" to "1".
Do the same for the other 3 options, then Ctrl+x, y and hit enter to save.
2. Server Check
a. The below option failed.
Check /dev/shm is mounted noexec,nosuid
Check MySQL LOAD DATA disallows LOCAL
Check for cxs

b. how to fix dev/shim.

CODE
cd
nano /etc/fstab


Find - tmpfs /dev/shm tmpfs none 0 0
change to - tmpfs /dev/shm tmpfs noexec,nosuid 0 0

CODE
mount -o remount /dev/shm


c. how to fix MySQL LOAD DATA.

CODE
cd
nano /etc/my.cnf


add under [mysqld]

CODE
local-infile=0
hit Ctrl+x, then y, then enter to save it.

CODE
service mysql restart


d. how to fix CXS.
First u must pay for ConfigServer eXploit Scanner (cxs)

CODE
wget http://www.configserver.com/free/cxsinstaller.tgz
tar -xzf cxsinstaller.tgz
perl cxsinstaller.pl
rm -fv cxsinstaller.*


Now to setup CXS
1. Create a quarantine location, e.g.:

CODE
mkdir /home/quarantine
chmod 1777 /home/quarantine


2. Use the example ignore file provided and amend to your needs:

CODE
cp /etc/cxs/cxs.ignore.example /etc/cxs/cxs.ignore


3. Create a daily cron job to check for cxs updates and new Exploit Fingerprints, e.g.:

CODE
0 4 * * * /usr/sbin/cxs --upgrade --quiet


4. Create a daily cron job via the UI to scan all user accounts for exploits, e.g.:

CODE
/usr/sbin/cxs -Z --mail root --vopt mMfhexT -I /etc/cxs/cxs.ignore --qopt Mv -Q /home/quarantine --all



5. Enable ModSecurity cxs scanning (see install.txt) via /etc/cxs/cxscgi.sh, e.g.:

CODE
/usr/sbin/cxs -Z --cgi --mail root --qopt Mv -I /etc/cxs/cxs.ignore -Q /home/quarantine "$1"



6. If on a supported platform, run the cxs Watch daemon on all user html data via /etc/cxs/cxswatch.sh, e.g.:

CODE
/usr/sbin/cxs --Wstart --mail root -Q /home/quarantine -I /etc/cxs/cxs.ignore --qopt Mv --www --all


7. If not on a supported platform for cxs Watch, or if preferred, Enable pure-ftpd cxs scanning (see install.txt) via /etc/cxs/cxsftp.sh, e.g.:

CODE
/usr/sbin/cxs -Z --ftp --mail root --qopt Mv -I /etc/cxs/cxs.ignore -Q /home/quarantine "$1"


8. We strongly recommend that you subscribe via RSS to our blog to stay informed of updates to cxs and our other applications:

ConfigServer Blog

** For more info just login to your WHM then go to Plugins > ConfigServer eXploit Scanner, then click on Documentation. **3. Server Services Check
a. Check server startup for atd = failed

CODE
service atd stop
chkconfig atd off


The rest is self explanable and easily done through the WHM!
Comments
There have been no comments made as of yet. Why not be the first?



1 user(s) active
Active Users 1 guests, 0 members, 0 anonymous members
Sorted by Last Click
Quick Stats
Board Stats There have been a total of 244 tutorials in 6 categories and 0 sub-categories with 112005 views and 24 comments
The newest tutorial is How to Add “Move to” or “Copy to” to Windows 10¢s Context Menu by NickTheGreek

RSS Lo-Fi Version Time is now: 19th April 2024 - 04:43 PM
Skin and Graphics by Dan Ellis and Anubis. Hosting by Forums & More © 2005-2011.
InvisionGames - Your #1 Arcade Games Repository | AllSigs - Signatures for all | Rock Band + Guitar Hero = RockHero ! | The Remoters - Remote Assistance | FileMiners - You ask, We find