V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
niseceric
V2EX  ›  macOS

OSX El SIP 真是讨厌

  •  
  •   niseceric · 2015-10-01 15:11:23 +08:00 · 6925 次点击
    这是一个创建于 3122 天前的主题,其中的信息可能已经有所发展或是发生改变。
    proxychains 跪了

    什么#!/bin/sh 死死死

    算了 关了 rootless 算了
    第 1 条附言  ·  2015-10-01 15:56:14 +08:00
    /usr/bin/env * 全灭
    第 2 条附言  ·  2015-10-01 16:36:41 +08:00
    恢复模式下 csrutil enable --without debug
    终于又能愉快注入 dyld 了~~~
    11 条回复    2019-10-18 10:58:08 +08:00
    ynyounuo
        1
    ynyounuo  
       2015-10-01 15:59:12 +08:00
    https://developer.apple.com/videos/wwdc/2015/?id=706

    好处多了去了,苹果不会干没有卵蛋用的事儿
    不过当然可以关掉,部分应用只需要 --withou debug 就好了
    jade88
        2
    jade88  
       2015-10-01 18:54:37 +08:00
    proxifier 可以用啊
    Totoria
        3
    Totoria  
       2015-10-01 19:10:39 +08:00
    EI EL 傻傻分不清
    hedaors
        4
    hedaors  
       2015-10-01 19:37:49 +08:00
    @Totoria 楼主写的是对的,是 EL (L 是小写)。
    WildCat
        5
    WildCat  
       2015-10-01 19:44:09 +08:00
    csrutil enable --without debug

    csrutil disable
    有什么区别? enable 也能用 proxychains?
    refear99
        6
    refear99  
       2015-10-01 19:44:13 +08:00
    csrutil enable --without debug 和 csrutil disable 请问作用上有什么区别呀
    niseceric
        7
    niseceric  
    OP
       2015-10-01 21:52:03 +08:00   ❤️ 2
    @WildCat
    @refear99

    http://www.v2ex.com/t/225061
    虽然没人回复

    Apple Internal: enabled
    Kext Signing: enabled
    Filesystem Protections: enabled
    Debugging Restrictions: enabled
    DTrace Restrictions: enabled
    NVRAM Protections: enabled

    disable 是把 5 个都关了。。。

    目测 proxychains 之类的需要加入 LD_PRELOAD 进行动态 HOOK
    debug 那个就是保护了关键路径上的 bin 不被劫持

    其他都是字面意思

    保护的只有 rootless.conf 定义的目录文件
    refear99
        8
    refear99  
       2015-10-01 21:59:53 +08:00
    那请问只 without debug 的话, proxychains 应该也是用不了的对么?
    @niseceric
    niseceric
        9
    niseceric  
    OP
       2015-10-01 22:15:20 +08:00
    @refear99 ...必须用得了啊。。。否则我发这个帖子的附言 2 不是没意义了。。。亲测。。。
    shajiquan
        10
    shajiquan  
       2015-10-02 16:03:08 +08:00
    我直接全部 disable 。
    kk580kk
        11
    kk580kk  
       2019-10-18 10:58:08 +08:00
    首先,有个软件
    https://github.com/rofl0r/proxychains-ng

    可以完成代理
    Gitl clone https://github.com/rofl0r/proxychains-ng.git
    然后编译
    ./configure --prefix=/usr/local --sysconfdir=/etc
    sudo make install
    于是会在 /usr/local/bin/proxychains4 安装好
    然而直接使用
    /usr/local/bin/proxychains4 curl -v -L https://ip.cn/
    发现返回值
    {"ip": "117.144.123.128", "country": "上海市", "city": "移动”}
    并没有生效

    通过安装
    brew install curl
    然后执行
    /usr/local/bin/proxychains4 /usr/local/opt/curl/bin/curl -v -L https://ip.cn
    发现成功切换到了美国
    {"ip": "198.11.180.71", "country": "美国", "city": "阿里云”}
    最后
    echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.zshrc

    这样就可以不用关闭 SIP 也可以用 proxychains-ng
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1480 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 23:58 · PVG 07:58 · LAX 16:58 · JFK 19:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.