Skip to main content
Here is the list of all supported helper functions can be used in the RAW requests / Network requests.

Deserialization helper functions

Nuclei allows payload generation for a few common gadget from ysoserial. Supported Payload:
  • dns (URLDNS)
  • commons-collections3.1
  • commons-collections4.0
  • jdk7u21
  • jdk8u20
  • groovy1
Supported encodings:
  • base64 (default)
  • gzip-base64
  • gzip
  • hex
  • raw
Deserialization helper function format:
Deserialization helper function example:

.NET Deserialization

Nuclei provides the generate_dotnet_gadget function to generate .NET deserialization exploit payloads with various gadget chains, formatters, and encodings. Function format:
Parameters:
  • gadget - The gadget chain to use
  • cmd - Command, URL, or data (depends on gadget type)
  • formatter - Serialization formatter (optional, defaults to BinaryFormatter)
  • encoding - Output encoding format (optional, defaults to URL-safe base64)
Supported Gadgets: Command-based gadgets (execute system commands):
  • windows-identity - WindowsIdentity gadget
  • claims-principal - ClaimsPrincipal gadget
  • dataset - DataSet gadget
  • dataset-type-spoof - DataSet with type spoofing
  • object-data-provider - ObjectDataProvider gadget
  • text-formatting-runproperties - TextFormattingRunProperties gadget
  • type-confuse-delegate - TypeConfuseDelegate gadget
URL-based gadgets (make HTTP requests):
  • object-ref - Remote object reference
  • veeam-crypto-keyinfo - Veeam CryptoKeyInfo gadget
XML-based gadgets:
  • dataset-xmldiffgram - DataSet XML DiffGram
DLL-based gadgets:
  • axhost-state-dll - AxHostState DLL loading
  • dll-reflection - DLL reflection loading
ViewState gadget:
  • viewstate - ASP.NET ViewState (format: "payloadData:machineKey:generator")
Supported Formatters:
  • binary or binaryformatter - BinaryFormatter (default)
  • soap or soapformatter - SOAPFormatter
  • soapwithexceptions or soap-exceptions - SOAPFormatter with exceptions
  • los or losformatter - LOSFormatter
  • Empty string - defaults to BinaryFormatter
Supported Encodings:
  • raw - Raw binary string
  • hex - Hexadecimal encoding
  • gzip - Gzip compressed
  • gzip-base64 - Gzip + URL-safe base64
  • base64-raw - Standard base64
  • Empty string - URL-safe base64 (default)
.NET Deserialization examples:

JSON helper functions

Nuclei allows manipulate JSON strings in different ways, here is a list of its functions:
  • generate_jwt, to generates a JSON Web Token (JWT) using the claims provided in a JSON string, the signature, and the specified algorithm.
  • json_minify, to minifies a JSON string by removing unnecessary whitespace.
  • json_prettify, to prettifies a JSON string by adding indentation.
Examples generate_jwt To generate a JSON Web Token (JWT), you have to supply the JSON that you want to sign, at least. Here is a list of supported algorithms for generating JWTs with generate_jwt function (case-insensitive):
  • HS256
  • HS384
  • HS512
  • RS256
  • RS384
  • RS512
  • PS256
  • PS384
  • PS512
  • ES256
  • ES384
  • ES512
  • EdDSA
  • NONE
Empty string ("") also means NONE. Format:
Arguments other than json are optional.
Example:
The maxAgeUnix argument is to set the expiration "exp" JWT standard claim, as well as the "iat" claim when you call the function.
json_minify Format:
Example:
minify variable output:
json_prettify Format:
Example:
pretty variable output:
resolve Format:
Here is a list of formats available for dns type:
  • 4 or a
  • 6 or aaaa
  • cname
  • ns
  • txt
  • srv
  • ptr
  • mx
  • soa
  • caa

Examples

For more examples, see the helper function examples