EvilCouncil
Published in

EvilCouncil

Building ing

Overview

Setup

DNS

SMTP and IMAP

The battle with port 25

nc smtp.$MYDOMAIN 25

and no banner, no log showing up on the server. I tried again from the server itself,

nc smtp.$MYDOMAIN 25
220 2f099f4e1e56 ESMTP Postfix (Ubuntu)

immediately a banner pops up.

Now i’m met with the question of why can’t I reach port 25 when its open. I tired connecting from a different ec2 instances, once again i’m greeted with a postfix banner as soon as i connect. So now the mystery is why can’t I hit port 25 from my home connection, after some google searches it turns out Comcast blocks it.

With this mystery solved setup is complete.

Getting the emails

import imaplibM = imaplib.IMAP4_SSL("imap.MYDOMAIN")
M.login("email@MYDOMAIN", "totallyasecurepassword123")
M.select()
typ, data = M.search(None, 'ALL')
for num in data[0].split():
typ, data = M.fetch(num, '(RFC822)')
print('Message %s\n%s\n\n\n' % (num, data[0][1]))
M.close()
M.logout()

Next up in Part II

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store