In-depth lesson · RCE
Typical fixes
Every point the RCE reports back under this heading, best-backed first, each with the reports it is seen in.
-
Validate DNS responses before processing them.
-
Validate download parameters against traversal and sanitise log filter values before shell use.
Seen in 1 report
-
Validate file content rather than relying on file headers, and restrict executable file uploads.
Seen in 1 report
-
Validate file writes under the navigation directory and restrict which files can execute scripts.
Seen in 1 report
-
Validate incoming serialised data before deserialising it.
Seen in 1 report
-
Validate input before it is used in a sensitive operation.
-
Validate or escape the fileName parameter before passing it to a shell command.
-
Validate or restrict which libraries are loaded when handling project files.
-
Validate or sandbox plugin code before allowing it to be activated.
-
Validate pod-supplied sysctl values before passing them to the pinns utility.
-
Validate strings from DHCP requests before passing them to system calls.
-
Validate that an 'as' property value is a valid behaviour class or configuration before creating an object.
Seen in 1 report
-
Validate the file extension and content of uploaded avatars and store them outside executable paths.
-
Validate the filter parameter in diag_routes.php to prevent arbitrary file creation.
Seen in 1 report
-
Validate the loading process rather than relying on a blocklist of file names.
-
Validate the model name in the pull endpoint.
-
Validate the notification email setting with an email-format check rather than a generic string sanitiser.
Seen in 1 report
-
Validate the origin header on WebSocket connections and do not connect to attacker-supplied gateway URLs.
Seen in 1 report
-
Validate the scheme and destination of user-supplied URLs before passing them to the operating system.
Seen in 1 report
-
Validate the SOAPAction header before using it in a system call.
-
Validate the source of DLLs loaded from user-writable directories.
-
Validate the target path and file type from XML files during firmware updates.
Seen in 1 report
-
Validate the timezone value before interpolating it into a shell command.
-
Validate the type and content of data deserialised from API requests.
Seen in 1 report
-
Validate the type of the __VSTATE form value before deserialisation.
Seen in 1 report
-
Validate uploaded file types and extend the disabled-function list to cover process-spawning functions.
-
Validate user-controlled input before passing it to PHP's unserialize function.
-
Validate user-supplied input before passing it to system calls in the file-copy JSON RPC handler.
-
Validate user-supplied input before using it to compile code.
-
Validate user-supplied name and email fields before using them in system calls.
-
Validate user-supplied namespace data before constructing server objects.
-
Validate user-supplied strings before passing them to exec calls.
-
Validate user-supplied strings before writing them to configuration files.
-
Validate ValueExpression objects deserialized by the AttributesMap class before evaluating them.
Seen in 1 report
-
Validate vSMB packet data on the host.
Seen in 1 report
-
Validate which cmdlets a policy template's command blocks may contain.
Seen in 1 report
-
Validate ZIP contents and extract to a non-web-accessible directory with unpredictable names.
Seen in 1 report
-
Verify a cryptographic signature of uploaded application code instead of relying only on a CRC32 check.
Seen in 1 report
-
Verify firmware integrity and authenticity before installing it.
-
Verify source archive checksums and secure the distribution server against compromise.
Seen in 1 report
-
Verify that an object is a genuine Promise rather than relying on a callable then property.
Seen in 1 report
-
Verify that IOCTL requests come from kernel mode before invoking function pointers from the input buffer.
-
Verify the authenticity of HTTP requests to the ConnectivityService.
-
Verify the caller before trusting user-supplied session ID and username parameters in authentication endpoints.
Seen in 1 report
-
Verify the deserialized data, not just the class name, and avoid separate validation and connection steps that allow time-of-check/time-of-use flaws.
Seen in 1 report
-
Verify the downloaded package's checksum against the expected value before moving or extracting it.
Seen in 1 report
-
Verify the integrity and authenticity of uploaded firmware images.
-
Verify the integrity of notification data before acting on it.
-
Verify the version as well as the signature of updater binaries.
Seen in 1 report
-
Warn the user before opening unsafe attachments.
Seen in 1 report