SFTP
— SSH File Transfer ProtocolUnlike legacy FTP or FTPS, SFTP is an extension of SSH (Secure Shell) that multiplexes commands, data, and authentication through a single encrypted TCP port 22 tunnel, making it exceptionally firewall-friendly.
Interactive Session: How SFTP Works
Step through the packet exchange sequence between nodes.
Interactive Execution Sandbox
Interact with a live or clearly-labelled simulated instance of SFTP.
Threat Model & Attack Simulation
How this protocol is attacked in practice, what defenders can see, and which control stops it.
Threat model & attack simulation
SimulatedDefensive education. Every step runs in this page; no traffic is generated or sent.
SFTP path traversal and weak credentials
InjectionA misconfigured SFTP server or stolen credentials allow access outside the intended directory.
Authenticate
The attacker logs in with reused credentials or a stolen key.
SFTP logins from new locations.
Data exposure and malware staging on the server.
Defences that matter
- Chroot every SFTP account
- Keys plus MFA, no password reuse
- Audit file access and transfers
This is a conceptual model for defenders, not an exploit toolkit. It contains no payloads, tooling or instructions for attacking systems you do not own.
Protocol Specification & Architecture
Key characteristics, real-world deployment patterns, and trade-offs.
Core Technical Features
- Encrypted by SSH v2 (AES-GCM, ChaCha20-Poly1305)
- Single-port architecture (TCP 22) - firewall and NAT friendly
- Full filesystem operations (chmod, chown, directory listing, file locking, resume)
- Public key and password authentication
Real-World Use Cases
- Secure deployment pipelines (CI/CD artifact upload)
- Automated banking/payroll batch processing
- Enterprise secure backup uploads
Advantages & Strengths
- Completely encrypted in transit
- Single port eliminates complex NAT/firewall pinholing
Limitations & Vulnerabilities
- Slightly lower throughput than raw FTP due to crypto overhead on high-bandwidth links