Morsmalleo / AhMyth

Cross-Platform Android Remote Administration Tool | Official maintained repository for the AhMyth R.A.T Project | A dedicated revival of the original repository at https://GitHub.com/AhMyth/AhMyth-Android-RAT
GNU General Public License v3.0
709 stars 175 forks source link

Adding User IP:PORT Input Failed #409

Open arkchkp opened 8 months ago

arkchkp commented 8 months ago

This is an issue with the

Describe the bug

A clear and concise description of what the bug is.


When opening GUI and trying to create a new APK: When click on Build it says: Adding User IP:PORT Input Failed

Whole log output:

[ * ] Reading (IP:PORT) File from
Ahmyth/smali/ahmyth/mine/king/ahmyth/e.smali...
[ * ] Adding USer IP:PORT Input to
Ahmyth/smali/ahmyth/mine/king/ahmyth/e.smali...
[ x ] Adding User IP:PORT Input Failed


To Reproduce

Steps to reproduce the behavior:

  1. Open GUI using "npm start"
  2. Change to APK Builder tab
  3. Type IP and Port
  4. Click "Build"
  5. Error is prompted

Expected behavior

A clear and concise description of what you expected to happen.


It should create the APK. In addition, I tried same procedure from another virtual machine (Kali 2023.3) and it worked properly.

OS Information

  1. OS: e.g. Linux

  2. OS Version: e.g. Ubuntu 23.04

  3. OS Architecture:
    • [ ] 32bit
    • [x] 64bit

Checklist

Morsmalleo commented 8 months ago

There should have been an "IP-Port.log" file generated just outside where built AhMyth payloads are stored on your PC in "Logs" folder, this file contains the reason for the error, can you post the contents of this please

arkchkp commented 8 months ago

Hi!!

Where is/should be located this log file? I am using AhMyth over Ubuntu 23.04 and I cannot see this file into the folder AhMyth/AhMyth-Server.

Thanks!

Morsmalleo commented 8 months ago

Hi!!

Where is/should be located this log file? I am using AhMyth over Ubuntu 23.04 and I cannot see this file into the folder AhMyth/AhMyth-Server.

Thanks!

It should have printed the path where the log file is stored in the black AhMyth log box in the GUI it's usually printed in Yellow letters

arkchkp commented 8 months ago

I can only see this:

image

Morsmalleo commented 8 months ago

I can only see this:

image

Ok we'll have to try something else.

Tell me have you setup AhMyth using a root account or did you invoke the use of sudo when installing AhMyth????

Morsmalleo commented 8 months ago

I can only see this: image

Ok we'll have to try something else.

Tell me have you setup AhMyth using a root account or did you invoke the use of sudo when installing AhMyth????

These IP:PORT problems are usually due to permission problems, that's why I ask

arkchkp commented 8 months ago

Hi!

I installed it using "sudo" as when I deployed AhMyth using root I had some issues when trying to run the software.

What should be the correct procedure? Because I could try again following your recommendations.

Thanks!

Morsmalleo commented 8 months ago

Hi!

I installed it using "sudo" as when I deployed AhMyth using root I had some issues when trying to run the software.

What should be the correct procedure? Because I could try again following your recommendations.

Thanks!

Yeah it's most likely a permission problem.

Go into your AhMyth-Server folder, and run this command and let me know if it fixes the problem

sudo npx electron ./app --no-sandbox start
Morsmalleo commented 8 months ago

Hi! I installed it using "sudo" as when I deployed AhMyth using root I had some issues when trying to run the software. What should be the correct procedure? Because I could try again following your recommendations. Thanks!

Yeah it's most likely a permission problem.

Go into your AhMyth-Server folder, and run this command and let me know if it fixes the problem

sudo npx electron ./app --no-sandbox start

This will start AhMyth out of the chrome sandbox which is required when trying to run AhMyth as root.

Morsmalleo commented 8 months ago

Hello? I don't mean to be rude, but if you're going to open issues, I need you to respond to the fixes I provide so I know whether they've worked for you or not

Morsmalleo commented 8 months ago

If I don't have a response on whether the issue has been fixed or not within 24hrs I'll have to mark the issue for deletion in order to keep the repository issues section clean for everyone

arkchkp commented 8 months ago

Hi!

Sorry but I am on a business trip and I will test it once back.

If you need to close it, do it. I’ll open a new one if needed.

Thanks.

El El vie, 27 oct 2023 a las 16:53, Morsmalleo @.***> escribió:

If I don't have a response on whether the issue has been fixed or not I'll have to mark the issue for deletion in order to keep the repository issues section clean for everyone

— Reply to this email directly, view it on GitHub https://github.com/Morsmalleo/AhMyth/issues/409#issuecomment-1783054035, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2UQ7O74SACHN7PEBA7DFTLYBPDHLAVCNFSM6AAAAAA6ME2LPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTGA2TIMBTGU . You are receiving this because you authored the thread.Message ID: @.***>

Morsmalleo commented 8 months ago

Hi! Sorry but I am on a business trip and I will test it once back. If you need to close it, do it. I’ll open a new one if needed. Thanks. El El vie, 27 oct 2023 a las 16:53, Morsmalleo @.> escribió: If I don't have a response on whether the issue has been fixed or not I'll have to mark the issue for deletion in order to keep the repository issues section clean for everyone — Reply to this email directly, view it on GitHub <#409 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2UQ7O74SACHN7PEBA7DFTLYBPDHLAVCNFSM6AAAAAA6ME2LPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTGA2TIMBTGU . You are receiving this because you authored the thread.Message ID: @.>

Thank you for the reply, I'll leave it open for when you are back

arkchkp commented 8 months ago

Hi!!

I tried with your suggestion and it failed with the following error message:

Invalid MIT-MAGIC-COOKIE-1 keyThe futex facility returned an unexpected error code.
/path/AhMyth/AhMyth-Server/node_modules/electron/dist/electron exited with signal SIGABRT

GUI is not run. However, I tried to run the command without "sudo" and GUI runs. However, still same issue when building the APK and getting the "IP:PORT Input Failed" issue.

Thanks!!!

Morsmalleo commented 8 months ago

Remove AhMyth completely, and I'll run you through it step by step once you've done that

arkchkp commented 8 months ago

Just needed to delete the folder? Or any other instructions?

Thanks!

Morsmalleo commented 8 months ago

Just needed to delete the folder? Or any other instructions?

Thanks!

Remove the entire AhMyth application

arkchkp commented 8 months ago

Sorry for my poor knowledge however I would like to do it perfectly: What is the best procedure to remove AhMyth at all?

Thanks!! BR.

Morsmalleo commented 8 months ago

Sorry for my poor knowledge however I would like to do it perfectly: What is the best procedure to remove AhMyth at all?

Thanks!! BR.

The command rm -rf AhMyth will do it

arkchkp commented 8 months ago

Hi!

I tried it however it seems it did nothing:

ark@ubuntu:/path/AhMyth$ rm -rf AhMyth
ark@ubuntu:/path/AhMyth$ 

All folder still remains with al content inside yet.

Any other way to delete it even manually?

Thanks!

Morsmalleo commented 8 months ago

Bro seriously if you don't know how to properly run this command then I can't help, you need to have more working knowledge of the Linux terminal.

For you, all you need to do is remove AhMyth completely by running the command I gave you in the directory you cloned AhMyth into, and if you still can't understand that or don't know how to do that, then I definitely can't help you, because I'm not a Linux teacher nor is it an issue with the project

arkchkp commented 8 months ago

Bro, I didn’t read in the Readme.md I must have Linux certification to be assisted here :)

I already deleted AhMyth, just a quick reference was more than enough. SORRY FOR THE CONFUSION.

Now that it's deleted, Will you assist me with this procedure to do it workable or must I study Linux Science degree before? :)

Thank you very much buddy.

Morsmalleo commented 7 months ago

I'll assist you, apologies for the wait

arkchkp commented 7 months ago

Hi man!!

Nice, thanks!! Which steps should I follow?

Thanks! BR.

Morsmalleo commented 7 months ago

Hi man!!

Nice, thanks!! Which steps should I follow?

Thanks! BR.

Follow these steps and run each command as they are here, don't run these from your root account either, you only need to invoke Sudo where I've stated so, these are quick-copy commands as well so you can click them to copy them

  1. Remove AhMyth Completely:
    rm -rf AhMyth; sudo rm -rf /usr/local/sbin/ahmyth

    #

  2. git clone AhMyth to your Home directory
    cd ~; git clone https://GitHub.com/Morsmalleo/AhMyth

    #

  3. Install the dependencies
    • Install electron v11.0.0 for AhMyth
      cd ~/AhMyth/AhMyth-Server; npm install electron@11.0.0
    • if you're on a 32bit Linux, then run this command to install Java 11 and Zipalign
      sudo apt install openjdk-11-jdk zipalign -y
    • If your on a 64bit Linux, then run this command to install Java 11, zipalign isn't needed for 64bit Linux.
      sudo apt install openjdk-11-jdk -y
    • Run the command below and Switch your Java Version to Java 11 by typing the number that corresponds to Java 11 after running th command below
      sudo update-alternatives --config java

      #

  4. Start AhMyth
    npm start
    • if you wish to run AhMyth as root at this point you can switch to your root and start AhMyth with the below command
      
      npx electron ./app --no-sandbox start 
arkchkp commented 7 months ago

Hi man!!

It works!! :D

Thank you very much for helping here. Much appreciated.

Morsmalleo commented 7 months ago

Hi man!!

It works!! :D

Thank you very much for helping here. Much appreciated.

You're welcome 😁

Morsmalleo commented 7 months ago

Actually I'll reopen this issue, and see if there's anything we can do in the next release to stop this from happening completely

Morsmalleo commented 7 months ago

Hi! I installed it using "sudo" as when I deployed AhMyth using root I had some issues when trying to run the software. What should be the correct procedure? Because I could try again following your recommendations. Thanks!

Yeah it's most likely a permission problem.

Go into your AhMyth-Server folder, and run this command and let me know if it fixes the problem

sudo npx electron ./app --no-sandbox start

Apparently invoking sudo when trying to run AhMyth as root out of chrome-sandbox sandbox doesn't work, which indicates to me that permissions for the application aren't being set at all, for the time being users can either follow the steps I provided above, or use the command chmod -R a+rwx AhMyth