Deck 1 Flashcards
(138 cards)
What should you do if a script is missing in the local scripts directory?
You can fix this by running ‘sudo apt update && sudo apt install nmap’ or by manually downloading the script from Nmap and updating the script.db file.
What command can you run to manually install a missing NSE script?
You can run ‘sudo wget -O /usr/share/nmap/scripts/.nse https://svn.nmap.org/nmap/scripts/.nse’ to download and install the script.
What command should you run after manually installing an NSE script to update the script.db file?
You should run ‘nmap –script-updatedb’ to update the script.db file after manually installing a script.
Where does Nmap store its scripts on Linux?
/usr/share/nmap/scripts
What is the purpose of the /usr/share/nmap/scripts/script.db file?
To search for installed scripts in Nmap.
Where can you find a list of all official scripts for Nmap?
On the Nmap website.
What is the content stored in the script.db file?
Filenames and categories for each available script.
What is the command to activate NSE scripts from the vuln category?
To activate NSE scripts from the vuln category, the command is –script=vuln.
What is the command to run multiple scripts simultaneously?
To run multiple scripts simultaneously, the command is –script=,.
How can arguments be given to NSE scripts using the Nmap switch?
Arguments can be given to NSE scripts using the –script-args Nmap switch.
How can the built-in help menu for Nmap scripts be accessed?
The built-in help menu for Nmap scripts can be accessed using the command nmap –script-help .
What language are NSE Scripts written in?
NSE Scripts are written in the Lua programming language.
What are some categories of NSE Scripts?
Some categories of NSE Scripts include safe, intrusive, vuln, exploit, auth, brute, and discovery.
What can NSE Scripts be used for?
NSE Scripts can be used for scanning for vulnerabilities, automating exploits, reconnaissance, bypassing authentication, and querying running services for further information about the network.
What is the purpose of using a ping sweep with Nmap?
The purpose of using a ping sweep with Nmap is to obtain a map of the network structure by identifying active hosts based on ICMP echo responses.
What does the -sn switch do in Nmap?
The -sn switch in Nmap tells it not to scan any ports and rely primarily on ICMP echo packets to identify targets during a ping sweep.
What additional packets does the -sn switch cause Nmap to send during a ping sweep?
In addition to ICMP echo requests, the -sn switch causes Nmap to send a TCP SYN packet to port 443 and a TCP ACK (or TCP SYN if not run as root) packet to port 80 of the target during a ping sweep.
How can you specify IP ranges when performing a ping sweep with Nmap?
You can specify IP ranges using either a hyphen (-) or CIDR notation when performing a ping sweep with Nmap.
What are NULL scans used for?
NULL scans are used to send TCP requests with no flags set at all.
What is the expected behavior if a port is protected by a firewall during a NULL, FIN, or Xmas scan?
If a port is protected by a firewall during a NULL, FIN, or Xmas scan, the scan will identify the port as open|filtered, closed, or filtered.
What is the purpose of FIN scans?
FIN scans send a request with the FIN flag and expect a RST response if the port is closed.
What is the reason for most modern IDS solutions being savvy to NULL, FIN, and Xmas scan types?
Most modern IDS solutions are savvy to NULL, FIN, and Xmas scan types because they are designed to detect these scan techniques and prevent firewall evasion.
What is the expected response from network hosts for closed ports according to RFC 793?
According to RFC 793, network hosts should respond to malformed packets with a RST TCP packet for closed ports.
Why are Xmas scans called Xmas scans?
Xmas scans are called Xmas scans because the flags it sets (PSH, URG, and FIN) give it the appearance of a blinking Christmas tree when viewed as a packet capture in Wireshark.