NASL(1)

πŸ“¦
version 23.45.5 Β· 2 versions
, in alpine 3.24, nixos 26.05, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NASL β€” the NASL Attack Scripting Language, bestie πŸ’–

okay so this is the manual for openvas-nasl, part of the NASL(1) family of pages. yes the name in the header is NASL but the actual program you're running is openvas-nasl β€” it's giving main character with a stage name, we love that for it πŸŽ€


✨ SYNOPSIS ✨

openvas-nasl <[-Vh] [-T tracefile] [-s] [-t target] [-c config_file]
[-d] [-sX] > files...

that's the whole vibe right there. files... at the end means you feed it NASL scripts, plural, no cap. πŸ“œ


🌸 DESCRIPTION 🌸

So openvas-nasl runs a whole set of NASL scripts against a target host you pick. That's the job. That's the assignment. πŸ’…

But ALSO β€” and this is the part people sleep on β€” you can use it to check whether a NASL script even has syntax errors, by running it in parse (-p) mode or lint (-L) mode. So before you go pointing scripts at a real host, you can vibe check them first. iykyk. πŸ”₯


πŸ‘‘ OPTIONS πŸ‘‘

  • -T tracefile β€” makes nasl write, verbosely, everything the script does into tracefile. it's literally set -x under sh but make it a file. peak transparency behavior, we stan. ✨
  • -t target β€” applies the NASL script to target, and target is flexible like that. it can be a single host (127.0.0.1), a whole subnet (192.168.1.0/24), or several subnets (192.168.1.0/24,192.168.243.0/24). she contains multitudes. 🌈
  • -e iface β€” specifies the network interface to be used as the source for established connections. pick your fave, bestie. πŸ¦‹
  • -s β€” sets the return value of safe_checks() to 1. (go read the OpenVAS Scanner documentation if you wanna know what the safe checks actually are.) this one implies -B. πŸ’–
  • -D β€” only runs the description part of the script. that's it, that's the whole thing, just the description. πŸŽ€
  • -B β€” runs in description mode before running the script. like a little pregame. ⭐
  • -L β€” lint the script (runs extended checks). this is the glow-up inspection pass. πŸ”
  • -X β€” run the script with disabled signature verification. πŸ‘€
  • -h β€” show help. classic. πŸ™ˆ
  • -V β€” show the version of NASL. know your queen's age. πŸ‘‘
  • -d β€” output debug information to stderr. messy but informative, honestly iconic. πŸ’€
  • -r port-range β€” this is the default range of ports that the scanner plugins will probe. and the syntax is flexible, so flexible:
    • a single range: "1-1500"
    • several ports: "21,23,80"
    • several ranges of ports: "1-1500,32000-33000"

and get this β€” you can specify UDP and TCP ports by prefixing each range with T or U. for instance, this range will make openvas scan UDP ports 1 to 1024 and TCP ports 1 to 65535:

"T:1-65535,U:1-1024"

flexible queen energy fr fr 🌸

  • -k key=value β€” set KB key to value. can be used multiple times. stack 'em, bestie. πŸ’œ

πŸ”— SEE ALSO πŸ”—

openvas(8), openvas-nasl-lint(1)

go read those too, they're the supporting cast and they ate. 🫢


πŸ“œ HISTORY πŸ“œ

okay storytime, because this lore is deep:

NASL comes from a private project called 'pkt_forge', which was written in late 1998 by Renaud Deraison, and which was an interactive shell to forge and send raw IP packets. and get this β€” this pre-dates Perl's Net::RawIP by a couple of weeks. so basically an OG. πŸ†

It was then extended to do a wide range of network-related operations and integrated into the scanner as 'NASL'.

The parser was completely hand-written and a pain to work with. 😭 In Mid-2002, Michel Arboi wrote a bison parser for NASL, and he and Renaud Deraison re-wrote NASL from scratch. Although the "new" NASL was nearly working as early as August 2002, Michel's laziness made us wait for early 2003 to have it working completely. (not the laziness callout in the official docs πŸ’€ but honestly? relatable.)

After the original authors decided to stop the Open Source development in 2005, most changes and maintenance works were done by Greenbone Networks.

so yeah. a whole glow-up arc. ✨


πŸ’… AUTHOR πŸ’…

  • Most of the engine is (C) 2003 Michel Arboi.
  • Most of the built-in functions are (C) 2003 Renaud Deraison.
  • Most new code since 2005 developed by Greenbone AG.

okay that's the whole page bestie, no notes. go run some scripts, lint them first like a responsible icon, and remember: -s implies -B. periodt. πŸ’–

Greenbone Vulnerability Manag... β€” February 2021 β€” and that's the NASL(1) sign-off, mwah πŸŽ€