{"id":24057021,"url":"https://github.com/bitdruid/smtpsurfer","last_synced_at":"2026-02-28T23:31:35.483Z","repository":{"id":184595491,"uuid":"666477837","full_name":"bitdruid/smtpsurfer","owner":"bitdruid","description":"HTTP-Proxy via SMTP-Mail tunnel","archived":false,"fork":false,"pushed_at":"2023-10-24T19:13:55.000Z","size":6273,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main_alpha","last_synced_at":"2025-02-26T12:16:31.332Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitdruid.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":"2023-07-14T16:08:11.000Z","updated_at":"2024-07-31T08:24:04.000Z","dependencies_parsed_at":"2025-01-10T07:33:14.024Z","dependency_job_id":null,"html_url":"https://github.com/bitdruid/smtpsurfer","commit_stats":null,"previous_names":["bitdruid/smtpsurfer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bitdruid/smtpsurfer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitdruid%2Fsmtpsurfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitdruid%2Fsmtpsurfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitdruid%2Fsmtpsurfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitdruid%2Fsmtpsurfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitdruid","download_url":"https://codeload.github.com/bitdruid/smtpsurfer/tar.gz/refs/heads/main_alpha","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitdruid%2Fsmtpsurfer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29954959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T22:53:01.873Z","status":"ssl_error","status_checked_at":"2026-02-28T22:52:50.699Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-01-09T05:28:49.221Z","updated_at":"2026-02-28T23:31:35.457Z","avatar_url":"https://github.com/bitdruid.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ccenter\u003e\u003ch1\u003e\u003cb\u003eHTTP-Proxy via SMTP-Mail tunnel\u003c/b\u003e\u003c/h1\u003e\n\n\u003c/center\u003e\n\n## info ##\n\nThis was a project for the course \"Internet Security, Data-Protection and Forensics\" of my university (FernUniversität in Hagen - Germany) in 2023. The goal was to transfer the whole internet traffic of a browser on the client-machine by mail to a server-machine which then forwards the traffic to the internet. The client-machine should use the server-machine as a http-proxy.\n\nIn the current state it is recommended to test smtpsurfer with curl. see below for instructions.\n\nsmtpsurfer can transport http-traffic without problems but https-traffic is not working right now. the tls-handshake seems to be corrupted on its way. i think it may be a problem on the server side (mailproxy-machine) which does indeed receive the correct client-hello but it's answer does contain some kind of error.\n\nafter terminating smtpsurfer it is recommended to run `smtpsurfer kill` to clean up processes as subprocesss-termination does not work for python right now.\n\n## requirements ##\n\n- 2 machines or virtual machines:\n  - client to surf\n  - server to proxy\n- OS tested:\n  - arch-2023.04.01 (manjaro)\n  - debian-bullseye (ubuntu)\n- define in same local network\n- do either\n  - set a static ipv4 for each\n  - get an ipv4 by dhcp for each\n\n## Install ##\n\nFor client or server:\n```\nbash script/client_install.sh\nbash script/server_install.sh\n```\n\n## Run ##\n\nAfter reboot you run the client or server with command:\n```\nsmtpsurfer [run|kill]\n```\n\n## Logging\n\nThe logfiles are located in `/smtpsurfer` as `log` for tunnel and `logpy` for the initial base64 encoding python script.\n\n# IMPORTANT #\n\nYour DNS server may rate-limit the NXDOMAIN requests performed by postfix sendmail.\n\nFor pihole e.g. you have to turn off RATE_LIMIT in `pihole-FTL.conf` or via `UI`\n\n# DEBUG #\n\n## run only tunnel and debug with curl ##\n\nopen terminal and run:\n\nclient (mailsurfer):\n```\nsudo socat tcp-l:8080,fork SYSTEM:\"python3 /smtpsurfer/python/client_socat.py | /smtpsurfer/shell/client_tunnel.sh\"\n```\n\nserver (mailproxy):\n```\nsudo socat tcp-l:8080,fork SYSTEM:\"/smtpsurfer/shell/server_tunnel.sh\"\nsudo mitmdump -p 9090\n```\n\nclient: curl tunnel for http or https url:\n```\ncurl --verbose \"https://www.google.com//\" --proxy \"http://localhost:8080\"\n```\n\n\n## server mail receiving ##\n```\necho -e \"MAPPING=\\n12345\\nBODY=\\nCONNECT www.google.com:443 HTTP/1.1\" | sendmail -i smtpsurfer@mailproxy\n```\n\n## test request to google ##\n```\nGET http://www.google.com/ HTTP/1.1\\nHost: www.google.com\\nUser-Agent: curl/8.1.2\\nAccept: */*\\nProxy-Connection: Keep-Alive\\r\\n\\r\\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitdruid%2Fsmtpsurfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitdruid%2Fsmtpsurfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitdruid%2Fsmtpsurfer/lists"}