proxychains-ng icon indicating copy to clipboard operation
proxychains-ng copied to clipboard

csrutil disabled, built from source, still got warning

Open aeroxy opened this issue 7 years ago • 5 comments

warning: could not load inserted library '/usr/local/lib/libproxychains4.dylib' into library validated process because no suitable image found.

How to produce:

High Sierra 10.13.6

git clone https://github.com/rofl0r/proxychains-ng
cd proxychains-ng
./configure --prefix=/usr/local --bindir=/usr/local/bin --libdir=/usr/local/lib --fat-binary
make
sudo make install

Then I edited config file (/etc/proxychains.conf) to:

strict_chain
proxy_dns
remote_dns_subnet 224
tcp_read_time_out 15000
tcp_connect_time_out 8000
localnet 127.0.0.0/255.0.0.0
[ProxyList]
socks5 127.0.0.1 1080

Noted that at this point I already disabled SIP.

When I run proxychains4 git clone I still get warning: could not load inserted library '/usr/local/lib/libproxychains4.dylib' into library validated process because no suitable image found.

aeroxy avatar Aug 06 '18 07:08 aeroxy

anyone got an idea what's causing this and how to fix it ? help welcome.

rofl0r avatar Aug 07 '18 03:08 rofl0r

Note if I run proxychains4 curl google.com similar error would not occur.

aeroxy avatar Aug 07 '18 15:08 aeroxy

what's the difference between curl and git ? is one shipped with mac os, vs the other installed via brew ? where are the binaries located ?

rofl0r avatar Aug 08 '18 05:08 rofl0r

Same problem here.

I'm using macOS 10.14.2 and I have SIP completed disabled. Running proxychains4 with /usr/bin/git still prints the warning messages and does not work.

> proxychains4 /usr/bin/git pull 
[proxychains] config file found: /Users/simon/.proxychains/proxychains.conf
[proxychains] preloading /usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib
dyld: warning: could not load inserted library '/usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib' into hardened process because no suitable image found.  Did find:
        /usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib: code signature in (/usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
        /usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib: stat() failed with errno=1
dyld: warning: could not load inserted library '/usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib' into hardened process because no suitable image found.  Did find:
        /usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib: code signature in (/usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
        /usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib: stat() failed with errno=1
dyld: warning: could not load inserted library '/usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib' into hardened process because no suitable image found.  Did find:
        /usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib: code signature in (/usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
        /usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib: stat() failed with errno=1

The output mentions "Library Validation" which looks like another layer of protection and I can't find ways to easily disable it. (see https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_disable-library-validation)

I can install git from brew to workaround it.

#303 seems to be the same problem.

yume-chan avatar Nov 27 '19 10:11 yume-chan

Try sudo defaults write /Library/Preferences/com.apple.security.libraryvalidation.plist DisableLibraryValidation -bool true, it works for my macOS Big Sur.

Ref: https://www.macenhance.com/docs/general/sip-library-validation.html

malash avatar Sep 11 '21 16:09 malash