Skip to content

Cmdex 0.1.6

Choose a tag to compare

@thangkes thangkes released this 14 Oct 08:25
· 30 commits to main since this release

Cmdex 0.1.6 — security release: paste, don't run; encrypted library

Update recommended.

▶ pastes, you run

  • ▶ now pastes the command into the terminal without pressing Enter: read it, then press Enter yourself. In 0.1.5 and earlier it pasted and ran at once, and the "ask first" / "copy only" settings were not enforced (see the correction in the 0.1.4 and 0.1.5 notes).
  • Commands are labelled Warning (changes the system: services, packages, firewall, users, configuration) or Critical (may delete data or cut service: rm -rf, Remove-Item -Recurse, robocopy /MIR, format, mkfs, dd, restarts, firewall off, Cisco write erase / reload, pfctl -d…). Critical commands carry a reminder to check every part before Enter.
  • Labels also apply to commands you add, import, collect or type to have explained: Cmdex detects them from the text, per system (on Cisco, shutdown turns a port off, not the device).
  • A pasted command counts as collected only when you press Enter on it unchanged.

Your library is encrypted

  • Connections (name, host, user, key path, serial settings), your commands and the collected log are encrypted with AES-256-GCM. The key is random and kept in the system keychain (Windows Credential Manager, Secret Service on Linux). A copied database file cannot be read without it.
  • The first start of 0.1.6 encrypts your existing library (and its backup copy) once, then rewrites the files so nothing readable is left on the disk. Nothing in your library changes: tests check every command, connection and collected line before and after.
  • Linux without a keyring: Cmdex asks you to choose a master password, then asks it at each start.
  • If the key is missing (a database copied from another computer, a keychain reset), Cmdex says so and lets you start a new library; the locked one is kept.
  • JSON backups are not encrypted (so they open on another computer): keep them safe. A .db copy stays encrypted and imports only on the computer that made it.
  • Going back to 0.1.5 or older is not supported after this update.

Downloads

File For
Cmdex-Windows-Setup-0.1.6.exe Windows 10/11 64-bit, per-user install
Cmdex-Linux-amd64-0.1.6.tar.gz Linux x86-64 (added by CI a few minutes after the release)

Tiếng Việt — bản vá bảo mật, nên cập nhật.

▶ chỉ dán, bạn tự chạy

  • Nút ▶ giờ dán lệnh vào terminal mà không nhấn Enter: đọc lại rồi tự nhấn Enter. Ở 0.1.5 trở về trước nút này dán và chạy ngay, và các thiết lập "hỏi trước" / "chỉ sao chép" không có tác dụng (xem đính chính trong ghi chú 0.1.4, 0.1.5).
  • Lệnh được gắn nhãn Cảnh báo (thay đổi hệ thống: dịch vụ, phần mềm, tường lửa, người dùng, cấu hình) hoặc Critical (có thể xóa dữ liệu hoặc ngắt dịch vụ: rm -rf, Remove-Item -Recurse, robocopy /MIR, format, mkfs, dd, khởi động lại, tắt tường lửa, write erase / reload của Cisco, pfctl -d…). Lệnh Critical có lời nhắc kiểm tra kỹ trước khi nhấn Enter.
  • Nhãn áp dụng cả cho lệnh bạn thêm, nhập, thu thập hay gõ để giải nghĩa: Cmdex tự nhận diện theo nội dung và theo hệ (trên Cisco, shutdown chỉ tắt một cổng, không tắt thiết bị).
  • Lệnh đã dán chỉ được thu thập khi bạn nhấn Enter mà không sửa nó.

Thư viện được mã hóa

  • Kết nối (tên, máy, tài khoản, đường dẫn khóa, cấu hình COM), lệnh của bạn và nhật ký thu thập được mã hóa AES-256-GCM. Khóa ngẫu nhiên, nằm trong kho bảo mật của hệ điều hành (Windows Credential Manager, Secret Service trên Linux). Chép file database đi nơi khác cũng không đọc được.
  • Lần mở đầu tiên của 0.1.6 sẽ mã hóa thư viện hiện có (cả bản sao lưu) một lần, rồi ghi lại file để không còn dữ liệu đọc được trên ổ đĩa. Không có gì trong thư viện bị thay đổi: test kiểm tra từng lệnh, kết nối, dòng thu thập trước và sau.
  • Linux không có kho mật khẩu: Cmdex yêu cầu đặt mật khẩu chính, và hỏi nó mỗi lần mở.
  • Nếu không tìm thấy khóa (database chép từ máy khác, kho bảo mật bị đặt lại), Cmdex báo rõ và cho bắt đầu thư viện mới; thư viện đang khóa được giữ lại.
  • File sao lưu JSON không được mã hóa (để mở được trên máy khác): hãy cất giữ cẩn thận. Bản chép .db vẫn mã hóa và chỉ nạp được trên đúng máy đã tạo.
  • Sau bản này, không hỗ trợ quay lại 0.1.5 hoặc cũ hơn.