Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Z4nzu
GitHub Repository: Z4nzu/hackingtool
Path: blob/master/tools/post_exploitation.py
1761 views
1
# coding=utf-8
2
import os
3
4
from core import HackingTool
5
from core import HackingToolsCollection
6
7
from rich.console import Console
8
from rich.theme import Theme
9
from rich.table import Table
10
from rich.panel import Panel
11
from rich.prompt import Prompt
12
13
_theme = Theme({"purple": "#7B61FF"})
14
console = Console(theme=_theme)
15
16
17
class Vegile(HackingTool):
18
TITLE = "Vegile - Ghost In The Shell"
19
DESCRIPTION = "This tool will set up your backdoor/rootkits when " \
20
"backdoor is already setup it will be \n" \
21
"hidden your specific process,unlimited your session in " \
22
"metasploit and transparent."
23
INSTALL_COMMANDS = [
24
"sudo git clone https://github.com/Screetsec/Vegile.git",
25
"cd Vegile && sudo chmod +x Vegile"
26
]
27
RUN_COMMANDS = ["cd Vegile && sudo bash Vegile"]
28
PROJECT_URL = "https://github.com/Screetsec/Vegile"
29
30
def before_run(self):
31
os.system('echo "You can Use Command: \n'
32
'[!] Vegile -i / --inject [backdoor/rootkit] \n'
33
'[!] Vegile -u / --unlimited [backdoor/rootkit] \n'
34
'[!] Vegile -h / --help"|boxes -d parchment')
35
36
37
class ChromeKeyLogger(HackingTool):
38
TITLE = "Chrome Keylogger"
39
DESCRIPTION = "Hera Chrome Keylogger"
40
INSTALL_COMMANDS = [
41
"sudo git clone https://github.com/UndeadSec/HeraKeylogger.git",
42
"cd HeraKeylogger && sudo apt-get install python3-pip -y && sudo pip3 install -r requirements.txt"
43
]
44
RUN_COMMANDS = ["cd HeraKeylogger && sudo python3 hera.py"]
45
PROJECT_URL = "https://github.com/UndeadSec/HeraKeylogger"
46
47
48
class PostExploitationTools(HackingToolsCollection):
49
TITLE = "Post exploitation tools"
50
TOOLS = [
51
Vegile(),
52
ChromeKeyLogger()
53
]
54
55
def _get_attr(self, obj, *names, default=""):
56
for n in names:
57
if hasattr(obj, n):
58
return getattr(obj, n)
59
return default
60
61
def pretty_print(self):
62
table = Table(title="Post-Exploitation Tools", show_lines=True, expand=True)
63
table.add_column("Title", style="purple", no_wrap=True)
64
table.add_column("Description", style="purple")
65
table.add_column("Project URL", style="purple", no_wrap=True)
66
67
for t in self.TOOLS:
68
title = self._get_attr(t, "TITLE", "Title", "title", default=t.__class__.__name__)
69
desc = self._get_attr(t, "DESCRIPTION", "Description", "description", default="").strip().replace("\n", " ")
70
url = self._get_attr(t, "PROJECT_URL", "PROJECT_URL", "PROJECT", "project_url", "projectUrl", default="")
71
table.add_row(str(title), str(desc or "—"), str(url))
72
73
panel = Panel(table, title="[purple]Available Tools[/purple]", border_style="purple")
74
console.print(panel)
75
76
def show_options(self, parent=None):
77
console.print("\n")
78
panel = Panel.fit("[bold magenta]Post-Exploitation Tools Collection[/bold magenta]\n"
79
"Select a tool to view options or run it.",
80
border_style="purple")
81
console.print(panel)
82
83
table = Table(title="[bold cyan]Available Tools[/bold cyan]", show_lines=True, expand=True)
84
table.add_column("Index", justify="center", style="bold yellow")
85
table.add_column("Tool Name", justify="left", style="bold green")
86
table.add_column("Description", justify="left", style="white")
87
88
for i, tool in enumerate(self.TOOLS):
89
title = self._get_attr(tool, "TITLE", "Title", "title", default=tool.__class__.__name__)
90
desc = self._get_attr(tool, "DESCRIPTION", "Description", "description", default="—")
91
table.add_row(str(i + 1), title, desc or "—")
92
93
table.add_row("[red]99[/red]", "[bold red]Exit[/bold red]", "Return to previous menu")
94
console.print(table)
95
96
try:
97
choice = Prompt.ask("[bold cyan]Select a tool to run[/bold cyan]", default="99")
98
choice = int(choice)
99
if 1 <= choice <= len(self.TOOLS):
100
selected = self.TOOLS[choice - 1]
101
# Delegate to collection-style show_options if available
102
if hasattr(selected, "show_options"):
103
selected.show_options(parent=self)
104
# Otherwise call run if available
105
elif hasattr(selected, "run"):
106
selected.run()
107
# If tool exposes before_run (like Vegile), call it to preserve original behavior
108
elif hasattr(selected, "before_run"):
109
selected.before_run()
110
else:
111
console.print("[bold yellow]Selected tool has no runnable interface.[/bold yellow]")
112
elif choice == 99:
113
return 99
114
except Exception:
115
console.print("[bold red]Invalid choice. Try again.[/bold red]")
116
return self.show_options(parent=parent)
117
118
119
if __name__ == "__main__":
120
tools = PostExploitationTools()
121
tools.pretty_print()
122
tools.show_options()
123
124