{"id":16995796,"url":"https://github.com/qtc-de/webshell-cli","last_synced_at":"2025-04-12T05:41:13.722Z","repository":{"id":54329464,"uuid":"486351798","full_name":"qtc-de/webshell-cli","owner":"qtc-de","description":"A simple command line interface for webshells","archived":false,"fork":false,"pushed_at":"2023-02-02T14:03:58.000Z","size":49,"stargazers_count":25,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T01:06:32.192Z","etag":null,"topics":["aspx","jsp","php","web-hacking","webshell","webshell-cli","webshells"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qtc-de.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-27T21:09:47.000Z","updated_at":"2025-03-14T16:25:54.000Z","dependencies_parsed_at":"2023-02-17T20:45:55.525Z","dependency_job_id":null,"html_url":"https://github.com/qtc-de/webshell-cli","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qtc-de%2Fwebshell-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qtc-de%2Fwebshell-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qtc-de%2Fwebshell-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qtc-de%2Fwebshell-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qtc-de","download_url":"https://codeload.github.com/qtc-de/webshell-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525162,"owners_count":21118617,"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":["aspx","jsp","php","web-hacking","webshell","webshell-cli","webshells"],"created_at":"2024-10-14T03:50:12.817Z","updated_at":"2025-04-12T05:41:13.699Z","avatar_url":"https://github.com/qtc-de.png","language":"Python","readme":"### webshell-cli\n\n----\n\n*webshell-cli* is a python script that allows accessing its associated webshells in a commandline\nfashion. *webshell-cli* supports changing the current working directory, setting environment\nvariables and allows easy uploads and downloads of files.\n\n![](https://github.com/qtc-de/webshell-cli/workflows/main%20Python%20CI/badge.svg?branch=main)\n![](https://github.com/qtc-de/webshell-cli/workflows/develop%20Python%20CI/badge.svg?branch=develop)\n[![](https://img.shields.io/badge/version-1.1.0-blue)](https://github.com/qtc-de/webshell-cli/releases)\n![](https://img.shields.io/badge/python-9%2b-blue)\n[![](https://img.shields.io/badge/license-GPL%20v3.0-blue)](https://github.com/qtc-de/webshell-cli/blob/master/LICENSE)\n\n\n\nhttps://user-images.githubusercontent.com/49147108/165632033-efe925fe-63ce-445f-9570-78fadec4e09a.mp4\n\n\n\n### Installation\n\n----\n\n*webshell-cli* is just a python script. After installing the requirements, you should be able\nto run it:\n\n```console\n[qtc@devbox ~]$ git clone https://github.com/qtc-de/webshell-cli\n[qtc@devbox ~]$ cd webshell-cli\n[qtc@devbox webshell-cli]$ pip3 install --user -r requirements.txt\n[qtc@devbox webshell-cli]$ python3 webshell-cli.py \nusage: webshell-cli.py [-h] [-m] [-f FILE_HISTORY] [-s SHELL] url\nwebshell-cli.py: error: the following arguments are required: url\n```\n\n\n### Supported Webshells\n\n----\n\n*webshell-cli* only works with webshells that were specifically build for this project. You can\nfind the supported webshells within the [webshells directory](/webshells/). Currently, the following\nserver-side technologies are supported:\n\n* [PHP](/webshells/webshell.php)\n* [JSP](/webshells/webshell.jsp)\n* [ASPX](/webshells/webshell.aspx)\n\nAdditionally, the webshells directory contains a [build script](/webshells/build_war.sh) for building\n`.war` archives.\n\n\n### Special Commands\n\n----\n\n*webshell-cli* supports some special commands that can be invoked by using an exclamation\nmark as the first character on a command line. Below you can find the list of currently supported\nspecial commands:\n\n*  `!background \u003ccmd\u003e`            execute the specified command in the background\n*  `!download \u003crfile\u003e [\u003clfile\u003e]`  download a remote file from the server\n*  `!upload \u003clfile\u003e [\u003crfile\u003e]`    upload a local file to the server\n*  `!get \u003crfile\u003e [\u003clfile\u003e]`       alias for download\n*  `!put \u003clfile\u003e [\u003crfile\u003e]`       alias for upload\n*  `!eval \u003clfile\u003e`                evaluate a local file on the server (only available for php)\n*  `!env [\u003cvar\u003e=\u003cval\u003e]`           set an environment variable\n*  `!help`                        show this help menu\n\nWhen using the `!env` command without specifying a variable, it outputs a list containing the currently\nset variables. When `!env clear` was specified, all manually added environment variables get deleted.\n\n\n### Custom Shell Command\n\n----\n\nYou can use a custom shell command for each shell by using the `--shell` option. The default shell commands\nare `/bin/sh -c` for Unix and `cmd.exe /c` for Windows. How about a `base64` shell? No problem:\n\n```console\n[qtc@devbox ~]$ webshell-cli 172.18.0.2/webshell.php --shell base64\n[nobody@efd0355fda4c /var/www/html/public]$ /etc/issue\nV2VsY29tZSB0byBBbHBpbmUgTGludXggMy4xNQpLZXJuZWwgXHIgb24gYW4gXG0gKFxsKQoK\n```\n\n\n### Command History\n\n----\n\nBy default, *webshell-cli* uses the history file `~/.webshell_cli_history` to provide you a command line history\nfor your latest commands. You can use the `-f` option to specify a different location for storing the history file\nor use the `-m` option to use an in-memory command history instead.\n\n\n### Final Remarks\n\n----\n\nContributions to this project are always welcome. The [docs](/docs) folder contains a specification that lists\nthe requirements for webshells to be consumable by *webshell-cli*. Furthermore, the documentation lists some\ndesign decisions, as certain things were not that straight forward to implement.\n\nThis project is meant to be used only for *CTF* challenges and educational purposes. As plenty of webshells\nare available on the internet and the shells from this repository do not even implement obfuscation or encryption,\nthey won't be useful for real world attacks anyway.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqtc-de%2Fwebshell-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqtc-de%2Fwebshell-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqtc-de%2Fwebshell-cli/lists"}