forked from gl4ssesbo1/Nebula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
help.py
120 lines (106 loc) · 4.9 KB
/
help.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
from termcolor import colored
# I couldn't get this to work with 2 for loops. Never got the tabs right. if any of you can, be my guest
help_dict = {
"Listing Commands":{
"show credentials":"Show credentials configured on the tool",
"show enum":"List all Enumeration modules",
"show privesc":"List all Privilege Escalation modules",
"show persistence":"List all Persistence modules"
},
"Setting Commands":{
"set credentials":"Set IAM credentials to access AWS resources",
"set <option>":"Set options for modules. Eg: 'set HOST 1.2.3.4'"
},
"Module related commands":{
"use":"Use a module. Eg: 'use <module name>'",
"options":"Show options of a module you have selected",
"run":"Run a module you have selected. Eg: 'run <module name>'",
"search":"Search for a module via pattern. Eg: 'search s3'"
}
}
def help():
help_commands()
module_commands()
useragent_commands()
workspace_commands()
def specific_help(command):
if command == 'user-agent':
useragent_commands()
elif command == 'module':
module_commands()
elif command == 'workspace':
workspace_commands()
elif command == 'credentials':
credential_commands()
else:
print(colored("[*] That help does not exist.", "red"))
def help_commands():
print (colored('''
Help Command: Description:
------------- ------------''',"green",attrs=['bold']))
print(colored('''
help Show help for all the commands
help credentials Show help for credentials
help module Show help for modules
help workspace Show help for credentials
help user-agent Show help for credentials
''',"yellow"))
def module_commands():
print(colored('''
Module Commands Description
--------------- -----------''',"green",attrs=['bold']))
print(colored('''
show modules List all the modules
show enum List all Enumeration modules
show exploit List all Exploit modules
show persistence List all Persistence modules
show privesc List all Privilege Escalation modules
show reconnaissance List all Reconnaissance modules
show listener List all Reconnaissance modules
show cleanup List all Enumeration modules
show detection List all Exploit modules
show detectionbypass List all Persistence modules
show lateralmovement List all Privilege Escalation modules
show stager List all Reconnaissance modules
use module <module> Use a module.
options Show options of a module you have selected.
run Run a module you have selected. Eg: 'run <module name>'
search Search for a module via pattern. Eg: 'search s3'
back Unselect a module
set <option> Set option of a module. Need to have the module used first.
unset <option> Unset option of a module. Need to have the module used first.
''',"yellow"))
def workspace_commands():
print(colored('''
Workspace Commands Description
------------------ -----------''',"green",attrs=['bold']))
print(colored('''
create workspace <wp> Create a workspace
use workspace <wp> Use one of the workspaces
remove workspace <wp> Remove a workspace
''',"yellow"))
def useragent_commands():
print(colored('''
User-Agent commands Description
------------------- -----------''',"green",attrs=['bold']))
print(colored('''
set user-agent windows Set a windows client user agent
set user-agent linux Set a linux client user agent
set user-agent custom Set a custom client user agent
show user-agent Show the current user-agent
unset user-agent Use the user agent that boto3 produces
''',"yellow"))
def credential_commands():
print(colored('''
Credential commands Description
------------------- -----------''',"green",attrs=['bold']))
print(colored('''
set credentials <cred name> Inser credentials while providing the name as argument
set credentials Inser credentials without providing the name as argument
use credentials <cred name> Use the credentials you want
show credentials Show all credentials
show current-creds Show credentials you are currently using
remove credentials Delete credentials
import credentials Import credentials dumped before
dump credentials Dump credentials on files stored on directory credentials on Nebula dir
''',"yellow"))