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

能否保护剪贴板里的数据?

  •  
  •   ttgo · 2019-10-27 20:46:55 +08:00 · 6136 次点击
    这是一个创建于 1636 天前的主题,其中的信息可能已经有所发展或是发生改变。

    复制密码的时候,感觉很不安全啊。

    剪贴板的访问权限是否可控呢??

    比如禁止某些程序访问剪贴板,只可以通过 cmd+v 组合键粘贴进来。

    27 条回复    2019-10-30 04:22:35 +08:00
    bumz
        1
    bumz  
       2019-10-27 21:08:32 +08:00 via iPhone
    为什么要安装不受信任的程序

    开发环境全放 docker
    应用软件全放虚拟机
    wclebb
        2
    wclebb  
       2019-10-27 23:22:40 +08:00
    好像从 1password 复制后会一定的时间内自我消失。
    所以经常粘不了密码才发现。
    ftu
        3
    ftu  
       2019-10-27 23:38:27 +08:00 via iPhone
    1password,90s 清除从该软件内复制的剪贴板,很放心了
    geelaw
        4
    geelaw  
       2019-10-28 00:23:01 +08:00 via iPhone
    不能通过是否按键盘热键决定访问权限,因为 Cmd+V 粘出来结果的实现方式是每个进程自己决定在有人 Cmd+V 的时候去看剪贴板。

    如果你自己写一个操作系统当然是可以实现这个功能的,然而剪贴板通常是一个 session 里任何程序都可以访问的一个对象,这是设计使然。

    于是一个简单的做法是用 FUS,你准备两个账户,分别登录,则两个会话之间是不共享剪贴板的。
    lihongming
        5
    lihongming  
       2019-10-28 00:49:27 +08:00 via iPhone
    @ftu 1password 的做法恰恰说明后台程序是可以操作剪切板的,所以恶意程序也可以常驻后台监控你的剪切板

    个人感觉更好的方式是干扰,即经常往剪切板里放点貌似密码的字符串,让恶意程序获得大量无效数据,再配合安全策略(密码错 N 次就禁止再试),就可以有效防止密码被窃取了。
    anguiao
        6
    anguiao  
       2019-10-28 00:55:58 +08:00 via Android
    其实不必太过在意,前提是你不是每个应用都用同一个密码。这样就算剪贴板里的密码被读取了,也不知道是对应哪个服务的。
    Atomo
        7
    Atomo  
       2019-10-28 01:02:02 +08:00 via Android
    你不说,谁知道这是哪家的密码呢
    echo314
        8
    echo314  
       2019-10-28 01:35:39 +08:00 via iPhone
    使用密码管理工具自动填写,完美避开复制密码的操作。
    dawn009
        9
    dawn009  
       2019-10-28 04:25:26 +08:00
    的确是个问题。
    安全的方法是操作系统本身提供密码管理方案,就像苹果的「钥匙串」那样。
    n1dragon
        10
    n1dragon  
       2019-10-28 06:22:01 +08:00 via iPhone
    剪切板算是很小的攻击面了,1password 之前爆出来所有密码明文存在内存里可被任意非提权程序读取,而且官方轻描淡写,从那以后再也不信任 1p
    herexf
        11
    herexf  
       2019-10-28 08:18:21 +08:00 via Android
    三星安卓一笑而过,除了 root 没办法,而那些支付宝银行啥的,不停地看着你的粘贴板,要是只有支付宝和银行就好了…
    heganyuliang
        12
    heganyuliang  
       2019-10-28 08:54:48 +08:00 via Android   ❤️ 1
    @herexf appops 可以禁用剪贴板权限,无需 root
    imn1
        13
    imn1  
       2019-10-28 08:56:57 +08:00
    如果大数据样本足够,是可以估算的
    很简单,根据你跑流量的数据,以及该时段固定出现在剪贴板的字符串,应该能 8 成匹配成功
    反正我是没办法应付这种“为了提升用户体验”的功能

    只是,能这样长时间获取数据的,除了手机商 / 运营商 / 输入法外,只有少数几家能做到,所以重点是切断它们的常驻后台能力
    itning
        14
    itning  
       2019-10-28 09:57:51 +08:00
    Ctrl+C 复制到剪贴板的时候自动加密下,Ctrl+V 自动解密? 剪贴板中的内容是加密的,别人获取了也破解不了?
    Mutoo
        15
    Mutoo  
       2019-10-28 09:59:56 +08:00   ❤️ 1
    这样的话「复制这段文字,打开吱护裱搜索 blah blah blah 」要怎么办。
    herexf
        16
    herexf  
       2019-10-28 12:28:55 +08:00 via Android
    @heganyuliang 需要用到 Shizuku 吗
    heganyuliang
        17
    heganyuliang  
       2019-10-28 14:35:55 +08:00 via Android
    @herexf 需要
    Wolther47
        18
    Wolther47  
       2019-10-28 15:03:19 +08:00 via iPhone
    @n1dragon #10 什么时候的新闻,有链接吗?
    herexf
        19
    herexf  
       2019-10-28 15:47:44 +08:00 via Android
    @heganyuliang 多谢,回家试试,客户电脑搞不起来 adb,监控的厉害
    n1dragon
        20
    n1dragon  
       2019-10-28 16:20:27 +08:00
    @Wolther47 https://www.zdnet.com/article/critical-vulnerabilities-uncovered-in-popular-password-managers/

    > 1Password7: The current release of the software, in the security researcher's opinion, is "less secure" than the legacy version. Rather than only keeping one entry at a time in memory, this version of 1Password decrypted all individual passwords in a database upon testing, and also did not scrub individual passwords, the master password, or the secret key used to derive the encryption key when moving from the unlocked state to locked.

    > "This renders the "lock" button ineffective; from the security standpoint, after unlocking and using 1Password7, the user must exit the software entirely in order to clear sensitive information from memory as locking should," the researchers added.
    skies457
        21
    skies457  
       2019-10-28 17:38:38 +08:00
    @n1dragon #20
    读内存需要 root 权限吧
    Leonard
        22
    Leonard  
       2019-10-28 17:54:37 +08:00
    苹果全家桶的话直接 iCloud 钥匙串就行了,不用复制直接自动填充了,完美规避这个问题
    n1dragon
        23
    n1dragon  
       2019-10-29 04:18:26 +08:00 via iPhone
    @skies457 对 1password 来说不需要,研究人员用未提权的程序直接读出了主密码、secret key、以及所有储存的密码,即使 1password 已经 lock

    简而言之,1password 就是一个玩具。
    skies457
        24
    skies457  
       2019-10-29 20:23:58 +08:00
    @n1dragon #23
    未提权的程序不可能读到别的程序的内存,除非系统有漏洞
    n1dragon
        25
    n1dragon  
       2019-10-29 21:07:24 +08:00 via iPhone
    @skies457 可以读取的 研究人员甚至做出了 proof of concept

    As stated before, all secrets are exposed by 1Password7 when in an unlocked and locked state. To demonstrate the severity of this issue we created proof of concept code to read 1Password7’s memory address space to extract these items. The proof of concept applications ran in the existing user context (which was an ordinary non-administrative user).

    原文见此: https://www.ise.io/casestudies/password-manager-hacking/
    skies457
        26
    skies457  
       2019-10-29 22:04:00 +08:00
    @n1dragon #25

    https://support.1password.com/kb/201902a/

    > The report describes a specific and unlikely attack. An attacker must be able to read memory when 1Password for Windows is locked without being able to read it when it is unlocked. If someone has this level of access to your computer, there are many simpler ways they can steal secrets.
    n1dragon
        27
    n1dragon  
       2019-10-30 04:22:35 +08:00 via iPhone   ❤️ 1
    @skies457 当 1p 解锁的时候当然更能读取,这里他们只是狡辩说攻击只针对锁定后的程序,其实不然。

    报告已经明确说了可以非提权读取,官方也没有否认。我自己也能通过非管理员状态下的 process explorer 直接看到密码。

    之所以 1p 无法清除内存有两方面原因,一是他们用的 c#语言没有直接管理内存的机制,导致只要读取了就没办法直接释放。二是 1p 的索引功能需要解密所有数据,包括密码本身,如果只解密用户看到的数据会影响软件功能。所以至始至终他们都在轻描淡写,不正视问题。

    目前在 windows 平台上,同一用户账户下运行的任何程序在技术上都能读取 1p 里面的所有密码,包括主密码、secret key,即使用户锁定 1p 也没有用。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1007 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 19:00 · PVG 03:00 · LAX 12:00 · JFK 15:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.