jimtangshfx / 5G_ciphered_NAS_decipher_tool

A python tool to decipher/decrypt 5G ciphered NAS message and export plain 5G NAS into wireshark pcap file
75 stars 29 forks source link

can't decrypt NAS #3

Open AddRemover opened 11 months ago

AddRemover commented 11 months ago

Hi there! First of all, thanks for making this script. It's crucial for debugging purposes.

Long story short, I've install python, all other listed dependencies, compiled CryptoMobile. All looks good, I can see GUI but still can't decode anything. Not sure maybe my pyshark (latest) broken? or simply script needs some modification to work with latest dependencies versions? Here is what I see in the python terminal output:

2023-08-02 14:48:53,777 - INFO - waiting for pcap filtered by ngap protocol,0 seconds passed.

2023-08-02 14:48:54,778 - INFO - waiting for pcap filtered by ngap protocol,1 seconds passed.

2023-08-02 14:48:54,778 - INFO - filter pcap by ngap protocol finished, now start dectypting!

Exception in thread Thread-1 (main_test):
Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "C:\Program Files\Python311\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "C:\User\Downloads\python\5G_NAS_decipher_3gpp_standard.py", line 573, in main_test
    self.capture = pyshark.FileCapture(self.filtered_file_name, display_filter='nas-5gs')
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\pyshark-0.6-py3.11.egg\pyshark\capture\file_capture.py", line 38, in __init__
    super(FileCapture, self).__init__(display_filter=display_filter, only_summaries=only_summaries,
  File "C:\Program Files\Python311\Lib\site-packages\pyshark-0.6-py3.11.egg\pyshark\capture\capture.py", line 88, in __init__
    self._setup_eventloop()
  File "C:\Program Files\Python311\Lib\site-packages\pyshark-0.6-py3.11.egg\pyshark\capture\capture.py", line 170, in _setup_eventloop
    current_eventloop = asyncio.get_event_loop_policy().get_event_loop()
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\asyncio\events.py", line 677, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'Thread-1 (main_test)'.
Jakubkmn commented 3 weeks ago

Have you managed to get rid of this error?