FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
shellsploit-framework/shell/shellsploit.py at master · rootjacker/shellsploit-framework · GitHub
rootjacker
shellsploit-framework
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
shellsploit-framework
/
shell
/
shellsploit.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
206 lines (168 loc) · 5.62 KB
Breadcrumbs
shellsploit-framework
/
shell
/
shellsploit.py
Copy path
File metadata and controls
206 lines (168 loc) · 5.62 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
#!/usr/bin/env python
#------------------Bombermans Team---------------------------------#
#Author : B3mB4m
#Concat : b3mb4m@protonmail.com
#Project : https://github.com/b3mb4m/Shellsploit
#LICENSE : https://github.com/b3mb4m/Shellsploit/blob/master/LICENSE
#------------------------------------------------------------------#
import
sys
import
os
name
=
os
.
sep
.
join
([
x
for
x
in
os
.
getcwd
().
split
(
os
.
sep
)
if
x
!=
os
.
getcwd
().
split
(
os
.
sep
)[
-
1
]])
sys
.
path
.
append
(
name
)
if
sys
.
version_info
.
major
==
3
:
raw_input
=
input
from
.
control
import
*
from
.
core
.
logo
.
logo
import
banner
from
.
core
.
logo
.
counter
import
*
from
.
core
.
Comp
import
tab
shellcodeModules
=
{
"linux86"
:
[
"binsh_spawn"
,
"read"
,
"exec"
,
"chmod"
,
"tcp_bind"
,
"reverse_tcp"
,
"download&exec"
],
"linux64"
:
[
"read"
,
"binsh_spawn"
,
"tcp_bind"
,
"reverse_tcp"
],
"linux"
:
[
"binsh_spawn"
,
"tcp_bind"
,
"reverse_tcp"
,
"read"
],
"osx86"
:
[
"tcp_bind"
,
"binsh_spawn"
,
"reverse_tcp"
],
"osx64"
:
[
"reverse_tcp"
,
"tcp_bind"
,
"binsh_spawn"
],
"FreeBSDx86"
:
[
"binsh_spawn"
,
"reverse_tcp2"
,
"reverse_tcp"
,
"read"
,
"exec"
,
"tcp_bind"
],
"FreeBSDx64"
:
[
"binsh_spawn"
,
"tcp_bind"
,
"reverse_tcp"
,
"exec"
],
"linux_arm"
:
[
"binsh_spawn"
,
"chmod"
,
"reverse_tcp"
,
"exec"
],
"linux_mips"
:
[
"binsh_spawn"
,
"chmod"
,
"reverse_tcp"
,
"tcp_bind"
],
"windows"
:
[
"messagebox"
,
"download&execute"
,
"exec"
,
"reverse_tcp"
,
"tcp_bind"
],
"solarisx86"
:
[
"binsh_spawn"
,
"read"
,
"reverse_tcp"
,
"tcp_bind"
],
"injectors"
:
[
"Linux/x86/ptrace"
,
"Linux64/ptrace"
,
"Windows/x86/tLsInjectorDLL"
,
"Windows/x86/CodecaveInjector"
,
"Windows/Dllinjector"
,
"Windows/BFD/Patching"
,
"MacOSX/BFD/Patching"
,
"Linux/BFD/Patching"
,
"Linux/ARM/x86/BFD/Patching"
,
"FreeBSD/x86/BFD/Patching"
,
#Dllinjector is still passive.
],
"backdoors"
:
[
"linux86/reverse_tcp"
,
"linux64/reverse_tcp"
,
"osx86/reverse_tcp"
,
"unix/python/reverse_tcp"
,
"unix/perl/reverse_tcp"
,
"unix/bash/reverse_tcp"
,
"unix/ruby/reverse_tcp"
]
}
tab
.
start
(
1
)
db
=
B3mB4mLogo
().
start
()
def
start
():
print
(
banner
(
db
[
0
],
db
[
1
],
db
[
2
],
db
[
3
]
+
5
))
shellsploit
()
def
shellsploit
():
try
:
bash
=
bcolors
.
OKBLUE
+
bcolors
.
UNDERLINE
+
"ssf"
+
bcolors
.
ENDC
bash
+=
bcolors
.
OKBLUE
+
" > "
+
bcolors
.
ENDC
terminal
=
raw_input
(
bash
)
except
KeyboardInterrupt
:
sys
.
exit
(
"
\n
[*] (Ctrl + C ) Detected, Trying To Exit ..."
)
if
terminal
[:
4
]
==
"help"
:
from
.
core
.
help
import
mainhelp
mainhelp
()
shellsploit
()
elif
terminal
[:
14
]
==
"show backdoors"
:
from
.
core
.
backdoors
import
backdoorlist
backdoorlist
()
shellsploit
()
elif
terminal
[:
2
]
==
"os"
:
from
.
core
.
commands
import
oscommand
oscommand
(
terminal
[
3
:])
shellsploit
()
elif
terminal
[:
6
]
==
"banner"
:
print
(
banner
(
db
[
0
],
db
[
1
],
db
[
2
],
db
[
3
]
+
4
))
shellsploit
()
elif
terminal
[:
3
]
==
"use"
:
all_sc_modules
=
[]
for
platforms
in
shellcodeModules
.
keys
():
for
shellcodeType
in
shellcodeModules
[
platforms
]:
all_sc_modules
.
append
(
"{}/{}"
.
format
(
platforms
,
shellcodeType
))
if
terminal
.
split
()[
1
]
in
all_sc_modules
:
for
shellcode
in
all_sc_modules
:
if
terminal
.
split
()[
1
]
==
shellcode
:
B3mB4m
().
control
(
shellcode
)
shellsploit
()
print
(
"
\n
Module not avaible !
\n
"
)
shellsploit
()
elif
terminal
[:
14
]
==
"show injectors"
:
from
.
core
.
lists
import
injectorlist
injectorlist
()
shellsploit
()
elif
terminal
[:
5
]
==
"clear"
:
from
.
core
.
commands
import
clean
clean
()
shellsploit
()
elif
terminal
[:
12
]
==
"show modules"
:
from
.
core
.
shellcodes
import
shellcodelist
shellcodelist
()
shellsploit
()
elif
terminal
[:
4
]
==
"exit"
:
sys
.
exit
(
"
\n
Thanks for using shellsploit !
\n
"
)
else
:
if
terminal
==
""
:
shellsploit
()
else
:
print
(
bcolors
.
RED
+
bcolors
.
BOLD
+
"[-] Unknown command: %s"
%
terminal
+
bcolors
.
ENDC
)
shellsploit
()
def
main
():
import
optparse
parser
=
optparse
.
OptionParser
()
parser
.
add_option
(
'-p'
,
'--payload'
,
action
=
"store"
)
parser
.
add_option
(
'-e'
,
'--encoder'
,
action
=
"store"
,
default
=
"False"
)
parser
.
add_option
(
'-o'
,
'--output'
,
action
=
"store"
,
default
=
True
)
parser
.
add_option
(
'-l'
,
'--list'
,
action
=
"store"
,
default
=
True
)
parser
.
add_option
(
'-n'
,
'--nc'
,
action
=
"store"
,
default
=
True
)
parser
.
add_option
(
'--host'
,
action
=
"store"
)
parser
.
add_option
(
'--port'
,
action
=
"store"
)
(
options
,
args
)
=
parser
.
parse_args
()
if
options
.
list
==
"backdoors"
:
from
.
core
.
backdoors
import
backdoorlist
backdoorlist
(
require
=
False
)
sys
.
exit
()
if
options
.
list
==
"shellcodes"
:
from
.
core
.
shellcodes
import
shellcodelist
shellcodelist
()
sys
.
exit
()
if
options
.
list
==
"encoders"
:
from
.
core
.
backdoors
import
encoderlist
encoderlist
(
require
=
False
)
sys
.
exit
()
if
options
.
list
==
"injectors"
:
from
.
core
.
lists
import
injectorlist
injectorlist
()
sys
.
exit
()
elif
options
.
nc
==
"netcat"
or
options
.
nc
==
"nc"
:
from
.
Session
.
netcat
import
nc
if
options
.
port
:
nc
(
PORT
)
else
:
nc
()
sys
.
exit
()
else
:
if
options
.
payload
:
if
options
.
host
and
options
.
port
:
from
.
core
.
backdoors
import
backdoorlist
from
.
core
.
backdoors
import
encoderlist
if
options
.
payload
in
backdoorlist
(
require
=
True
):
from
.
Session
.
generator
import
process
if
"py"
in
options
.
encoder
and
"python"
not
in
options
.
payload
:
sys
.
exit
(
"
\n
This encoder can not use with that payload
\n
"
)
if
options
.
output
:
process
(
options
.
payload
,
options
.
host
,
options
.
port
,
options
.
encoder
,
options
.
output
)
else
:
process
(
options
.
payload
,
options
.
host
,
options
.
port
,
options
.
encoder
,
True
)
#Default, file will be create with random name.
else
:
sys
.
exit
(
"
\n
python shellsploit -p PAYLOAD -e ENCODER --host IP --port P0RT
\n
"
)
else
:
sys
.
exit
(
"
\n
python shellsploit -p PAYLOAD -e ENCODER --host IP --port P0RT
\n
"
)
else
:
start
()
Back
|
FazBrowse Home
|
New Git URL