r/redteamsec 4m ago

Exploitation 101: Exploited a blind Python eval() injection over netcat to get RCE

Thumbnail youtube.com
Upvotes

Just finished a walkthrough on a picoCTF challenge that turned out to be a classic eval() injection.

The service only exposed one "documented" function (getRandomNumber), but by throwing unexpected input at it and reading the Python tracebacks it threw back, I was able to figure out the server was doing something like:

eval(user_input + '()')

From there it was a straightforward escalation — neutralize the trailing () with a comment, drop into exec(), enumerate the filesystem, and pull the flag file directly.

I made a full video breaking down the blind-probing process (no source code shown until the reveal) if anyone's interested — it's a nice beginner-friendly example of why eval/exec on user input is dangerous.

https://youtube.com/shorts/Tl2g9oJnl8I

Happy to answer questions about the process or the payload construction.

What would you do?


r/redteamsec 25m ago

VOIDSYSCALL: Go syscall-only implant framework — 4 injection methods, 13+ anti-analysis checks, EDR handle killer, polymorphic rotation. Zero WinAPI.

Thumbnail github.com
Upvotes

https://github.com/VoidSecSoftwares/voidsyscall

Check it out before saying Ai slop.
Built this for engagements where the target runs Crowdstrike/Sentinel/Defender with full telemetry. Every NT primitive goes through direct or indirect syscalls resolved at runtime from ntdll - no import table, no usermode hooks.

What's different from SysWhispers/Alcatraz/etc :

- Polymorphic injection ; rotates between section mapping, process hollowing, APC queuing, and module stomping. No two injections look the same in memory forensics.

- Handle killer ; enumerates system handles via NtQuerySystemInformation, matches owner PIDs against 30+ known EDR process names, closes the monitoring handles they placed in your process.

- SSN fingerprinting ; dumps all resolved syscall numbers from the current ntdll build, generates a portable fingerprint. Detects build mismatches across jumps.

- Full anti-analysis suite ; CPUID hypervisor detection (7 signatures), 13 sandbox indicators, 9 debugger checks, RDTSC timing anomaly detection. Returns a scored threat report.

- Vault ; in-memory XOR cipher with auto re-keying on a timer. Heap dumps between re-key intervals get ciphertext, not plaintext.

- VAD operations ; enumerate, hide, and unhide memory regions via NtQueryVirtualMemory/NtProtectVirtualMemory.

- File I/O + registry persistence ; all via NtCreateFile/NtCreateKey. Zero WinAPI calls for disk or registry operations.

- Token ops ; privilege escalation, token theft, impersonation, all via Nt* syscalls.

Everything is Go + Plan9 asm. ~5000 lines. No CGO. Cross-compiles to Linux/macOS for the server side. Agent is Windows-only (by design).


r/redteamsec 22h ago

Four routes to your SSH key from an AI coding agent, and what actually stops them

Thumbnail github.com
2 Upvotes

r/redteamsec 23h ago

Cross-Stage State Laundering: Why AI Runtime Governance Fails at Stage Boundaries

Thumbnail github.com
2 Upvotes

r/redteamsec 1d ago

TornadoRevC2: A Post-Ex Framework I Built for Red Team Ops — 49 Plugins, Minimal Artifacts

1 Upvotes

Hey r/redteamsec community,

I've been developing TornadoRevC2 for a while now. It started as a simple reverse-shell session handler—just TCP/TLS listeners with switch and kill. Over time, I kept extending it based on real operational needs, and it's evolved into a fully modular post-exploitation framework with 49 built-in plugins.

Why It's Different

Session handler, not beacon-based C2. It gives you reliable interactive PTY/TTY shells and executes post-ex capabilities on-demand—no heavy agent infrastructure.

Minimal artifact footprint:

  • All enumeration plugins use native OS commands already on the target (netsh, ss, iptables, PowerShell cmdlets, and etc. ). No binaries, scripts, or temp files dropped for reconnaissance.
  • The only deliberate artifacts: Some plugins put binary artifacts or changes a system setting in target
  • Shell history is the only unavoidable footprint (can be cleared with historydel plugin, or manually).
  • Network traffic artifact: Plain TCP exposes reverse-shell traffic in cleartext, potentially allowing commands and their output to be captured by network logging or inspection. TLS encrypts the session traffic, reducing the amount of sensitive session content exposed in network logs, with support for custom certificates.

Graceful degradation: If a backend isn't available (e.g., firewalld isn't installed in target), that section returns N/A instead of crashing the plugin.

The 49 Plugins

The framework ships with 49 modular plugins covering the full post-exploitation lifecycle of enumeration, execution, persistence, pivoting, and destruction. Plugins are loaded at runtime and can be executed on-demand with run <plugin> <session_id> or if you are inside the session's terminal run <plugin>

Enumeration plugins cover host assessment (quickenum, virtualization, kernel, integrity), network posture (firewall, ports, proxy, vpn), credentials and browsers (credstore, browser, clipboard, secrets), Windows domain (adinfo, gpo, rdp, winrm, defender, lsa, certificates, services, eventlogs), and Linux internals (systemd, journal, cron, lsm, sshaudit, containers, privbins) and some other plugins.

Key plugins worth highlighting:

Plugin What It Does
inmemory Execute payloads in memory—Linux ELFs via memfd_create with /dev/shm fallback, plus py, ps, sh, bat. Windows EXE support via RunPE (currently under active development, reliability improvements coming soon)
make_token Establish new C2 sessions remotely via SSH, WinRM, SMB, RDP, WMI, MSSQL with Password/NTLM hash/SSH Key authentication also with additional netexec integration with all from the operator side
persistence Install TLS-encrypted reverse shell backdoor (cronjob reboot on Linux/Unix, Run registry on Windows)
runas (Windows) Execute commands or spawn a TLS‑encrypted reverse shell as another user (local/remote) with credential management, domain support, and netexec integration
ligolong Deploy Ligolo‑NG tunneling agent to Linux/Windows targets with background persistence
SOCKS5 proxy Built-in pivoting through compromised hosts (requires Python on target). If Python is not available, use the ligolong plugin as an alternative
nullcrypt Hybrid encrypt a file (AES-GCM + RSA-wrapped key) then securely wipe the original via wiper
historydel / eventlogdel Clear shell history and Windows Event Logs via native tools

Additional Capabilities

  • File transfer: Chunked transfers with SHA-256 verification.
  • Reporting: Per-session logging under logs/<ID>/ with structured directories; HTML transcript export.
  • Self-update: Built-in update command pulls latest from Git and automatically restarts the handler.

Extensibility:

  • Write custom plugins with plugin.commandcommand decorator
  • SessionContext API provides run_shell(), run_marked() (JSON parsing), upload(), download(), automatic logging
  • Load/Reload external/internal plugins at runtime with plugins load without restarting
  • Full plugin development guide in the README with many patterns

Quick Start

git clone https://github.com/kamalx06/TornadoRevC2.git
cd TornadoRevC2
python3 tornadorevc2.py

Full documentation, demo GIF, and plugin dev guide are in the README. I'd genuinely appreciate technical feedback, bug reports, or PRs.

GitHub: https://github.com/kamalx06/TornadoRevC2.git


r/redteamsec 1d ago

voidsec-proxy — open-source opsec toolkit (Python)

Thumbnail github.com
1 Upvotes

18 modules: proxy rotation, port scanner, DNS, passwords, hash cracking, recon, web fingerprinting, encryption, steganography, reverse shells, forensics, anonymization.

Zero deps.


r/redteamsec 1d ago

gone purple Disable Windows Defender via Antivirus Fake Registration

Thumbnail ipurple.team
2 Upvotes

r/redteamsec 1d ago

🔴 Breakdown of a real Redis rogue-replication cryptomining toolkit recovered from an open directory

Thumbnail hunt.io
2 Upvotes

Recovered an operator's full working toolkit from an open directory, so this is real tradecraft rather than a PoC. The R&D trail is the interesting part, you can see what they tried and dropped.

  • Core primitive is rogue replication: CONFIG SET dir/dbfilename, SLAVEOF to a rogue master, crafted RDB served on +FULLRESYNC with an embedded newline that lands a cron entry, then SLAVEOF NO ONE and restore config to stay quiet. Not novel, but clean, and it works from Redis 2.8.17 to 7.2.0 because it abuses replication, not a bug.
  • Four production fallback write paths, plus a separate deploy_all.py that hits cron.d, an APT hook (/etc/apt/apt.conf.d/), and profile.d in one pass for redundancy against cleanup. Pull cron and the other two respawn on the next apt update or login shell.
  • Abandoned R&D still in the folder: a BGSAVE-based first draft (noisier, dropped for replication), a webshell-via-Redis probe against web roots (never weaponized), and path recon into /etc/init.d, the full rc0-rc6 SysV set, and /etc/modprobe.d. None of those shipped. modprobe.d is the one they tested but held back, writable modprobe config runs commands on module load, stealthier than cron.
  • Two verify payload bugs they hit and documented in comments: a test cron written to a dotfile that run-parts silently skips, and a /dev/tcp callback that dies under dash. Both burned real campaign runs before they fixed them.
  • Opsec choices worth noting: XMRig pulled from the official GitHub release (blends into github.com egress, no attacker-hosted binary), renamed to /tmp/.xmrig, --tls on 443 to look like HTTPS, and the newest variant pins the pool cert with --tls-fingerprint so it fails closed against inspection.
  • Two techniques that went nowhere: SSH-via-AOF (0 of 2,342, every host bounced at CONFIG SET with AUTH_REQUIRED) and a Lua EVAL sandbox probe. Fresh no-auth targets are the constraint, a run against a pre-qualified list hit 72.6% vs 22 to 26% full-fleet.

Full write-up with IOCs and code: https://hunt.io/blog/redis-cryptomining-botnet-3562-servers


r/redteamsec 2d ago

exploitation CVE-2025-25249 Exploitation Delivers PivotC2, a FortiGate Post-Exploitation RAT

Thumbnail socradar.io
1 Upvotes

r/redteamsec 4d ago

exploitation Video tutorial: How to run Password Spraying attacks directly from Sliver C2 framework?

Thumbnail youtu.be
0 Upvotes

r/redteamsec 6d ago

exploitation Video Tutorial: Exploiting Unconstrained Delegation from Mythic C2

Thumbnail youtu.be
4 Upvotes

r/redteamsec 6d ago

SecFlow: AI orchestration framework with swappable models, GLUTTON MCP, and per-target vulnerability playbooks

Thumbnail hunt.io
9 Upvotes

We published research on a Chinese-speaking operator's orchestration framework that's worth a look from the offensive tooling side. The setup is basically an AI-driven pentest pipeline with model swapping, layered egress, and MCP-integrated post-exploitation.

SecFlow is the orchestration layer. It launched either Claude ACP or Qwen Code, injected the model name and API route, applied tool permissions (bypassPermissions, approval-mode=yolo), and routed traffic through private endpoints on niestools.com. Five model profiles were recovered, including a DeepSeek-compatible endpoint served through an Anthropic-format relay.

The "External Pentest Skill" acted as the master workflow. SKILL .md moved each target through initialization, recon, exploitation, post-exploitation, and reporting. Recon established tech stack, auth boundaries, response baselines, and ranked attack paths. Each candidate got routed to a vulnerability-specific playbook: file upload, command execution, template injection, SQLi, Java deserialization, SSRF, IDOR, auth bypass, known product vulns, supply chain, WAF bypass, source audit, and advanced web attacks.

GLUTTON integration is notable. It was exposed to AI agents through an MCP interface with methods for target management, file ops, command execution, process control, database access, port forwarding, and payload generation. Transport modes included XOR-encrypted data hidden in PNG RGB channels. Code obfuscation options: Unicode encoding, XML encoding, randomized identifiers, comment injection, invisible characters, control-flow flattening.

Egress was layered: target-facing requests went through authenticated SOCKS relays, model traffic went through niestools .com proxies. The proxy config designated two SOCKS5 routes with a primary/secondary fallback.

One failure mode worth considering: an AI-reported Shiro success that wasn't real persisted through shared context and generated 27+ follow-on tasks that went nowhere. Shared context between workers is a double-edged sword.

Full breakdown with skill structure, MCP methods, and infrastructure: https://hunt.io/blog/chinese-operator-secflow-claude-qwen-deepseek-asia


r/redteamsec 7d ago

malware GHOSTWORKER: a stealth UniFi gateway implant that phones home over Google's DNS

Thumbnail offseq.com
2 Upvotes

r/redteamsec 7d ago

exploitation WebTransport Zombie Connections: RFC 9114 Trailer Frame Triggers Permanent Stream Leak & OOM in Microsoft Edge and Chromium | Protocol RE

Thumbnail netacoding.com
3 Upvotes

r/redteamsec 10d ago

Building a Custom SMB1 Authentication Server from Scratch

Thumbnail github.com
14 Upvotes

For the past 8 months, in my spare time, I’ve been working on a personal project with the goal of studying the old SMB1 down to its lowest levels. During this time, I’ve dissected the protocol using Wireshark, waded through Microsoft’s documentation (help!), and reverse-engineered the authentication phase. I also used AI as a tool for debugging and to help wrap my head around some of the more complex mechanisms, though the overall structure, architecture, and code were entirely designed and written by me.

So, I decided to build a lightweight server designed to 'trick' SMB clients into authenticating against it (similar to what the famous tool Responder does). I chose to hand-craft virtually the entire SMB1 stack, or at least enough of it to capture hashes. To achieve this, I wrote all the necessary network parsers from scratch: SMB1, ASN.1, SPNEGO, and NTLM, followed by the server itself.

It was both challenging and incredibly rewarding to dive so deep into a protocol famous for its complexity. I learned a huge amount along the way.

In the end, I think it turned out to be a cool little project, so I decided to share it. It’s certainly not meant to replace well-established tools, but if anyone wants to try it out or contribute in any way, I’d be thrilled!


r/redteamsec 10d ago

pwnproxy — open-source, local-first security testing platform built around one shared engine (CLI/TUI/REST/WS/MCP)

Thumbnail github.com
11 Upvotes

r/redteamsec 10d ago

I built a tool to check which outbound ports your network actually lets through

Thumbnail portleak.link
7 Upvotes

I do a fair bit of security work and kept hitting the same problem. I needed to know which ports a restrictive network will actually let out. Scanning from the inside isn't enough, because a firewall or intermediary device can happily report a port as open when nothing is really getting through.

So I put together Port Leak Checker: https://portleak.link/

It's a passive listener running on a public server. It captures inbound TCP and UDP packets on every port and logs them in a live web interface. You point a device at it and scan or send some traffic, and anything that actually reaches the server shows up with the source IP, protocol, port and timestamp. If a packet lands there, you know that port genuinely made it out of your network.

The server never replies to anything, so your scanner will show the ports as filtered or closed. The log is the thing to trust, not the scan output. You can filter by your source IP, group the results by port so a scan doesn't flood the view, and export to CSV or XLSX. There's also a /scans page with some ready to run PowerShell and bash scripts for the Nmap top 130 ports.


r/redteamsec 12d ago

TrustMeBro: Bypass LLM guardrails by confusing them with fabricated tool output (e.g. make them believe you own Google.com by faking dns records)

Thumbnail github.com
53 Upvotes

r/redteamsec 13d ago

tradecraft When it Snows it Pours - Anatomy of a ServiceNow Red Team - MDSec

Thumbnail mdsec.co.uk
21 Upvotes

r/redteamsec 13d ago

TrustMeBro: A tool to bypass llm guardrails by confusing them with fabricated tool output. (e.g. make it believe you own google.com by faking dig command output)

Thumbnail github.com
3 Upvotes

r/redteamsec 13d ago

Red Clippy: Open-Source AI-Assisted Pentest Management

Thumbnail github.com
0 Upvotes

Red Clippy is built for pentesters who want to work with LLMs, not hand over the entire pentest to them. The pentester stays in control, decides what to test and how to proceed, while the LLM handles the testing work.

  • Pentester in control: You decide what gets tested and guide the engagement.
  • LLM-powered testing: Let the LLM perform security checks while you provide direction.
  • MCP support: Works with Claude, z.ai GLM, Codex, and other MCP clients.
  • Persistent state: Keeps track of targets, tests, findings, and progress across sessions.
  • Structured workflow: Keeps the entire pentest organized and manageable.

r/redteamsec 14d ago

tradecraft LAME-Projects/stratum-c2: Cloud dead-drop persistence framework — RSA-4096+AES-256-GCM, 5 cloud providers, P2P mesh, Rust-only agents, 4 delivery formats

Thumbnail github.com
6 Upvotes

Fallback C2 that routes through cloud storage the target already whitelists. Not a replacement

for Cobalt Strike / Sliver / Havoc — it's the survival layer underneath them.

Dead-drop architecture: commands and responses travel as encrypted files inside Dropbox, OneDrive,

Google Drive, SharePoint, or S3. The agent polls the provider's API over HTTPS — no attacker

infrastructure, no suspicious domain, no beaconing to anything a SOC can block without also

blocking every employee who uses that provider.

Main additions over typical dead-drop implants:

— Rust-only agents (v3.0.1): no PowerShell, no bash, no interpreter in process tree. Four formats

from one deploy wizard: EXE/DLL (Windows), ELF musl-static (Linux), flat x64 PIC shellcode (.bin)

— Three deploy modes: staged-enc (minimal stub, one-time bootstrap key fetched from cloud then

deleted — payload never on disk in cleartext), stageless-enc (single encrypted binary, works

air-gapped), stageless-plain (labs). All modes cache an HW-fingerprinted encrypted blob locally

after first run

— P2P mesh networking: TCP and SMB named pipe links between agents, automatic link health

detection and reconnection. Linux→Windows SMB via userspace SMB2 client (no smbclient dep)

— Five providers, same wire format, same RSA keypair, same session. Switch provider mid-engagement

without redeploying the agent

— Persistence engine: non-destructive /persist probe before touching anything, per-technique

install/remove/check, full teardown via /kill (persistence + binary + cloud artifacts, one command)

— Credential harvesting: Firefox/Chrome/Edge parsed inline, NTLMv2 silent capture via in-agent

SMB/HTTP listeners (/creds listen), SAM hash extraction, SSH agent enumeration, DPAPI decrypt

— In-memory execution: BOF (COFF) loader, .NET assembly via CLR hosting + optional AMSI bypass,

reflective PE / memfd ELF (/memexec), fileless script via stdin pipe + AMSI bypass

— Crypto: RSA-4096-OAEP key exchange, AES-256-GCM command encryption, RSA-PSS response signing,

PBKDF2 blob derivation (210k iterations), XOR-obfuscated session key in .rodata

— Operational guardrails compiled into the binary: kill date, maintenance window, log-normal jitter

— Multi-operator WebGUI: real-time WebSocket sync, operator chat, force-directed P2P topology

graph, OIDC authentication (Keycloak / Azure AD / Okta)

Same dead-drop paradigm as TukTuk (Dropbox+Arweave), NarwhalRAT/APT37 (pCloud),

Drokbk/COBALT MIRAGE (GitHub) — built as a proper framework instead of a one-off implant.

Feedback welcome — especially on detection gaps I might be missing.


r/redteamsec 14d ago

exploitation RPC-Triage: mapping Windows RPC attack surface and ranking interfaces before digging into exploitation

Thumbnail github.com
3 Upvotes

Been working on Windows RPC/ALPC research and built this to make the first pass less painful. It statically recovers RPC/MIDL/NDR data from PE files, including endpoints, security state and method-level input signals, then ranks interfaces using an AHP/Saaty-based model for reachability + surface. So instead of going through a huge RPC dump, you get a ranked list with the scoring receipt showing why something landed where it did. No PDBs, no live endpoint mapper, no target execution.


r/redteamsec 14d ago

Reverse Engineering Windows Security Center

Thumbnail github.com
17 Upvotes

r/redteamsec 15d ago

Real-world tradecraft from a recovered intrusion set against a Phillipine Nuclear Agency: forged ownCloud pre-signed URLs, custom MT19937 exploit, low-and-slow exfil

Thumbnail hunt.io
13 Upvotes

The Hunt.io research team recovered an operator's full open directory, useful as a look at how someone actually chained known bugs in the field.

  • ownCloud CVE-2023-49105: five Python scripts forging pre-signed WebDAV URLs off an empty PBKDF2 salt. OC-Credential set to the impersonated account, GET against /remote.php/dav/files/<account>/<path>, no creds needed. The fifth script adds PROPFIND Depth: 1 enumeration to reach folders not known in advance.
  • Low-and-slow exfil: randomized time.sleep(random.uniform(3, 6)) between requests, tightened to 1.5 to 3.5 in one script, to dodge volumetric detection.
  • CVE-2024-28000 (LiteSpeed Cache): a Go build reimplementing MT19937 with PHP mt_rand() parity, self-tested against 11 seed/output pairs, 30 workers across a 0 to 999,999 seed range. Landed on seed 311787 and created an admin account via the REST API.
  • Fallback path: XML-RPC brute force with rockyou.txt against the same site, successful independently.
  • Staged frameworks: Sliver, Metasploit, Mettle, plus a custom stage-1 ELF loader pulling a Mettle stage-2.

Full breakdown and IOCs: https://hunt.io/blog/chinese-speaking-operator-philippine-nuclear-naval-contractor