{"id":26889767,"url":"https://github.com/manashma/nethunter","last_synced_at":"2025-03-31T21:56:27.648Z","repository":{"id":283950004,"uuid":"953375794","full_name":"manashma/nethunter","owner":"manashma","description":"NetHunter: An open-source Ruby-based network vulnerability scanner for port scanning, service detection, and custom payloads. Ideal for security pros and penetration testers","archived":false,"fork":false,"pushed_at":"2025-03-23T08:48:06.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T09:21:27.556Z","etag":null,"topics":["exploit-tool","nethunter","network-security","open-source","penetration-testing","ruby","security-tools","vulnerability-scanner"],"latest_commit_sha":null,"homepage":"https://manashma.github.io/nethunter","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manashma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-23T08:02:25.000Z","updated_at":"2025-03-23T09:19:03.000Z","dependencies_parsed_at":"2025-03-23T09:21:35.840Z","dependency_job_id":"95b68c9e-d866-49b4-a84d-7d3a89cf05e8","html_url":"https://github.com/manashma/nethunter","commit_stats":null,"previous_names":["manashma/nethunter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manashma%2Fnethunter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manashma%2Fnethunter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manashma%2Fnethunter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manashma%2Fnethunter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manashma","download_url":"https://codeload.github.com/manashma/nethunter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246547387,"owners_count":20794970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exploit-tool","nethunter","network-security","open-source","penetration-testing","ruby","security-tools","vulnerability-scanner"],"created_at":"2025-03-31T21:56:27.056Z","updated_at":"2025-03-31T21:56:27.631Z","avatar_url":"https://github.com/manashma.png","language":"Ruby","funding_links":["https://paypal.me/dorazombiieegetbook?country.x=IN\u0026locale.x=en_GB"],"categories":[],"sub_categories":[],"readme":"# NetHunter\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"/assets/logo.png\" alt=\"NetHunter Logo\" width=\"600\"/\u003e\n\u003c/p\u003e\n\n\nNetHunter is a network vulnerability scanner designed to help identify potential security issues in target systems. Built in Ruby, it offers a flexible and extensible platform for port scanning, service detection, vulnerability assessment, and executing custom payloads and exploits. Whether you're a security professional, penetration tester, or network administrator, NetHunter provides the tools you need to assess and secure networks effectively.\n\n## Table of Contents\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Command-Line Options](#command-line-options)\n- [Examples](#examples)\n- [Custom Payloads](#custom-payloads)\n- [Available Payloads](#available-payloads)\n\n## Features\n- **Port Scanning**: Scan individual IPs, IP ranges, or CIDR notations with customizable port lists.\n- **Service Detection**: Identify services running on open ports with banner grabbing.\n- **Vulnerability Scanning**: Detect common vulnerabilities in services like HTTP, SSH, FTP, and SMB.\n- **Custom Payloads and Exploits**: Extend functionality with user-defined Ruby scripts.\n- **Multi-Threaded Performance**: Speed up scans with concurrent thread support.\n- **Detailed Output**: Generate JSON reports for analysis and documentation.\n\n## Installation\n\n### Clone the Repository\n```bash\ngit clone https://github.com/manashma/nethunter.git\n```\nReplace `manashma` with your actual GitHub username.\n\n### Install Ruby\nEnsure Ruby (version 2.5 or higher) is installed. Download it from [ruby-lang.org](https://www.ruby-lang.org/) or use a package manager:\n\n#### Ubuntu/Debian:\n```bash\nsudo apt install ruby\n```\n#### macOS:\n```bash\nbrew install ruby\n```\n#### Windows:\nUse the [RubyInstaller](https://rubyinstaller.org/).\n\nVerify the installation:\n```bash\nruby -v\n```\n\n### Install Required Gems\nNetHunter relies on several Ruby gems. Install them with:\n```bash\ngem install optparse json socket net-http uri fileutils colorize time timeout concurrent\n```\n\n### Set Up Directories\nNavigate to the NetHunter directory:\n```bash\ncd nethunter\n```\nThe tool automatically creates the following directories if they don’t exist:\n- `payloads/`: For custom payload scripts.\n- `exploits/`: For custom exploit scripts.\n- `output/`: For saving scan results.\n\n### Configuration\nOn the first run, NetHunter generates a `config.json` file with default settings (e.g., scan timeout, default ports, thread count). Edit this file to customize behavior as needed.\n\n## Usage\nRun NetHunter with the following command:\n```bash\nruby nethunter.rb [options]\n```\n\n## Command-Line Options\n| Option | Description |\n|--------|-------------|\n| `-t, --target TARGET` | Specify a single target IP or hostname (e.g., 192.168.1.1). |\n| `-r, --range IP_RANGE` | Scan an IP range (e.g., 192.168.1.1-192.168.1.254 or 192.168.1.0/24). |\n| `-p, --ports PORT_RANGE` | Define ports to scan (e.g., 1-100 or 80,443,8080). Default ports used if omitted. |\n| `--payload PAYLOAD_NAME` | Run a custom payload from `payloads/` (e.g., `http_vulnerability_scanner`). |\n| `-o, --output FILENAME` | Save results to a file in `output/` (e.g., `scan.json`). |\n| `-v, --verbose` | Enable detailed output during scanning. |\n| `--exploit EXPLOIT_NAME` | Execute a specific exploit from `exploits/`. |\n| `--list-payloads` | Display all available payloads in `payloads/`. |\n| `--list-exploits` | Display all available exploits in `exploits/`. |\n| `--pentest` | Run a direct penetration test using the specified payload. |\n| `--timeout SECONDS` | Set the scan timeout in seconds (overrides `config.json`). |\n| `--threads NUM` | Set the number of concurrent threads (overrides `config.json`). |\n| `--aggressive` | Enable aggressive scanning (service and version detection). |\n| `--service-scan` | Perform service detection on open ports. |\n| `--vuln-scan` | Scan for common vulnerabilities on detected services. |\n| `-h, --help` | Show the help message. |\n| `--version` | Display the NetHunter version (1.1.0). |\n\n## Examples\n\n### Basic Port Scan\n```bash\nruby nethunter.rb -t 192.168.1.1\n```\n\n### Scan an IP Range with Custom Ports and Verbose Output\n```bash\nruby nethunter.rb -r 192.168.1.1-192.168.1.10 -p 80,443,8080 -v\n```\n\n### Run a Vulnerability Scan and Save Output\n```bash\nruby nethunter.rb -t 192.168.1.1 --vuln-scan -o scan_results.json\n```\n\n### List Available Payloads\n```bash\nruby nethunter.rb --list-payloads\n```\n\n## Custom Payloads\n\nNetHunter allows you to extend its functionality with custom Ruby payloads, stored in the `payloads/` directory.\n\n### Adding a Custom Payload\n1. Create a Ruby file in `payloads/` (e.g., `my_payload.rb`).\n2. Define a class matching the file name (e.g., `MyPayload` for `my_payload.rb`).\n3. Implement the `run` method, which takes:\n   - `target`: The target IP or hostname.\n   - `open_ports`: An array of open ports.\n   - `options`: A hash of command-line options.\n4. Add a `# Description:` comment at the top.\n\n### Payload Template\n```ruby\n# Description: A custom payload example\nclass MyPayload\n  def run(target, open_ports, options)\n    puts \"Running custom payload on #{target}\"\n    results = { target: target, findings: [] }\n\n    if open_ports.include?(80)\n      results[:findings] \u003c\u003c \"Port 80 open, potential HTTP service.\"\n    end\n\n    if options[:verbose]\n      puts \"Verbose: #{results[:findings].join(', ')}\"\n    end\n\n    results\n  end\nend\n```\n\n### Using a Custom Payload\n```bash\nruby nethunter.rb -t 192.168.1.1 --payload my_payload\n```\n\n## Available Payloads\n\nNetHunter version 1.1.0 includes these pre-built payloads:\n\n- **http_vulnerability_scanner.rb**: Scans for common HTTP vulnerabilities (XSS, SQLi, open directories).\n- **service_enumeration.rb**: Performs advanced service enumeration and fingerprinting.\n- **ssh_weak_credentials.rb**: Tests SSH for weak or default credentials.\n- **dos_vulnerability_checker**: Checks for common DoS vulnerabilities and identifies if systems are susceptible to various DoS attack types.\n- **cve_hunter**: CVE detection payload that identifies potential vulnerabilities based on service banners and version information\n\nList all payloads with:\n```bash\nruby nethunter.rb --list-payloads\n```\n### Support the Project\nIf you find this project helpful and want to support its development, consider making a donation. Your contributions will help keep the project alive and improve it further.\n\n**Donate via PayPal:** [PayPal Donation Link](https://paypal.me/dorazombiieegetbook?country.x=IN\u0026locale.x=en_GB)\n**Donate via Bitcoin:** bc1q9p4j857k49spf0tc97f32m3ukdy4g6n8mpqgs8\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanashma%2Fnethunter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanashma%2Fnethunter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanashma%2Fnethunter/lists"}