<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Security on MeerStory</title><link>https://linux.meerstory.com/zh/categories/security/</link><description>Recent content in Security on MeerStory</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Fri, 27 Nov 2026 01:44:22 +0900</lastBuildDate><atom:link href="https://linux.meerstory.com/zh/categories/security/index.xml" rel="self" type="application/rss+xml"/><item><title>Linux apgbfm 实战：利用布隆过滤器构建弱口令高速校验防线</title><link>https://linux.meerstory.com/zh/ubuntu/20261127_014343_440/</link><pubDate>Fri, 27 Nov 2026 01:44:22 +0900</pubDate><guid>https://linux.meerstory.com/zh/ubuntu/20261127_014343_440/</guid><description>&lt;h2 id="概述">概述&lt;/h2>
&lt;p>在维护企业级 Linux 系统的身份安全时，杜绝弱口令和可预测字符组合是基础防线。APG（Automated Password Generator）套件所搭载的 &lt;code>apgbfm&lt;/code> 工具，依托高效的布隆过滤器（Bloom Filter）机制，能够把庞大的弱口令文本字典压缩为紧凑的二进制结构，并在毫秒级内完成成员资格判定。本文将带大家从零开始构建布隆过滤字典，掌握弱密码的即时拦截与安全口令生成的实战技巧。&lt;/p>
&lt;h2 id="环境部署安装-apg-套件与解析-apgbfm-指令集">环境部署：安装 apg 套件与解析 apgbfm 指令集&lt;/h2>
&lt;p>首先通过系统的包管理器引入 &lt;code>apg&lt;/code> 工具包，为后续构建布隆过滤字典提供必要的执行环境。&lt;/p>
&lt;p>&lt;img src="https://linux.meerstory.com/ubuntu/20261127_014343_440/captures/s01_c01_apt-get_update_-qq____apt-get_install_-y_apg.png"
 alt="更新APT仓库并部署apg套件"
 
 loading="lazy"
 decoding="async"
 style="max-width: 100%; height: auto;">


&lt;/p>
&lt;p>软件包安装就绪后，执行 &lt;code>which apgbfm&lt;/code> 探查对应二进制工具在系统环境路径中的落脚点。&lt;/p>
&lt;p>&lt;img src="https://linux.meerstory.com/ubuntu/20261127_014343_440/captures/s01_c02_which_apgbfm.png"
 alt="定位apgbfm二进制执行路径"
 
 loading="lazy"
 decoding="async"
 style="max-width: 100%; height: auto;">


&lt;/p>
&lt;p>作为 APG 体系内专用于维护与查询布隆过滤器的核心组件，&lt;code>apgbfm&lt;/code> 承担着字典构建、样本增删以及快速匹配的职责。&lt;br>
在终端直接键入该命令而不带额外参数，即可打印出系统支持的操作标志与帮助概览。&lt;br>
⚙️ [核心功能参数解析]&lt;/p>
&lt;p>&lt;code>-f&lt;/code> : 指定当前需要读写或校验的目标布隆过滤器文件。&lt;br>
&lt;code>-n&lt;/code> : 初始化一个具备容纳指定词条容量的全新空白过滤器。&lt;br>
&lt;code>-d&lt;/code> : 读取外部字典明文（dictfile），根据其内容直接生成对应的过滤实体。&lt;br>
&lt;code>-a&lt;/code> : 将单个指定词条追加写入至既有的过滤器内部。&lt;br>
&lt;code>-A&lt;/code> : 批量读取明文字典文件，将内部所有词汇合并注入已存在的过滤器。&lt;br>
&lt;code>-c&lt;/code> : 快速校验指定单条密码是否存在于布隆过滤器之中。&lt;br>
&lt;code>-C&lt;/code> : 传入字典列表，批量检索其中条目是否命中布隆过滤器。&lt;br>
&lt;code>-s&lt;/code> : 启用大小写不敏感匹配模式进行特征检索。&lt;br>
&lt;code>-i&lt;/code> : 导出并展示目标过滤器的底层元数据、散列参数与运行统计。&lt;/p>
&lt;p>&lt;img src="https://linux.meerstory.com/ubuntu/20261127_014343_440/captures/s01_c03_apgbfm.png"
 alt="查看apgbfm内置帮助手册与参数清单"
 
 loading="lazy"
 decoding="async"
 style="max-width: 100%; height: auto;">


&lt;/p>
&lt;h2 id="构造黑名单样本并编译二进制过滤规则库">构造黑名单样本并编译二进制过滤规则库&lt;/h2>
&lt;p>为保持操作环境的整洁，通过执行 &lt;code>mkdir -p ~/apg_test &amp;amp;&amp;amp; cd ~/apg_test&lt;/code> 建立专用的实验测试路径并切入其中。&lt;/p></description></item></channel></rss>