-

 -

: 39 (0)

 - e-mail

 

 -

   _Hacking_

 -

 LiveInternet.ru:
: 11.05.2006
:
:
: 4992

:


, 12 2006 . 01:56 +
:)


_Hacking_   , 12 2006 . 01:56 ()
( , , ) iNet. . , , ! ! - : , mp3, avi mpg . : ( ), , , . , , .

, ?

: mp3-, - , mp3, html , , jpg. : , . ( ) , , , . . , , , - ( ). .

FTP => FTP

, - ( , ), , , . . ( , , , ) ftp- , , , . , , ( ) - ftp-, ftp- . - , .. , , , HTTP-. , , FTP ( - ). , FTP. (, , , .. FTP - File Transfer Protocol) . , , , - 21 ( ftp ) . . , . : ? , : ( ), ( ). , , , ( ). , . . : ( ) (.. ) . ; , CuteFTP, FAR -, , , , ( ) . ftp-, . ( ), - ( ), . ? , . ( telnet) , USER PASS, :
USER ivanov
PASS qwerty
, , , , .. "anonymous", - . "TYPE I" , . PASV PORT, . :
PASV
227 Entering passive mode (213,180,190,56,222,116)
( - , - .)
- , (213.180.190.56:56948, 222 * 256 + 116):
PORT 213,180,190,56,222,116
200 PORT command OK
, , , , . , "CWD < >" ( , , PWD, ). , , ( "LIST") , . - , , , "/pub/R/Robert_Miles/mp3/fable.mp3", : "CWD /pub/R/Robert_Miles/mp3". : "RETR < >" "STOR < >". : "QUIT". , , . , -, ftp- . -, ftp-, , ftp- ( , ).



, , , , . , - - , , , . : 2-3 - ( : perl + ), ( ) , . , . , , . - , pelr-, . ( , 3$ 2 , spb.ru msk.ru + perl + ). , , . "31337.spb.ru" "www.admin_pridurok.narod.ru" , , , . - -, /, - . , , , - , , .
HTTP => http
, - perl-. , Perl. , . . , , :
use Socket;
, . , .
, , - . :
$sin=sockaddr_in($xport, inet_aton($xhost));
socket(HTTPCMD, PF_INET, SOCK_STREAM, getprotobyname('tcp'));
if (!connect(HTTPCMD, $sin)) {<, >exit;}
$xport $xhost ip-. connect , , 0. , HTTPCMD . : close(HTTPCMD); :
send HTTPCMD, "$mydata", 0;
, :
$newline = ;
, - , / / -, , . , , , , , . , -, , , , , , . , on-line (, ), . : , . . : http-, , ( ) . , , , ( - ). -, HTTP (Hypertext Transfer Protocol). -:

GET /xxx.jpg HTTP/1.0
User-Agent: Mozilla
Accept: */*
Host: www.super-site.bjg.sg.jtr.ck
Range: bytes=110-3548790

, , . , , . , . , . xxx.jpg 110- 3548790- . , . , .. ""? , . , , ( ). , , ( ) -. , , . , . , , , , ( ). , , , . , "\r\n", "\n". (.. "\r\n\r\n"). , , , , . , , ftp, (.. ). , , "\r\n", - . , . :
HTTP/1.1 200 OK
Date: Tue, 29 Jan 2002 16:10:59 GMT
Server: Apache/1.3.6 (Win32)
Last-Modified: Sun, 07 Oct 2001 00:23:46 GMT
ETag: "0-8e7b0c-3bbda092"
Accept-Ranges: bytes
Content-Length: 9358092
Connection: close
Content-Type: audio/mpeg
< >

, . , "200 OK", "404 Not Found", , , .
Perl-, , :

while ( ) {
if ($_ eq "\r\n") {last;}
}
while ( ) {
print NF;
}

HTTPCMD - , NF - , . , , .. , "!". , . : , . "", 1400000 ( , .. ). "" , , (1400000) . , URL , , , , , , ( cgi-bin, , html-), :

print "Content-type: */*\r\n";
print "Location: $newfilelocation\r\n";
print "\r\n";

. .. - :
http://www.mycoolsite.ru/cgi-bin/script.cgi?n=4. 4- , , "/tmp/xe-xe-xe.004", , .. htpp://www.mycoolsite.ru/tmp/xe-xe-xe.004. , , . " . ?" - . " " - . (> 3-5 mb), , , . , . . , - http-. ftp-, , , .
FTP => http
, , . : , :

USER anonymous
PASS my@e-mail.address.ru
TYPE I
CWD /pub/mp3/Robert_Miles
REST 1400001
PASV RETR fable.mp3

REST : ( - "" = 8 ) . , , http, , . . http, "\r\n", ( http , , ftp , ). , , , , , .. , . , , , (.. telnet) . , . PASV, .. , , . , , PASV 227:

227 Entering passive mode (213,180,190,56,222,116)
IP- :
$ans=~/(\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/;
$dhost="$1.$2.$3.$4";
$dport=$5*256+$6;

.. 213.180.190.56:56948. , . , , , , . (: sysread(FTPDATA, $buf, $n) $buf FTPDATA $n .)

. , WinAPI, , , , , winapihelp.001. , , , .. - :
http://www.allforstudents.box.sk/cgi-bin/getfile.cgi?
n=4&fname=winapihelp&vers=last&user=&requeststring=win+api&a=0
( "n=4", - )
http://www.allforstudents.box.sk/files/win/help/splited/winapihelp.001

, ?


. , : , (< 1kb) , , - . - 50. , , , , ( exe). - , , , , , . : , , , , , . , exe- self-ex , - . , , , . , , , , .. , , ( ) , , , , . - (.. xor ). , , . , - , , . Perl-, , 1.dat 5 2.dat:
open(F1, "1.dat");
open(F2, ">2.dat");
binmode F1;
binmode F2;
$t = 0;
$nofp = sysread(F1, $t, 1);
while ($nofp) {
print F2 chr(ord($t) ^ 5);
$nofp = sysread(F1, $t, 1);
}
close(F1);
close(F2);
, . , " " ( ). .. n , . : , . ( : - ), , , , ( ). .. , , , 2- . . , .



, , , , , . : . , , , "!". !

: , !
   
: [1] []
 

:
: 

: ( )

:

  URL