Base64 and emails
#4
(05-30-2018, 03:32 PM)ekultek Wrote:
(05-30-2018, 02:05 PM)Vector Wrote: That's pretty interesting, thanks for the information. With regards to the thread where the question was originally posted. If you look at the code i posted you can see that the author imports the SMTP lib. As far as i am aware the SMTP lib handles all the encoding needed to send mails. Yet the author decided to encode the attachment in base64 as well, my question would be. If the SMTP lib handles all encoding related to sending the email, why would you need to encode the attachment if not for the fact you want to obfuscate what your attachment is in order bypass any filters designed to keep malicious email out that contains certain supicious looking strings. Kind of like MailAdmin, that you designed for your mail server?

Well SMTP lib does support the encoding, but at the same time, if you encode it into base64, and it gets re-encoded into another base64 counter part. As you said, it would possible bypass the filtering, but it would then show up to the end user as a jumbled mess of base64 encoded strings.

@Null look at this https://docs.python.org/3/library/email.header.html it seems like the encoding isn't handled by SMTPlib, rather it's handled by python itself

Hmm, weird then why the author of the script i posted would base64 encode the attachment then.
Reply


Messages In This Thread
Base64 and emails - by ekultek - 05-30-2018, 01:30 PM
RE: Base64 and emails - by Vector - 05-30-2018, 02:05 PM
RE: Base64 and emails - by ekultek - 05-30-2018, 03:32 PM
RE: Base64 and emails - by Vector - 05-30-2018, 10:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Spoofing Emails - The Effective Way Corvo 5 11,115 11-15-2021, 08:41 PM
Last Post: quietsuburb8
  Windows Privilege Escalation (And more...) Insider 1 10,982 08-13-2021, 10:34 PM
Last Post: parzival
  [Links] Resources - Wargames and Hacking Challenges Insider 17 59,349 07-20-2021, 05:57 PM
Last Post: Insider
  eLearnsecurity, offensive security and SANS dangcracker 16 46,262 07-16-2021, 05:43 PM
Last Post: z3r0dwn