{"id":13549020,"url":"https://github.com/nodauf/Swego","last_synced_at":"2025-04-02T22:31:16.631Z","repository":{"id":45414734,"uuid":"314682883","full_name":"nodauf/Swego","owner":"nodauf","description":"Swiss army knife Webserver in Golang. Keep simple like the python SimpleHTTPServer but with many features","archived":false,"fork":false,"pushed_at":"2025-03-26T19:33:22.000Z","size":1105,"stargazers_count":195,"open_issues_count":7,"forks_count":31,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-26T20:32:09.838Z","etag":null,"topics":["embedded-binaries","embedded-files","golang","pentest","swissarmyknife","webserver"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodauf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-20T22:18:23.000Z","updated_at":"2025-03-26T19:32:56.000Z","dependencies_parsed_at":"2024-03-16T18:45:13.386Z","dependency_job_id":"94de0e70-2514-451c-8176-70229387dc13","html_url":"https://github.com/nodauf/Swego","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodauf%2FSwego","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodauf%2FSwego/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodauf%2FSwego/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodauf%2FSwego/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodauf","download_url":"https://codeload.github.com/nodauf/Swego/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246905101,"owners_count":20852812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded-binaries","embedded-files","golang","pentest","swissarmyknife","webserver"],"created_at":"2024-08-01T12:01:17.328Z","updated_at":"2025-04-02T22:31:16.181Z","avatar_url":"https://github.com/nodauf.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Swego\n\nSwiss army knife Webserver in Golang.\nKeep simple like the python SimpleHTTPServer but with many features\n\n![Swego screenshot](./images/swego.png)\n\n## Usage\n\n### Run the binary\n\nIf you don't want to build it, binaries are availables on https://github.com/nodauf/Swego/releases\n\nOtherwise, `build-essential` should be installed and `GOPATH` configured:\n```\ngit clone https://github.com/nodauf/Swego.git\ncd Swego/src\nmake compileLinux # Or make compileWindows\n```\n\n### Usage\n\nweb subcommand: \n\n```\n$ ./webserver web --help\nStart the webserver (default subcommand)\n\nUsage:\n  Swego web [flags]\n\nFlags:\n  -b, --bind int                  Bind Port (default 8080)\n  -c, --certificate string        HTTPS certificate : openssl req -new -x509 -sha256 -key server.key -out server.crt -days 365\n  -d, --disableListing            Disable directory listing\n  -g, --gzip                      Enables gzip/zlib compression (default true)\n      --ip string                 Binding IP (default \"0.0.0.0\")\n  -k, --key string                HTTPS Key : openssl genrsa -out server.key 2048\n  -o, --oneliners                 Generate oneliners to download files\n  -p, --password string           Password for basic auth (default \"notsecure\")\n      --private string            Private folder with basic auth (default \"/home/florian/dev/SimpleHTTPServer-golang/src/private\")\n      --promptPassword            Prompt for for basic auth's password\n  -r, --root string               Root folder (default \"/home/florian/dev/SimpleHTTPServer-golang/src\")\n  -s, --searchAndReplace string   Search and replace string in embedded text files\n      --tls                       Enables HTTPS\n  -u, --username string           Username for basic auth (default \"admin\")\n\nGlobal Flags:\n      --config string   config file (default is $HOME/.Swego.yaml)\n  -h, --help            Help message\n```\n\nrun subcommand: \n\n```\n$ ./webserver web --help\nRun an embedded binary\n\nUsage:\n  Swego run [flags]\n\nFlags:\n  -a, --args string     Arguments for the binary\n  -b, --binary string   Binary to execute\n  -l, --list            List embedded binaries\n\nGlobal Flags:\n      --config string   config file (default is $HOME/.Swego.yaml)\n  -h, --help            Help message\n```\n\n### Web server over HTTP\n```\n$ ./webserver\nSharing /tmp/ on 8080 ...\nSharing /tmp/private on 8080 ...\n```\n\n### Web server over HTTPS\n```\n$ openssl genrsa -out server.key 2048\nGenerating RSA private key, 2048 bit long modulus (2 primes)\n..........................................+++++\n.................................................................................................................+++++\ne is 65537 (0x010001)\n\n$ openssl req -new -x509 -sha256 -key server.key -out server.crt -days 365\nYou are about to be asked to enter information that will be incorporated\ninto your certificate request.\nWhat you are about to enter is what is called a Distinguished Name or a DN.\nThere are quite a few fields but you can leave some blank\nFor some fields there will be a default value,\nIf you enter '.', the field will be left blank.\n-----\nCountry Name (2 letter code) [AU]:\nState or Province Name (full name) [Some-State]:\nLocality Name (eg, city) []:\nOrganization Name (eg, company) [Internet Widgits Pty Ltd]:\nOrganizational Unit Name (eg, section) []:\nCommon Name (e.g. server FQDN or YOUR name) []:\nEmail Address []:\n\n$ ./webserver web --tls --key server.key --certificate server.crt\nSharing /tmp/ on 8080 ...\nSharing /tmp/private on 8080 ...\n```\n\n### Web server using private directory and root directory\n\n#### Private folder on same directory\n\n```\n$ ./webserver-linux-amd64 web --private ThePrivateFolder --username nodauf --password nodauf\nSharing /tmp/ on 8080 ...\nSharing /tmp/ThePrivateFolder on 8080 ...\n```\n\n#### Different path for root and private directory\n```\n$ ./webserver-linux-amd64 web --private /tmp/private --root /home/nodauf --username nodauf --password nodauf\nSharing /home/nodauf on 8080 ...\nSharing /tmp/private on 8080 ...\n```\n\n### Embedded binary (only on Windows)\n\n#### List the embedded binaries:\n\n```\nC:\\Users\\Nodauf\u003e.\\webserver.exe run  \nUsage:\n  Swego run [flags]\n\nFlags:\n  -a, --args string     Arguments for the binary\n  -b, --binary string   Binary to execute\n  -l, --list            List embedded binaries\n\nGlobal Flags:\n      --config string   config file (default is $HOME/.Swego.yaml)\n  -h, --help            Help message\n\n```\n\n#### Run binary with arguments:\n\n```\nC:\\Users\\Nodauf\u003e.\\webserver.exe run --binary mimikatz.exe --args \"privilege::debug sekurlsa::logonpasswords\"\n....\n```\nRunning binary this way could help bypassing AV protections. Sometimes the arguments sent to the binary may be catch by the AV, if possible use the interactive CLI of the binary (like mimikatz) or recompile the binary to change the arguments name.\n\n## Features\n\n* HTTPS (auto generate certificate / key if no certificate / key specified)\n* Directory listing\n* Define a private folder with basic authentication\n* Upload multiple files\n* Download file as an encrypted zip (password: infected)\n* Download folder with a zip\n* Embedded files\n* Run embedded binary written in C# (only available on Windows)\n* Create a folder from the browser\n* Ability to execute embedded binary\n* Feature for search and replace (for fill the IP address in reverse shell for example)\n* Generate oneliners to download and execute a embedded file\n* Config file [examples .Swego.yaml](./src/.Swego.yaml)\n* Auto generate random certificate for TLS\n\n## Todo\n* Webdav (with capture Net-NTLM hash)\n* Log file\n* JS/CSS menu to give command line in powershell, some lolbins, curl, wget to download and execute\n* Use regex for search and replace\n* Using virtual file system to manage embedded files\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodauf%2FSwego","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodauf%2FSwego","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodauf%2FSwego/lists"}