On Security
\ __ /
Case Study
Proxy
/ > SS 首先开启了易用的用户态加密TCP代理的模范 , 但是很快就出了好几个密码工程的错误 , 这提醒我们没事不要重新发明密码协议 , 为何不用TLS呢 V2 的一部分也在多少重新发明密码协议
Jan 6, 2019
SS 目前没有包长度混淆 , 要检测它并不需要机器学习 , 手动写一个代码都可以做到 , 原因是它运载的流量一大部分是TLS , 而TLS握手有固定的包长度. SS又再额外添加了一些包头 , 形成了独特的包长分布 , 因此运载TLS流量的SS是极易检测
SSR在这基础上添加了包长度混淆 , 一个明显的反驳是 , 如果包长度的随机分布呈现一个明显的均匀分布 , 那一个简单的熵就可以检测出来 , 对此 , 不如直接从运载流量中提取分布 , 就没有内生熵特征的问题了 , 包长度混淆这个技术依然是合理的
SSRR之后试图实现若干 “高级” 的伪装协议 , 网络安全界早有结论 : 模仿协议反而会暴露出更多可以检测的特征 , 例如SSR里面歪用TLS的技巧 , V2的http伪装 , 本身都暴露更大的特征
在反主动指纹识别上 , SS也出过错 , 解决方法是尽量减少用户认证前透露的信息 , 但根本问题不在于能少透露多少信息 , 问题在于这几个代理工作在传输层上 , 但传输层上的常见实现及其特征是很少的 , 唯一彻底避免主动指纹识别的方法是用一个真的常见应用 ( 例nginx ) 作为前端
TLS的确比自行发明密码协议好一些 , 但是TLS协议栈的被动指纹特征又非常明显 , go有它的指纹特征 , openssl 等等特征都不同 , Tor之前被查封就是因为使用了固定的特征 , 后来用了Firefox的特征依然被一款防火墙查封 , 原因是 : 没人用 ( 该版本 ) 的Firefox , 这里唯一的办法是跟进主流浏览器的特征
SS等等不使用TLS的根源来自性能架构 : 如果用户每一个TCP连接翻译成往外的一个连接 , 如果用TLS连接发起时间会很高 , 这反映出常见代理在架构设计上缺乏大规模生产环境的经验指导 , SS/V2 还在努力实现Fast Open的时候 , Chrome 已经把 Fast Open 的代码删除了 , 因为现实世界这个功能不工作
高性能TLS的方法是连接池复用 , 长连接 , 预连接 , 多路复用 , 最终TLS握手的成本被均摊掉了 , 见Chrome网络栈的经验 https://web.archive.org/web/20160305002536/https://insouciant.org/tech/connection-management-in-chromium/
取代TLS/HTTP/2的下一代协议QUIC看目前的进度希望在一两年内能完成标准化 , Chrome早就内置了QUIC代理 , 但现在市面上还没有公开的QUIC代理服务器 , Caddy有望 , 不过它暂时还不工作 , 至于KCP也号称是UDP上的高性能协议 , 但它连协议定义都没有 , 于是无法评价
Sino DNS
https://v2ex.com/t/838579 三星港版之前也硬编码 114dns , 后面系统更新取消了这个设置 根本不需要反编译 在路由器防火墙上加条 LOG 规则就能看到 移动 刚需 : 手机 & 树莓派 当 路由器 , DNS
WeShit
weshit moments picture dns analytics route is different from those in the articles published
tags: Anti-Censorship Surveillance Capitalism
WeChat is watching you and much more
I should say, OpenWrt-flashed 4G router & virtual machine (as an android emulator, regardless of the risk of account prohibition) & proxy (... have some security problems (ref to be filled), I personally recommend ... // do not invent your protocol ), solely for chatting through WeChat is not a high benefit-to-cost-ratio method;
// 匿名 (2020年7月1日) : 不知道作者本人是否长期通过虚拟机使用微信,因为看过一些其他用户反馈这会增大帐号被锁的风险,所以对此表示怀疑。同时关键的手机号注册,银行卡绑定(加入大型群组必需)等问题没有提到,这样使用微信其实没有多大价值,完全可以通过桥接机器人推送到其他安全的即时通讯应用上(但是不管怎样使用微信肯定是不安全的)。而且不在手机上的微信对于习惯使用的用户来说简直寸步难行。 // 个人建议大多数读者应当尽量放弃不是真正必要的微信使用(就目前来说应该还很少有这种情况,因为基本都有替代方案,只是相对麻烦),实在无法脱离的可以考虑购买其他人注册的帐号,同时在物理层面进行隔离(单独一个手机进行操作,不使用时进行金属信号屏蔽,不放心的可以考虑拆除摄像头与麦克风及其它传感器或者直接购买功能残缺的手机) // 总的来说,不得不泼个冷水,个人以为文中提到的策略实际使用面太窄,仅仅是用来通讯的情况下可能有用,但这样的话不如直接换用其他通讯工具来的省心。
DeepSeek android
/ > Hardcoded device model lists suggest the application may behave differently depending on the detected hardware. https://michael.bacarella.com/2025/02/07/static-analysis-of-the-deepseek-android-app/
编译器 逆向工程的 ( 专家 ) 不会 被 AI 替代
/1. https://dl.acm.org/doi/fullHtml/10.1145/3689535.3689554
xz /2. https://gist.github.com/smx-smx/a6112d54777845d389bd7126d6e9f504 > 技术水平细致程度 &「隐忍」「前人种树 后人乘凉 功成不必在我 风物长宜放眼量」的远见卓识 https://mp.weixin.qq.com/s/KzIhfGwKygcKUrlN42dv-Q
/3. https://www.jeremykun.com/2023/02/13/googles-fully-homomorphic-encryption-compiler-a-primer/
pinduoduo
https://github.com/davinci1012/pinduoduo_backdoor_unpacker
https://finance.sina.cn/2021-01-13/detail-ikftpnnx6435218.d.html
Zoom
Bvp47 美国 NSA 方程式的顶级后门 技术细节
https://www.pangulab.cn/files/The_Bvp47_a_top-tier_backdoor_of_us_nsa_equation_group.zh-cn.pdf
======
Kernels
https://news.ycombinator.com/item?id=23255642
https://forums.gentoo.org/viewtopic-p-8693830.html?sid=62babf16812abf0d0ff3c521ebffe5e4
Microkernels
Having vastly smaller amounts of code in the kernel makes it easier to find and fix bugs/security issues more efficiently. Andrew Tanenbaum (author of MINIX) stated that for every 1,000 lines of properly written code, there is a bug. This means that for a monolithic kernel with nearly 25,000,000 lines of code, there could be nearly 25,000 bugs. A microkernel with only 16,000 lines of code would mean that around 16 bugs exist.
https://doc.redox-os.org/book/ch01-05-how-redox-compares.htmlhttps://gitlab.redox-os.org/nandi/book/-/blob/master/src/ch01-05-how-redox-compares.md
Securing Operating Systems using Hardware-Enforced Compartmentalization https://dspace.mit.edu/bitstream/handle/1721.1/139903/Giannaris-yiannig-meng-eecs-2021-thesis.pdf?sequence=1&isAllowed=y
Combining Type Checking and Formal Verification for Lightweight OS Correctness https://arxiv.org/pdf/2501.00248
Pros and Cons of Turing-completeness
https://tex.stackexchange.com/questions/58042/are-there-any-disadvantages-of-tex-being-turing-complete – Hard to Analyse – High Demands on Engines – Low Fault Tolerance
https://news.ycombinator.com/item?id=22839035 > usually, a program is far harder to analyze than to run. I think that a better way to view the post's author's point is by unpredictability. Given a short program in a weak setting, we can not only predict what the program will do, but what the program cannot do, usually because it is too short or too simple. In a Turing-complete setting, though, there are short programs with very unpredictable behavior.
PS : Mathematical Screensavers
https://www.jwz.org/xscreensaver/screenshots/
https://boinc.berkeley.edu/wiki/BOINC_screensaver
https://news.ycombinator.com/item?id=39799755
======
Social engineering “Trust” | Game theory
“normal” people don't know and don't need to lever up their threat model (and corresponding costs)
https://www.nytimes.com/2021/05/17/technology/apple-china-privacy-censorship.html
/ > 大意是一种病毒把编译器做为感染的源头,最终感染了操作系统。在这个操作系统上,它会判断用户指令对它是否会造成伤害,如果是有害的指令,就假装执行一下,实际并不真执行,从而可以躲过杀毒软件和人工清除。 https://jhuo.ca/post/wall_infection_trust_cheating
/ > 生活里有许多东西 还没被写成算法 。我们还没有可靠的测谎软件——不论是针对面部、皮肤,还是大脑的。我们可以检测到异常,但我们检测不出这种异常的根源——撒谎、疲惫,紧张,它们表现得都差不多。当然,人类还能表现出并不存在的紧张情绪,让情况更加复杂。 https://mp.weixin.qq.com/s/ZWYR3DWGnG-DBELddZc98Q
/ > 奥威尔曾经天才似的想象出了无处不在的电屏,但是这其实完全没有必要,其实摧毁一个社会最为有效的方法恰恰是最为原始的方式——告密。禁止一个人讲话并不需要捏紧他的嘴,只要让他失去值得信任的听众就够了。儿子揭发父亲,夫妻互相监视……一旦人与人之间的 信任 纽带被斩断,以人性为基础的社会自然会发生雪崩式的坍塌。 https://douban.com/book/review/1463179
============
two major “tech” waves boosted with capitalism
- 1. web , front-end , cloud // attention-grasping economy & privacy surveillance : ad blocker , RSS & VPN , sino app
https://anvaka.github.io/map-of-github/#10.31/-19.0547/-34.1612
- 2. AI
============
Pass Crack
https://github.com/hashcat/hashcat
Avoids the use of ! and uses positive conditionals wherever possible (e.g., if (foo == 0) instead of if (!foo), and if (foo) instead of if (foo != 0))