Network Protocol Examples
Examples of the Network Protocol Nuclei Templates
Basic Network Request
This template connects to a network service, sends some data and reads 4 bytes from the response. Matchers are run to identify valid response, which in this case is PONG
.
TLS Network Request
Similar to the above template, but the connection to the service is done with TLS enabled.
Hex Input Request
This template connects to a network service, sends some data encoded in hexadecimal to the server and reads 4 bytes from the response. Matchers are run to identify valid response, which in this case is PONG
. The match words here are encoded in Hexadecimal, using encoding: hex
option of matchers.
Input Expressions
Inputs specified in network also support DSL Helper Expressions, so you can create your own complex inputs using variety of nuclei helper functions. The below template is an example of using hex_decode
function to send decoded input over wire.
Multi-Step Requests
This last example is an RCE in proFTPd which, if vulnerable, allows placing arbitrary files in any directory on the server. The detection process involves a random string on each nuclei run using {{randstr}}
, and sending multiple lines of FTP input to the vulnerable server. At the end, a successful match is detected with the presence of Copy successful
in the response.
Was this page helpful?