Lucene search
K

Bash Brace Expansion Command Encoder

🗓️ 24 Aug 2018 02:33:43Reported by wvu <[email protected]>, egypt <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 38 Views

Bash Brace Expansion Command Encoder, uses brace expansion in Bash and other shells to avoid whitespace without being overly fanc

Code
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Encoder

  # This may produce incorrect code due to minimal escaping
  Rank = LowRanking

  def initialize
    super(
      'Name'        => 'Bash Brace Expansion Command Encoder',
      'Description' => %q{
        This encoder uses brace expansion in Bash and other shells
        to avoid whitespace without being overly fancy.
      },
      'Author'      => ['wvu', 'egypt'],
      'Platform'    => %w[ linux unix ],
      'Arch'        => ARCH_CMD,
      'EncoderType' => Msf::Encoder::Type::CmdPosixBrace
    )
  end

  def encode_block(state, buf)
    # Skip encoding if there are no badchars
    return buf if state.badchars !~ /\s/

    # Perform brace expansion encoding
    "{#{buf.gsub(/([{,}])/, '\\\\\1').gsub(/\s+/, ',')}}"
  end

end

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

19 Jan 2024 18:40Current
7.3High risk
Vulners AI Score7.3
38