Mastering the Nmap Scripting Engine
eBook - ePub

Mastering the Nmap Scripting Engine

Paulino Calderon Pale

Compartir libro
  1. 244 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Mastering the Nmap Scripting Engine

Paulino Calderon Pale

Detalles del libro
Vista previa del libro
Índice
Citas

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Mastering the Nmap Scripting Engine un PDF/ePUB en línea?
Sí, puedes acceder a Mastering the Nmap Scripting Engine de Paulino Calderon Pale en formato PDF o ePUB, así como a otros libros populares de Computer Science y Cyber Security. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2015
ISBN
9781782168317
Categoría
Cyber Security

Mastering the Nmap Scripting Engine


Table of Contents

Mastering the Nmap Scripting Engine
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Introduction to the Nmap Scripting Engine
Installing Nmap
Building Nmap from source code
Keeping Nmap up to date
Running NSE scripts
Script categories
NSE script selection
Selecting by script name or category
Selecting by filename or folder
Advanced script selection with expressions
NSE script arguments
Loading script arguments from a file
Forcing the execution of NSE scripts
Debugging NSE scripts
Scan phases and NSE
NSE script rules
Applications of NSE scripts
Information-gathering
Collecting UPNP information
Finding all hostnames resolving to the same IP address
Advanced host discovery
Discovering hosts with broadcast pings
Listening to your LAN to discover targets
Password auditing
Brute-forcing MySQL passwords
Brute-forcing SMTP passwords
Vulnerability scanning
Detecting insecure MySQL server configurations
Detecting web servers vulnerable to slow denial-of-service attacks
Detecting SSL servers vulnerable to CVE-2014-3566
Setting up a development environment
Halcyon IDE
Adding new scripts
Summary
2. Lua Fundamentals
Quick notes about Lua
Comments
Dummy assignments
Indexes
Semantics
Coercion
Safe language
Booleans
Flow control structures
Conditional statements – if-then, else, and elseif
Loops – while
Loops – repeat
Loops – for
Data types
String handling
Character classes
Magic characters
Patterns
Captures
Repetition operators
Concatenation
Finding substrings
String repetition
String length
Formatting strings
Splitting and joining strings
Common data structures
Tables
Arrays
Linked lists
Sets
Queues
Custom data structures
http-enum database
http-default-accounts
I/O operations
Modes
Opening a file
Reading a file
Writing a file
Closing a file
Coroutines
Creating a coroutine
Executing a coroutine
Determining the running coroutine
Getting the status of a coroutine
Yielding a coroutine
Metatables and metamethods
Arithmetic metamethods
Relational metamethods
Summary
3. NSE Data Files
Locating your data directory
Data directory search order
Username and password lists used in brute-force attacks
Username dictionaries
Password dictionaries
Web application auditing data files
http-fingerprints.lua
http-sql-errors.lst
http-web-files-extensions.lst
http-devframework-fingerprints.lua
http-folders.txt
vhosts-default.lst
wp-plugins.lst
DBMS-auditing data files
mysql-cis.audit
oracle-default-accounts.lst
oracle-sids
Java Debug Wire Protocol data files
JDWPExecCmd.java
JDWPSystemInfo.class
Other NSE data files
mygroupnames.db
rtsp-urls.txt
snmpcommunities.lst
ssl-ciphers
ssl-fingerprints
ike-fingerprints.lua
tftplist.txt
Other Nmap data files
Summary
4. Exploring the Nmap Scripting Engine API and Libraries
Understanding the structure of an NSE script
Other NSE script fields
Author
License
Dependencies
A sample NSE script
Exploring environment variables
Accessing the Nmap API
NSE arguments
Host table
Port table
Exception handling in NSE scripts
The NSE registry
Writing NSE libraries
Extending the functionality of an NSE library
NSE modules in C/C++
Exploring other popular NSE libraries
stdnse
openssl
target
shortport
creds
vulns
http
Summary
5. Enhancing Version Detection
Understanding version detection mode in NSE
Phases of version detection
Adjusting the rarity level of a version scan
Updating the version probes database
Taking a closer look at the file format
Excluding scanned ports from version detection
Using fallbacks to match other version probes
Getting to know post-processors
Nmap Scripting Engine
SSL
Writing your own version detection scripts
Defining the category of a version detection script
Defining the portrule of a version detection script
Updating the port version information
Setting the match confidence level
Examples of version detection scripts
NSE script – modbus-discover
NSE script – ventrilo-info
NSE script – rpc-grind
Summary
6. Developing Brute-force Password-auditing Scripts
Working with the brute NSE library
Selecting a brute mode
Implementing the Driver class
Passing library and user options
Returning valid accounts via Account objects
Handling execution errors gracefully with the Error class
Reading usernames and password lists with the unpwdb NSE library
Managing user credentials found during scans
Writing an NSE script to launch password-auditing attacks against the MikroTik RouterOS API
Summary
7. Formatting the Script Output
Output formats and Nmap Scripting Engine
XML structured output
Implementing structured output in your scripts
Printing verbosity messages
Including debugging information
The weakness of the grepable format
NSE script output in the HTML report
Summary
8. Working with Network Sockets and Binary Data
Work...

Índice