Skip to content

Modify Laucher and Executable names #75

@w0nd3r365

Description

@w0nd3r365
  • OS = Kali Linux rolling 2023.2
  • Python 3.11.2
  • exodus-bundler 2.0.4 (From pipx, no --version option in exodus)
  • Binary = /usr/bin/kmod
  • readelf -a /usr/bin/kmod output = readelf-kmod.txt

I created an exodus bundle for kmod program using the following command:

exodus --shell-launchers -o kmod-bundle.tgz -t -v -a /usr/lib/libkmod.la -a /usr/lib/libkmod.so -a /usr/lib/libkmod.so.2 -a /usr/lib/libkmod.so.2.4.0 /usr/bin/depmod /usr/bin/insmod /usr/bin/kmod /usr/bin/lsmod /usr/bin/modinfo /usr/bin/modprobe /usr/bin/rmmod

kmod and its symlinks failed to run, terminating with 254 status code. kmod verifies its argv[0] using program_invocation_short_name() to determine what it will run as, kind of like busybox. To fix this, I renamed launcher scripts in exodus/bundles/3d77fd2.../<launcher> to add a .sh suffix. Then I renamed exodus/bundles/3d77fd2.../<progname>-x to remove -x suffix, hence regaining their original names. I edited the launcher scripts to remove the -x suffix accordingly. This is why I used --shell-launchers instead of binary ones. I then re-symlinked launcher scripts from exodus/bundles/3d77fd2.../<launcher>.sh to exodus/bin/<progname> so they would point to they newly renamed launchers. kmod worked just fine after that.

My suggestion is that launcher files in exodus/bundles/<hash>/<launcher> have a .sh suffix if shell-based or .bin suffix if binary. This way the ported programs in exodus/bundles/<hash>/<progname> will have their original names, incase they use it to determine what to run as. The symlinks to launchers in exodus/bin/<progname> will also have the same original names as the programs ported, so user experience will not be impacted. Also, a --version option would be great in exodus.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions