memshell-party-cli 0.5.0 → 0.7.0
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/README.en.md +452 -425
- package/README.md +221 -419
- package/dist/cli.js +610 -80
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +74 -5
- package/dist/index.js +346 -33
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/memshell-party/SKILL.md +24 -5
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@ The CLI is the source of truth for examples below; MCP tool args mirror the CLI
|
|
|
26
26
|
|
|
27
27
|
## Step 0 — Discover, don't guess
|
|
28
28
|
|
|
29
|
-
The backend supports ~
|
|
29
|
+
The backend supports ~19 servers, 9 shell tools, dozens of shell types, and 60+ packers. **Never
|
|
30
30
|
hard-code a server/packer name from memory.** Always enumerate first:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
@@ -142,6 +142,13 @@ Output:
|
|
|
142
142
|
- payload → **stdout** by default.
|
|
143
143
|
- `-o shell.class` / `-o shell.jar` → auto base64-decodes and writes binary.
|
|
144
144
|
- `--json` → full response (class names, sizes, base64 bytes, config echo) for downstream tooling.
|
|
145
|
+
- `-o` + `--json` together → the file is still written and the JSON gains an
|
|
146
|
+
`outputFile: {destination, size, decoded}` field — the recommended combo for agents
|
|
147
|
+
(metadata via JSON, payload on disk).
|
|
148
|
+
- `-o` refuses aggregate packers (several variants in `allPackResults`) with an error
|
|
149
|
+
telling you to pick a leaf packer.
|
|
150
|
+
- MCP: `generate_memshell` / `generate_probe` accept an `outputFile` arg with the same
|
|
151
|
+
behavior (auto-decode by extension, write result echoed back as `outputFile`).
|
|
145
152
|
|
|
146
153
|
## Step 4 — Verify the shell is alive
|
|
147
154
|
|
|
@@ -237,10 +244,12 @@ regex crawler cannot.
|
|
|
237
244
|
the site's **dominant traffic** looks like: a content site serves mostly HTML documents,
|
|
238
245
|
an SPA serves mostly JSON XHR, an admin console serves mostly form POSTs.
|
|
239
246
|
2. **Match the dominant traffic first.** Blending in is a statistics game: your requests
|
|
240
|
-
should be the same *shape* as what the site already serves all day.
|
|
241
|
-
HTML
|
|
242
|
-
|
|
243
|
-
|
|
247
|
+
should be the same *shape* as what the site already serves all day. A content site
|
|
248
|
+
serves HTML documents; an SPA serves JSON XHR; an AI product streams SSE — mimic
|
|
249
|
+
covers all of them: HTML pages (marker injected) or **any text response with a
|
|
250
|
+
`{{payload}}` placeholder** (JSON envelope, XML, JS, SSE chunks…) served with its
|
|
251
|
+
own contentType (a `text/event-stream` skin is flushed chunk by chunk, not as a
|
|
252
|
+
one-shot body), and form, JSON, or **fully templated request bodies**.
|
|
244
253
|
3. **Scaffold + hand-write the profile:**
|
|
245
254
|
|
|
246
255
|
```bash
|
|
@@ -270,6 +279,15 @@ regex crawler cannot.
|
|
|
270
279
|
`{{hex:N}}` (N hex), `{{b64:N}}` (N base64url), `{{uuid}}`, `{{ts}}` (unix seconds),
|
|
271
280
|
`{{int:A:B}}`. Never ship the default `pass=<cipher>` single-field body — a lone
|
|
272
281
|
`pass=` parameter is a textbook webshell signature.
|
|
282
|
+
- `request.bodyTemplate` (optional, secretIn=body only): a **full request body** with
|
|
283
|
+
`{{payload}}` where the ciphertext goes — for traffic a flat form/JSON body can't
|
|
284
|
+
imitate: an OpenAI-style chat completion (`{"model":…,"messages":[{"role":"user",
|
|
285
|
+
"content":"{{payload}}"}]}`, pair with an SSE skin), a GraphQL envelope, an XML/SOAP
|
|
286
|
+
message, or a multipart/form-data upload (write the boundary literally in the
|
|
287
|
+
template — the Content-Type boundary is inferred from its first delimiter line, or
|
|
288
|
+
set it explicitly in `headers`). Decoy macros render per request. The filter
|
|
289
|
+
extracts the field from any raw body (JSON / multipart / XML anchors), so no
|
|
290
|
+
server-side change is needed per format.
|
|
273
291
|
- `cipher` (optional): the wire codec. Fields (all optional, defaults = the legacy
|
|
274
292
|
format `aes-ecb` + `base64` + `js-var` + no tail):
|
|
275
293
|
- `algorithm`: `"aes-ecb"` (fixed blocks — same plaintext ⇒ same ciphertext),
|
|
@@ -459,6 +477,7 @@ actions before repeating them, or to answer "what did we run on this host?".
|
|
|
459
477
|
`--injector-class-name` for these.
|
|
460
478
|
- **Shrink is on by default** (smaller bytecode). Use `--no-shrink` only if a stripped payload misbehaves.
|
|
461
479
|
- **Aggregate packers** return multiple variants — pick a leaf for a single payload (see Step 1).
|
|
480
|
+
`-o`/`outputFile` refuses them outright (error tells you to pick a leaf packer).
|
|
462
481
|
- **Agent memshells** (`Agent*` types) require the `AgentJar*` packer family and a JVM attach; they
|
|
463
482
|
aren't class-byte payloads.
|
|
464
483
|
- **Backend override.** Default is the public `https://party.mem.mk` (good for trying things, but
|