Home page logo
/

metasploit logo Metasploit mailing list archives

Need Help with Exploit
From: hdm at metasploit.com (H D Moore)
Date: Tue, 19 Jul 2005 00:46:25 -0500

It looks like you are sending the entire raw IP packet as the TCP data. 
You will need to use a raw socket instead, check out the 
Pex::Socket::RawUDP for an example[1]. Raw sockets have only been 
successfully tested on Linux (running as root, etc), the Cygwin raw 
socket support is handicapped by the OS. 

-HD

1. $BASE/lib/Pex/Socket/RawUdp.pm

$sock = Pex::RawSocket->new();
[ snip ]
my $x = Pex::RawPackets->new('UDP'); # change to 'IP'
    
$x->ip_src_ip       ( $self->LocalAddr );
$x->ip_dest_ip      ( $self->PeerAddr  );
$x->udp_dest_port   ( $self->PeerPort  );
$x->udp_src_port    ( $self->LocalPort );
$x->udp_data        ( $data );
    
my $r = $self->Socket->send($x->Encode, $self->PeerAddr);


On Saturday 16 July 2005 13:40, Michael James Reilly wrote:
? ? ?my $s = Msf::Socket::Tcp->new( 'PeerAddr' ?=> $targethost,
'PeerPort' ?=> $targetport,); if ($s->IsError) {
????????$self->PrintLine("[*] Socket Error: " . $s->GetError());
????????return;
? ? ?}
? ? ?$s->Send($packet);
? ? ?$self->Handler($s);



  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault