summaryrefslogtreecommitdiff
path: root/README.md
blob: 6522e14f3bf20c32bd83011503b4df252ca07c57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# PY-NET
PY-NET is a cross-platform C&C server hosting program requiring zero third-party dependencies. Supporting both AES & TLS encrypted connections over TCP.

## Requirements
* [Python 3.8+](https://www.python.org/downloads/release/python-380)
* (cryptography)

## Features
* Stable RCE & Reverse Shell
* Zero Third-party Dependencies
  * _Requires the cryptography library when using AES encryption_
* Cross-Platform
* Multiple Connection Types
  * Raw - Compression
  * Symmetric - Compression & AES Encryption
  * Asymmetric - TLS Encryption

## Implementation Features
* Secure TCP message implementation using a server side generated token for each message
* Fast TCP message transfer using bytearrays instead of strings
* Encryption of TCP headers when using AES encryption
* Specific encoding, encoding errors & language code support
* Support for shell & connection timeouts
* No HTTP overhead or dependency on the web

## Usage
* python host.py
* python bot.py

#### Generating Self-signed Keys
* python host.py --pubk_out [filepath] --privk_out [filepath]
  * _Requires openssl in your path variable_

#### Connecting to an AES Encrypted Host
* python bot.py --password [password] --salt [salt]

#### Connecting to an TLS Encrypted Host
* python bot.py --pubk_data "[public key string]"

## Commands
* exit
  * Exit the program

* cls
  * Clear the screen

* list
  * List all hosts & connected bots
  * This will show their ID used for specific interactions
  * This will also specify their session status

* listen (--hostname [hostname]) (--port [port]) (--password [password] & --salt [salt])
* listen (--hostname [hostname]) (--port [port]) (--pubk [public key filepath] & --privk [private key filepath])
  * --hostname & --port defaults to localhost & 38568
  * --password & --salt starts an AES encrypted host
  * --pubk & --privk starts an TLS encrypted host

* who --id [host or bot ID]
  * Specific address information of host or bot

* close --id [host or bot IDs separated by comma]
  * Closes connections of hosts or bots

* session --id [bot IDs separated by comma] (--remove)
  * --remove will remove the bot from the active session

## Session Commands
* ([command] | --filepath [filepath]) (--run) (--history)
  * A reverse shell for any command
  * --filepath sets the command with the file's content
  * --run executes the command as Python code instead
  * --history provides additional information of transferred data