المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : شرح طريقة أغلاق ثغرة ProFTPd



admin
11-02-2013, بتوقيت غرينيتش 01:16 AM
الترقيع ثغره خطيرة في برنامج الاف تي بي تحديث update برنامج Proftpd-1.3.2

الثغرة التي تعالجها الاصدارة الجديدة كثير من الثغرات واخرها :

هذه معظم الثغرات :

اقتباس
1.3.2 (stable)
---------------

+ Security fixes

Fixed encoding-dependent SQL injection vulnerability in mod_sql_mysql
and mod_sql_postgres modules.


1.3.2rc4
---------

+ Fixed %f logging, HiddenStore and UserOwner not working (Bug#3137).

+ Added Russian translation.

+ New documentation:

doc/howto/Compiling.html
doc/howto/Rewrite.html
doc/howto/Sendfile.html


1.3.2rc3
---------

+ Fixed character set/encoding support on FreeBSD.

+ Fixed mod_sql authentication regression (Bug#2922)

+ Start of a regression testsuite. Currently have basic unit tests for
most FTP commands, and a few of the configuration directives. See
the Testing howto for more information.

+ Fixed variable substitution in user/group names in SQL queries.

+ Lowered the default TimeoutLinger value from 180 secs to 30 secs,
for better interoperability. Many FTP clients have a timeout of
60 secs, waiting for a response from the server, before the client
closes the control connection. ProFTPD's lingering closes should
thus not be longer than 60 secs, to avoid hitting those clients'
timeout limit.

+ Fixed several issues related to aborting of downloads.




+ New documentation:

doc/howto/Testing.html
doc/howto/Translations.html


1.3.2rc2
---------

+ Added Chinese translation.

+ Fixed handling of SSL/TLS session shutdowns on data connections. This
issue was causing problems for users of recent FileZilla versions which
insisted on proper SSL/TLS session shutdowns.

+ Fixed file descriptor leak when using syslog logging.

+ Fixed syslog logging on Mac OSX platforms.

+ Attempted to address the following message in system log files:

warning: `proftpd' uses 32-bit capabilities (legacy support in use)

by having mod_cap use the libcap version numbers provided by newer
Linux kernels. See doc/modules/mod_cap.html for more details.

+ Added new `prxs' tool, for compiling and installing third-party
modules without needing the proftpd source code. See
doc/howto/DSO.html for more information.

+ Added sendfile support for Mac OSX 10.5.




اول شيء قبل البداء لازم نسوي تنزيل للبرامج هامة gcc package

اكتب الامر التالي لتنزيلها :
رمز Code:
rpm -qa gcc*
رمز Code:
# cd /usr/src # wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.2.tar.gz # tar zxvf proftpd-1.3.2.tar.gz # cd proftpd-1.3.2/ # ./configure --sysconfdir=/etc # make # make install # cd .. # rm -fr proftpd-1.3.2* #ln -s /usr/local/sbin/proftpd /usr/sbin/proftpd
ننشئ سكربت للأف تي بي

رمز Code:
vi /etc/init.d/proftpd
نلصق المحتوى التالي :
رمز Code:
#!/bin/sh # $Id: proftpd.init,v 1.1 2004/02/26 17:54:30 thias Exp $ # # proftpd This shell script takes care of starting and stopping # proftpd. # # chkconfig: - 80 30 # description: ProFTPD is an enhanced FTP server with a focus towards \ # simplicity, security, and ease of configuration. \ # It features a very Apache-like configuration syntax, \ # and a highly customizable server infrastructure, \ # including support for multiple 'virtual' FTP servers, \ # anonymous FTP, and permission-based directory visibility. # processname: proftpd # config: /etc/proftp.conf # pidfile: /var/run/proftpd.pid # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 [ -x /usr/sbin/proftpd ] || exit 0 RETVAL=0 prog="proftpd" start() { echo -n $"Starting $prog: " daemon proftpd RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/proftpd } stop() { echo -n $"Shutting down $prog: " killproc proftpd RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/proftpd } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status proftpd RETVAL=$? ;; restart) stop start ;; condrestart) if [ -f /var/lock/subsys/proftpd ]; then stop start fi ;; reload) echo -n $"Re-reading $prog configuration: " killproc proftpd -HUP RETVAL=$? echo ;; *) echo "Usage: $prog {start|stop|restart|reload|condrestart|status}" exit 1 esac exit $RETVAL
بعد ذلك للي ما يعرف اوامر vi

بعد ما نلصق المحتوى نضغط زر ESC في الكيبورد
واضغط زر الشيفت وحرف الزيد مرتين
Shift-z-z

خلاص يبقى سوينا الملف السكربت

نعطيه تصريح :
رمز Code:
chmod 755 /etc/init.d/proftpd
بعد ذلك نفتح الملف :
رمز Code:
pico /etc/proftpd.conf
نعدل التالي :
رمز Code:
# Set the user and group under which the server will run. User nobody Group nobody
وايضا :
رمز Code:
# To cause every FTP user to be "jailed" (chrooted) into their home # directory, uncomment this line. DefaultRoot ~
بعد ذلك تشغيل الخدمة :
رمز Code:
/usr/local/sbin/proftpd
رمز Code:
chkconfig --levels 235 proftpd on
رمز Code:
/etc/init.d/proftpd start
بعد ذلك نتأكد من الترقية upgrade انها تمت بنجاح :
رمز Code:
root@server [~]# proftpd -v ProFTPD Version 1.3.2
وللتأكد ان الخدمة تعمل نكتب الامر التالي :
رمز Code:
ps aux | grep proftpd
رمز Code:
root@server [~]# ps aux | grep proftpd root 5399 0.0 0.0 3912 680 pts/1 S+ 04:48 0:00 grep proftpd nobody 30302 0.0 0.0 2756 1032 ? SNs 04:18 0:00 proftpd: (accepting connections)
حل اخر لآغلاق الثغره وهي استخدام برنامج :


ادخل الي سيرفر SERVERك عن طريق WHM بأستخدام اليوزر root

اذهب الي الاختيار التالي : FTP Server Selection

سوف تجد امامك اختيارات برامج FTP الموجوده مع السي بانل CPANEL قم بأختيار :

رمز PHP:

<code style="white-space:nowrap"> <code> Pure-FTPD
</code> </code>

ثم قم بعمل Save

بعدها ادخل الاختيار التالي : FTP Server Configuration

سوف تجد Allow Anonymous Logins اجعل امامها NO

و اذهب الي الشل و تأكد من توفر الاصدار الاخير من البرنامج لديك علي السيرفر SERVER بالامر التالي :

رمز PHP:

<code style="white-space:nowrap"> <code> rpm -qa |grep pure-ftpd
</code> </code>

الاصدرا الاخير يحمل الرقم :

رمز PHP:

<code style="white-space:nowrap"> <code> pure-ftpd-1.0.21-7.tls
</code> </code>

اذا لم تجد لديك الاصدار الاخير قم بعمل تحديث update للسي بانل CPANEL عن طريق الامر التالي :

رمز PHP:

<code style="white-space:nowrap"> <code> /scripts/upcp --force
</code> </code>

و نسأل الله العفو و العافيه
الموضوع حصريا علي منتديات معهد الحماية العربي .




طبعاً هنالك فرق كبير بين pure-ftpd و برنامج proftpd

برنامج proftpd سريع وخفيف ومحمي
برنامج pure-ftpd بطيء جداً ومحمي


ادارة هوست تونيد




https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash4/482113_236967293114455_1193518507_n.png (http://www.dzbatna.com)
©المشاركات المنشورة تعبر عن وجهة نظر صاحبها فقط، ولا تُعبّر بأي شكل من الأشكال عن وجهة نظر إدارة المنتدى (http://www.dzbatna.com)©

استعمل مربع البحث في الاسفل لمزيد من المواضيع


سريع للبحث عن مواضيع في المنتدى