- System/Server Administration
- Android Development
- IT Security
tomiwa-ot / moukthar Goto Github PK
View Code? Open in Web Editor NEWAndroid remote administration tool
License: GNU General Public License v3.0
Android remote administration tool
License: GNU General Public License v3.0
Hello, I tried to perform the installation as follows, but I was not successful.
Ubuntu 22.04.3 LTS
sudo apt install apache2
sudo git clone https://github.com/Tomiwa-Ot/moukthar.git
sudo mv moukthar/Server/* /var/www/html/
cd /var/www/html/c2-server
sudo apt install composer
composer install
sudo nano .env
DB_HOST='localhost'
DB_NAME='cc'
DB_USER='myuser' *CHANGED
DB_PASSWORD='b!mbo4431312deCDAWAxlex' *CHANGED
WS_SERVER='ws://localhost:8080'
cd /var/www/html/web\ socket/
composer install
sudo nano .env
DB_HOST='localhost'
DB_NAME='cc'
DB_USER='myuser' *CHANGED
DB_PASSWORD='b!mbo4431312deCDAWAxlex' *CHANGED
WS_SERVER='ws://localhost:8080'
sudo apt-get install mysql-server
sudo mysql -u root -p
CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'b!mbo4431312deCDAWAxlex';
GRANT ALL PRIVILEGES ON . TO 'myuser'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
sudo mysql -u myuser -p
create database cc;
exit
cd ..
sudo mysql -u myuser -p cc < /var/www/html/database.sql
sudo systemctl start apache2
sudo systemctl start mysql
sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2024-02-26 18:51:38 +03; 4s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 8027 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 8031 (apache2)
Tasks: 55 (limit: 9496)
Memory: 21.2M
CGroup: /system.slice/apache2.service
├─8031 /usr/sbin/apache2 -k start
├─8032 /usr/sbin/apache2 -k start
└─8033 /usr/sbin/apache2 -k start
Feb 26 18:51:38 DESKTOP-8VFMU1B systemd[1]: Starting The Apache HTTP Server...
Feb 26 18:51:38 DESKTOP-8VFMU1B systemd[1]: Started The Apache HTTP Server.
sudo systemctl status mysql
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2024-02-26 18:29:42 +03; 22min ago
Process: 7613 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 7621 (mysqld)
Status: "Server is operational"
Tasks: 41 (limit: 9496)
Memory: 411.7M
CGroup: /system.slice/mysql.service
└─7621 /usr/sbin/mysqld
Feb 26 18:29:42 DESKTOP-8VFMU1B systemd[1]: Starting MySQL Community Server...
Feb 26 18:29:42 DESKTOP-8VFMU1B systemd[1]: Started MySQL Community Server.
php web\ socket/App.php
Error:
PHP Fatal error: Uncaught PDOException: could not find driver in /var/www/html/web socket/src/Database.php:20
Stack trace:
#0 /var/www/html/web socket/src/Database.php(20): PDO->__construct()
#1 /var/www/html/web socket/App.php(14): C2\Database->__construct()
#2 {main}
thrown in /var/www/html/web socket/src/Database.php on line 20
sudo apt-get install php-mysql
php web\ socket/App.php
Log:
PHP Fatal error: Uncaught RuntimeException: Failed to listen on "tcp://0.0.0.0:8080": Address already in use (EADDRINUSE) in /var/www/html/web socket/vendor/react/socket/src/TcpServer.php:184
Stack trace:
#0 /var/www/html/web socket/vendor/react/socket/src/Server.php(77): React\Socket\TcpServer->__construct()
#1 /var/www/html/web socket/vendor/cboden/ratchet/src/Ratchet/Server/IoServer.php(59): React\Socket\Server->__construct()
#2 /var/www/html/web socket/App.php(22): Ratchet\Server\IoServer::factory()
#3 {main}
thrown in /var/www/html/web socket/vendor/react/socket/src/TcpServer.php on line 184
Maybe its work.
sudo nano /etc/apache2/apache2.conf
I ADDED:
<Directory /var/www/html/c2-server>
Options -Indexes
DirectoryIndex app.php
AllowOverride All
Require all granted
</Directory>
sudo service apache2 restart
Now i go to my panel but have this error
http://172.24.253.12/c2-server/
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
tail -f /var/log/apache2/error.log
Log:
[Mon Feb 26 19:11:23.240760 2024] [core:alert] [pid 9234:tid 139799440651840] [client 172.24.240.1:64634] /var/www/html/c2-server/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
sudo a2enmod rewrite
sudo systemctl restart apache2
Now error gone but when i enter the panel i only face php codes
sudo apt install libapache2-mod-php
sudo systemctl restart apache2
Now there is a php page but its sources are not loaded
Log:
fontawesome.min.css:1
Failed to load resource: the server responded with a status of 404 (Not Found)
brands.min.css:1
master.css:1
bootstrap.min.css:1
flag-icon.min.css:1
jquery.min.js:1
bootstrap.bundle.min.js:1
datatables.min.js:1
datatables.min.css:1
c2-server/:1
fontawesome.min.css:1
solid.min.css:1
brands.min.css:1
master.css:1
bootstrap.min.css:1
flag-icon.min.css:1
datatables.min.css:1
cd c2-server/src/View
nano header.php && nano footer.php
OLD
<link href="/src/View/assets/..........css" rel="stylesheet">
CHANGED
<link href="src/View/assets/..........css" rel="stylesheet">
remove "/" on src
Apply to all
Now i have only this errors
GET http://172.24.253.12/c2-server/ 404 (Not Found) c2-server/:1
POST https://translate.googleapis.com/element/log?format=json&hasfast=true&authuser=0 net::ERR_BLOCKED_BY_CLIENT
php web\ socket/App.php
Web sockets started...
Now I opened the browser and went to my panel http://172.24.253.12/c2-server/. I am directly on the header.php page without login.php. Why am I not on the login screen and why only header.php appears.
When I examined the point where I am, I realized that the header.php and footer.php page works, but the home.php page cannot work within this page.
Look
also when I press the "logout" button it throws me to http://172.24.253.12/logout
Not Found
The requested URL was not found on this server.
the same thing happens with the "reset password" button.
there seems to be a lot of errors, is there something I'm missing?
maybe I didn't install some dependencies?
or do we have to edit the code ourselves?
sudo cat /var/log/apache2/error.log
when I run this code I don't see any current errors.
Can you make a video of how it was installed?
please make a video about the installation of mokhtar Android remote administration,
otherwise nothing is clear.
Please Can you tell how to build client apk?
Please make it possible for the apk to be build with apktool available in linux, for example haxRAT "https://github.com/Hax4us/haxRat"
I'm your neighbor Following you from from CMR, A python malware sample developer.
under Installation in Move server files to /var/www/html/ and install dependencies
under the command cd /var/www/html/web-ocket/ ,should be cd /var/www/html/web-socket/
cool project tho, looking forward to seeing future versions
Im just writing down the short and quick steps to make it work with nginx.
Installing it on Ubuntu:
==================
sudo apt install nginx
Adjusting_Firewall_(if you are using)
=============================
sudo ufw app list
After Installing nginx it will white list the service , in-case if does not white list use following
sudo ufw allow 'Nginx HTTP'
Checking_Ngnix_Status
====================
systemctl status nginx
Modify the Hosts File (Optional)
=========================
Most of the time our domain_name took longer then we expect, so to test our config we need to modify /etc/hosts
file.
Syntax is <Your_IP/VPS> <Domain_Name>
nano /etc/hosts
192.168.2.50 testme.com
Save the file
Now let's configure nginx to work with our configuration.
Create_Directory
==============
sudo mkdir -p /var/www/viva
sudo chown -R www-data.www-data /var/www/viva
Creating_Config_File_For_Moukthar
=============================
sudo nano /etc/nginx/sites-available/viva
Copy and paste below lines
server{
listen 80;
#root /var/www/viva;
# Add index.php to the list if you are using PHP
#index index.html index.htm index.nginx-debian.html;
server_name testme.com;
access_log /var/log/nginx/viva.access.log;
error_log /var/log/nginx/viva.error.log;
location / {
root /var/www/viva;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
include proxy_params;
proxy_pass http://127.0.0.1:5001;
}
}
Save file with above code.
Restart nginx service
systemctl restart nginx.service
Now copy the content of server folder into /var/www/viva (THIS STEP IS OPTIONAL)
cp -R server/* /var/www/viva
Actually this whole project is based on python-3 and flask use for web server .
Install_Python_Dependancies
==========================
pip3 install flask
pip3 install flask-socketio
pip3 install passlib
== Tested if you get an error "GET /socket.io/?EIO=3&transport=polling HTTP/1.1" 400 - bla bla then make sure you use following packages along with the version I mention.==
pip3 install flask-socketio==3.1
pip3 install python-engineio==3.1
pip3 install python-socketio==2.1
There might be other dependencies you needed depending on your python installation. In my case I had to install above modules.
Run_Python3_Server
=================
python3 init.py
Hope this will help all those who are lost how to get it work with nginx :) .
Regards
After building apk correctly an doing everything correct, my pc receives connection but client(my phone) doesn't show up in web ui
moukthar.service: Failed to execute command: No such file or directory
moukthar.service: Failed at step EXEC spawning /var/www/andro/venv/bin/gunicorn: No such file or directory
I could not find venv/bin any where in server folder ?
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Error Log
Process: com.ot.grhq.client, PID: 8548
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ot.grhq.client/com.ot.grhq.client.MainActivity}: java.lang.SecurityException: getLine1NumberForDisplay: Neither user 10183 nor current process has android.permission.READ_PHONE_STATE, android.permission.READ_SMS, or android.permission.READ_PHONE_NUMBERS
Additional context
Is there any specific android version that this app can running well ?
full log :
FATAL EXCEPTION: main
Process: com.ot.grhq.client, PID: 8818
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ot.grhq.client/com.ot.grhq.client.MainActivity}: java.lang.SecurityException: getLine1NumberForDisplay: Neither user 10183 nor current process has android.permission.READ_PHONE_STATE, android.permission.READ_SMS, or android.permission.READ_PHONE_NUMBERS
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3645)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:138)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7924)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: java.lang.SecurityException: getLine1NumberForDisplay: Neither user 10183 nor current process has android.permission.READ_PHONE_STATE, android.permission.READ_SMS, or android.permission.READ_PHONE_NUMBERS
at android.os.Parcel.createExceptionOrNull(Parcel.java:3011)
at android.os.Parcel.createException(Parcel.java:2995)
at android.os.Parcel.readException(Parcel.java:2978)
at android.os.Parcel.readException(Parcel.java:2920)
at com.android.internal.telephony.ITelephony$Stub$Proxy.getLine1NumberForDisplay(ITelephony.java:10150)
at android.telephony.TelephonyManager.getLine1Number(TelephonyManager.java:5064)
at android.telephony.TelephonyManager.getLine1Number(TelephonyManager.java:5032)
at com.ot.grhq.client.functionality.Utils.phoneNumber(Utils.java:97)
at com.ot.grhq.client.MainActivity.setClientID(MainActivity.java:133)
at com.ot.grhq.client.MainActivity.onCreate(MainActivity.java:75)
at android.app.Activity.performCreate(Activity.java:8342)
at android.app.Activity.performCreate(Activity.java:8321)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:138)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7924)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.