Jump to content

Packet Squirrel tcpreplay is not working


aclx
Go to solution Solved by dark_pyrro,

Recommended Posts

I have installed tcpreplay on my packet squirrel version 3.2

when I try to run tcpreplay I get ...

root@squirrel:/mnt/loot/tcpdump# tcpreplay dump_2023-11-21-144844.pcap
Error loading shared library libpcap.so.0.8: No such file or directory (needed by /usr/bin/tcpreplay)
Error relocating /usr/bin/tcpreplay: pcap_close: symbol not found
Error relocating /usr/bin/tcpreplay: pcap_inject: symbol not found
Error relocating /usr/bin/tcpreplay: pcap_freealldevs: symbol not found
Error relocating /usr/bin/tcpreplay: pcap_datalink_val_to_name: symbol not found
Error relocating /usr/bin/tcpreplay: pcap_datalink: symbol not found
Error relocating /usr/bin/tcpreplay: pcap_open_live: symbol not found
Error relocating /usr/bin/tcpreplay: pcap_open_offline: symbol not found
Error relocating /usr/bin/tcpreplay: pcap_next: symbol not found
Error relocating /usr/bin/tcpreplay: pcap_next_ex: symbol not found
Error relocating /usr/bin/tcpreplay: pcap_datalink_val_to_description: symbol not found
Error relocating /usr/bin/tcpreplay: pcap_snapshot: symbol not found
Error relocating /usr/bin/tcpreplay: pcap_geterr: symbol not found
Error relocating /usr/bin/tcpreplay: pcap_findalldevs: symbol not found
Error relocating /usr/bin/tcpreplay: pcap_version: symbol not found
root@squirrel:/mnt/loot/tcpdump#

Any idea?

Link to comment
Share on other sites

You have the error in the output that should lead you in the correct direction

31 minutes ago, aclx said:

Error loading shared library libpcap.so.0.8: No such file or directory (needed by /usr/bin/tcpreplay)

My guess is that it's a newer version of libpcap on the system (or available for installation). One "dirty" fix would be to symlink 0.8 to the existing one, but it might result in bad behavior since there could be diffs between what the tcpreplay version expects/needs from the lib and the onboard version.

Link to comment
Share on other sites

  • Solution

If you need more specific details about compiling from source, then it's not the path you should walk.

The correct way to install is as you mention, but... there are dependencies that aren't met regarding libpcap specifically which stops tcpreplay from executing even if you installed it in the way it's supposed to be installed.

You could try (as I mentioned in a previous post) to create a symlink between the already existing libpcap file and the one tcpreplay wants. Might not be optimal and "unorthodox", but it could make it run.

libpcap should be located in /usr/lib

so...

cd /usr/lib

Create a symlink (this is the possibly "unorthodox" thing)
ln -s /usr/lib/libpcap.so.1 /usr/lib/libpcap.so.0.8

ls -la (or ll) on /usr/lib/ should show the created symlink in the directory listing
libpcap.so.0.8 -> libpcap.so.1

Execute tcpreplay

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...