由于 LibNet,无法安装 IDSwakeup

由于 LibNet,无法安装 IDSwakeup

因此,我确实从 ubuntu 存储库下载了 IDSwakeup 并安装了 libnet 和 hping3。当我尝试“制作”IDSwakeup 时,我收到以下错误:

gcc  -o iwu iwu.o -lnet ; \

iwu.o: In function `main':
iwu.c:(.text.startup+0x148): undefined reference to `libnet_open_raw_sock'
iwu.c:(.text.startup+0x26b): undefined reference to `libnet_write_ip'
collect2: error: ld returned 1 exit status
make: *** [iwu] Error 1

我做错了什么?我尝试重新安装 libnet 多次。

答案1

问题出在你使用的 libnet 版本上。你得到的错误是,在你尝试链接的库中缺少符号 libnet_open_raw_sock 和 libnet_write_ip。

IDSWakeup 使用 libnet 1.0 版本,您可以在此处找到:

http://packetfactory.openwall.net/libnet/dist/deprecated/libnet-1.0.2a.tar.gz

如果您访问 libnet 维护者的最新版本(在 github 中),您会看到他调用了迁移到 1.1 的步骤,其中特别要求删除某些调用:

https://github.com/sam-github/libnet/blob/master/libnet/doc/MIGRATION

MIGRATING YOUR CODE TO LIBNET 1.1 AND QUICKSTART

Using Libnet 1.1 you will find it MUCH simpler to build and write packets
than before.  Instead of the previous five steps (initialize memory,
initialize network, build packet, do checksums, write packet) there are
now only three steps (initialize library, build packet, write packet).  
In order to port your existing code, you will mainly be REMOVING 
function calls and variables.

1) Start with code removal:

    - Remove all calls to libnet_init_packet() / packet malloc()ing and
      all associated variables.
    - Remove all calls to libnet_open_raw_sock() / libnet_open_link_layer()
      and all associated variables.
    - Remove all calls to libnet_do_checksum() and all associated
      variables.

要使 IDSWakeup 在 Ubuntu 14.04 上运行,请执行以下操作:

sudo apt-get update
sudo apt-get install --yes build-essential autoconf libtool make

wget http://packetfactory.openwall.net/libnet/dist/deprecated/libnet-1.0.2a.tar.gz -O libnet-1.0.2a.tar.gz 
tar xvf libnet-1.0.2a.tar.gz
cd Libnet-1.0.2a
./configure
sudo make install
cd ..

wget http://www.hsc.fr/ressources/outils/idswakeup/download/IDSwakeup-1.0.tgz -O IDSwakeup-1.0.tgz
tar xvf IDSwakeup-1.0.tgz
cd IDSwakeup-1.0
make
cd ..

最后,要在 192.168.0.6 的机器上运行 IDSWakeup,请执行以下操作:

cd IDSwakeup-1.0
sudo ./IDSwakeup 0 192.168.0.6 1 1

您应该看到如下输出:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-  IDSwakeup : false positive generator               -
-  Stephane Aubert                                    -
-  Herv? Schauer Consultants (c) 2000                 -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  src_addr:0  dst_addr:192.168.0.6  nb:1   ttl:1 

  sending : teardrop ...
  sending : land ...
  sending : get_phf ...
  sending : bind_version ...
  sending : get_phf_syn_ack_get ...
  sending : ping_of_death ...
  sending : syndrop ...
  sending : newtear ...
  sending : X11 ...
  sending : SMBnegprot ...
  sending : smtp_expn_root ...
  sending : finger_redirect ...
  sending : ftp_cwd_root ...
  sending : ftp_port ...
  sending : trin00_pong ...
  sending : back_orifice ...
  sending : msadcs ...

相关内容