Skip to content

Commit 41a44c5

Browse files
committed
Release v1.3.0 remote workspace
1 parent 669f55c commit 41a44c5

16 files changed

Lines changed: 678 additions & 19 deletions

File tree

.github/ISSUE_TEMPLATE/release-checklist.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ assignees: ""
1919
- [ ] `python3 -m unittest discover -s tests -v`
2020
- [ ] `python3 bla_cli.py validate-rules --strict-metadata`
2121
- [ ] sample log smoke tests pass with `--exit-on none`
22+
- [ ] `bla ssh --help` confirms Remote Workspace CLI wiring
2223
- [ ] `python3 -m build`
23-
- [ ] wheel/sdist include `bla/rules/web_attacks.yaml`
24+
- [ ] wheel/sdist include `bla/rules/web_attacks.yaml` and `bla/remote/ssh_workspace.py`
2425

2526
## Publishing
2627

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,15 @@ jobs:
4444
names = archive.namelist()
4545
if "bla/rules/web_attacks.yaml" not in names:
4646
raise SystemExit("Wheel is missing bla/rules/web_attacks.yaml")
47+
if "bla/remote/ssh_workspace.py" not in names:
48+
raise SystemExit("Wheel is missing bla/remote/ssh_workspace.py")
4749
4850
with tarfile.open(sdists[0]) as archive:
4951
names = archive.getnames()
5052
if not any(name.endswith("/bla/rules/web_attacks.yaml") for name in names):
5153
raise SystemExit("Source distribution is missing bla/rules/web_attacks.yaml")
54+
if not any(name.endswith("/bla/remote/ssh_workspace.py") for name in names):
55+
raise SystemExit("Source distribution is missing bla/remote/ssh_workspace.py")
5256
PY
5357
5458
- name: Publish to PyPI

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
- name: Run regression tests
3434
run: python -m unittest discover -s tests -v
3535

36+
- name: Smoke test Remote Workspace CLI
37+
run: python bla_cli.py ssh --help
38+
3639
- name: Smoke test on sample logs
3740
# 样本日志包含故意构造的暴力破解 / Web 攻击,bla 命中严重告警时退出码为 1,
3841
# 这是期望行为而不是 CI 失败。允许 0 或 1,其它退出码才视为故障。
@@ -43,6 +46,8 @@ jobs:
4346
rc=$?; [ $rc -eq 0 ] || [ $rc -eq 1 ] || exit $rc
4447
python bla_cli.py sample_logs/access.log --no-color --max-alerts 5
4548
rc=$?; [ $rc -eq 0 ] || [ $rc -eq 1 ] || exit $rc
49+
python bla_cli.py sample_logs/remote_ssh_auth.log --no-color --max-alerts 5
50+
rc=$?; [ $rc -eq 0 ] || [ $rc -eq 1 ] || exit $rc
4651
4752
- name: Build package
4853
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Thumbs.db
4242
!docs/allowlist-example.json
4343
!tests/fixtures/**/*.json
4444
*.csv
45+
case-*/
4546
!sample_logs/
4647

4748
# Logs

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2026 Hackerchen716 and BlueTeam Log Analyzer contributors
3+
Copyright (c) 2026-present Hackerchen716 and BlueTeam Log Analyzer contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ BLA 的结果分成两类:给人看的应急判断,和给系统继续处理
4646

4747
默认 `--out report/` 会落地 `index.html``report.json``events.csv``iocs.txt``report.sarif`,人能看,脚本也能继续处理。
4848

49-
## v1.2.2 Update
49+
## v1.3.0 Update
5050

51-
v1.2.2 把 Windows Security 分析从“高危告警列表”推进到“应急案件还原”:围绕账号、操作者、来源 IP、工作站和目标资产做通用关联
51+
v1.3.0 引入 Remote Workspace:从本机 SSH 进入远程日志目录,像普通 shell 一样 `ls``cd``pwd`,然后直接 `bla access.log` 做本地分析。目标机不需要安装 Python、pip 或 BLA
5252

5353
| 能力 | 说明 |
5454
| --- | --- |
55-
| Windows 账号链路 | 通用识别 `4720/4722/4724/4732 + 4624 Type 10/3`:新建账户、启用/改密、加入特权组后短时间内远程登录 |
56-
| 案件核心实体 | Incident 优先展示核心账号、操作者、来源 IP、来源工作站、资产和阶段,减少“未知来源/其他” |
57-
| 攻击路径还原 | 终端和 HTML 报告把关键事件按时间串起来,便于直接进入应急复盘或工单 |
58-
| ATT&CK 降噪 | 普通 `4688` 进程创建不再默认映射为 `T1059`,仅高危命令/LOLBins 才升级为执行阶段 |
59-
| 报告细节修正 | Top IP 过滤空值/本机来源;有时区日志默认按 UTC+8 展示并保留原始 UTC;内置 YAML 正则解析不再输出 escape warning |
55+
| `bla ssh` | 使用本机 OpenSSH 连接远程 Linux/POSIX 主机,支持 SSH config 主机别名、端口和私钥 |
56+
| 远程目录工作台 | 支持 `ls``cd``pwd``find``tail`,只执行白名单只读命令 |
57+
| 远程文件本地分析 | 在工作台内执行 `bla FILE`,BLA 通过 SSH 拉回文件并在本机完成解析、检测、关联和报告 |
58+
| `journalctl:` 输入 | 支持 `bla journalctl:ssh` 这类快捷输入,把远程 journalctl 输出作为日志源分析 |
59+
| 来源标记 | 报告中的 `source_file` 会标记为 `host:/remote/path`,便于转交和复盘 |
6060

61-
更多变更见 [v1.2.2 发布说明](docs/releases/v1.2.2.md),历史版本见 [docs/releases](docs/releases/)
61+
更多变更见 [v1.3.0 发布说明](docs/releases/v1.3.0.md),历史版本见 [docs/releases](docs/releases/)
6262

6363
## 核心能力
6464

@@ -281,6 +281,31 @@ bla --list-log-sources
281281
bla auth.log --no-color > report.txt
282282
```
283283

284+
### Remote Workspace
285+
286+
当目标 Linux/POSIX 主机无法安装 Python、pip 或 BLA 时,可以在本机打开远程日志工作台。远程侧只需要 SSH 和系统自带命令,分析仍然在本机完成。
287+
288+
```bash
289+
bla ssh root@192.168.1.20
290+
291+
bla@root@192.168.1.20:/root$ cd /var/log/nginx
292+
bla@root@192.168.1.20:/var/log/nginx$ ls
293+
bla@root@192.168.1.20:/var/log/nginx$ bla access.log --out case-nginx --exit-on none
294+
```
295+
296+
工作台内支持的命令:
297+
298+
```text
299+
ls [PATH]
300+
cd PATH
301+
pwd
302+
find [PATH] [PATTERN]
303+
tail FILE [N]
304+
bla FILE [--out DIR]
305+
bla journalctl:ssh
306+
exit
307+
```
308+
284309
### Windows 日志导出
285310

286311
在 Windows 主机上导出日志,拷贝到分析机后使用 BLA 分析:
@@ -368,7 +393,7 @@ fi
368393
```
369394
╔══════════════════════════════════════════════════════════════════════════════╗
370395
║ BlueTeam Log Analyzer (BLA) - Blue Team Incident Response ║
371-
║ Version 1.2.2 | 100% Offline | No AI ║
396+
║ Version 1.3.0 | 100% Offline | No AI ║
372397
╚══════════════════════════════════════════════════════════════════════════════╝
373398
374399
📊 分析总览

bla/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Single source of truth for the BLA package version."""
22

3-
__version__ = "1.2.2"
3+
__version__ = "1.3.0"

bla/remote/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""Remote workspace primitives for agentless log collection."""
2+
3+
from .ssh_workspace import RemoteWorkspace, SSHClient
4+
5+
__all__ = ["RemoteWorkspace", "SSHClient"]

0 commit comments

Comments
 (0)