Skip to Content
Security Automation with Ansible 2
book

Security Automation with Ansible 2

by Akash Mahajan, MADHU AKULA
December 2017
Intermediate to advanced
364 pages
7h 30m
English
Packt Publishing
Content preview from Security Automation with Ansible 2

Nmap NSE scanning playbook

The following playbook will perform enumeration of directories used by popular web applications and servers using http-enum and finds options that are supported by an HTTP server using http-methods using Nmap scripts.

More about Nmap NSE can be found at https://nmap.org/book/nse.html.

The following playbook will perform http-enum and http-methods scans against scanme.nmap.org of ports 80 and 443:

- name: Advanced NMAP Scan using NSE  hosts: localhost  vars:    ports:      - 80      - 443    scan_host: scanme.nmap.org   tasks:    - name: Running Nmap NSE scan      shell: "nmap -Pn -p {{ ports|join(',') }} --script {{ item }} -oA nmap-{{ item }}-results-%Y-%m-%d {{ scan_host }}"      with_items:        - http-methods        - http-enum

The following playbook ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Implementing DevOps with Ansible 2

Implementing DevOps with Ansible 2

Jonathan McAllister
Practical Ansible 2

Practical Ansible 2

Daniel Oh, James Freeman, Fabio Alessandro Locati

Publisher Resources

ISBN: 9781788394512Supplemental Content