packing-box / docker-packing-box

Docker image gathering packers and tools for making datasets of packed executables and training machine learning models for packing detection
GNU General Public License v3.0
49 stars 10 forks source link

`KeyError` on `packer upx /path/to/file.exe` #79

Closed rjzak closed 1 year ago

rjzak commented 1 year ago

I ran docker system prune -a to make sure everything would be pristine. I updated to the latest commit, c88a26e5, and rebuilt.

┌──[user@packing-box]──[/mnt/share]────────
$ packer --help
Traceback (most recent call last):
  File "/home/user/.opt/tools/packer", line 24, in <module>
    parser.add_argument("-A", "--alteration", choices=Alterations.names(), action="extend", nargs="*",
                                                      ^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/pbox/common/alterations/__init__.py", line 114, in names
    l.extend(list(Alterations.registry[c].keys()))
                  ~~~~~~~~~~~~~~~~~~~~^^^
KeyError: 'ELF32'

──[user@packing-box]──[/mnt/share]────────                                                                                                                                                                      ────[172.17.0.2]──[19:52:41]────
$ packer upx hello.x86.exe --prefix "upx_"
Traceback (most recent call last):
  File "/home/user/.opt/tools/packer", line 24, in <module>
    parser.add_argument("-A", "--alteration", choices=Alterations.names(), action="extend", nargs="*",
                                                      ^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/pbox/common/alterations/__init__.py", line 114, in names
    l.extend(list(Alterations.registry[c].keys()))
                  ~~~~~~~~~~~~~~~~~~~~^^^
KeyError: 'ELF32'
dhondta commented 1 year ago

Hi @rjzak ! Thank you for mentioning this and sorry for the long response delay. This should have been fixed in the meantime with the latest improvements. Can you retest and give me feedback, please ?

rjzak commented 1 year ago

Sorry... I haven't forgotten but haven't had a chance to try again.

dhondta commented 1 year ago

No worry ! Since then, I made significant changes anyway that should have fixed the issue. However, I figured out yesterday evening that there is another bug that makes execution of the daraset tool.