• Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Menu
  • Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Search
Close
  • Home
  • 2018
  • April
  • 9
  • Email Spoofing – Exploiting Open Relay configured Public Mailservers

Email Spoofing – Exploiting Open Relay configured Public Mailservers

April 9, 2018July 27, 2019 Comments Off on Email Spoofing – Exploiting Open Relay configured Public Mailservers
Email Spoofing – Exploiting Open Relay configured Public Mailservers exploiting public smtp servers how to spoof email spoof from open relay email host

Email spoofing is the way of delivering forged emails to recipients.These methods are used by criminals to launch attacks like phishing or spams to provide persistent backdoors with legitimate behavior.

Publicly available email servers can be used for spoofing attack.If you have configured your mail server with OPEN RELAY, this dangerous email spoofing attack can be performed by attackers.

An open relay is an SMTP server configured in such a way that allows a third party to relay (send/receive email messages that are neither from nor for local users).Therefore, such servers are usually targeted by spam senders to send spoofed emails to victims inbox.

Searching the vulnerable mail server in public network with open relay configured might be the task to do this email spoofing.

Discovery of Vulnerable Mailserver- Email spoofing

  • The attacker will be trying to find mail server with subdomain enumeration tools like Dig, Nslookup or else straightforward of using the legitimate website like VirusTotal to find the subdomains of your target.

Telnet or Netcat Client:

  • Many ISPs will block or restrict SMTP connections on port 25.Why blocking port 25?
  • According to  Internet Engineering Task Force (IETF).Request For Comments (RFC) 821 was published, establishing port 25 as the default transmission channel for internet email.We still use port 25 as the primary means of transmitting email between two mail servers.
  • Later RFC 2476 submitted in support of adding a new specification for internet email communications.The RFC proposed a split of the traditional message submission and message relay concept.
  • The RFC 2476 defined that message submission should occur over port 587 to ensure new policy and security requirements.
  • Finally, the RFC 2487 defined STARTTLS protocol which is Extension for Secure SMTP over TLS as encrypting communications over the internet.
  • To check this, we can use Telnet or Netcat client.

  • Above figure shows you’re on the external mail server.It should not connect.Here we should get an error.

SMTP Commands:

Whatever you do with Email such as Composing of mail, sending to the recipient, etc. every action will be performed with SMTP commands with Codes which is behind the scene.So understanding the SMTP commands is the better way to understand open mail relay.

  • HELO It’s the very first SMTP welcome command to start the conversation and identifying the sender server and is followed by its domain name.
  • EHLO Same like HELO command or An alternative command to start the conversation, underlying that the server is using the Extended SMTP protocol.
  • EMAIL FROM The sender states the source email address in the “From” field and starts the email transfer.
  • RCPT TO It identifies the recipient of the email
  • DATA Sending your body of mail by the DATA command the email content begins to be transferred.
  • VRFY The server is asked to verify whether a particular email address or username exists.
  • AUTH Authentication command, the client authenticates itself to the server, giving its username and password.
  • HELP client’s request for some information that can be useful for the successful transfer of the email.
  • EXPN asks for confirmation about the identification of a mailing list.
  • RSET Client communicates the server to stop the ongoing email transmission or terminating the continuous mail from the server.
  • ETRN or TURN changes roles between the client and the server.Client will be acting as SMTP Server
  • QUIT It terminates the SMTP conversation.

Mailserver User Enumeration

  • Attacker finds out the present mail addresses in the server with VRFY SMTP Command.

  • Above figure shows mail server replies with 250 code that tells us the usernames are found on the mail server.

Composing the spoofing mail

  • Here we have enumerated two usernames in the mail server.

  • Above figure shows SMTP Commands MAIL FROM and RCPT TO are utilized to send the forged mail to the receiver.
  • Syntax for sender:      mail from:balaji@123.com
  • Syntax for receiver:    rcpt to:gurubaran@123.com
  • Mailserver will reply with 250 code as sender and receiver are ok!

Sending Forge mail

  • Now its final step to use this open relay to send spoofed emails to receivers.
  • Utilize SMTP command DATA to compose the mail in the command line.

  • executing DATA command will receive a 354 code to compose our mail to target.
  • Above figure shows mail is forged from to subject: with the body of mail with some message to the receiver.
  • Enter . after composing the mail on the new line and hit enter to fire the spoofed mail to target.
  • Now the spoofed mail is sent to the receiver.

Never configure your mail server with the open relay.Implement security controls with authentication with user accounts and encryption with STARTTLS.Configure email gateway allow only authorized IP addresses to send.

Post navigation

Xiaopan OS – Pentesting Distribution for Wireless Security Enthusiasts
Portspoof – Spoof All Ports Open & Emulate Valid Services

Related Articles

DHCP Starvation: DoS Attacks to the DHCP Server

- Denial of service, Hacking Tutorials
April 23, 2019July 27, 2019

CarbonCopy – A Tool Which Creates A Spoofed Certificate Of Any Online Website

- Hack Tools, Spoofing
March 18, 2019July 27, 2019

MAC Flooding with Macof Tool

- Denial of service, Hacking Tutorials
July 8, 2018July 27, 2019
hacker gadgets
hacker phone covers

Recent Posts

WPAxFuzz: full-featured open-source Wi-Fi fuzzer

WPAxFuzz: full-featured open-source Wi-Fi fuzzer

March 24, 2023
Mimicry is a security tool developed by Chaitin Technology for active deception in exploitation and post-exploitation. (4)

Mimicry – Security Tool For Active Deception In Exploitation And Post-Exploitation

March 24, 2023
CVE-2023-28445: Critical security vulnerability in the popular runtime, Deno

CVE-2023-28445: Critical security vulnerability in the popular runtime, Deno

March 24, 2023
CVE-2023-28432: High severity security vulnerability in MinIO

CVE-2023-28432: High severity security vulnerability in MinIO

March 24, 2023
CVE-2023-0386: A New Linux Kernel Vulnerability Puts Systems at Risk

CVE-2023-0386: A New Linux Kernel Vulnerability Puts Systems at Risk

March 23, 2023
APCLdr - Payload Loader With Evasion Features

APCLdr – Payload Loader With Evasion Features

March 23, 2023

Social Media Hacking

SocialPath – Track users across Social Media Platforms

SocialPath – Track users across Social Media Platforms

- Social Media Hacking
October 16, 2019October 16, 2019

SocialPath is a django application for gathering social media intelligence on specific username. It checks for Twitter, Instagram, Facebook, Reddit...

SocialScan – Check Email Address and Username Availability on Online Platforms

SocialScan – Check Email Address and Username Availability on Online Platforms

June 17, 2019
Shellphish – Phishing Tool For 18 Social Media Apps

Shellphish – Phishing Tool For 18 Social Media Apps

June 10, 2019July 27, 2019
WhatsApp Hacking using QRLJacking

WhatsApp Hacking using QRLJacking

May 2, 2019May 19, 2019
How to Hack any Facebook Account with Z-Shadow

How to Hack any Facebook Account with Z-Shadow

April 26, 2019June 29, 2020
hacker buffs

About Us

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Join Our Community!

Please wait...
Get the latest News and Hacking Tools delivered to your inbox.
Don't Worry ! You will not be spammed

Active Members

Submit a Tool

Hackers Handbook 2018


Grab your copy here

ABOUT US

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Our primary focus revolves around the latest tools released in the Infosec community and provide a platform for developers to showcase their skillset and current projects.

COMPANY
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Menu
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Live Chat
RESOURCES
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Menu
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Get Started
TOOLBOX
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Menu
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Tools Directory

2014 – 2020 | Haxf4rall.com               Stay Connected:

Facebook Twitter Google-plus Wordpress
Please wait...

Join Our Community

Subscribe now and get your free HACKERS HANDBOOK

Don't Worry ! You will not be spammed
SIGN UP FOR NEWSLETTER NOW