Skip to content

Instantly share code, notes, and snippets.

@jarrodoxical
Created August 14, 2021 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarrodoxical/753d0beb1ac3702a45f9e5344db8450e to your computer and use it in GitHub Desktop.
Save jarrodoxical/753d0beb1ac3702a45f9e5344db8450e to your computer and use it in GitHub Desktop.
Fake Email Server for Windows with SSL Using Standalone Cross-platform Binaries
easiest possible fake-email-server-ssl
# designed for windows to spoof an empty vivaldi mail client account and enable rss features... uses imap/smtp requires java
first create new folder for project downloads called fake-email
download and extract https://snapshots.mitmproxy.org/7.0.2/mitmproxy-7.0.2-windows.zip
download https://repo1.maven.org/maven2/com/icegreen/greenmail-standalone/1.6.4/greenmail-standalone-1.6.4.jar
from https://github.com/jarrodoxical/fake-email-server-ssl/
download and install sloth.com.crt
(double-click to install to Trusted Central Authority on machine)
download sloth.com.pem
(a pem file is just a key file and cert file combined one after the other, which are just text)
if you create your own key/cert be sure the CN=something.com and DNS alt_name includes 127.0.0.1
add line to hosts file at C:\Windows\System32\drivers\etc\hosts
127.0.0.1 sloth.com
open cmd.exe
ipconfig /flushdns
cd C:\Users\jdox\Documents\webdev\fake-email
java -Dgreenmail.setup.test.imap -Dgreenmail.setup.test.smtp -Dgreenmail.auth.disabled -Dgreenmail.hostname=127.0.0.1 -Dgreenmail.verbose -Dgreenmail.startup.timeout=8000 -jar greenmail-standalone-1.6.4.jar
open cmd.exe
cd C:\Users\jdox\Documents\webdev\fake-email
.\mitmdump.exe -p 4433 --mode reverse:127.0.0.1:3143 --certs sloth.com=sloth.com.pem --set block_global=false
open cmd.exe
cd C:\Users\jdox\Documents\webdev\fake-email
.\mitmdump.exe -p 465 --mode reverse:127.0.0.1:3025 --certs sloth.com=sloth.com.pem --set block_global=false
# vivaldi mail client
chrome://restart
vivaldi://settings (enable mail and navigate to new mail panel)
anything@sloth.com (user)
anything (password)
sloth.com:465 (incoming server)
sloth.com:4433 (outgoing server)
optional: test ssl connection with openssl
"C:\Program Files\Git\mingw64\bin\openssl.exe" s_client -tls1_2 -connect sloth.com:4433 -quiet
tag login anyuser anypassword
tag OK LOGIN completed.
tag LIST "" "*"
* LIST () "." "INBOX"
tag OK LIST completed.
"C:\Program Files\Git\mingw64\bin\openssl.exe" s_client -tls1_2 -connect imap.gmail.com:993 -crlf
tag login user@gmail.com password
tag NO [AUTHENTICATIONFAILED] Invalid credentials (Failure)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment