Skip to content

Commit 9177990

Browse files
authored
Merge pull request #1 from themalwarenews/V2.0
Grauda V2.0
2 parents 5bb974a + 6de5892 commit 9177990

2 files changed

Lines changed: 102 additions & 94 deletions

File tree

README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
1-
# GARUDA
21

3-
![image](https://user-images.githubusercontent.com/100226024/155191796-04b494f7-90c1-4e10-b9c0-1f8f01c9dd65.png)
2+
# GARUDA
43

4+
Garuda is a python script designed to streamline the installation process of Android penetration testing tools in a single execution.
55

6+
![image](https://github.com/themalwarenews/Garuda/assets/31186224/84b0efdb-8f27-4d03-bfaf-32263d8deaae)
67

78

8-
### Garuda is a simple automated script, that installs and configures the android penetration testing setup.
9-
---
10-
### NOTE: If you are using Virtual machines as an attacking device, then connect the android emulator via ADB.
11-
---
129

13-
### PRESEQUITES
14-
1. Linux
15-
2. Genymotion/Android emulator/Rooted device
10+
## PRESEQUITES
11+
- Any Linux OS
12+
- Genymotion/Android Emulator/Rooted device
13+
- Go and npm to install DAST packages.
1614

1715

18-
---
1916

2017
## Tools Installed:
2118

22-
### APK Packages:
19+
### APK Packages
2320

2421
* [Xposed](http://repo.xposed.info/module/de.robv.android.xposed.installer)
2522
* [Inspeckage](https://github.com/ac-pm/Inspeckage)
@@ -29,47 +26,50 @@
2926
* [SSL Unpin](https://github.com/ac-pm/SSLUnpinning_Xposed)
3027
* [RootCloak](http://repo.xposed.info/module/com.devadvance.rootcloak2)
3128

32-
---
3329

3430
### Utilities
3531

3632
* [Frida-server](https://frida.re/)
3733
* [tcpdump](https://www.androidtcpdump.com/)
3834

39-
---
40-
4135
### Flash file
4236

4337
* [Xposed-framework](https://repo.xposed.info/)
4438

45-
---
46-
4739
### System Tools
4840

4941
* [Drozer](https://labs.mwrinfosecurity.com/tools/drozer/)
5042
* [Frida-tools](https://frida.re/)
51-
* APKtool
52-
* Objection
53-
54-
---
43+
* [APKtool](https://apktool.org/)
44+
* [Objection](https://github.com/sensepost/objection)
45+
* [apkleaks](https://github.com/dwisiswant0/apkleaks)
46+
* [andriller](https://github.com/den4uk/andriller)
47+
* [quark-engine](https://github.com/quark-engine/quark-engine)
5548

56-
## How to use
57-
1. Make sure you have connected the android virtual device to your attacking machine.
58-
2. Download or Clone the Garuda Repo.
59-
3. From the terminal, move into Garuda Directory
60-
4. Run ```python garuda.py```
6149

62-
![image](https://user-images.githubusercontent.com/100226024/155191673-6ab5cf70-6ec1-432b-b0bc-e379088462ef.png)
50+
### DAST Tools
6351

52+
* [RMS](https://github.com/m0bilesecurity/RMS-Runtime-Mobile-Security)
53+
* [dexcalibur](https://github.com/FrenchYeti/dexcalibur)
6454

65-
## Installation Video
6655

56+
## Installation
6757

58+
Make sure you have connected the android virtual device to your attacking machine.
6859

69-
https://user-images.githubusercontent.com/100226024/155308712-de2fb7b3-45ef-46cc-bb56-341f01e6dd31.mp4
60+
```bash
61+
git clone https://github.com/themalwarenews/Garuda
62+
cd Garuda
63+
python3 garuda.py
64+
```
65+
![image](https://github.com/themalwarenews/Garuda/assets/31186224/35c783c7-aa57-47e3-a1d8-6d8b05883f12)
7066

7167

68+
Feel free to notify us for any errors :slightly_smiling_face:
69+
70+
Follow us on :
7271

73-
### Inspiration Droxes tool.
72+
[<img src='https://user-images.githubusercontent.com/100226024/229274315-c12a320c-cf5b-44da-ae6d-f3811957663d.svg' alt='linkedin' height='40'>](https://www.linkedin.com/in/anonsharan/) [<img src='https://user-images.githubusercontent.com/100226024/229274268-453d1eec-4d98-4dad-80c8-885b4c6d0854.svg' alt='instagram' height='40'>](https://www.instagram.com/hackwithsharan/) [<img src='https://user-images.githubusercontent.com/100226024/229274348-8af09e55-c563-4e0c-9118-59af0fda9df9.svg' alt='twitter' height='40'>](https://twitter.com/anon_sharzzk) [<img src='https://user-images.githubusercontent.com/100226024/229274377-07f7c7d2-2cf9-4bfc-8727-0eba0eb4cfe4.svg' alt='YouTube' height='40'>](https://www.youtube.com/channel/ByteTheories)
7473

7574

75+

garuda.py

Lines changed: 73 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,109 @@
1-
# !/usr/bin/env python
2-
31
import os
4-
import configparser
52
import subprocess
6-
import threading
73
import colorama
84
from colorama import Fore
9-
from time import sleep
10-
from ppadb.client import Client as AdbClient
11-
125

13-
__author__ = 'themalwarenews ( @themalwarenews) '
14-
__inspired_by__ = ' DROXES '
6+
# Define constants for directories and file paths
7+
APK_DIR = os.path.join(os.getcwd(), "apk")
8+
XPOSED_DIR = os.path.join(os.getcwd(), "xposed")
9+
BIN_DIR = os.path.join(os.getcwd(), "bin")
10+
SYSTEM_DIR = os.path.join(os.getcwd(), "system")
1511

1612
class Garuda:
17-
1813
def __init__(self):
1914
self.apk_list = ['xposed.apk', 'drozer.apk', 'term.apk', 'busybox.apk', 'rootcloak.apk', 'inspeckage.apk', 'SSLunpin.apk']
20-
self.test_list = ['drozer.apk']
21-
self.server_list = ['tcpdump', 'frida_server']
2215
self.flashfile = ['xposed_flash.zip']
16+
self.server_list = ['tcpdump', 'frida_server']
2317
self.tools_list = ['apktool','python-pip','python3-pip', 'python-dev', 'python-twisted']
24-
self.py_dependencies = ['frida','frida-tools','objection']
18+
self.py_dependencies = ['frida','frida-tools','objection','apkleaks','andriller','quark-engine']
2519
self.sys_tools = ['drozer.deb']
20+
self.DAST_tool = ['rms-runtime-mobile-security','dexcalibur']
2621

2722
def welcome(self):
28-
__banner__='''\t ██████╗ █████╗ ██████╗ ██╗ ██╗██████╗ █████╗
29-
\t██╔════╝ ██╔══██╗██╔══██╗██║ ██║██╔══██╗██╔══██╗
30-
\t██║ ███╗███████║██████╔╝██║ ██║██║ ██║███████║
31-
\t██║ ██║██╔══██║██╔══██╗██║ ██║██║ ██║██╔══██║
32-
\t╚██████╔╝██║ ██║██║ ██║╚██████╔╝██████╔╝██║ ██║
33-
\t ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝
34-
'''
35-
36-
print("\n")
37-
print(Fore.RED+" \t WELCOME TO ALL IN ONE ANDROID PENTESTING SETUP TOOL\n")
38-
print(Fore.GREEN+__banner__)
39-
40-
print (" ------------------------------------------------------------------")
41-
print ("\n\t| TOOL : Android Pentesting setup \t\t|")
42-
print ("\t| AUTHOR : " + __author__ + " |")
43-
print ("\t| Inspiration : " + __inspired_by__ + "\t\t\t|")
23+
banner = '''
24+
██████╗ █████╗ ██████╗ ██╗ ██╗██████╗ █████╗
25+
██╔════╝ ██╔══██╗██╔══██╗██║ ██║██╔══██╗██╔══██╗
26+
██║ ███╗███████║██████╔╝██║ ██║██║ ██║███████║
27+
██║ ██║██╔══██║██╔══██╗██║ ██║██║ ██║██╔══██║
28+
╚██████╔╝██║ ██║██║ ██║╚██████╔╝██████╔╝██║ ██║
29+
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝
30+
'''
31+
print(f"\n{Fore.RED}\t WELCOME TO ALL IN ONE ANDROID PENTESTING SETUP TOOL\n")
32+
print(f"{Fore.GREEN}{banner}\n")
33+
print(" ------------------------------------------------------------------")
34+
print("\n\t| TOOL : Android Pentesting setup \t\t|")
35+
print("\t| AUTHOR : themalwarenews ( @themalwarenews) |")
36+
print("\t| VERSION : 2.0 \t\t\t\t|\n")
37+
print(" ------------------------------------------------------------------\n\n")
38+
print(f"{Fore.RED}\t NOTE: MAKE SURE YOU HAVE TURNED ON YOUR ANDROID VIRTUAL DEVICE / REAL DEVICE AND CONNECTED VIA ADB")
4439

45-
print ("\t| VERSION : 1.0 \t\t\t\t|\n")
46-
print (" ------------------------------------------------------------------")
40+
def install_sys_tools(self):
41+
print(f"{Fore.BLUE}\n[+] Setting up the system")
42+
for tool in self.tools_list:
43+
subprocess.call(['sudo', 'apt-get', '-f', 'install', tool], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
44+
print(f"{Fore.WHITE}\t[+] Installed {tool}")
4745

48-
print("\n\n")
49-
print(Fore.RED+"\t NOTE: MAKE SURE YOU HAVE TURNED ON YOUR ANDROID VIRTUAL DEVICE / REAL DEVICE AND CONNECTED VIA ADB")
46+
for dependency in self.py_dependencies:
47+
subprocess.call(['sudo', '-H', 'pip3', 'install', dependency], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
48+
print(f"\t[+] Installed {dependency}")
5049

50+
for dependency in self.DAST_tool:
51+
try:
52+
subprocess.check_output(['npm', '--version'])
53+
subprocess.call(['sudo', 'npm', 'install', '-g', dependency], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
54+
print(f"\t[+] Installed {dependency}")
55+
except subprocess.CalledProcessError:
56+
print(f"\t[+] install npm first")
5157

52-
def install_sys_tools(self):
53-
print (Fore.BLUE+"\n[+] Setting up the system")
54-
for i in self.tools_list:
55-
subprocess.call(['sudo', 'apt-get', '-f', 'install', i], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
56-
print (Fore.WHITE+"\t[+] Installed " + i)
5758

58-
for j in self.py_dependencies:
59-
subprocess.call(['sudo', '-H', 'pip', 'install', j], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
60-
print ("\t[+] Installed " + j)
61-
62-
for k in self.sys_tools:
63-
subprocess.call(['sudo', 'dpkg', '-i', os.getcwd() + "/system/" + k], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
64-
print ("\t[+] Installed " + k)
59+
for sys_tool in self.sys_tools:
60+
subprocess.call(['sudo', 'dpkg', '-i', os.path.join(SYSTEM_DIR, sys_tool)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
61+
print(f"\t[+] Installed {sys_tool}")
6562

6663
def install_apks(self):
67-
print (Fore.BLUE+"\n[+] Installing APK Tools")
68-
for i in self.apk_list:
69-
subprocess.Popen(['adb', 'install', '-r', os.getcwd() + "/apk/" + i],stdout=subprocess.PIPE, stderr=subprocess.PIPE)
70-
print (Fore.WHITE+"\n \t[+] Installed " + i)
71-
64+
print(f"{Fore.BLUE}\n[+] Installing APK Tools")
65+
for apk in self.apk_list:
66+
subprocess.Popen(['adb', 'install', '-r', os.path.join(APK_DIR, apk)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
67+
print(f"{Fore.WHITE}\n \t[+] Installed {apk}")
68+
7269
def install_xposed(self):
73-
print (Fore.BLUE+"\n[+] Installing xposedframework")
74-
for i in self.flashfile:
75-
subprocess.Popen(['adb', 'push', os.getcwd() + '/xposed/' + i, '/sdcard/Download'],stdout=subprocess.PIPE, stderr=subprocess.PIPE)
76-
print (Fore.WHITE+"\n \t[+] Installed " + i)
70+
print(f"{Fore.BLUE}\n[+] Installing xposedframework")
71+
for flashfile in self.flashfile:
72+
subprocess.Popen(['adb', 'push', os.path.join(XPOSED_DIR, flashfile), '/sdcard/Download'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
73+
print(f"{Fore.WHITE}\n \t[+] Installed {flashfile}")
7774

7875
def install_server_files(self):
79-
print (Fore.BLUE+"\n[+] Installing Binary Tools")
80-
for i in self.server_list:
81-
subprocess.Popen(['adb', 'push', os.getcwd() + '/bin/' + i, '/data/local/tmp'],stdout=subprocess.PIPE, stderr=subprocess.PIPE)
82-
print (Fore.WHITE+"\n \t[+] Installed " + i)
76+
print(f"{Fore.BLUE}\n[+] Installing Binary Tools")
77+
for server in self.server_list:
78+
subprocess.Popen(['adb', 'push', os.path.join(BIN_DIR, server), '/data/local/tmp'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
79+
print(f"{Fore.WHITE}\n \t[+] Installed {server}")
8380
os.system('adb shell "chmod 777 /data/local/tmp/frida_server"')
8481
os.system('adb shell "chmod 777 /data/local/tmp/tcpdump"')
85-
print(Fore.RED+"\n All the tools have been installed, Please goahead and configure the Xposed Framework.")
86-
print(Fore.RED+"\n watch this video to setup Xposed-framework link : https://youtu.be/Sy09edb57hg .")
87-
82+
print(f"{Fore.RED}\n All the tools have been installed, Please go ahead and configure the Xposed Framework.")
83+
print(f"{Fore.RED}\n Watch this video to set up Xposed-framework link: https://youtu.be/Sy09edb57hg.")
84+
85+
def install_go_based_tools(self):
86+
subprocess.check_call(['sudo','go', 'install', 'github.com/andpalmier/apkingo/cmd/apkingo@latest'])
87+
print("apkingo has been installed successfully.")
88+
89+
def is_go_installed(self):
90+
try:
91+
subprocess.check_output(['go', 'version'])
92+
return True
93+
except (subprocess.CalledProcessError, FileNotFoundError):
94+
return False
95+
8896

8997
def main():
9098
ga = Garuda()
9199
ga.welcome()
92-
ga.install_sys_tools()
100+
ga.install_sys_tools()
101+
if ga.is_go_installed():
102+
ga.install_go_based_tools()
93103
ga.install_apks()
94104
ga.install_xposed()
95105
ga.install_server_files()
96-
106+
97107

98108
if __name__ == '__main__':
99109
main()
100-
101-

0 commit comments

Comments
 (0)