V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Neoth

Little Snitch(官方隐藏)防火墙规则设置不当,将出现严重泄漏

  •  1
     
  •   Neoth · Jan 18, 2020 · 6868 views
    This topic created in 2294 days ago, the information mentioned may be changed or developed.

    MacOS 上著名防火墙软件 Little Snitch,下面简称 LS,使用中发现并不能监控本地 PAC 代理,进一步发现默认设置的 LS 不能监控或过滤所有本机流量,推测是产品设计故意隐藏,毕竟有相当多本地 127.0.0.1 上的端口之间通讯不需要用户知情。

    但这给所有使用本机 proxy 的用户带来相当大泄漏风险 -- 你以为开着防火墙和 PAC 代理,但只要 PAC 代理文件内设置了目标 hostname 或 IP,app 访问流量就会直接通过本地代理偷偷走掉了。

    进一步和 LS 的技术团队沟通后,发现使用本地代理,并同时使用 PAC 的用户,在 LS 自带的 little snitch network monitor 里看到通过本机 PAC 走的流量同样被“误导性”的记录为远程目标,而没有任何它是从本机 PAC 代理跑掉的相关信息。

    下面是 LS 技术支持目前给出的解决方式:

    as for your question, there is a hidden rule that allows localhost connections. But you can for example create a High Priority Ask Rule to get over it. E.g. with this rule you get a connection alert for processes from your user, which connect to localhost (e.g. ssh localhost, if SSH is active):

    • action: ask
    • direction: outgoing
    • priority: high
    • process: any
    • owner: me
    • destination: 0.0.0.0, 127.0.0.1, ::-::1

    But with such rules you should be careful. Processes usually do not assume that connections to localhost will be blocked for a long time, i.e. while the connection alert is pending.

    简单来说,目前的方法是如上设置一个 high priority 的 ask 规则,用来每个连接进行确认,我测试过,如果不设置 hight priority,这条规则完全无效 <<-- 这也是好大一个坑

    另外对于每个 app 进行设置 Deny any incoming connection,即便提高到 high priority,并 global,依然无效,流量依然会通过本地端口跑掉 <<-- 这是更大一个坑

    13 replies    2022-11-28 13:29:10 +08:00
    Neoth
        1
    Neoth  
    OP
       Jan 18, 2020
    - action: ask
    - direction: outgoing
    - priority: high
    - process: any
    - owner: me
    - destination: 0.0.0.0, 127.0.0.1, ::-::1

    如上设置。
    Neoth
        2
    Neoth  
    OP
       Jan 18, 2020
    又发现进一步的 bug,
    proxychains4 使用本机 proxy 情况下,在 little snitch 里无法被跟踪监控,无法过滤
    。。。。
    littiefish
        3
    littiefish  
       Jan 18, 2020 via iPhone
    mac 也需要防火墙?
    我 win 都一直裸奔,补丁也没打过
    icyalala
        4
    icyalala  
       Jan 18, 2020
    @littiefish 这个主要是监控和阻止 App 向外联网的
    Neoth
        5
    Neoth  
    OP
       Jan 18, 2020
    深度用过才知道,不同 app 作者的水平和意图不同,甚至包括 apple 系统,都有大量的 「隐私泄漏」
    更何况今天发现,很多 app 或 PAC 方式会泄漏。。。。真是。。。。想不到啊,little snitch 你也有今天
    0xroot
        6
    0xroot  
       Jan 18, 2020
    路由器上挂代理可解决
    kimdir
        7
    kimdir  
       Jan 18, 2020
    @Neoth 楼主没找到可以设置的地方呢?
    loading
        8
    loading  
       Jan 18, 2020
    如果默认堵掉 127 估计很多软件直接说不兼容 LS,然后 LS 就会被垃圾桶了。
    Neoth
        9
    Neoth  
    OP
       Jan 19, 2020
    @loading 实测,并没有太多 system 级别的需要连 127,作客户端而不是服务器,用了一天了,还不到 10 个,但作为漏洞,LS 这个锅太大了

    @kimdir 你再用用 LS 再说吧,这事儿就在和尚头上爬着个苍蝇一样

    @0xroot 对于 LS 这种能够跟踪程序 hash 的高级防火墙来说,你这种妥协用法就是在糟蹋好东西
    YY
        10
    YY  
       Jan 19, 2020
    怎么设置 priority: high 啊?
    qgy18
        11
    qgy18  
       Jul 18, 2020
    我也遇到了这个问题,不过还好 Surge3 可以设置允许哪些应用使用代理。
    tuochenlyu
        12
    tuochenlyu  
       Jul 19, 2020
    正要入 little snitch,来 V2 上一看犹豫了
    Exp
        13
    Exp  
       Nov 28, 2022
    @Neoth #1 Little Snitch 5 自建规则貌似不能设置 priority: high?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   835 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 21:12 · PVG 05:12 · LAX 14:12 · JFK 17:12
    ♥ Do have faith in what you're doing.