Skip to content
RCE Write-up Intermediate

My First RCE from N/A to Triaged (CVE2021–3064)

The author found a Palo Alto GlobalProtect portal running an outdated PAN-OS version vulnerable to CVE-2021-3064, a memory corruption flaw. They did not develop an exploit but convinced the Bugcrowd triage team that the asset was vulnerable to remote code execution.

medium.com

Published on medium.com

Bug Bounty

Vivekkashyap, on medium.com

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

This is a short account of a first remote code execution finding, made on a private VDP (vulnerability disclosure programme) run through Bugcrowd. The researcher had started bug bounty work eight months before writing the post, and says the write-up is brief because many people had asked for the proof of concept.

The affected product is Palo Alto PAN-OS, specifically the GlobalProtect portal and gateway. GlobalProtect is the VPN component: the portal serves a login page at a path such as /global-protect/login.esp, where users authenticate before being given access to the internal network. The issue discussed is CVE-2021-3064, described in the linked Palo Alto advisory as a memory corruption vulnerability in the GlobalProtect portal and gateway. The researcher's target was a host belonging to a private programme, and the post does not name it.

Setup

The work relied on public sources:

  • Shodan, for fingerprinting the host and reading the exposed version.
  • crt.sh and SecurityTrails, for certificate and subdomain enumeration.
  • Google, for searching known vulnerabilities of the identified version.
  • The panos-scanner tool by noperator, to determine the PAN-OS version of a remote GlobalProtect portal or management interface.
  • The Palo Alto security advisory for CVE-2021-3064, a Randori blog post on the same CVE by aaronportnoy, and the researcher's own Twitter account.

The programme was a VDP, so no bounty was payable. The researcher notes that the programme was not splitting bounties.

Finding it

Reconnaissance followed the researcher's usual routine: searching the target on Shodan, crt.sh and SecurityTrails. The Shodan query used was:

Text
Ssl:"target Inc." 200

On crt.sh and SecurityTrails the search term was target(.)com. Digging through the results turned up three very long subdomains. The example given is:

Text
https://sns-snsvpn.nme.bllon.sns.target(.)com/global-protect/login.esp
through crt.sh From the original on medium.com

The screenshot shows the certificate transparency results on crt.sh where the long subdomain appeared.

Looking at the subdomain, the researcher saw that it was managed by Palo Alto services, and that the version was clearly visible on Shodan.

From the original on medium.com

The Shodan view of the host is what exposed the PAN-OS version.

With the version in hand, the next step was a Google search for Pan-OS 8.1.15 vulnerabilities. After a few hours of reading, the researcher concluded there was a serious issue to pursue.

From the original on medium.com

Exploitation

Step 1: identify the version

The researcher could not work out how to exploit the bug directly. The approach taken instead was to demonstrate the vulnerable version, which was possible with a scanner. The tool used is panos-scanner, whose description reads: determine the Palo Alto PAN-OS software version of a remote GlobalProtect portal or management interface.

From the original on medium.com

The researcher used the scanner to show the vulnerable version, and also presented the list of vulnerable versions.

Step 2: build the case from public material

The report was supported with three references:

  1. The Palo Alto Networks security advisory for CVE-2021-3064, a memory corruption vulnerability in the GlobalProtect portal and gateway.
  2. The Randori blog post on the zero-day disclosure of the same CVE, which states that Palo Alto Networks provided an update on 10 November 2021 patching a vulnerability that Randori had discovered and reported.
  3. A link to the aaronportnoy Twitter account.

The post does not include an exploit request, payload or command, and does not show a shell or command output. The demonstration rested on the version fingerprint plus the public vulnerability research.

Step 3: triage

The researcher was able to convince the Bugcrowd team that the host was vulnerable to RCE. The duplicate reports visible in the submission history were, according to the researcher, all filed by the researcher. The N/A status shown on one of them prompted a review request on Bugcrowd, which the researcher expected to be corrected.

From the original on medium.com

The screenshot shows the Bugcrowd submissions, including the duplicates and the N/A status.

Root cause

The post does not analyse the defect itself. What it establishes is that the host was running PAN-OS 8.1.15, a version listed as vulnerable to CVE-2021-3064, and that the vendor advisory describes that CVE as a memory corruption vulnerability in the GlobalProtect portal and gateway. The mechanism behind the memory corruption, and why the deployed defences did not prevent it, are not described in the report; the public advisory and the Randori write-up are the references given for that detail.

Impact

The researcher's claim, accepted at triage, is that the host was vulnerable to remote code execution through the GlobalProtect portal. The impact is bounded by the conditions shown: the target had to be running an affected PAN-OS version, and the portal had to be reachable. The report does not show code execution being achieved, so the practical consequences on this specific host are not demonstrated in the text. Because the programme was a VDP, no bounty was paid.

Fix

The report does not describe a fix applied by the programme. The relevant remediation is the vendor update referenced in the advisory: Palo Alto Networks patched CVE-2021-3064 in an update published on 10 November 2021, and hosts running 8.1.15 should be upgraded to a fixed release.

Variants to test

  • Enumerate certificate transparency and passive DNS for long, service-style subdomains under a target domain, for example with crt.sh and SecurityTrails. A positive result is a hostname that resolves to an internet-facing appliance rather than a marketing site.
  • Fingerprint edge appliances on Shodan with a certificate-based query such as Ssl:"target Inc." 200. A positive result is a host whose banner or TLS certificate identifies the vendor and whose management or portal interface is exposed.
  • Run panos-scanner against any GlobalProtect portal or management interface you find. A positive result is a reported PAN-OS version that appears in the vendor's list of versions affected by CVE-2021-3064.
  • Search for the identified version plus the product name to find the matching advisory and public research. A positive result is an advisory that names the exact version and a vulnerability class that matters for an internet-facing portal.
  • When a report is closed as N/A despite a version match against a published advisory, request a review with the scanner output and the advisory link attached. A positive result is a change of status to triaged.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

A security researcher who had been doing bug bounty work for about eight months found a serious flaw in a company's VPN login page. The flaw is a known one, catalogued as CVE-2021-3064, and the host was reported as vulnerable to remote code execution. That is what "remote code execution" (RCE) means: someone on the internet can make the server do things the server's owner never intended, without ever touching the machine.

The researcher did not break in. They found a login page belonging to the company, worked out which version of the software was running behind it, looked that version up in public records, and showed the company's bug bounty platform that the version was on the official list of versions affected by the flaw. The platform accepted the report and moved it from "N/A" (not applicable, effectively a rejection) to "triaged" (accepted and being handled).

The work was done on a private vulnerability disclosure programme (VDP) run through Bugcrowd. A VDP is a scheme where a company invites people to report security problems, but pays no money for them. The researcher notes the programme was not splitting bounties, which is another way of saying there was no bounty to split.

From the original on medium.com

The post is short, the researcher says, because many people had asked for the proof of concept. It is dated 1 April 2022 and is tagged with bug bounty, RCE, remote code execution, Bugcrowd and hacking.

The product and the feature

The affected product is Palo Alto PAN-OS, the operating system that runs Palo Alto Networks firewalls. The specific feature is GlobalProtect, which is the VPN part. A VPN (virtual private network) is a private tunnel into a company's internal network: staff connect to it from home or a cafe and then behave as if they were sitting in the office.

GlobalProtect has two pieces. The portal is the public web page where staff log in, typically at a path ending in /global-protect/login.esp. The gateway is what actually carries the traffic once the user is authenticated. Both are reachable from the internet by design, which is why they are interesting to an attacker: they are doors that must be left open.

The flaw in question, CVE-2021-3064, is described in the Palo Alto advisory as a memory corruption vulnerability in the GlobalProtect portal and gateway. Memory corruption is a class of bug where a program writes data outside the area of memory it was supposed to use. Think of a form where the box for your surname is meant to hold 20 characters; if the program does not check the length and you type 200, the extra characters spill into the next boxes on the form and overwrite whatever was written there. In a program, those next boxes might hold the instructions the computer is about to follow, so a carefully crafted overflow can make the program run the attacker's instructions instead. That is how memory corruption can become remote code execution.

The researcher's target was a host belonging to a private programme. The post does not name the company.

The tools used

The work relied on public sources:

  • Shodan, a search engine for internet-connected devices. Instead of indexing web pages, it indexes what services answer on the public internet, including the version numbers some of them announce.
  • crt.sh, a public search over certificate transparency logs. Every time a website gets an HTTPS certificate, the certificate is published to public logs. Those logs list the hostnames the certificate covers, so they are a way to discover subdomains a company may not advertise.
  • SecurityTrails, a similar service for passive DNS and subdomain data.
  • Google, to search for known vulnerabilities of whatever version was identified.
  • panos-scanner, a tool by noperator whose description is to determine the Palo Alto PAN-OS software version of a remote GlobalProtect portal or management interface.
  • The Palo Alto security advisory for CVE-2021-3064, a Randori blog post on the same CVE by aaronportnoy, and the researcher's own Twitter account.

Finding it

Reconnaissance followed the researcher's usual routine: searching the target on Shodan, crt.sh and SecurityTrails. Reconnaissance, or recon, is the information-gathering phase before any testing: finding out what the company owns and what it runs, the way a burglar might first walk the street noting which houses have which locks.

The Shodan query used was:

Text
Ssl:"target Inc." 200

Line by line: Ssl: tells Shodan to look inside the TLS certificate a server presents, rather than at the page content. The quoted string "target Inc." is the organisation name the researcher expected to find in that certificate. 200 asks for hosts that answered with HTTP status 200, meaning the web server responded normally rather than with an error. The effect is to find internet-facing machines whose certificate names the target company and whose web service is up.

On crt.sh and SecurityTrails the search term was target(.)com. The (.) is a way of writing a dot that will not be turned into a clickable link when the text is pasted into a chat or a post; to a search engine it is just a dot. Searching for the bare domain in certificate logs returns every hostname that has ever had a certificate issued under it, including internal-sounding names that were never meant to be public.

Digging through the results turned up three very long subdomains. The example given is:

Text
https://sns-snsvpn.nme.bllon.sns.target(.)com/global-protect/login.esp

Line by line: https:// is the normal secure web protocol. sns-snsvpn.nme.bllon.sns.target(.)com is the hostname. It is long because it is built from several labels separated by dots, and the labels read like a chain of internal systems: something called sns, then an snsvpn, then nme, then bllon, then another sns, all under the target's domain. Long, machine-generated names like this are a strong hint that the host is an appliance or an internal service rather than a marketing page. /global-protect/login.esp is the path of the GlobalProtect login page, which tells you exactly what software is listening there.

through crt.sh From the original on medium.com

The screenshot shows the certificate transparency results on crt.sh where the long subdomain appeared.

Looking at the subdomain, the researcher saw that it was managed by Palo Alto services, and that the version was clearly visible on Shodan.

From the original on medium.com

The Shodan view of the host is what exposed the PAN-OS version. This matters because the version number is the whole case: a flaw only affects the versions that contain it, so knowing the version turns a guess into a fact.

With the version in hand, the next step was a Google search for Pan-OS 8.1.15 vulnerabilities. After a few hours of reading, the researcher concluded there was a serious issue to pursue.

From the original on medium.com

Exploitation

Step 1: identify the version

The researcher could not work out how to exploit the bug directly. Exploiting here means crafting the actual malicious input that triggers the memory corruption and gets code to run. That is hard, specialised work, and the public material did not hand it over in a usable form.

The approach taken instead was to demonstrate the vulnerable version, which was possible with a scanner. This is a common and legitimate shortcut in disclosure work: you do not need to prove you can break in if you can prove the door is a model known to be broken. The tool used is panos-scanner, whose description reads: determine the Palo Alto PAN-OS software version of a remote GlobalProtect portal or management interface.

From the original on medium.com

The researcher used the scanner to show the vulnerable version, and also presented the list of vulnerable versions. The advisory is the vendor's own official notice: it names the CVE, describes the flaw, and lists which versions are affected and which contain the fix. Quoting the vendor against itself is far more persuasive to a triage team than a researcher's own opinion.

Step 2: build the case from public material

The report was supported with three references:

  1. The Palo Alto Networks security advisory for CVE-2021-3064, a memory corruption vulnerability in the GlobalProtect portal and gateway.
  2. The Randori blog post on the zero-day disclosure of the same CVE, which states that Palo Alto Networks provided an update on 10 November 2021 patching a vulnerability that Randori had discovered and reported. A zero-day is a flaw that is exploited, or at least known to the finder, before the vendor has a fix out.
  3. A link to the aaronportnoy Twitter account.

The post does not include an exploit request, payload or command, and does not show a shell or command output. A payload is the actual piece of data sent to trigger the bug; a shell is the command prompt an attacker hopes to obtain on the victim machine. Neither appears here. The demonstration rested on the version fingerprint plus the public vulnerability research.

Step 3: triage

Triage is the first stage of a bug bounty report's life: a staff member reads it and decides whether it is real, in scope and worth acting on. The researcher was able to convince the Bugcrowd team that the host was vulnerable to RCE.

The duplicate reports visible in the submission history were, according to the researcher, all filed by the researcher. A duplicate is a second report of a problem that has already been reported; platforms usually close duplicates without reward. The N/A status shown on one of them prompted a review request on Bugcrowd, which the researcher expected to be corrected. A review request is simply asking the platform to look again at a decision.

From the original on medium.com

The screenshot shows the Bugcrowd submissions, including the duplicates and the N/A status.

Root cause

The post does not analyse the defect itself. What it establishes is that the host was running PAN-OS 8.1.15, a version listed as vulnerable to CVE-2021-3064, and that the vendor advisory describes that CVE as a memory corruption vulnerability in the GlobalProtect portal and gateway. The mechanism behind the memory corruption, and why the deployed defences did not prevent it, are not described in the report; the public advisory and the Randori write-up are the references given for that detail.

Impact

The researcher's claim, accepted at triage, is that the host was vulnerable to remote code execution through the GlobalProtect portal. The impact is bounded by the conditions shown: the target had to be running an affected PAN-OS version, and the portal had to be reachable. The report does not show code execution being achieved, so the practical consequences on this specific host are not demonstrated in the text. Because the programme was a VDP, no bounty was paid.

Fix

The report does not describe a fix applied by the programme. The relevant remediation is the vendor update referenced in the advisory: Palo Alto Networks patched CVE-2021-3064 in an update published on 10 November 2021, and hosts running 8.1.15 should be upgraded to a fixed release.

Variants to test

  • Enumerate certificate transparency and passive DNS for long, service-style subdomains under a target domain, for example with crt.sh and SecurityTrails. A positive result is a hostname that resolves to an internet-facing appliance rather than a marketing site.
  • Fingerprint edge appliances on Shodan with a certificate-based query such as Ssl:"target Inc." 200. A positive result is a host whose banner or TLS certificate identifies the vendor and whose management or portal interface is exposed.
  • Run panos-scanner against any GlobalProtect portal or management interface you find. A positive result is a reported PAN-OS version that appears in the vendor's list of versions affected by CVE-2021-3064.
  • Search for the identified version plus the product name to find the matching advisory and public research. A positive result is an advisory that names the exact version and a vulnerability class that matters for an internet-facing portal.
  • When a report is closed as N/A despite a version match against a published advisory, request a review with the scanner output and the advisory link attached. A positive result is a change of status to triaged.

Glossary

  • Bug bounty: a scheme where a company pays people for reporting security problems in its systems.
  • VDP (vulnerability disclosure programme): like a bug bounty but with no money; the company only promises to receive and handle reports.
  • Bugcrowd: a platform that hosts bug bounty and disclosure programmes for companies.
  • RCE (remote code execution): a flaw that lets an attacker run their own code on someone else's machine over the network.
  • CVE: a public catalogue number for a known vulnerability, so everyone refers to the same flaw by the same name.
  • PAN-OS: the operating system that runs Palo Alto Networks firewalls.
  • GlobalProtect: Palo Alto's VPN feature; the portal is the public login page, the gateway carries the traffic after login.
  • VPN: a private encrypted tunnel into a company's internal network.
  • Memory corruption: a bug where a program writes data outside the memory area it was given, potentially overwriting instructions.
  • Zero-day: a flaw known to an attacker before the vendor has a fix available.
  • Advisory: the vendor's official notice about a vulnerability, listing affected versions and the fix.
  • Recon (reconnaissance): the information-gathering phase before testing, finding out what a company owns and runs.
  • Shodan: a search engine that indexes internet-connected devices and the services and versions they expose.
  • crt.sh: a public search over certificate transparency logs, useful for discovering subdomains.
  • Certificate transparency: public logs of every HTTPS certificate issued, so anyone can see which hostnames exist.
  • SecurityTrails: a service for passive DNS and subdomain data.
  • Subdomain: a hostname under a main domain, such as vpn.example.com under example.com.
  • TLS certificate: the file a server presents to prove its identity during an HTTPS connection; it names the organisation and hostnames it covers.
  • HTTP status 200: the normal "OK" answer from a web server.
  • Payload: the actual data sent to trigger a vulnerability.
  • Shell: a command prompt on a machine, which an attacker hopes to obtain.
  • Fingerprint: identifying what software and version a remote host runs from its visible behaviour or banners.
  • Triage: the first review of a report, deciding whether it is real, in scope and worth acting on.
  • Duplicate: a second report of a problem already reported.
  • N/A: a status meaning not applicable, effectively a rejection.
  • Triaged: a status meaning the report has been accepted and is being handled.
  • Review request: asking the platform to look again at a decision on a report.
  • Remediation: the fix that removes the vulnerability, usually a software update.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.