Site, Sunucu Sorunlarınız ve Çözümleri » Güvenlik

SQL Injection için mysqlde log tutmak mümkün mü?

Geri git   WHM cPanel Destek Platformu » Site, Sunucu Sorunlarınız ve Çözümleri » Güvenlik
Kayıt ol Yardım Üye Listesi Ajanda Forumları Okundu Kabul Et
 

Cevapla
 
LinkBack Seçenekler Stil
  #1 (permalink)  
Alt 05.11.07, 10:20 AM
kgungor - ait Kullanıcı Resmi (Avatar)
Atari
 
Üyelik tarihi: Nov 2007
Mesajlar: 6
Tecrübe Puanı: 0
kgungor is on a distinguished road
Question SQL Injection için mysqlde log tutmak mümkün mü?

MySQL e sadece normal karakterler dışındaki ([a-z][A-Z][0-9]) karakterleri içeren sorguların kayıtlarını tutturmak mümkün mü? Sunucumdaki bir site SQL Injection ile göçertildi fakat nasıl yapıldığını bulamıyorum yani hangi SQL kodunda açık var bilmiyorum. Bulabilmenin başka yolları var mı?

SQL sorgularında ' ve % işaratleri de kullanılıyor bunların dışında veya bunların fazlaca geçtiği sorguları kayıt altına alabilmek mümkün mü acaba?
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 05.11.07, 12:27 PM
Fesih BICER - ait Kullanıcı Resmi (Avatar)
fshbcr
 
Üyelik tarihi: Jun 2007
Nerden: Çorlu
Yaş: 28
Mesajlar: 596
Tecrübe Puanı: 1092
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
Bügün işten çıktım zaten moralim bozuk
birincisi site dosyalarına gerekli kodları include edip kurtulabilirsin.


ikincisi sunucunuza mod_security kurup conf dosyasına ekleyeceğiniz kurallarla kurtulabilirsiniz.

1. yol

bu kodları guvenlik.php diye kayıt et, at ftpye
Kod:
<?php
 $netlojik = $_SERVER['QUERY_STRING'];
 $netlojikguvenlik = array('chr(', 'wget', 'cmd=', 'rush=', 'union', 'UNION', 'echr(', 'esystem(', 'cp%20', 'mdir%20', 'mcd%20', 'mrd%20', 'rm%20', 'mv%20', 'rmdir%20', 'chmod(', 'chmod%20', 'chown%20', 'chgrp%20', 'locate%20', 'grep%20', 'diff%20', 'kill%20', 'kill(', 'killall', 'passwd%20', 'telnet%20', 'vi(', 'vi%20', 'INSERT%20INTO', 'SELECT%20', 'nigga', 'fopen', 'fwrite', '$_REQUEST', '$_GET');
 $guvenlik = str_replace($netlojikguvenlik, '*', $netlojik);
 if ($netlojik != $guvenlik)
   {
     $hadegit = $_SERVER['REMOTE_ADDR'];
     $bilgiler = $_SERVER['HTTP_USER_AGENT'];
     $ipadres = GETENV("REMOTE_ADDR");
     die( "Defooolllll ulan Ip:$ipadres $i$bilgiler" );
   }
echo "<!-- tüm php kodlanmış siteler için - root[at]netlojik.net -->";
?>
Bunuda sitene include et
Kod:
require_once("guvenlik.php");
Kodu geliştirip saldırgana virus ve trojan bile yollayabilirsin. bu sana kalmış.
nasıl yapıldığı konusunda bilgi istemeyin. yardımcı olamam

2. yol

mod_security kurup conf dosyasına ilgili kuralları ekleyerek kurtulabilirsin..

mod_security kurulumu

Rep vermeyi unutma bu 31 sayısından kurtulamadım getti
__________________
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 05.11.07, 02:38 PM
kgungor - ait Kullanıcı Resmi (Avatar)
Atari
 
Üyelik tarihi: Nov 2007
Mesajlar: 6
Tecrübe Puanı: 0
kgungor is on a distinguished road
işten ayrılmış olmana üzüldüm, Allah daha hayırlısını verir inşallah. Cevap için teşekkür ederim. Bunu tum sunucu üzerinde uygulamak pek olası gözükmüyor gibi, yoksa yanılıyor muyum? Daha pratik bir çözüm var mı? Ve ayrıca bir kayıt dosyasının tutulmasını istiyorum. Bu konuda bir önerin var mı?
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 05.11.07, 03:12 PM
Fesih BICER - ait Kullanıcı Resmi (Avatar)
fshbcr
 
Üyelik tarihi: Jun 2007
Nerden: Çorlu
Yaş: 28
Mesajlar: 596
Tecrübe Puanı: 1092
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
Tüm sunucyu korusun istiyorsan 2. yol size uygun. ve tüm girişleri engeller. zaten gösterdiğim ilgili konuda eklediğim komutlar var onlar içinde sql injectiona karşıda koruma mevcut.

Apache log tutuyor zaten apache loglarına bakıp (ör bende: /var/log/apache2 içinde) sitelerin loglarını görebilirsin.

tail -f ile açıp son logları görebilirsin.

ör son 100 girişi görmek için tail -n 100 -f kultur-sanat.net-combined.log

Alıntı:
88.245.163.182 - - [05/Nov/2007:00:17:22 +0100] "GET /kartal-bulent-ecevit-kultur-merkezi/wp-admin/images/wordpress-logo.png HTTP/1.1" 200 1029 "http://kultur-sanat.net/kartal-bulent-ecevit-kultur-merkezi/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
68.142.212.166 - - [05/Nov/2007:03:07:27 +0100] "GET /robots.txt HTTP/1.0" 200 24 "-" "Yahoo-MMCrawler/3.x (mms dash mmcrawler dash support at yahoo dash inc dot com)"
65.55.213.109 - - [05/Nov/2007:10:44:30 +0100] "GET /robots.txt HTTP/1.0" 200 24 "-" "msnbot-media/1.0 (+http://search.msn.com/msnbot.htm)"
65.55.213.109 - - [05/Nov/2007:10:44:31 +0100] "GET / HTTP/1.0" 200 25455 "-" "msnbot-media/1.0 (+http://search.msn.com/msnbot.htm)"
74.6.19.116 - - [05/Nov/2007:11:17:40 +0100] "GET /robots.txt HTTP/1.0" 200 24 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"
74.6.22.204 - - [05/Nov/2007:11:17:41 +0100] "GET /getir/site-tanitimlari/ HTTP/1.0" 200 10814 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"
74.6.26.233 - - [05/Nov/2007:15:17:09 +0100] "GET /yasar-kemalin-tenekesi-la-scalada/ HTTP/1.0" 200 11542 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"
64.246.165.140 - - [05/Nov/2007:18:26:22 +0100] "GET /robots.txt HTTP/1.0" 200 24 "http://www.whois.sc/" "SurveyBot/2.3 (Whois Source)"
64.246.165.140 - - [05/Nov/2007:18:26:22 +0100] "GET / HTTP/1.1" 200 25455 "http://www.whois.sc/kultur-sanat.net" "SurveyBot/2.3 (Whois Source)"
__________________
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
  #5 (permalink)  
Alt 06.11.07, 04:01 PM
Fesih BICER - ait Kullanıcı Resmi (Avatar)
fshbcr
 
Üyelik tarihi: Jun 2007
Nerden: Çorlu
Yaş: 28
Mesajlar: 596
Tecrübe Puanı: 1092
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ı:
kgungor´isimli üyeden Alıntı Mesajı göster
işten ayrılmış olmana üzüldüm, Allah daha hayırlısını verir inşallah.
işsiz kalmam yarım gün sürdü yine buldum 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