Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
routersploit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
czos-dpend
routersploit
Commits
4dc1a1cd
Commit
4dc1a1cd
authored
Apr 27, 2016
by
ArtificialImmunity
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2 from reverse-shell/master
Update from original
parents
a05553a1
677863ca
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
50 additions
and
22 deletions
+50
-22
README.md
README.md
+1
-1
interpreter.py
routersploit/interpreter.py
+1
-1
http_form_bruteforce.py
routersploit/modules/creds/http_form_bruteforce.py
+21
-8
http_form_default.py
routersploit/modules/creds/http_form_default.py
+21
-8
autopwn.py
routersploit/modules/scanners/autopwn.py
+2
-2
dlink_scan.py
routersploit/modules/scanners/dlink_scan.py
+1
-1
utils.py
routersploit/utils.py
+1
-1
defaults.txt
routersploit/wordlists/defaults.txt
+1
-0
passwords.txt
routersploit/wordlists/passwords.txt
+1
-0
No files found.
README.md
View file @
4dc1a1cd
...
@@ -14,9 +14,9 @@ It consists of various modules that aids penetration testing operations:
...
@@ -14,9 +14,9 @@ It consists of various modules that aids penetration testing operations:
# Installation
# Installation
sudo apt-get install python-requests python-paramiko python-netsnmp
git clone https://github.com/reverse-shell/routersploit
git clone https://github.com/reverse-shell/routersploit
cd routersploit
cd routersploit
pip install -r requirements.txt
./rsf.py
./rsf.py
# Update
# Update
...
...
routersploit/interpreter.py
View file @
4dc1a1cd
...
@@ -86,7 +86,7 @@ class BaseInterpreter(object):
...
@@ -86,7 +86,7 @@ class BaseInterpreter(object):
command_handler
(
args
)
command_handler
(
args
)
except
RoutersploitException
as
err
:
except
RoutersploitException
as
err
:
utils
.
print_error
(
err
)
utils
.
print_error
(
err
)
except
KeyboardInterrupt
:
except
(
KeyboardInterrupt
,
EOFError
)
:
print
()
print
()
utils
.
print_status
(
"routersploit stopped"
)
utils
.
print_status
(
"routersploit stopped"
)
break
break
...
...
routersploit/modules/creds/http_form_bruteforce.py
View file @
4dc1a1cd
...
@@ -34,8 +34,9 @@ class Exploit(exploits.Exploit):
...
@@ -34,8 +34,9 @@ class Exploit(exploits.Exploit):
threads
=
exploits
.
Option
(
8
,
'Number of threads'
)
threads
=
exploits
.
Option
(
8
,
'Number of threads'
)
usernames
=
exploits
.
Option
(
'admin'
,
'Username or file with usernames (file://)'
)
usernames
=
exploits
.
Option
(
'admin'
,
'Username or file with usernames (file://)'
)
passwords
=
exploits
.
Option
(
wordlists
.
passwords
,
'Password or file with passwords (file://)'
)
passwords
=
exploits
.
Option
(
wordlists
.
passwords
,
'Password or file with passwords (file://)'
)
form
=
exploits
.
Option
(
'auto'
,
'Post Data: auto or in form login={{
LOGIN
}}&password={{PASS}}&submit'
)
form
=
exploits
.
Option
(
'auto'
,
'Post Data: auto or in form login={{
USER
}}&password={{PASS}}&submit'
)
path
=
exploits
.
Option
(
'/login.php'
,
'URL Path'
)
path
=
exploits
.
Option
(
'/login.php'
,
'URL Path'
)
form_path
=
exploits
.
Option
(
'same'
,
'same as path or URL Form Path'
)
verbosity
=
exploits
.
Option
(
'yes'
,
'Display authentication attempts'
)
verbosity
=
exploits
.
Option
(
'yes'
,
'Display authentication attempts'
)
credentials
=
[]
credentials
=
[]
...
@@ -46,9 +47,15 @@ class Exploit(exploits.Exploit):
...
@@ -46,9 +47,15 @@ class Exploit(exploits.Exploit):
self
.
credentials
=
[]
self
.
credentials
=
[]
self
.
attack
()
self
.
attack
()
def
get_form_path
(
self
):
if
self
.
form_path
==
'same'
:
return
self
.
path
else
:
return
self
.
form_path
@multi
@multi
def
attack
(
self
):
def
attack
(
self
):
url
=
sanitize_url
(
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
self
.
path
))
url
=
sanitize_url
(
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
self
.
get_form_path
()
))
try
:
try
:
requests
.
get
(
url
,
verify
=
False
)
requests
.
get
(
url
,
verify
=
False
)
...
@@ -61,11 +68,15 @@ class Exploit(exploits.Exploit):
...
@@ -61,11 +68,15 @@ class Exploit(exploits.Exploit):
# authentication type
# authentication type
if
self
.
form
==
'auto'
:
if
self
.
form
==
'auto'
:
self
.
data
=
self
.
detect_form
()
form_
data
=
self
.
detect_form
()
if
self
.
data
is
None
:
if
form_
data
is
None
:
print_error
(
"Could not detect form"
)
print_error
(
"Could not detect form"
)
return
return
(
form_action
,
self
.
data
)
=
form_data
if
form_action
:
self
.
path
=
form_action
else
:
else
:
self
.
data
=
self
.
form
self
.
data
=
self
.
form
...
@@ -116,7 +127,7 @@ class Exploit(exploits.Exploit):
...
@@ -116,7 +127,7 @@ class Exploit(exploits.Exploit):
self
.
invalid
[
"max"
]
=
l
self
.
invalid
[
"max"
]
=
l
def
detect_form
(
self
):
def
detect_form
(
self
):
url
=
sanitize_url
(
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
self
.
path
))
url
=
sanitize_url
(
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
self
.
get_form_path
()
))
r
=
requests
.
get
(
url
,
verify
=
False
)
r
=
requests
.
get
(
url
,
verify
=
False
)
soup
=
BeautifulSoup
(
r
.
text
,
"lxml"
)
soup
=
BeautifulSoup
(
r
.
text
,
"lxml"
)
...
@@ -125,20 +136,22 @@ class Exploit(exploits.Exploit):
...
@@ -125,20 +136,22 @@ class Exploit(exploits.Exploit):
if
form
is
None
:
if
form
is
None
:
return
None
return
None
action
=
form
.
attrs
.
get
(
'action'
,
None
)
if
len
(
form
)
>
0
:
if
len
(
form
)
>
0
:
res
=
[]
res
=
[]
for
inp
in
form
.
findAll
(
"input"
):
for
inp
in
form
.
findAll
(
"input"
):
if
'name'
in
inp
.
attrs
.
keys
():
if
'name'
in
inp
.
attrs
.
keys
():
if
inp
.
attrs
[
'name'
]
.
lower
()
in
[
"username"
,
"user"
,
"login"
]:
if
inp
.
attrs
[
'name'
]
.
lower
()
in
[
"username"
,
"user"
,
"login"
,
"username_login"
]:
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
+
"{{USER}}"
)
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
+
"{{USER}}"
)
elif
inp
.
attrs
[
'name'
]
.
lower
()
in
[
"password"
,
"pass"
]:
elif
inp
.
attrs
[
'name'
]
.
lower
()
in
[
"password"
,
"pass"
,
"password_login"
]:
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
+
"{{PASS}}"
)
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
+
"{{PASS}}"
)
else
:
else
:
if
'value'
in
inp
.
attrs
.
keys
():
if
'value'
in
inp
.
attrs
.
keys
():
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
+
inp
.
attrs
[
'value'
])
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
+
inp
.
attrs
[
'value'
])
else
:
else
:
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
)
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
)
return
'&'
.
join
(
res
)
return
(
action
,
'&'
.
join
(
res
)
)
def
target_function
(
self
,
running
,
data
):
def
target_function
(
self
,
running
,
data
):
module_verbosity
=
boolify
(
self
.
verbosity
)
module_verbosity
=
boolify
(
self
.
verbosity
)
...
...
routersploit/modules/creds/http_form_default.py
View file @
4dc1a1cd
...
@@ -32,8 +32,9 @@ class Exploit(exploits.Exploit):
...
@@ -32,8 +32,9 @@ class Exploit(exploits.Exploit):
port
=
exploits
.
Option
(
80
,
'Target port'
)
port
=
exploits
.
Option
(
80
,
'Target port'
)
threads
=
exploits
.
Option
(
8
,
'Number of threads'
)
threads
=
exploits
.
Option
(
8
,
'Number of threads'
)
defaults
=
exploits
.
Option
(
wordlists
.
defaults
,
'User:Pass or file with default credentials (file://)'
)
defaults
=
exploits
.
Option
(
wordlists
.
defaults
,
'User:Pass or file with default credentials (file://)'
)
form
=
exploits
.
Option
(
'auto'
,
'Post Data: auto or in form login={{
LOGIN
}}&password={{PASS}}&submit'
)
form
=
exploits
.
Option
(
'auto'
,
'Post Data: auto or in form login={{
USER
}}&password={{PASS}}&submit'
)
path
=
exploits
.
Option
(
'/login.php'
,
'URL Path'
)
path
=
exploits
.
Option
(
'/login.php'
,
'URL Path'
)
form_path
=
exploits
.
Option
(
'same'
,
'same as path or URL Form Path'
)
verbosity
=
exploits
.
Option
(
'yes'
,
'Display authentication attempts'
)
verbosity
=
exploits
.
Option
(
'yes'
,
'Display authentication attempts'
)
credentials
=
[]
credentials
=
[]
...
@@ -44,9 +45,15 @@ class Exploit(exploits.Exploit):
...
@@ -44,9 +45,15 @@ class Exploit(exploits.Exploit):
self
.
credentials
=
[]
self
.
credentials
=
[]
self
.
attack
()
self
.
attack
()
def
get_form_path
(
self
):
if
self
.
form_path
==
'same'
:
return
self
.
path
else
:
return
self
.
form_path
@multi
@multi
def
attack
(
self
):
def
attack
(
self
):
url
=
sanitize_url
(
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
self
.
path
))
url
=
sanitize_url
(
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
self
.
get_form_path
()
))
try
:
try
:
requests
.
get
(
url
,
verify
=
False
)
requests
.
get
(
url
,
verify
=
False
)
...
@@ -59,11 +66,15 @@ class Exploit(exploits.Exploit):
...
@@ -59,11 +66,15 @@ class Exploit(exploits.Exploit):
# authentication type
# authentication type
if
self
.
form
==
'auto'
:
if
self
.
form
==
'auto'
:
self
.
data
=
self
.
detect_form
()
form_
data
=
self
.
detect_form
()
if
self
.
data
is
None
:
if
form_
data
is
None
:
print_error
(
"Could not detect form"
)
print_error
(
"Could not detect form"
)
return
return
(
form_action
,
self
.
data
)
=
form_data
if
form_action
:
self
.
path
=
form_action
else
:
else
:
self
.
data
=
self
.
form
self
.
data
=
self
.
form
...
@@ -109,7 +120,7 @@ class Exploit(exploits.Exploit):
...
@@ -109,7 +120,7 @@ class Exploit(exploits.Exploit):
self
.
invalid
[
"max"
]
=
l
self
.
invalid
[
"max"
]
=
l
def
detect_form
(
self
):
def
detect_form
(
self
):
url
=
sanitize_url
(
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
self
.
path
))
url
=
sanitize_url
(
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
self
.
get_form_path
()
))
r
=
requests
.
get
(
url
,
verify
=
False
)
r
=
requests
.
get
(
url
,
verify
=
False
)
soup
=
BeautifulSoup
(
r
.
text
,
"lxml"
)
soup
=
BeautifulSoup
(
r
.
text
,
"lxml"
)
...
@@ -118,20 +129,22 @@ class Exploit(exploits.Exploit):
...
@@ -118,20 +129,22 @@ class Exploit(exploits.Exploit):
if
form
is
None
:
if
form
is
None
:
return
None
return
None
action
=
form
.
attrs
.
get
(
'action'
,
None
)
if
len
(
form
)
>
0
:
if
len
(
form
)
>
0
:
res
=
[]
res
=
[]
for
inp
in
form
.
findAll
(
"input"
):
for
inp
in
form
.
findAll
(
"input"
):
if
'name'
in
inp
.
attrs
.
keys
():
if
'name'
in
inp
.
attrs
.
keys
():
if
inp
.
attrs
[
'name'
]
.
lower
()
in
[
"username"
,
"user"
,
"login"
]:
if
inp
.
attrs
[
'name'
]
.
lower
()
in
[
"username"
,
"user"
,
"login"
,
"username_login"
]:
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
+
"{{USER}}"
)
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
+
"{{USER}}"
)
elif
inp
.
attrs
[
'name'
]
.
lower
()
in
[
"password"
,
"pass"
]:
elif
inp
.
attrs
[
'name'
]
.
lower
()
in
[
"password"
,
"pass"
,
"password_login"
]:
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
+
"{{PASS}}"
)
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
+
"{{PASS}}"
)
else
:
else
:
if
'value'
in
inp
.
attrs
.
keys
():
if
'value'
in
inp
.
attrs
.
keys
():
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
+
inp
.
attrs
[
'value'
])
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
+
inp
.
attrs
[
'value'
])
else
:
else
:
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
)
res
.
append
(
inp
.
attrs
[
'name'
]
+
"="
)
return
'&'
.
join
(
res
)
return
(
action
,
'&'
.
join
(
res
)
)
def
target_function
(
self
,
running
,
data
):
def
target_function
(
self
,
running
,
data
):
module_verbosity
=
boolify
(
self
.
verbosity
)
module_verbosity
=
boolify
(
self
.
verbosity
)
...
...
routersploit/modules/scanners/autopwn.py
View file @
4dc1a1cd
...
@@ -17,9 +17,9 @@ class Exploit(exploits.Exploit):
...
@@ -17,9 +17,9 @@ class Exploit(exploits.Exploit):
__info__
=
{
__info__
=
{
'name'
:
'AutoPwn'
,
'name'
:
'AutoPwn'
,
'description'
:
'Scanner module for all vulnerabilities.'
,
'description'
:
'Scanner module for all vulnerabilities.'
,
'author'
:
[
'author
s
'
:
[
'Marcin Bury <marcin.bury[at]reverse-shell.com>'
,
# routersploit module
'Marcin Bury <marcin.bury[at]reverse-shell.com>'
,
# routersploit module
],
],
}
}
target
=
exploits
.
Option
(
''
,
'Target IP address e.g. 192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target IP address e.g. 192.168.1.1'
)
# target address
...
...
routersploit/modules/scanners/dlink_scan.py
View file @
4dc1a1cd
...
@@ -17,7 +17,7 @@ class Exploit(exploits.Exploit):
...
@@ -17,7 +17,7 @@ class Exploit(exploits.Exploit):
__info__
=
{
__info__
=
{
'name'
:
'D-Link Scanner'
,
'name'
:
'D-Link Scanner'
,
'description'
:
'Scanner module for D-Link devices'
,
'description'
:
'Scanner module for D-Link devices'
,
'author'
:
[
'author
s
'
:
[
'Marcin Bury <marcin.bury[at]reverse-shell.com>'
,
# routersploit module
'Marcin Bury <marcin.bury[at]reverse-shell.com>'
,
# routersploit module
],
],
}
}
...
...
routersploit/utils.py
View file @
4dc1a1cd
...
@@ -314,7 +314,7 @@ def pprint_dict_in_order(dictionary, order=None):
...
@@ -314,7 +314,7 @@ def pprint_dict_in_order(dictionary, order=None):
prettyprint
(
rest_keys
,
dictionary
[
rest_keys
])
prettyprint
(
rest_keys
,
dictionary
[
rest_keys
])
def
random_text
(
length
,
alph
=
string
.
letters
+
string
.
digits
):
def
random_text
(
length
,
alph
=
string
.
ascii_
letters
+
string
.
digits
):
""" Random text generator. NOT crypto safe.
""" Random text generator. NOT crypto safe.
Generates random text with specified length and alphabet.
Generates random text with specified length and alphabet.
...
...
routersploit/wordlists/defaults.txt
View file @
4dc1a1cd
...
@@ -166,6 +166,7 @@ admin:rmnetlm
...
@@ -166,6 +166,7 @@ admin:rmnetlm
admin:root
admin:root
admin:secure
admin:secure
admin:setup
admin:setup
admin:sky
admin:smallbusiness
admin:smallbusiness
admin:smcadmin
admin:smcadmin
admin:superuser
admin:superuser
...
...
routersploit/wordlists/passwords.txt
View file @
4dc1a1cd
...
@@ -146,6 +146,7 @@ RSX
...
@@ -146,6 +146,7 @@ RSX
SECURITY
SECURITY
SERVICE
SERVICE
SESAME
SESAME
sky
SKY_FOX
SKY_FOX
SMDR
SMDR
SSA
SSA
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment