Güvenlik » Soru ve Cevaplar

mod_security kural zinciri hakkında

Geri git   WHM cPanel Destek Platformu » Site, Sunucu Sorunlarınız ve Çözümleri » Güvenlik » Soru ve Cevaplar
Kayıt ol Yardım Üye Listesi Ajanda Forumları Okundu Kabul Et
 
Cevapla
 
LinkBack Seçenekler Stil
  #1 (permalink)  
Alt 24.03.08, 01:48 PM
byilyas - ait Kullanıcı Resmi (Avatar)
Celeron
 
Üyelik tarihi: Mar 2008
Mesajlar: 79
Tecrübe Puanı: 11
byilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud of
mod_security kural zinciri hakkında

Merhabalar,

mod_securtiynin default olan kural zinciri joomla sitelerde yönetim panelinden içerik eklerken konu başlığında TR karakter içeriyorsa mod_security engelliyor ve sayfa 406 hatasına düşüyor.

.htaccess dosyası ile bu içerik eklemedeki sıkıntıyı gideremedim. mod_securtiynin kural zincirini komple boşaltıyorum yani hiçbir kural girilmemiş halde kaydediyorum ozaman sorun kalmıyor ortada ama bu şekilde de bazı güvenlik açıkları oluşabilir güvenlik açığı vermeden arkadaşlarımız arasında sağlam bir kural zinciri varmıdır kendi sunucularınızda kullandığınız mo_securitydeki kuralları paylaşırsanız sevinirim.

Amaç shell filan yemeden güvenlik sağlayabilmek ve sitelerde 406 hatasına rastlamamak...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #2 (permalink)  
Alt 24.03.08, 07:39 PM
Fesih BICER - ait Kullanıcı Resmi (Avatar)
SysAdmin
 
Üyelik tarihi: Jun 2007
Nerden: Çorlu
Yaş: 28
Mesajlar: 584
Tecrübe Puanı: 1091
Fesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond repute
Fesih BICER - MSN üzeri Mesaj gönder
ben bunu kullanıyorum.

mutlaka olması gereken bir kural
SecFilterSelective THE_REQUEST "/*\.txt\?"
__________________
domain bayiliği
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #3 (permalink)  
Alt 25.03.08, 09:42 PM
byilyas - ait Kullanıcı Resmi (Avatar)
Celeron
 
Üyelik tarihi: Mar 2008
Mesajlar: 79
Tecrübe Puanı: 11
byilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud of
İzninizle bi denemek isterim ve birde sorum olucaktı...

Alıntı:
mutlaka olması gereken bir kural
SecFilterSelective THE_REQUEST "/*\.txt\?"
şeklinde belirtmişsiniz işlevi nedir acaba açıklıyabilirmisiniz?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #4 (permalink)  
Alt 25.03.08, 10:29 PM
ALEXIS - ait Kullanıcı Resmi (Avatar)
phpBB Türkiye
 
Üyelik tarihi: Aug 2007
Nerden: istanbul
Mesajlar: 102
Tecrübe Puanı: 1
ALEXIS is on a distinguished road
csf ile mod_security uyumlu çalışır mı, ilk defa kuracağım ?
__________________
Canver Software :: phpBB3 hizmetleri sitemiz yenilendi | canversoftSEF :: phpBB3 arama motoru optimizasyonu
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #5 (permalink)  
Alt 25.03.08, 10:37 PM
Fesih BICER - ait Kullanıcı Resmi (Avatar)
SysAdmin
 
Üyelik tarihi: Jun 2007
Nerden: Çorlu
Yaş: 28
Mesajlar: 584
Tecrübe Puanı: 1091
Fesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond repute
Fesih BICER - MSN üzeri Mesaj gönder
Alıntı:
byilyas´isimli üyeden Alıntı Mesajı göster
İzninizle bi denemek isterim ve birde sorum olucaktı...

şeklinde belirtmişsiniz işlevi nedir acaba açıklıyabilirmisiniz?
dene tabi ayıpsın.

işlevi şöyle türkiyede kendi hacker sananlar sitelerin sonuna index.php?id=http:///exploit.linki/hnn.txt? gibi link getirip açık kapı ararlar. bizim kural sondaki txt? kısmını önler zaten sonda soru işareti ? kalmadımı exploit dışardan çalışmaz.

ama sunucunuza php olarak upload ederse çalıştırır. bunun içinde artı güvenlik önlemleri var. php fonksiyonlarını kapama, open basedir, safe mod v.s

@alexix

çalışır. sorun çıkarmaz yani.
__________________
domain bayiliği
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #6 (permalink)  
Alt 25.03.08, 10:45 PM
ALEXIS - ait Kullanıcı Resmi (Avatar)
phpBB Türkiye
 
Üyelik tarihi: Aug 2007
Nerden: istanbul
Mesajlar: 102
Tecrübe Puanı: 1
ALEXIS is on a distinguished road
Soruyu değiştirdim:

WHM de "Mod Security" zaten var, bu mod_security yi daha önce kurduğum anlamına mı geliyor, edit ile kuralları ekleyebiliyoruz sanırım.

httpd.conf a eklenmiş

Kod:
 Include "/usr/local/apache/conf/modsec2.conf"

modsec2.conf da:

Kod:
LoadFile /opt/xml2/lib/libxml2.so
LoadModule security2_module  modules/mod_security2.so
<IfModule mod_security2.c>
SecRuleEngine On
# See http://www.modsecurity.org/documentation/ModSecurity-Migration-Matrix.pdf 
#  "Add the rules that will do exactly the same as the directives"
# SecFilterCheckURLEncoding On 
# SecFilterForceByteRange 0 255
SecAuditEngine RelevantOnly
SecAuditLog logs/modsec_audit.log 
SecDebugLog logs/modsec_debug_log
SecDebugLogLevel 0
SecDefaultAction "phase:2,deny,log,status:406"
SecRule REMOTE_ADDR "^127.0.0.1$" nolog,allow
Include "/usr/local/apache/conf/modsec2.user.conf"
</IfModule>
__________________
Canver Software :: phpBB3 hizmetleri sitemiz yenilendi | canversoftSEF :: phpBB3 arama motoru optimizasyonu

Konu ALEXIS tarafından (25.03.08 Saat 11:00 PM ) değiştirilmiştir..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #7 (permalink)  
Alt 25.03.08, 10:54 PM
Fesih BICER - ait Kullanıcı Resmi (Avatar)
SysAdmin
 
Üyelik tarihi: Jun 2007
Nerden: Çorlu
Yaş: 28
Mesajlar: 584
Tecrübe Puanı: 1091
Fesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond repute
Fesih BICER - MSN üzeri Mesaj gönder
öylede olabilir. zaten whm panelinizde tıklayıp kuralları ekleyebiliyorsunuz. (sol menude en altta)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #8 (permalink)  
Alt 25.03.08, 11:04 PM
ALEXIS - ait Kullanıcı Resmi (Avatar)
phpBB Türkiye
 
Üyelik tarihi: Aug 2007
Nerden: istanbul
Mesajlar: 102
Tecrübe Puanı: 1
ALEXIS is on a distinguished road
edit deyip yazıyorum, ama apache başlamıyor. Sadece bunu yazıyorum:


SecFilterSelective THE_REQUEST "/*\.txt\?"

(9)Bad file descriptor: apr_socket_accept: (client socket) Syntax error on line 1 of /usr/local/apache/conf/modsec2.user.conf: Invalid command 'SecFilterSelective', perhaps misspelled or defined by a module not included in the server configuration

SecFilterScanPOST on

(9)Bad file descriptor: apr_socket_accept: (client socket) Syntax error on line 1 of /usr/local/apache/conf/modsec2.user.conf: Invalid command 'SecFilterScanPOST', perhaps misspelled or defined by a module not included in the server configuration
__________________
Canver Software :: phpBB3 hizmetleri sitemiz yenilendi | canversoftSEF :: phpBB3 arama motoru optimizasyonu

Konu ALEXIS tarafından (25.03.08 Saat 11:10 PM ) değiştirilmiştir..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #9 (permalink)  
Alt 25.03.08, 11:16 PM
byilyas - ait Kullanıcı Resmi (Avatar)
Celeron
 
Üyelik tarihi: Mar 2008
Mesajlar: 79
Tecrübe Puanı: 11
byilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud ofbyilyas has much to be proud of
Alıntı:
Fesih BICER´isimli üyeden Alıntı Mesajı göster
ben bunu kullanıyorum.

mutlaka olması gereken bir kural
SecFilterSelective THE_REQUEST "/*\.txt\?"

Sayın hocam

o nasıl kuraldır ya kuralları ekledim sitelerin yayını durdu senin sunucu bu kurallara nasıl dayanıyor veya httpd nasıl dayanıyor?

sen ciddimisin bu kuralları kullandığına ben sitelerin açılması için zor temizlettim:ag:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #10 (permalink)  
Alt 25.03.08, 11:17 PM
Fesih BICER - ait Kullanıcı Resmi (Avatar)
SysAdmin
 
Üyelik tarihi: Jun 2007
Nerden: Çorlu
Yaş: 28
Mesajlar: 584
Tecrübe Puanı: 1091
Fesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond reputeFesih BICER has a reputation beyond repute
Fesih BICER - MSN üzeri Mesaj gönder
@alexis
ama sen 2. veriyonunu kullanıyorsun. benim kurallar 1x versiyonu için.

2.x için ruleleri ek yapıyorum indir. işine yarayanları kullan
Eklenmiş Dosya
Dosya tipi: gz apache2-gotrootrules-modsec2.0-latest.tar.gz (121,1 KB (Kilobyte), 18x kez indirilmiştir)
__________________
domain bayiliği
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
Cevapla



Seçenekler
Stil

Yetkileriniz
Yeni Mesaj yazma yetkiniz aktif değil dir.
Mesajlara Cevap verme yetkiniz aktif değil dir.
Eklenti ekleme yetkiniz aktif değil dir.
Kendi Mesajınızı değiştirme yetkiniz aktif değil dir.

Smileler Açık
[IMG] Kodları Açık
HTML-KodlarıKapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık

Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
mod_security kurulumu CaLViN Makaleler 41 11.05.08 03:52 AM
Örnek Mod Security Kural Zinciri McLee Makaleler 2 29.03.08 12:48 AM
Mod_security 2.5.0 Kurulumu hamzam Soru ve Cevaplar 2 19.03.08 09:44 PM
Mod_Security Installation CaLViN Security 0 08.11.07 08:14 PM
veri tabanı hakkında hakkında prozac Soru ve Cevaplar 12 15.10.07 05:43 PM




Saat Dilimimiz:GMT +2.Saatimiz:06:03 AM.