Convert Figma logo to code with AI

threat9 logoroutersploit

Exploitation Framework for Embedded Devices

12,114
2,311
12,114
86

Top Related Projects

Metasploit Framework

8,470

Nikto web server scanner

hydra

10,048

Nmap - the Network Mapper. Github mirror of official SVN repository.

The Rogue Access Point Framework

13,141

Most advanced XSS scanner.

Quick Overview

RouterSploit is an open-source exploitation framework designed for embedded devices. It aims to aid security researchers and penetration testers in identifying and exploiting vulnerabilities in routers, IP cameras, and other network devices. The project is written in Python and provides a modular structure for easy extension and customization.

Pros

  • Comprehensive collection of exploits and scanners for various embedded devices
  • User-friendly command-line interface with auto-completion and command suggestions
  • Regularly updated with new modules and vulnerability checks
  • Supports both manual and automated exploitation techniques

Cons

  • Potential for misuse by malicious actors
  • Requires responsible usage and adherence to legal and ethical guidelines
  • Some modules may become outdated as manufacturers patch vulnerabilities
  • Limited documentation for advanced usage and custom module development

Code Examples

  1. Scanning a target for vulnerabilities:
from routersploit.core.exploit import *
from routersploit.modules.scanners.autopwn import Exploit

target = "192.168.1.1"
exploit = Exploit()
exploit.target = target
exploit.run()
  1. Exploiting a specific vulnerability:
from routersploit.core.exploit import *
from routersploit.modules.exploits.routers.dlink.dir_815_850l_rce import Exploit

target = "192.168.1.1"
exploit = Exploit()
exploit.target = target
exploit.run()
  1. Using a custom payload:
from routersploit.core.exploit import *
from routersploit.modules.payloads.cmd.python_reverse_tcp import Payload

payload = Payload()
payload.lhost = "192.168.1.100"
payload.lport = 4444
print(payload.generate())

Getting Started

To get started with RouterSploit:

  1. Clone the repository:

    git clone https://github.com/threat9/routersploit
    
  2. Install dependencies:

    cd routersploit
    pip install -r requirements.txt
    
  3. Run RouterSploit:

    python rsf.py
    
  4. Use the built-in help command to explore available modules and options:

    rsf > help
    

Remember to use RouterSploit responsibly and only on systems you have permission to test.

Competitor Comparisons

Metasploit Framework

Pros of Metasploit-Framework

  • Extensive library of exploits and modules covering a wide range of vulnerabilities
  • Active community and regular updates, ensuring up-to-date tools and techniques
  • Comprehensive documentation and extensive resources for learning and usage

Cons of Metasploit-Framework

  • Larger codebase and more complex setup, potentially overwhelming for beginners
  • Broader focus on various systems, not specifically tailored for router exploitation
  • Higher resource consumption due to its extensive feature set

Code Comparison

Metasploit-Framework (Ruby):

class MetasploitModule < Msf::Exploit::Remote
  Rank = ExcellentRanking
  include Msf::Exploit::Remote::HttpClient

  def exploit
    # Exploit code here
  end
end

RouterSploit (Python):

class Exploit(exploits.Exploit):
    __info__ = {
        "name": "Router Exploit",
        "description": "Exploit description",
        "authors": ["Author"],
        "references": [],
        "devices": ["Target device"],
    }

    def exploit(self):
        # Exploit code here

Both frameworks provide modular structures for creating exploits, but Metasploit-Framework uses Ruby while RouterSploit uses Python. Metasploit-Framework's structure is more complex, reflecting its broader scope, while RouterSploit's structure is simpler and more focused on router exploitation.

8,470

Nikto web server scanner

Pros of Nikto

  • Broader scope: Scans web servers for multiple vulnerabilities, not limited to routers
  • Longer development history: More mature and established tool
  • Extensive plugin system: Allows for easy extension of functionality

Cons of Nikto

  • Less focused: Not specialized for router exploitation like RouterSploit
  • Slower scanning: Generally takes longer to complete scans compared to RouterSploit
  • Less frequent updates: Development pace is slower than RouterSploit

Code Comparison

Nikto (Perl):

sub nikto_headers {
    my ($mark) = @_;
    my %headers;
    foreach my $header (split(/\n/, $mark->{'headers'})) {
        $header =~ s/^\s+|\s+$//g;
        my ($key, $value) = split(/:\s*/, $header, 2);
        $headers{lc($key)} = $value if ($key && $value);
    }
    return %headers;
}

RouterSploit (Python):

def check_default(self):
    if self.check_default_args(self.username, self.password):
        self.results.append({
            "name": "Default Credentials",
            "description": "Router has default credentials",
            "severity": "high",
            "data": {
                "username": self.username,
                "password": self.password
            }
        })

hydra

Pros of THC-Hydra

  • Supports a wider range of protocols and services for brute-force attacks
  • More mature project with a longer development history
  • Highly customizable with extensive command-line options

Cons of THC-Hydra

  • Less focused on router-specific vulnerabilities
  • Steeper learning curve for beginners
  • Requires more manual configuration for complex attacks

Code Comparison

THC-Hydra (example usage):

hydra -l admin -P passwords.txt 192.168.1.1 http-post-form "/login:username=^USER^&password=^PASS^:F=Invalid"

RouterSploit (example usage):

use scanners/autopwn
set target 192.168.1.1
run

THC-Hydra is a versatile tool for brute-force attacks across various protocols, while RouterSploit focuses specifically on router vulnerabilities and exploits. THC-Hydra offers more flexibility but requires more manual configuration, whereas RouterSploit provides a more streamlined experience for targeting routers. The code comparison illustrates the difference in approach: THC-Hydra uses command-line arguments for precise control, while RouterSploit employs a modular, interactive console for ease of use.

10,048

Nmap - the Network Mapper. Github mirror of official SVN repository.

Pros of Nmap

  • Broader scope: Nmap is a versatile network scanner and security auditing tool, while RouterSploit focuses specifically on embedded devices and routers
  • Larger community and more frequent updates: Nmap has a more extensive user base and development team
  • More comprehensive documentation and resources available

Cons of Nmap

  • Steeper learning curve: Nmap's extensive features can be overwhelming for beginners
  • Less specialized for router exploitation: RouterSploit offers more targeted tools for router vulnerabilities

Code Comparison

Nmap (basic TCP SYN scan):

nmap -sS 192.168.1.1

RouterSploit (basic router scan):

use scanners/autopwn
set target 192.168.1.1
run

Both tools offer command-line interfaces, but RouterSploit provides a more interactive environment specifically tailored for router exploitation. Nmap's syntax is generally more concise, while RouterSploit uses a module-based approach with more verbose commands.

The Rogue Access Point Framework

Pros of Wifiphisher

  • Focuses specifically on Wi-Fi attacks, providing a more specialized toolset
  • Includes a web interface for easier management and visualization
  • Offers social engineering templates for creating convincing phishing scenarios

Cons of Wifiphisher

  • Limited to Wi-Fi-based attacks, less versatile than Routersploit
  • Requires more setup and dependencies for advanced features
  • May have a steeper learning curve for users new to Wi-Fi security

Code Comparison

Wifiphisher (Python):

def start(self):
    self.template = template.TemplateManager(self.template_name)
    self.httpd = http.HTTPServer((NETWORK_GW_IP, PORT), http.HTTPRequestHandler)
    self.httpd.serve_forever()

Routersploit (Python):

def check(self):
    response = self.http_request(
        method="GET",
        path="/cgi-bin/webproc"
    )
    if response and "TP-LINK" in response.text:
        return True
    return False

Both projects use Python and focus on network security, but Wifiphisher emphasizes Wi-Fi attacks with web-based phishing, while Routersploit provides a broader range of router exploitation techniques.

13,141

Most advanced XSS scanner.

Pros of XSStrike

  • Specialized for XSS detection and exploitation
  • Advanced payload generation with encoding techniques
  • Includes DOM XSS scanning capabilities

Cons of XSStrike

  • Limited to XSS vulnerabilities only
  • Less frequent updates compared to RouterSploit
  • Smaller community and contributor base

Code Comparison

XSStrike (payload generation):

def generate_payloads(occurences, response):
    payloads = []
    for i, occurence in enumerate(occurences):
        context = occurence['context']
        payload = fuzzer(context, occurence['position'], occurence['delimiter'], response)
        payloads.append(payload)
    return payloads

RouterSploit (exploit execution):

def run(self):
    if self.check():
        print_success("Target is vulnerable")
        print_status("Exploiting...")
        self.exploit()
    else:
        print_error("Target is not vulnerable")

Summary

XSStrike focuses solely on XSS vulnerabilities, offering advanced payload generation and DOM XSS scanning. RouterSploit, on the other hand, is a more comprehensive framework for router exploitation, covering various vulnerabilities beyond XSS. XSStrike's specialized nature makes it more suitable for in-depth XSS testing, while RouterSploit provides a broader range of exploitation tools for network devices.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

RouterSploit - Exploitation Framework for Embedded Devices

Python 3.6 Build Status

The RouterSploit Framework is an open-source exploitation framework dedicated to embedded devices.

asciicast

It consists of various modules that aid penetration testing operations:

  • exploits - modules that take advantage of identified vulnerabilities
  • creds - modules designed to test credentials against network services
  • scanners - modules that check if a target is vulnerable to any exploit
  • payloads - modules that are responsible for generating payloads for various architectures and injection points
  • generic - modules that perform generic attacks

Installation

Requirements

Required:

  • future
  • requests
  • paramiko
  • pysnmp
  • pycrypto

Optional:

  • bluepy - Bluetooth low energy

Installation on Kali Linux

apt-get install python3-pip
git clone https://www.github.com/threat9/routersploit
cd routersploit
python3 -m pip install -r requirements.txt
python3 rsf.py

Bluetooth Low Energy support:

apt-get install libglib2.0-dev
python3 -m pip install bluepy
python3 rsf.py

Installation on Ubuntu 20.04

sudo apt-get install git python3-pip
git clone https://github.com/threat9/routersploit
cd routersploit
python3 -m pip install -r requirements.txt
python3 rsf.py

Bluetooth Low Energy support:

sudo apt-get install libglib2.0-dev
python3 -m pip install bluepy
python3 rsf.py

Installation on Ubuntu 18.04 & 17.10

sudo add-apt-repository universe
sudo apt-get install git python3-pip
git clone https://www.github.com/threat9/routersploit
cd routersploit
python3 -m pip install setuptools
python3 -m pip install -r requirements.txt
python3 rsf.py

Bluetooth Low Energy support:

apt-get install libglib2.0-dev
python3 -m pip install bluepy
python3 rsf.py

Installation on OSX

git clone https://www.github.com/threat9/routersploit
cd routersploit
sudo python3 -m pip install -r requirements.txt
python3 rsf.py

Running on Docker

git clone https://www.github.com/threat9/routersploit
cd routersploit
docker build -t routersploit .
docker run -it --rm routersploit

Update

Update RouterSploit Framework often. The project is under heavy development and new modules are shipped almost every day.

cd routersploit
git pull

Build your own

To our surprise, people started to fork routersploit not because they were interested in the security of embedded devices but simply because they want to leverage our interactive shell logic and build their tools using similar concept. All these years they must have said: "There must be a better way!" and they were completely right, the better way is called Riposte.

Riposte allows you to easily wrap your application inside a tailored interactive shell. Common chores regarding building REPLs was factored out and being taken care of so you can focus on specific domain logic of your application.

License

The RouterSploit Framework is under a BSD license. Please see LICENSE for more details.

Acknowledgments