/mechtron

A RAT tool. Mechtron allows you to administrate computers remotely and transfer files.

Primary LanguageRubyApache License 2.0Apache-2.0

Mechtron

This is an unfinished project.

Mechtron is a RAT that gives the server remote access to the client machine. You can execute remote commands on the client machine from the server. The server also has the ability to upload and download files from the client machine. Besides these commands, there are a few sugar commands. Mechtron can handle multiple clients at one time. Mechtron is used to form a network of computers that allows the server to operate on them. You can only work with one computer at a time.

The client software is distributed using the Mechtron application, but by supplying an argument with the server's IP address.

sudo ./mechtron -c 127.0.0.1

The server is ran using one argument.

./mechtron -s

Mechtron runs on ports 6666/tcp and 6667/tcp. It can handle multiple clients, but one session at a time. Meaning you can have one reverse shell instance at a time. I plan on publishing a debian package, but for now, you'll have to deal with the source folders.

Make sure to open ports 6666/tcp and 6667/tcp on the computer that you're running the server on

sudo ufw allow 6666:6667/tcp

Useful Tips

  • You can aim a Mechtron client at a Mechtron server that doesn't exist yet.
  • A torified shell will interfere with Mechtron.
  • You can use a client's ID anywhere you can use an IP address and vice versa.
  • A client will have a new ID number assigned to it when it reconnects.
  • The ID number is to the left of the IP address.
  • if you follow the client script name with '&' it will run it in the background.

Commands

Commands Description
clients Get a list of the connected machines
session IP Use session with an IP address to start a reverse shell session. Enter "exit" to stop
get IP FILE FORMAT Use get with an IP address followed by a file path and a format to download files. The format options are binary and text.
put IP FILE FORMAT Use put with an IP address followed by a file path and a format to upload files. The format options are binary and text.
scan IP Scan all TCP ports on the client machine
latency IP Get the speed of the connection for a client machine in milliseconds.
programs IP Get a list of the running programs on a client machine.
uptime IP Returns how long the client has been connected in minutes.
reboot IP Reboots the client machine.
clear Clears the screen.
delete IP (Linux only) Delete the client software off of the client.
fill IP Fills the remaining disk space available on the client machine.
help shows the HELP menu
exit Closes Mechtron application

Instructions

Program Parameters Description
-s Server mode
-c IP Client mode. This parameter requires an IP address

Example Usage

Server

sudo ufw allow 6666:6667/tcp
Rule added
Rule added (v6)
chmod +x mechtron.rb
./mechtron -s
starting server on port 6666
version 1
Useful tip: You can use the client ID in place of the IP!
  __  __ ______ _____ _    _ _______ _____   ____  _   _ 
 |  \/  |  ____/ ____| |  | |__   __|  __ \ / __ \| \ | |
 | \  / | |__ | |    | |__| |  | |  | |__) | |  | |  \| |
 | |\/| |  __|| |    |  __  |  | |  |  _  /| |  | | . ` |
 | |  | | |___| |____| |  | |  | |  | | \ \| |__| | |\  |
 |_|  |_|______\_____|_|  |_|  |_|  |_|  \_\\____/|_| \_|
By Evil Threads

[0] 127.0.0.1 chrisbasinger Linux joined
session 0
session started with [0] 127.0.0.1 chrisbasinger Linux
$ whoami
chrisbasinger
$ which ruby
/bin/ruby
$ exit
closing session
get 0 /home/chrisbasinger/script.sh text
download finished
get 0 /home/chrisbasinger/picture.jpg binary
download finished
put 0 /home/chrisbasinger/file.txt text
upload finished
put 0 /home/chrisbasinger/spreadsheet.xlsx binary
upload finished
scan 0
111 open
631 open
2049 open
4444 open
scan finished
latency 0
0.00022492 milliseconds
clients
+------------------------------------------+
|                 CLIENTS                  |
+----+------------+----------------+-------+
| ID | IP ADDRESS | NAME           | OS    |
+----+------------+----------------+-------+
| 0  | 127.0.0.1  | gazelle-laptop | Linux |
+----+------------+----------------+-------+
[1] 192.168.1.219 chris Linux joined
programs 1

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
System Idle Process              0 Services                   0          8 K
System                           4 Services                   0         32 K
Registry                        92 Services                   0     20,628 K
smss.exe                       324 Services                   0        268 K
csrss.exe                      424 Services                   0      2,268 K
wininit.exe                    500 Services                   0        660 K
csrss.exe                      512 Console                    1      2,592 K
winlogon.exe                   596 Console                    1      3,228 K
services.exe                   616 Services                   0      6,212 K

uptime 0
1.7 minutes
exit
exiting the server..

Process finished with exit code 0

Client

chmod +x rat.rb
sudo ./mechtron -c 127.0.0.1

License

Copyright 2023 Chris Basinger

Licensed under the Apache License, Version 2.0(the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.