默认在当前目录的 8000 端口启动服务,注意端口占用;HTTPS 自签名模式需加 -s -ss 参数,浏览器会提示证书不受信任;LDAP 字典破解需自行提供 wordlist 路径,README 未内置字典。
goshs
goshs-labsMIT活跃维护单二进制文件服务器,集成 HTTP/S、WebDAV、FTP/SFTP、SMB、LDAP 等多种协议,还能抓取 NTLM 哈希和接收 DNS/SMTP 回调,适合红队和开发者替代 python3 -m http.server。
Feature-rich single-binary file server for red teamers and developers. HTTP/S · WebDAV · FTP/SFTP · SMB · LDAP/S · NTLM hash capture · DNS/SMTP callbacks · TLS · Auth · Share links. A powerful python3 -m http.server replacement.
curl -sSfL https://goshs.de/install.sh | sh
goshsREADME 未说明硬件要求;作为 Go 单二进制程序,未提及 GPU 或显存需求。
单二进制文件服务器,替代 python3 -m http.server,集成多种协议与凭据捕获
单二进制文件服务器,集成 HTTP/S、WebDAV、FTP/SFTP、SMB、LDAP 等多种协议,还能抓取 NTLM 哈希和接收 DNS/SMTP 回调,适合红队和开发者替代 python3 -m http.server。
核心能力
- 单二进制提供 HTTP/S、WebDAV、FTP/SFTP、SMB、LDAP/S 多协议服务
- 支持 NTLM 哈希捕获与 LDAP 凭据捕获,可接字典破解
- 提供分享链接,可设下载次数与有效期限制
- 支持载荷模板,下载时渲染 LHOST/LPORT 等变量
- 内置 TUI 仪表盘,实时查看各协议与反弹 shell 事件
容易踩的坑
- v2.1.7最新正式版2026-09-28 · 2026-09-28 07:17 UTC
What Changed in v2.1.7
This is a security-focused release resolving six advisories. Most close the same class of gap: the per-folder
.goshsACL was enforced on HTTP/WebDAV but not on every other protocol serving the webroot. It also adds folder uploads to the web UI, fixes an FTP crash and an SFTP path bug on Windows, and brings the usual dependency and CI maintenance.🔒 Security
Per-folder
.goshsACL now enforced on every protocol: SFTP, FTP, TFTP and SMB share a new fail-closed enforcer,httpserver.ProtocolACL. These protocols cannot present a folder's basic-auth credential, so a folder protected by a.goshsauthentry is denied outright. Block-listed names and the.goshsfile itself (which holds the bcrypt hashes) are always denied, and directory listings hide.goshs, blocked entries and auth-protected subdirectories.- SFTP ignores the
.goshsACL (GHSA-2m7f-jq4x-rcj7, High): SFTP handlers only checked the webroot boundary, so the single SFTP credential could read, write, list, rename or delete files inside folders that.goshsprotects or blocks over HTTP.ProtocolACLis now wired into every SFTP read, write, list and command path, including the rename destination. - TFTP, FTP and SMB ignore the
.goshsACL (GHSA-q8gg-q2wc-w52g, Medium): the same gap in the other transfer protocols. Protected subtrees could be downloaded anonymously over TFTP, including the.goshsfile with its bcrypt hash. The fixes:- TFTP checks the ACL on read and write requests.
- FTP wraps its filesystem in an ACL layer that also filters listings.
- SMB checks at handle creation and on the rename destination, and filters directory queries.
- A directory named
.goshswipes inherited auth (GHSA-mhxc-hfx2-7w79, Medium): a.goshsdirectory (creatable via?mkdir) made the ACL resolver return an empty ACL, silently removing inherited per-directory auth and block lists for the whole subtree. The resolver now fails closed: an unreadable or unparsable.goshs(including a dangling symlink) denies everything, and non-regular.goshsentries are ignored.?mkdirand uploads refuse any.goshspath component. - Block list bypass on case-insensitive filesystems (GHSA-3x28-6v7h-gg87, Medium): incomplete fix of CVE-2026-66064. Block-list and never-serve checks compared names case-sensitively, so
SECRET.txtslipped past a block onsecret.txton Windows/macOS. All enforcement points across HTTP, WebDAV, SFTP and listing filters now compare case-insensitively. - Concurrent requests bypass the brute-force lockout (GHSA-8f9w-966j-qhq9, Medium):
verifyCredentialschecked and updated the per-IP failure counter in two separate locked sections around the bcrypt compare. A burst of concurrent wrong-password requests all passed the check, and the counter ended at 1, so the 5-failure lockout never triggered. Each attempt is now counted in the same locked section as the check, before the password is verified, so each IP gets at most 5 guesses per lockout window no matter how many requests it sends at once.
✨ New Features
- Folder upload in the web UI (#227): whole folders, including subdirectories, can now be dropped or selected for upload, and their structure is preserved on the server. Relative paths are sanitized:
..cannot escape the target directory, and.goshscomponents are refused.
🐛 Bug Fixes
- FTP crashed on
AUTH TLSwithout TLS (nil-pointer panic): when a client requested explicit TLS, the FTP driver handed back an empty TLS configuration and the server crashed. FTP now serves FTPS with the configured certificate (-swith-ssor-sk/-sc) and cleanly refusesAUTH TLSwhen TLS is not enabled. - SFTP paths doubled on Windows (#292): SFTP on Windows hosts prefixed the webroot twice, breaking directory navigation and transfers.
🛠️ Build, CI & Packaging
- Docker builder image moved to Go 1.27 (`golan
- SFTP ignores the
- v2.1.62026-08-24 · 2026-08-24 07:59 UTC
查看更新说明
What Changed in v2.1.6
This release turns the old shared clipboard into a full team chat for the web UI and the TUI, and resolves nine coordinated security advisories across the HTTP, WebDAV, SMB, TFTP and collaborator surfaces, plus the usual dependency and CI maintenance.
✨ New Features
-
Team chat (replaces the shared clipboard) — The non-persistent clipboard has grown into a live, collaboration-focused chat, synchronized over the websocket hub across every browser and the
--tuidashboard (which authors astui@<host>). Highlights:- Markdown rendering with the full
:shortcode:emoji catalog (~1800 emoji), composer autosuggest, and collapsible long code blocks. - Emoji reactions (with a who-reacted tooltip) and in-place editing of your own messages (↑ in the composer recalls and cycles them; edits are flagged
(edited)). - Image paste (inlined as base64, or written to disk with
--persist-chat-images) and file upload via 📎 (POST /?chatUpload→.goshs-chat/, respects--read-only, hidden from the listing). - Own-message highlight and opt-in desktop notifications (🔔 toggle) for others' messages when the tab is hidden.
- Opt-in persistence —
--persist-chatwrites the full log (messages, edit flags, per-emoji reaction authors) to<webroot>/.goshs-chat/chat.jsonand restores it on restart; in memory only by default.
# Chat is on by default; persist it across restarts and store pasted images on disk ./goshs --persist-chat --persist-chat-images # Disable the chat entirely ./goshs --no-chatFlags:
-nc/--no-chat(replaces the old--no-clipboard),-pc/--persist-chat,-pci/--persist-chat-images. - Markdown rendering with the full
🔒 Security
Nine coordinated advisories, all remotely and (by default) unauthenticated.
Content-destruction / mode-flag bypasses under
--no-delete/--upload-only/--read-only(#256) — Across every write protocol,--no-delete/--upload-onlynow treat overwrite, in-place write, truncate and rename/move of a pre-existing file as deletion-class operations and refuse them, while still allowing new-file creation and the operator's own create→write→rename upload flow.- SMB WRITE opcode overwrite (GHSA-275v-rxgc-4rcj, High) — the SMB2
WRITEopcode ignored the flags, allowing in-place overwrite of existing files. - SMB overwrite disposition & SET_INFO truncate (GHSA-jx6h-2x8x-hf5r, High) —
FILE_OVERWRITE/OVERWRITE_IF/SUPERSEDEcreates andSET_INFOallocation/EOF truncation destroyed existing file contents. - SMB rename/clobber (GHSA-ppvh-3pc7-mvxw, High) —
FileRenameInformationmoved and clobbered existing files. - TFTP
--no-deleteignored (GHSA-2q29-798w-6qcp, High) — a TFTPWRQignored--no-delete, allowing overwrite and truncation of existing files. - TFTP WRQ destroys served files (GHSA-vw29-46p5-7h7x, High) — an unauthenticated
WRQcould truncate any served file (os.CreateimpliesO_TRUNC). - HTTP DELETE on block-listed files (GHSA-ppmc-5w4w-2669, High) — incomplete fix of CVE-2026-40189:
.goshsblock-listed files could still be removed via HTTPDELETE; the block list is now enforced before removal, mirroring the read/share/bulk/WebDAV paths. - WebDAV LOCK plants empty files (GHSA-whqg-vqcj-px54, Medium) — the library's
LOCKhandler plants lock-null empty files for absent paths, bypassing--read-only/--upload-only;webdavGuardnow refusesLOCK/UNLOCKin those modes.
The four SMB sinks now route through
SMBServer.protectExisting(), which blocks only when a flag is set and the path is not one the current session just created.Credential & ACL exposure (#234)
- Collaborator feed leaks the
.goshsAuthorization header (GHSA-wfg4-m42q-9pvq, High) — a legitimate write to a.goshs-protected directory carriesAuthorization: Basic …; the collaborator feed (anonymous when n
-
- v2.1.52026-08-02 · 2026-08-02 08:48 UTC
查看更新说明
What Changed in v2.1.5
This is a security-focused release resolving seven coordinated advisories across the HTTP, WebDAV, FTP and SFTP surfaces, plus a TUI convenience feature and the usual dependency and CI maintenance.
🔒 Security
- HTTP/WebDAV
--no-delete/--upload-onlyoverwrite bypass (GHSA-966r-mw4j-rv64, Critical) — The v2.1.4 per-verb WebDAV guard blocked overwritingMOVE/COPY, but thePUTcase and the HTTPput()/upload()handlers still gated only on--read-only, so aPUT/POSTthat overwrote an existing file destroyed its contents under--no-deleteand--upload-only. Overwrites of existing files are now blocked whenever deletion is disabled, on both HTTP and WebDAV. ConPtyShell.ps1unauthenticated exemption bypass (GHSA-6m5c-fv2q-jrj2, Critical) — The exemption that lets a caught Windows host fetchConPtyShell.ps1was scoped only by theconptyquery key and path, not by method or by requiringconptyto be the sole parameter. Appending?conptyto a request reached most of the authenticated API surface anonymously (bulk download, info, WebSocket/RCE, unauthenticatedPUT/DELETE). A sharedconPtyExempt()helper now restricts the exemption to aGET/HEADof exactly/ConPtyShell.ps1whose only query parameter isconpty; every other method or extra feature key falls through to normal auth.- WebDAV
POSTreturns file contents, bypassing--upload-only(GHSA-rc9g-fmpg-c6pp, High) —golang.org/x/net/webdavdispatchesPOSTto the same read handler asGET, and thewebdavGuardhad noPOSTcase, so an unauthenticatedPOST /filereturned the full file body under--upload-only. The guard now treatsPOSTlikeGET/HEADand blocks it in upload-only mode. - FTP ignores
--upload-onlyand only partially enforces--no-delete(GHSA-6wwv-mx7w-35jx, High) — The FTP server never wired the--upload-onlyflag at all (the whole webroot was readable in upload-only mode), and its--no-deleteguard missed rename (RNFR/RNTO) and truncating overwrites. FTP now stacks independent filesystem wrappers:--no-deleteblocks deletes, renames and truncating/overwriting writes (appends and new files still allowed), and--upload-onlyblocks reads while permitting uploads and directory listing. - Trailing-slash ACL and hidden-file bypass in
sendFile(GHSA-964w-f6gj-5236, Medium) —sendFilederived the served filename from the raw request path while opening the file from the cleaned path; a trailing slash emptied the derived name and defeated both the never-serve rule for the.goshsfile and the block list. The name is now derived consistently from the cleaned path. - Single-file
?shareredemption served with an empty ACL (GHSA-mqvv-v9g7-4h3j, Medium) — Redeeming a share token for a single file passed an emptyconfigFile{}tosendFile, so neither the block list nor the per-directory basic auth was evaluated. The share redemption path now resolves and enforces the effective ACL, and share minting validates the caller's ACL permissions. - SFTP server ignored
--no-delete(GHSA-4wh5-87mw-whxf, Medium) — The SFTP server had noNoDeletefield and never mapped the flag, soRemove/Rmdir/Rename/overwrite stayed available under--no-delete. The flag is now honored, including an overwrite guard on writes.
✨ New Features
- Password reveal popup in the TUI — The
--tuistatus bar shows the basic-auth user but never the password. Pressingp(in any pane except the generator, wherepedits LPORT) now opens a modal overlay with the credentials — masked untilutoggles plaintext,y/ccopy, esc/q close. Handy when the password was generated inline at launch (e.g.-b "user:$(xkcdpass …)"). A bcrypt-hashed secret is shown but flagged as unrecoverable.
🛠️ Build, CI & Packaging
- Migrated the integration test harness to
moby/moby(testcontainers 0.43). - Releases are now s
- HTTP/WebDAV
- v2.1.42026-07-03 · 2026-07-03 07:32 UTC
查看更新说明
What Changed in v2.1.4
🔒 Security
- WebDAV
--no-deletebypass via MOVE/COPY (GHSA-hq33-8jgp-8qq3) — Under-w --no-delete(and--upload-only), the WebDAVMOVEverb still removed the source file — a rename deletes it from its original path — and, withOverwrite: T, destroyed an existing destination;COPYonto an existing file did the same via an implicit delete. The mode flags are now enforced on these verbs:MOVEis rejected whenever deletion is disabled, and aCOPYthat would overwrite an existing file is blocked, while a plainCOPYto a new path stays allowed.--read-onlycontinues to block all of them. - SFTP authentication bypass with a single credential (GHSA-rjrw-mjq6-hpmm) — SFTP only installed its password handler when both a username and a password were configured, so setting only one left the server accepting unauthenticated logins. Authentication is now enforced whenever either credential is set.
✨ New Features
- Clipboard copy in the TUI generator — The
--tuireverse-shell generator can now copy the selected payload straight to your - clipboard withy/c. It works both locally (xclip/xsel, wl-copy, pbcopy, clip) and over SSH via OSC 52, filling both the system clipboard and the X11 primary selection (Ctrl+V and middle-click / Shift+Insert). The generator tab was also restructured into a stacked layout so multi-line output can be cleanly mouse-selected without also grabbing the menu entries.
🐛 Bug Fixes
- Fatal port-bind errors under
--tui— Every listening protocol is now bound before the TUI dashboard takes over the terminal, so a port conflict (or any bind error) is reported cleanly and is fatal up front — instead of being swallowed by a serving goroutine, which under--tuileft the terminal in raw mode needing areset(and was silently dropped entirely for FTP).
⬆️ Dependencies
- Bumped
golang.org/x/net0.53.0 → 0.55.0. - Bumped GitHub Actions:
github/codeql-action(init/autobuild/analyze) 4.36.2 → 4.36.3, andgoreleaser/goreleaser-action7.2.2 → 7.2.3.
- WebDAV
- v2.1.32026-06-25 · 2026-06-25 13:50 UTC
查看更新说明
What Changed in v2.1.3
✨ New Features
- TFTP server (
-tftp/--tftp-server) — goshs can now serve files over TFTP, the one classic transfer protocol it was missing (next to HTTP/WebDAV/FTP/SFTP/SMB). Listens on UDP port 69 by default so built-in clients like Windows'tftp.exework out of the box, and supports both downloads (RRQ) and uploads (WRQ) withblksize/tsizeoption negotiation. Honors the IP whitelist and--read-only/--upload-only, rejects path traversal, and is advertised via mDNS. Hand-rolled with zero new dependencies.
# Serve the webroot over TFTP (port 69 needs privileges) sudo ./goshs -tftp # Custom, unprivileged port ./goshs -tftp -tftp-port 6900- Reverse-shell payload generator — A new generator tab in both the web UI and the
--tuidashboard builds reverse-shell one-liners from a shared payload database (Bash, nc, Python, PHP, PowerShell, Perl, Ruby, and more), with LHOST/LPORT substitution and optional URL/Base64 encoding (PowerShell payloads as-EncodedCommand).
🐛 Bug Fixes
- TUI interface display (#187) — In
--tuimode without an explicit-i, the status line now lists every bound interface IP instead of just showing0.0.0.0. - TUI template variables — The status line now reflects every
--tpl-var KEY=VALUEentry, not onlyLHOST/LPORT. - TUI status line — Enabled FTP/SFTP and TFTP servers are now surfaced in the status bar like the other protocols.
- Config
ldap_jndi— The example config shipped a non-bindingldap_jndi_enabledkey; the correct, working key isldap_jndi. - Config
ldap_wordlist— Aldap_wordlistvalue set via the config file was silently ignored; it is now applied.
🛠️ Build, CI & Packaging
- COPR spec fixes — networking enabled and the debug build disabled so package builds succeed.
- Shell completions (bash/zsh/fish) updated with the new
-tftp/--tftp-server/-tftp-portflags.
- TFTP server (
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
You're mid-engagement. You need to transfer a file, catch an SMB hash, or stand up a quick HTTPS server — and python3 -m http.server won't cut it.
goshs is a single-binary file server built for the moments when you need more than Python's SimpleHTTPServer but don't want to configure Apache. HTTP/S, WebDAV, FTP/SFTP, SMB, LDAP/S, basic auth, share links, DNS/SMTP callbacks, NTLM hash capture + cracking — all from one command.

Demo
Try it out yourself: demo.goshs.de

Quick Start
# Serve the current directory on port 8000
goshs
# Serve with HTTPS (self-signed) and basic auth
goshs -s -ss -b user:password
# Capture SMB hashes
goshs -smb -smb-domain CORP
# Capture LDAP credentials and NTLM hashes (with optional wordlist cracking)
goshs -ldap
goshs -ldap -ldap-wordlist /usr/share/wordlists/rockyou.txt
# Catch DNS callbacks and receive emails
goshs -dns -dns-ip 1.2.3.4 -smtp -smtp-domain your-domain.com
# Self-destruct after 2 hours
goshs --ttl 2h
# Run with the interactive terminal dashboard (great for headless SSH sessions)
goshs --tui
# Serve payloads that auto-fill your callback host/port at download time
goshs -i 10.10.14.7 --template --tpl-var LPORT=4444
# fetch rendered: curl 'http://10.10.14.7:8000/rev.ps1?tpl'
Documentation
For a detailed documentation go to docs.goshs.de
Features
| 📁 File Operations | Download (resumable & seekable via HTTP Range), upload (drag & drop, POST/PUT), delete, bulk ZIP, QR codes |
| 🔌 Protocols | HTTP/S, WebDAV, FTP/SFTP, SMB, LDAP/S |
| 🔒 Auth & Security | Basic auth, certificate auth, TLS (self-signed, Let's Encrypt, custom cert), IP whitelist, file-based ACLs |
| ⚙️ Server Modes | Read-only, upload-only, no-delete, silent, invisible, CLI command execution, TTL self-destruct |
| 🔗 Share Links | Token-based sharing, download limit, time limit |
| 🎯 Collaboration / CTF | Live team chat (markdown, emoji + :shortcodes: autosuggest, image paste, file upload, reactions, message edit, optional disk persistence — shared web ↔ TUI), DNS server, SMTP server, SMB NTLM hash capture + cracking, LDAP credential capture + NTLM hash cracking (JNDI mode for Log4Shell), redirect endpoint, Rev Shell Catcher + Payload generator |
| 🧩 Payload Templating | Render {{.LHOST}}/{{.LPORT}} + custom --tpl-var values into served files on demand (?tpl) |
| 🔔 Integration | Webhooks, tunnel via localhost.run, config file, JSON API, mDNS |
| 🖥️ TUI Dashboard | Interactive full-screen terminal dashboard; live panes for HTTP, DNS, SMB, LDAP, SMTP, reverse shells and team chat; attach and upgrade shells from the terminal |
| 🛠️ Misc | Dark/light themes, team chat, self-update, log output, embed files, drop privileges |
Installation
| Method | |
|---|---|
| 🐧 curl | sh | curl -sSfL https://goshs.de/install.sh | sh |
| 🦫 Go | go install goshs.de/goshs/v2@latest |
| 🐉 Kali & Parrot OS | sudo apt install goshs |
| 🎗️ Arch Linux (AUR) | yay -S goshs-bin |
| 🖤 BlackArch | pacman -S goshs |
| 🏔️ Alpine Linux (edge) | apk add goshs |
| 🫙 Snap | snap install goshs |
| 🎩 Fedora / RHEL (COPR) | dnf copr enable goshs-labs/goshs && dnf install goshs |
| 🦎 openSUSE | sudo zypper install goshs |
| ❄️ Nix / NixOS | nix-env -iA nixpkgs.goshs |
| 🍺 Homebrew | brew install goshs |
| 🪟 Scoop | scoop bucket add extras && scoop install extras/goshs |
| 🪟 winget | winget install GoshsLabs.Goshs |
| 🍫 Chocolatey | choco install goshs |
| 🐳 Docker | docker run --rm -it -p 8000:8000 -v "$PWD:/pwd" goshs-labs/goshs:latest -d /pwd |
| 📦 Release | Download from GitHub Releases |
goshs can install tab completion for bash, fish, and zsh:
goshs --completion bash
goshs --completion fish
goshs --completion zsh
On macOS with Homebrew the correct Homebrew path is used automatically. After installation the command prints an exact activation instruction, e.g.:
source ~/.local/share/bash-completion/completions/goshs
The bundled web assets are committed, so a plain build just works:
git clone https://github.com/goshs-labs/goshs.git
cd goshs
go build -o goshs .
If you change the JavaScript or SCSS sources, rebuild the assets first with esbuild and sass installed:
make generate
go build -o goshs .
Code Contributors
Security Contributors
These are the awesome contributors that made goshs even more secure :heart:
Community
Join the Discord Community and start connecting.
Star History
Credits
A special thank you goes to sc0tfree for inspiring this project with his project updog written in Python.