Git Product home page Git Product logo

turtle's Introduction

Overview

This is a multi-client, multi-threaded reverse shell written in Python. There is still a lot of work to do, so feel free to help out with development.

To learn more about this program, watch the YouTube Python Reverse Shell Tutorial Series

Disclaimer: This reverse shell should only be used in the lawful, remote administration of authorized systems. Accessing a computer network without authorization or permission is illegal.

How to Use

To use this reverse shell, two scripts need to be running

  • server.py - runs on a public server and waits for clients to connect
  • client.py - connects to a remote server and then wait for commands

Server

To set up server script, simply run server.py using Python 3.4

python3 server.py

You will then enter an interactive prompt where you are able to view connected clients, select a specific client, and send commands to that client remotely.

To list all current connections:

turtle> list

To select a target from the list of clients:

turtle> select 3


Client

In client.py, first change the IP address to that of the server and then run on target machine. If client does not have a compatible version of Python installed, you can create an executable by building from the source using setup.py.

python setup.py build

turtle's People

Contributors

buckyroberts avatar n-faycal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

turtle's Issues

Python Backdoor

Hi!
I also have created my own Python Backdoor! Now what if want to inject that Backdoor EXE file into a fake process or under a parent process?

Network Sockets Communicate in Plain Text.

I suppose this isn't so much of an issue as it is a feature request. This lightweight reverse shell is perfect for our company security in the event that our laptops are taken offsite, they can be remotely locked (if they're connected to the internet and haven't been wiped, which usually hasn't been done), however, Python sockets only communicate in UTF-8 by default.

This means all communication between endpoints and server can be captured using a packet sniffer such as Wireshark, and read in plaintext. The code lacks any kind of encryption for network communication and I have verified that all traffic can be captured and read over the internet. Since this is supposed to be used for legitimate administrative purposes and not trying to plant a reverse-shell on an unsuspecting victim, a lack of encryption makes it a little bit useless for actual company use.

If you could implement encrypted network streams, I would greatly appreciate it.

Binary file

Hey Bucky,

when you will be finished with your work on the reverse shell, pls add a tutorial for generating an executeable binary file including the python interpreter. People, who need the help, are usually non-programmer and so they dont have installed python.

Thank you!

Greetz :)

enhancement

can u please write another script to in client.py in order to move it to registry path of windows "(HKCU\Software\Microsoft\Windows\CurrentVersion\Run)" that would make ur script grate.

Cant print full output of some commands

When executing commands like help from the server to a client on a windows machine, the command is output is not fully printed, basically any extremely long output commands are not fully printed

file transfer over reverse shell

Hi,
Is there a way to transfer files from client to server continuously without closing the socket, if so could you give an example of it. or any links related to it.

Clients don't stop cleanly

first ctrl+c on client returns "Error in main"
second ctrl+c stops the script.
One ctrl + c should stop it in a clean fashion.

Licensing model ?

Is there a license this is released under or any other limitations on usage ?

Random characters appearing

Sometimes random characters appear when connecting to a client:
You are now connected to windows-client
_6_C:\Users\faycal... >

You are now connected to linux-client
n/mnt/.... >

This is not a consistent behavior

Netcat style shells

Can you/how can I modify the server to accept shells such as ones used by netcat as currently they don't seem to connect or work

Provide better insights on errors

Exception catching is too large and does not provide exception details. It should be corrected in order to understand better underlying errors.

How many clients can i get?

  1. I am running turtle master on kali linux and i wanted to ask what is the maximum numbers of clients that i can acheive? (10, 100, 100000)??
  • i run kali on Hard Drive :)

UnicodeDecodeError please help

Hey!
I'm some what new to programmering and I happend to find your project really interesting but I can get it to work :/.
It work fine we I enter commands like cd and echo but it crashs when I enter commands like tree and dir with the error "output_str = str(output_bytes, "utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 335: invalid start byte"
Whatever I can't get it working. It would awesome if you could help.
Thanks
//Frennish

shell hangs or crashes

Hi there when using the shell to run commands that require a confirmation (I.e overwriting a registry key) the shell seems to hang or crash and won't respond unless i start it up again. obviously because they overwrite was never confirmed the key hasn't changed

Client list bug

When you β€˜quit’ out of a connection, the list of connected clients is not correct. Sometimes there are duplicates and sometimes clients do not appear at all.

executabble requires extra .dll files (client.py)

the setup.py needs to be updated so that all the required files for executable are included , for eg after creating the executable i still need python to be installed in the client machine for the executable to work properly

Selecting a client index higher than what is already existing blocks the server

turtle> list
----- Clients -----

turtle> select 10
Not a valid selection
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "server.py", line 141, in work
    start_turtle()
  File "server.py", line 65, in start_turtle
    target, conn = get_target(cmd)
TypeError: 'NoneType' object is not iterable

No command is accepted after this exception.

Windows Defender

Windows Defender or firewall is stoping to create that type of file...
Any solution???

Switching among Clients

Hello Mr. robert i am also working on the RAT remote access trojan to create a rat from scratch using python socket programming. I was able to create a single client and server and directory traversal with python but now am working on handling multiple clients with threading or any other process.

OOP implementation of Turtle / Is this repository dead?

Hey,

I started a OOP implementation of Turtle. Right now only single client is done, but multi coming soon.

I didn't do a PR for two main reasons:

  1. Because it's a OOP implementation, it break all current code (but still, why not)
  2. This repo seems dead to me.

I let this here for some times, if I don't have any reply / answer I will close and go with the idea the repo is dead.

My repo: https://github.com/arount/super-turtle

o/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.