tklab-tud / ID2T

Official ID2T repository. ID2T creates labeled IT network datasets that contain user defined synthetic attacks.
MIT License
58 stars 23 forks source link

Installation and initiating error ID2T #111

Closed bsureshkum closed 2 years ago

bsureshkum commented 2 years ago

Hi,

I had difficulty in installing ID2T in Kali Linux VM. When I issued ./id2t command, I have got the following error. Can anyone help me please. Thanks.

$ sudo ./id2t
Traceback (most recent call last):
  File "/home/kali/ID2T/code/CLI.py", line 5, in <module>
    from Core.Controller import Controller
  File "/home/kali/ID2T/code/Core/Controller.py", line 9, in <module>
    import Core.AttackController as atkCtrl
  File "/home/kali/ID2T/code/Core/AttackController.py", line 7, in <module>
    import Core.LabelManager as LabelManager
  File "/home/kali/ID2T/code/Core/LabelManager.py", line 8, in <module>
    import Lib.TestLibrary as Lib
  File "/home/kali/ID2T/code/Lib/TestLibrary.py", line 5, in <module>
    import Lib.Utility as Util
  File "/home/kali/ID2T/code/Lib/Utility.py", line 9, in <module>
    import scapy.layers.inet as inet
  File "/home/kali/ID2T/.venv/lib/python3.9/site-packages/scapy/layers/inet.py", line 25, in <module>
    from scapy.layers.l2 import Ether, Dot3, getmacbyip, CookedLinux, GRE, SNAP, \
  File "/home/kali/ID2T/.venv/lib/python3.9/site-packages/scapy/layers/l2.py", line 17, in <module>
    from scapy.ansmachine import AnsweringMachine
  File "/home/kali/ID2T/.venv/lib/python3.9/site-packages/scapy/ansmachine.py", line 16, in <module>
    from scapy.sendrecv import send, sniff
  File "/home/kali/ID2T/.venv/lib/python3.9/site-packages/scapy/sendrecv.py", line 33, in <module>
    import scapy.route  # noqa: F401
  File "/home/kali/ID2T/.venv/lib/python3.9/site-packages/scapy/route.py", line 194, in <module>
    conf.route = Route()
  File "/home/kali/ID2T/.venv/lib/python3.9/site-packages/scapy/route.py", line 27, in __init__
    self.resync()
  File "/home/kali/ID2T/.venv/lib/python3.9/site-packages/scapy/route.py", line 33, in resync
    from scapy.arch import read_routes
  File "/home/kali/ID2T/.venv/lib/python3.9/site-packages/scapy/arch/__init__.py", line 28, in <module>
    from scapy.arch.bpf.core import get_if_raw_addr
  File "/home/kali/ID2T/.venv/lib/python3.9/site-packages/scapy/arch/bpf/core.py", line 29, in <module>
    LIBC = cdll.LoadLibrary(find_library("libc"))
  File "/usr/lib/python3.9/ctypes/util.py", line 341, in find_library
    _get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name))
  File "/usr/lib/python3.9/ctypes/util.py", line 147, in _findLib_gcc
    if not _is_elf(file):
  File "/usr/lib/python3.9/ctypes/util.py", line 99, in _is_elf
    with open(filename, 'br') as thefile:
FileNotFoundError: [Errno 2] No such file or directory: b'liblibc.a'
pepper-jk commented 2 years ago

Hi there,

did you use the build script as per the instructions?

If so, could you provide the output?

If you don't have it anymore please try ./build.sh --full to run a full rebuild and post the output here.

Meanwhile you can also take a look at our Dependencies wiki page and check if all the dependencies are installed manually.

Your call of id2t seems strange to me. What arguments are 1 and x supposed to be? Run ./id2t or ./id2t --help for information about which arguments are allowed. (Provided the dependency issues are solved before, of course.)

Please do not run id2t via sudo. It is not required and only exposes your system's privileges.

Hope this helps. I'll try to get back to you as soon as possible, once you post more information.

bsureshkum commented 2 years ago

Hi Pepper-JK,

Thanks for your time. I tried to manually install dependencies but still I am having issues. Please find the output below.

Kind Regards, output_ID2T.txt SK

bsureshkum commented 2 years ago

Hi peper-jk,

I have deleted the existing directory and reinstalled using ./build.sh --full command. Please see the output. output_ID2T-1.txt

UndeadKernel commented 2 years ago

The problem you are having is due to a file name change in Python 3.9. See this for a possible solution: https://stackoverflow.com/a/65513989/2632102

bsureshkum commented 2 years ago

Thanks a lot. That did the magic.

pepper-jk commented 2 years ago

Closing due to the solution found on stackexchange:

cd /usr/lib/x86_64-linux-gnu/
ln -s -f libc.a liblibc.a