printf(1) via PHP magic_quotes Utility Command Encoder - Metasploit


This page contains detailed information about how to use the encoder/cmd/printf_php_mq metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: printf(1) via PHP magic_quotes Utility Command Encoder
Module: encoder/cmd/printf_php_mq
Source code: modules/encoders/cmd/printf_php_mq.rb
Disclosure date: -
Last modification time: 2017-08-28 20:17:58 +0000
Supported architecture(s): cmd
Supported platform(s): Unix
Target service / protocol: -
Target network port(s): -
List of CVEs: -

This encoder uses the printf(1) utility to avoid restricted characters. Some shell variable substitution may also be used if needed symbols are blacklisted. Some characters are intentionally left unescaped since it is assumed that PHP with magic_quotes_gpc enabled will escape them during request handling.

Module Ranking and Traits


Module Ranking:

  • manual: The exploit is unstable or difficult to exploit and is basically a DoS. This ranking is also used when the module has no use unless specifically configured by the user (e.g.: exploit/windows/smb/psexec). More information about ranking can be found here.

Basic Usage


msf > use encoder/cmd/printf_php_mq
msf encoder(printf_php_mq) > show targets
    ... a list of targets ...
msf encoder(printf_php_mq) > set TARGET target-id
msf encoder(printf_php_mq) > show options
    ... show and set options ...
msf encoder(printf_php_mq) > exploit

Go back to menu.

Msfconsole Usage


Here is how the encoder/cmd/printf_php_mq module looks in the msfconsole:

msf6 > use encoder/cmd/printf_php_mq

msf6 encoder(cmd/printf_php_mq) > show info

       Name: printf(1) via PHP magic_quotes Utility Command Encoder
     Module: encoder/cmd/printf_php_mq
   Platform: Unix
       Arch: cmd
       Rank: Manual

Provided by:
  jduck <[email protected]>

Description:
  This encoder uses the printf(1) utility to avoid restricted 
  characters. Some shell variable substitution may also be used if 
  needed symbols are blacklisted. Some characters are intentionally 
  left unescaped since it is assumed that PHP with magic_quotes_gpc 
  enabled will escape them during request handling.

Module Options


This is a complete list of options available in the encoder/cmd/printf_php_mq module:

msf6 encoder(cmd/printf_php_mq) > show options

Module options (encoder/cmd/printf_php_mq):

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

Advanced Options


Here is a complete list of advanced options supported by the encoder/cmd/printf_php_mq module:

msf6 encoder(cmd/printf_php_mq) > show advanced

Module advanced options (encoder/cmd/printf_php_mq):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   VERBOSE    false            no        Enable detailed status messages
   WORKSPACE                   no        Specify the workspace for this module

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


jduck

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.