rofl0r / rofl0r/proxychains-ng
proxychains-ng should support both 32-bit and 64-bit binaries
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 10.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
proxychains-ng does not play nice with different archs. When I try to run a 64-bit program, it works:
$ proxychains4 /usr/bin/fc-cat 2>&1 | grep proxy
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib64/libproxychains4.so
[proxychains] DLL init: proxychains-ng 4.10
But this is what I get with 32-bit program:
$ proxychains4 /usr/bin/fc-cat32 2>&1 | grep proxy
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib64/libproxychains4.so
ERROR: ld.so: object '/usr/lib64/libproxychains4.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
It would be nice if proxychains-ng to not specify full path in its LD_PRELOAD. This would allow any 32-bit or 64-bit program to select its own version of libproxychains4.so. I extracted libproxychains4.so from a 32-bit compilation and installed it together with the full 64-bit proxychains-ng.
$ file /usr/bin/fc-cat32; LD_PRELOAD=libproxychains4.so /usr/bin/fc-cat32 2>&1 | grep proxy
/usr/bin/fc-cat32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.0.0, BuildID[sha1]=bc52842b8a98bfc79fc36a63a1ac91554d5f2249, stripped
[proxychains] DLL init: proxychains-ng 4.10
$ file /usr/bin/fc-cat32; LD_PRELOAD=libproxychains4.so /usr/bin/fc-cat 2>&1 | grep proxy
/usr/bin/fc-cat32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.0.0, BuildID[sha1]=bc52842b8a98bfc79fc36a63a1ac91554d5f2249, stripped
[proxychains] DLL init: proxychains-ng 4.10
Also, it would be nice to have a ./configure or Makefile argument that allows to compile 32-bit version of libproxychains4.so when compiling proxychains-ng for 64-bit. This would help packagers.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how proxychains4 sets LD_PRELOAD for the commands shown, then review the configure/Makefile options requested for producing a 32-bit library alongside a 64-bit build. Done means both 32-bit and 64-bit dynamically linked programs select a compatible proxychains library and packagers can request the additional 32-bit build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- build-system, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100