网络信息收集与数据包处理技术详解
1. Banner Grabbing技术
Banner grabbing是一种通过套接字连接到端口、向服务发送数据并分析返回数据的技术。当系统管理员未对服务的IP地址进行限制时,任何人(包括攻击者)都可以查询服务的端口。
以下是一个实现Banner grabbing的Perl脚本示例:
#!/usr/bin/perl
use strict;
use IO::Socket::INET;
my $usage = "./bg.pl <host> <protocol type> <comma separated ports> <timeout seconds>\n";
die $usage unless my $host = shift;
die $usage unless my $proto = shift;
die $usage unless my @ports = split(/,/,shift);
die $usage unless my $to = shift; # time out (seconds)
my $conPorts;
my $errPorts;
my $sock;
PRTR: foreach my $port (@ports){
eval {
local $SIG{ALRM} = sub { $errPorts++; die; };
print "banner grabbing :",$port,"\n";
alarm($to);
if($sock = I
超级会员免费看
订阅专栏 解锁全文
520

被折叠的 条评论
为什么被折叠?



