第 5 课,共 8 课 · 8 分钟
Application-layer filtering: why port 443 proves nothing
Almost everything travels over HTTPS on port 443, including attackers’ traffic. Learn why filtering by app identity beats filtering by port, what a firewall can learn from an encrypted connection without decrypting it, and where that stops.
此页面暂时只有英文版。
Classic firewall rules were written in ports: allow 80 and 443 for the web, 25 for mail, block the rest. That made sense when each service had its own port. Today, almost every app speaks HTTPS on port 443: browsers, chat apps, update checkers, analytics libraries, and attackers too. MITRE ATT&CK documents this under T1071, Application Layer Protocol: command-and-control traffic deliberately blends into ordinary web traffic so a port rule cannot tell them apart.
Filtering by application, not by port
NIST’s firewall guidelines (SP 800-41) describe application-aware filtering as a step beyond packet and port rules. On an endpoint, the most useful application attribute is identity: which program opened the connection. On macOS, that identity can be verified through the app’s code signature, which ties it to a developer and makes it hard to impersonate.
- A rule like “Zoom may reach zoom.us” is meaningful; “port 443 is allowed” is not.
- If identity is checked by signature, a fake app called “Zoom” does not inherit Zoom’s rules (MITRE ATT&CK T1036, Masquerading).
- An unsigned program, or one whose signature is broken, is a strong signal on its own.
What an encrypted connection still reveals
Encryption hides the content of a connection, but not everything around it. Before encryption starts, most TLS connections announce the name of the site they want in the Server Name Indication field (SNI), defined in RFC 6066. DNS lookups, unless they are themselves encrypted, reveal which names an app asked for. And some traffic still travels in the clear.
There is another path, TLS interception: installing a trusted root certificate so a security tool can decrypt and re-encrypt everything. It sees more, but it becomes a very attractive target, weakens the encryption guarantees apps rely on, and breaks apps that pin their certificates. For a personal device, it is usually the wrong trade.
How FireAI inspects without decrypting
FireAI identifies every app by its code signature and matches rules by app and destination. It does not install a root certificate and never reads the inside of an encrypted connection. It looks only at what a connection announces before encryption starts, or what is already sent in the clear:
- Secure connections: it reads the site name announced in the TLS handshake and blocks it if a threat list you turned on names it.
- Unencrypted secrets: it blocks unencrypted web requests carrying card numbers, bank details, passwords or keys before they leave the Mac.
- Hidden data in lookups: it blocks a technique that smuggles data out disguised as DNS lookups (MITRE ATT&CK T1071.004).
- It reads DNS answers to attach real host names to apps that connect by IP address.
Where it stops
Newer standards narrow this view on purpose. Encrypted Client Hello (ECH), being standardised at the IETF, hides the site name inside the handshake, and encrypted DNS hides lookups. As they spread, name-based inspection sees less, and app identity plus destination address become even more important. The blog article on ECH and DNS-over-HTTPS goes deeper into what that means for firewalls.
Try it: read an app’s identity
You can see the identity a firewall relies on. In Terminal, the read-only command codesign -dv --verbose=2 followed by the path of an app (for example /Applications/Safari.app) prints its identifier and the team that signed it, and spctl --assess -vv on the same path says whether Gatekeeper accepts it and why. Try it on an app you downloaded recently. The blog guide on reading code signatures and notarisation from Terminal walks through the output line by line.
Then think about what a rule should say. “This app, signed by this developer, may reach these names” survives an attacker renaming a file or copying an icon. “Anything on port 443 is fine” survives nothing.
Layers, not a silver bullet
None of these checks is sufficient alone, and each one fails differently. Identity rules fail if a trusted app is itself compromised. Name inspection fails when names are hidden or when an attacker uses a legitimate service. Threat lists only know what has already been reported. Plaintext checks only see what is sent unencrypted. Used together, they cover more of each other’s gaps, which is the same layered reasoning the course on layers of security applies to the whole system.
要点
- Port 443 carries almost everything, including attackers’ traffic: a port rule proves nothing.
- App identity, verified by code signature, is the most useful attribute on an endpoint.
- An encrypted connection still reveals its announced site name (SNI) and, often, its DNS lookups.
- FireAI inspects only what is announced or sent in the clear; it never decrypts and installs no root certificate.
- ECH and encrypted DNS shrink name-based inspection, making app identity more important.
自我检测
1. Why is “allow port 443” a weak rule today?
- Port 443 is rarely used
- Almost all apps, and attackers, use HTTPS on 443, so it can’t tell them apart — 正确。
- Port 443 is always blocked by routers
- It only works for email
Attackers deliberately use common web protocols so their traffic looks ordinary (MITRE ATT&CK T1071).
2. What can a firewall read from an HTTPS connection without decrypting it?
- The full page contents
- The passwords typed on the page
- The site name announced in the TLS handshake (SNI), when it isn’t hidden — 正确。
- The cookies
SNI is sent before encryption starts, unless Encrypted Client Hello hides it.
3. Why does FireAI avoid TLS interception with a root certificate?
- It is illegal everywhere
- It creates a high-value target, weakens encryption guarantees and breaks certificate-pinned apps — 正确。
- It makes the Mac faster
- Apple requires it
Decrypting everything trades one risk for another; FireAI inspects only what is announced or in the clear.
用 FireAI 动手做
在你自己的 Mac 上练习这节课的内容。
- FireAI 如何监视你 Mac 上的连接 — 清楚知道哪个应用在联网,用大白话说明白,而无需安装任何以隐藏后台服务方式运行的东西。
- 规则:应用、网站、域名、IP 或地址段,永久生效或直到重启 — 写一条规则,精确到单个地址,或宽泛到整个域名,任你选择。
- 自动驾驶:FireAI 替你决定简单的连接请求 — 让 FireAI 自主处理简单的决定,你随时能看到原因。
- 深度检测,无需解密任何内容 — 获得关于安全连接的真实细节,而 FireAI 从不会读取其中的内容。
- 安全模式:居家、咖啡店、偏执、遭受攻击 — 轻触一下,就能让 FireAI 的严格程度匹配 Mac 实际所在的场景。
- Coffee Shop Armor: safer on public Wi-Fi, and warned about fake networks — Sit down in any café, hotel or airport and let FireAI tighten up for you.
- 世界地图 — 直接看到你的数据实际去了哪里,而不是一个还得自己去查的主机名。
- 问 FireAI:用大白话下指令,而不是填表单 — 输入一句话就能改变 FireAI 的行为,不用在菜单里翻找。
- 调查一条连接 — 凭摆在眼前的事实做决定,而不是一句含糊的警告。
来源
- NIST SP 800-41 Rev. 1: Guidelines on Firewalls and Firewall Policy
- MITRE ATT&CK T1071: Application Layer Protocol
- MITRE ATT&CK T1071.004: DNS
- MITRE ATT&CK T1036: Masquerading
- RFC 6066: TLS Extensions (Server Name Indication)
- IETF: TLS Encrypted Client Hello (draft)
- Apple Developer: Code Signing Services
- FireAI docs: Deep inspection, without decrypting anything
- FireAI docs: Per-app rules
在你的 Mac 上实践
免费试用全部功能 17 天,无需绑定银行卡。