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
dd9b4f20
Unverified
Commit
dd9b4f20
authored
Oct 02, 2018
by
Marcin Bury
Committed by
GitHub
Oct 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding execute test for AsusWRT Lan RCE module (#526)
* Adding execute test for AsusWRT Lan RCE exploit * Trigger Travis
parent
91be37a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
test_asuswrt_lan_rce.py
tests/exploits/routers/asus/test_asuswrt_lan_rce.py
+12
-0
No files found.
tests/exploits/routers/asus/test_asuswrt_lan_rce.py
View file @
dd9b4f20
import
re
from
unittest
import
mock
from
routersploit.modules.exploits.routers.asus.asuswrt_lan_rce
import
Exploit
...
...
@@ -22,3 +23,14 @@ def test_check_success(mocked_shell, target):
assert
exploit
.
check
()
is
None
assert
exploit
.
run
()
is
None
def
test_execute
(
udp_target
):
infosvr_mock
=
udp_target
.
get_command_mock
(
re
.
compile
(
b
"^
\x0c\x15\x33\x00
.{508}$"
))
# 512 bytes in total
infosvr_mock
.
return_value
=
b
"
\x0c\x16
3
\x00
q6b3
\x18
1
\xbf
J
\xd5\x08
)
\x00
e1f419fdd8adf235c0948c8f3095e34878369301
\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
Asus4021432
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
255.255.255.0
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
RT-AC68U
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
3.0.0.4.380
\x00\x00\x00\x00\x00\x00\x18
1
\xbf
J
\xd5\x08\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x80
Q
\x00\x01\x02\x1f\x92\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
"
exploit
=
Exploit
()
exploit
.
target
=
udp_target
.
host
exploit
.
infosvr_port
=
udp_target
.
port
assert
exploit
.
execute
(
"echo e1f419fdd8adf235c0948c8f3095e34878369301"
)
==
"e1f419fdd8adf235c0948c8f3095e34878369301
\n
"
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