7¤0ìým´QxU«ØÀÓӤŒْ‡¹àWDe|@[‹g¾Kð4io¸¶!WHÈü-ܢĪªÒÿúÿ—ÿú¤€×0Œ%EH
›üWlÿެö޵3Ëãã Fã¡\4›-å`
«s‘8Jr¥BÆC „õ’Ô)d pos, ya que el cortafuegos anularía las sondas o las respuestas a las mismas\&.
.RE
.PP
\fB\-P0\fR (No realizar ping)
.RS 4
Con esta opción, Nmap no realiza la etapa de descubrimiento\&. Bajo circunstancias normales, Nmap utiliza dicha etapa para determinar qué máquinas se encuentran activas para hacer un análisis más agresivo\&. Por omisión, Nmap sólo realiza ese tipo de sondeos, como análisis de puertos, detección de versión o de sistema operativo contra los equipos que se están «vivos»\&. Si se deshabilita el descubrimiento de sistemas con la opción
\fB\-P0\fR
entonces Nmap utilizará las funciones de análisis solicitadas contra
\fItodas\fR
las direcciones IP especificadas\&. Por lo tanto, si se especifica una red del tamaÃME .. ".timeout"))
local version = stdnse.get_script_args(SCRIPT_NAME .. ".version") or 2
timeout = (timeout or 7) * 1000
if version ~= 'all' then
version = tonumber(version)
end
local responses, results, interfaces, lthreads = {}, {}, {}, {}
local result, grouptable, sourcetable
local group_names_fname = stdnse.get_script_args(SCRIPT_NAME .. ".mgroupnamesdb") or
nmap.fetchfile("nselib/data/mgroupnames.db")
local mg_names_db = group_names_fname and mgroup_names_fetch(group_names_fname)
local collect_interfaces = function (if_table)
if if_table and if_table.up == "up" and if_table.link=="ethernet"
and if_table.address:match("%d+%.%d+%.%d+%.%d+") then
interfaces[#interfaces+1] = if_table
end
end
stdnse.get_script_interfaces(collect_interfaces)
-- We should iterate over interfaces
for _, interface in pairs(interfaces) do
local co = stdnse.new_thread(igmpListener, interface, timeout, responses)
igmpQuery(interface, version)
lthreads[co] = true
end
local condvar = nmap.condvar(responses)
-- Wait for the listening threads to finish
repeat
for thread in pairs(lthreads) do
if coroutine.status(thread) == "dead" then lthreads[thread] = nil end
end
if ( next(lthreads) ) then
condvar("wait")
end
until next(lthreads) == nil;
-- Output useful info from the responses
if #responses > 0 then
-- We should sort our list here.
-- This is useful to have consistent results for tools such as Ndiff.
table.sort(responses, respCompare)
for _, response in pairs(responses) do
result = {}
result.name = response.src
table.insert(result, "Interface: " .. response.interface)
-- Add to new targets if newtargets script arg provided
if target.ALLOW_NEW_TARGETS then target.add(response.src) end
if response.type == 0x12 then
table.insert(result, "Version: 1")
table.insert(result, "Multicast group: ".. response.group)
rver ready\r\n| p/Nomadix AG $1 ftpd/ v/$2/ d/WAP/ cpe:/h:nomadix:ag_$1/a
match ftp m|^220 Welcome to Easy File Sharing FTP Server!\r\n| p/Easy File Sharing ftpd/ o/Windows/ cpe:/a:efssoft:easy_file_sharing_ftp_server/ cpe:/o:microsoft:windows/a
match ftp m|^220- \*+\r\n220- \r\n220- Welcome to Dream FTP Server\r\n220- Copyright 2002 - 2004\r\n220- BolinTech Inc\.\r\n| p/BolinTech Dream FTP Server/ o/Windows/ cpe:/o:microsoft:windows/a
match ftp m|^220 Welcome to the Netburner FTP server\.\r\n| p/Netburner embedded device ftpd/ d/specialized/
match ftp m|^220 NetBotz FTP Server ([\w._-]+) ready\.\r\n| p/NetBotz network monitor ftpd/ v/$1/ d/security-misc/
match ftp m|^220 TOSHIBA e-STUDIO5500c FTP server \(([\w._-]+)\) ready\.\r\n| p/Toshiba e-STUDIO5500c printer ftpd/ v/$1/ d/printer/ cpe:/h:toshiba:e-studio5500c/a
match ftp m|^220 \(WJ-HD220 FTP Server version ([\w._-]+) Ready\)\r\n| p/Panasonic WJ-HD220 ftpd/ v/$1/ d/media device/
match ftp m|^(?:220-.*\r\n)*220 ([\w._-]+) FTP server \(EMC-SNAS: ([\w._-]+)\) ready\.\r\n| p/EMC Scalable Network Accelerator ftpd/ v/$2/ h/$1/
match ftp m|^220-CentOS release ([\w._-]+) .*\r\n220 ProFTPD ([\w._-]+) Server \(ProFTPD Default Installation\)|s p/ProFTPD/ v/$2/ i/CentOS $1/ o/Linux/ cpe:/a:proftpd:proftpd:$2/a cpe:/o:centos:centos/
match ftp m|^220 TCAdmin FTP Server\r\n| p/Balance Servers TCAdmin game hosting ftpd/ o/Windows/ cpe:/o:microsoft:windows/a
match ftp m|^.* klogd: klogd started: BusyBox v([\w._-]+) \(.*\)\r\nDoing BRCTL \.\.\.\r\nsetfilter br0 0 \r\n/var/tmp/act_firewall: No such file or directory\r\n| p/Actiontec router ftpd/ i/firewall broken; BusyBox $1/ d/broadband router/ cpe:/a:busybox:busybox:$1/
# these should be fine. embyte
match ftp m|^220 .*BlackJumboDog Version ([^ ]+)| p/Blackjumbodog FTPd/ v/$1/
match ftp m|^220[- ] ?[Cc]rob FTP [Ss]erver [Vv]?([-.\d\w]+)| p/Crob FTPd/ v/$1/
match ftp m|^220.* GlobalSCAPE Secure FTP Server \(v\. ([^\)]+)\)| p/GlobalSCAPE Secure FTPd/ v/$1/ o/Wincontrol permitted-cross-domain-policies="master-only"/>\r\n \r\n\r\n| p/Facebook cross-domain policy/
softmatch adobe-crossdomain m|^<\?xml version=\"1\.0\"\?>.*|s
match afsmain m|^\+Welcome to Ability FTP Server \(Admin\)\. \[20500\]\r\n| p/Code-Crafters Ability FTP Server afsmain admin/ o/Windows/ cpe:/a:code-crafters:ability_ftp_server/ cpe:/o:microsoft:windows/a
match airserv-ng m|^\x05\0\0\x01.\0\0\0\0....\xff\xff\xff.\0\0\0\0\0\0\0.\0\0\0\0\0\x0fB@\0\0\0.\x80\0\0\0\xff\xff\xff\xff\xff\xff|s p/airserv-ng/ cpe:/a:aircrack-ng:airserv-ng/
match altiris-agent m|^<\0r\0e\0s\0p\0o\0n\0s\0e\0>\0C\0o\0n\0n\0e\0c\0t\0e\0d\0 \0t\0o\0 [\0\d.]*<\0/\0r\0e\0s\0p\0o\0n\0s\0e\0>\0$| p/Altiris remote monitoring agent/
# AMANDA index server 2.4.2p2 on Linux 2.4
match amanda m|^220 ([-.\w]+) AMANDA index server \((\d[-.\w ]+)\) ready\.\r\n| p/Amanda backup system index server/ v/$2/ o/Unix/ h/$1/ cpe:/a:amanda:amanda:$2/
match amanda m|^501 Could not read config file [^!\r\n]+!\r\n220 ([-.\w]+) AMANDA index server \(([-\w_.]+)\) ready\.\r\n| p/Amanda backup system index server/ v/$2/ i/broken: config file not found/ h/$1/ cpe:/a:amanda:amanda:$2/
match amanda m|^ld\.so\.1: amandad: fatal: (libsunmath\.so\.1): open failed: No such file or directory\n$| p/Amanda backup system index server/ i/broken: $1 not found/ cpe:/a:amanda:amanda/
match amanda m|^\n\*\* \(process:\d+\): CRITICAL \*\*: GLib version too old \(micro mismatch\): Amanda was compiled with glib-[\d.]+, but linking with ([\d.]+)\n| p/Amanda backup system index server/ i/broken: GLib $1 too old/ cpe:/a:amanda:amanda/
match AndroMouse m|^AMServer$|s p/AndroMouse Android remote mouse server/
match antivir m|^220 Symantec AntiVirus Scan Engine ready\.\r\n| p/Symantec AntiVirus Scan Engine/ cpe:/a:symantec:antivirus/ cpe:/a:symantec:antivirus_scan_engine/
match antivir m|^200 NOD32SS ([\d.]+) \((\d+)\)\r\n| p/Nime de tentative de conexiune in loguri venind de la o singura sursa trebuie sa stie ca a fost scanat prin metoda connect\&.
.RE
.PP
\fB\-sU\fR(Scanare UDP)
.RS 4
In tim ce multe servicii in Internet ruleaza prin protocolul TCP, serviciile
\m[blue]\fBUDP\fR\m[]\&\s-2\u[5]\d\s+2sunt si ele raspandite\&. DNS, SNMP si DHCP (porturile inregistrate 53, 161/162 si 67/68) sunt trei dintre cele mai comune\&. Deoarece scanarea UDP este in general lenta si mai dificila decat TCP, unii auditori de securitate ignora aceste porturi\&. Aceasta este o greseala, deoarece serviciile UDP exploatabile sunt destul de cunoscute si atacatorii cu siguranta nu vor ignora un intreg protocol\&. Din fericire, Nmap poate ajuta la inventarierea porturilor UDP\&.
.sp
Scanarea UDP este acivata cu optiunea
\fB\-sU\fR\&. Poate fi combinata cu o scanare TCP cum ar fi scanrea SYN (
\fB\-sS\fR) pentru a verifica ambele protocoale in timpul aceleiasi scanari\&.
.sp
Scanarea UDP functioneaza prin trimiterea de headere UDP goale (fara date) la fiecare port specificat al masinii tinta\&. Daca un mesaj ICMP de port inaccesibil (tipul 3, codul 3) este returnat, portul este
closed (inchis)\&. Alte mesaje ICMP de port care nu poate fi atins (tipul 3, codurile 1, 2, 9, 10 sau 13) marcheaza portul ca
filtered (filtrat)\&. Ocazional, un serviciu poate raspunde cu un pachet UDP, demonstrand faptul ca este
open (deschis)\&. Daca nici un raspuns nu este primit dupa mai multe retransmisii atunci portul este catalogat ca
open|filtered (deschis|filtrat)\&. Asta inseamna ca portul poate fi deschis sau poate un filtru de pachete blocheaza comunicatia\&. Scanarile de versiune (
\fB\-sV\fR) pot fi folosite pentru a ne ajuta sa diferentiem porturile cu adevarat deschise de cele filtrate\&.
.sp
O mare incercare in scanarea UDP o reprezinta realizarea acesteia rapid\&. Porturile deschise si filtrate rareori trimit raspuns, lasand Nmapul sa astepte si apoi sa retrimita pachetul pentru situatia in care proba sau raspunsul s\nsert( results, result_part )
end
end
socket:close()
results.name = TEMPLATE_NAME
table.insert(results, "")
table.insert(results, {name = "Additional information", ("The audit was performed using the db-account: %s"):format(username),
("The following admin accounts were excluded from the audit: %s"):format(table.concat(ADMIN_ACCOUNTS, ","))
})
return stdnse.format_output(true, { results })
end
---
-- TNS Library supporting a very limited subset of Oracle operations
--
-- Summary
-- -------
-- The library currently provides functionality to connect and authenticate
-- to the Oracle database server. Some preliminary query support has been
-- added, which only works against a few specific versions. The library has
-- been tested against and known to work with Oracle 10g and 11g. Please check
-- the matrix below for tested versions that are known to work.
--
-- Due to the lack of documentation the library is based mostly on guesswork
-- with a lot of unknowns. Bug reports are therefore both welcome and
-- important in order to further improve this library. In addition, knowing
-- that the library works against versions not in the test matrix is valuable
-- as well.
--
-- Overview
-- --------
-- The library contains the following classes:
--
-- o Packet.*
-- - The Packet classes contain specific packets and function to serialize
-- them to strings that can be sent over the wire. Each class may also
-- contain a function to parse the servers response.
--
-- o Comm
-- - Implements a number of functions to handle communication
--
-- o Crypt
-- - Implements encryption algorithms and functions to support
-- authentication with Oracle 10G and Oracle 11G.
--
-- o Helper
-- - A helper class that provides easy access to the rest of the library
--
--
-- Example
-- -------
-- The following sample code illustrates how scripts can use the Helper class
-- to interface the library:
--
--
-- tnshelper = tns.Helperp_styles
simplepie
top_searches
webform_features
views_ical
jquery_ajax_load
textimage
nodeaccess_nodereference
timeline
uc_ssl
block_term
og_user_roles
linkit_target
syntaxhighlighter_insert
commerce_fees
subpath_alias
tcontact
css_browser_selector
restrict_by_ip
features_diff
webform_php
profile_permission
todolist
crm_core
cacheflush
geofield_ymap
apachesolr_sort
uc_checkout_tweaks
inactive_user
field_collection_node_clone
htaccess
modules_weight
simplified_modules
uc_affiliate2
node_breadcrumb
joomla
workflow_extensions
tf_views
basic_cart
cleanpager
borealis
google_analytics_et
mass_pwreset
fileshare
statistics_filter
gallery_assist_ic
uc_tc
every_field
opigno_quiz_app
taxonomy_list
feeds_comment_processor
contact_importer
profile_role
submitagain
omega_ui
attachment_links
tracking_code
drupal_form
remote_file_source
role_watchdog
rel
magnific_popup
teaserbytype
contact_attach
field_countdown
matrix
word_link
blockanonymouslinks
afb
workflow_fields
hint
views_simple_pager
file_formatters
commerce_add_to_cart_extras
field_delimiter
facebook_wall
phpbbforum
file_aliases
node_adoption
feeds_youtube
hreflang
filter_harmonizer
book_access
better_watchdog_ui
commerce_moneybookers
link_css
imce_watermark
field_collection_feeds
asset
google_webfont_loader_api
duplicate_role
agrcache
media_archive
favorites
captcha_webform
seowatcher
commerce_custom_line_items
sitecatalyst
taxonomy_vtn
acquia_search_multi_subs
panopoly_demo
slideshow
commerce_product_bundle
content_theme
simplecrop
course
sfweb2lead_webform
zipcode
imagefield_import
context_redirect
pollfield
facetapi_taxonomy_sort
geonames
commerce_conditions
commerce_price_table
google_store_locator
boost_expire
node_noindex
responsive_tables
webform_autocomplete
search_engine_referers
date_repeat_instance
creative_commons
opigno_class_app
uc_atctweaks
answers
dynamic_persistent_menu
facetapi_collapsible
uc_product_minmax
flexslider_entityreference
uc_donation
term_level
commerce_billy_mail
node_registration
filterbтветствующий целевому IP, чтобы правильно адресовать фрейм\&. Это часто бывает медленно и проблематично, т\&.к\&. операционные системы не были написаны с учетом того, что им придется посылать миллионы ARP запросов недоступным хостам в короткий промежуток времени\&.
.sp
ARP сканирование позволяет Nmap вместо ARP запросов использовать свои собственные оптимизированные алгоритмы\&. И если Nmap получает ответ, то ей даже нет необходимости беспокоиться о других типах обнаружения хостов, основанных на IP пакетах\&. Этот делает ARP сканирование более быстрым и надежным\&. Поэтому оно применяется по умолчанию для сканирования локальных сетей\&. Даже если указаны другие типы сканирования (как
\fB\-PE\fR
или
\fB\-PS\fR), Nmap все равно использует ARP сканирование для машин локальной сети\&. Если вы абсолютно не хотите использовать такой тип сканирования, то задайте опцию
\fB\-\-send\-ip\fR\&.
.RE
.PP
\fB\-\-traceroute\fR (Отслеживать путь к хосту)
.RS 4
Отслеживание осуществляется после сканирования, используя результаты этого сканирования для определения порта и протокола, с помощью которых можно будет достичь цели\&. Процедура работает сÐик\&. В то время, как Nmap обычно используется для проверки безопасности, многие системные администраторы находят ее полезной для обычных задач, таких как контролирование структуры сети, управление расписаниями запуска служб и учет времени работы хоста или службы\&.
.PP
Выходные данные Nmap это список просканированных целей с дополнительной информацией по каждой из них в зависимости от заданных опций\&. Ключевой информацией является
«таблица важных портов»\&.
Эта таблица содержит номер порта, протокол, имя службы и состояние\&. Состояние может иметь значение
open
(открыт),
filtered
(фильтруется),
closed
(закрыт) или
unfiltered
(не фильтруется)\&.
Открыт
означает, что приложение на целевой машине готово для установки соединения/принятия пакетов на этот порт\&.
Фильтруется
означает, что брандмауэр, сетевой фильтр, или какая\-то другая помеха в сети блокирует порт, и Nmap не может установить
открыт
этот порт или
закрыт\&.
Закрытые
порты не связаны ни с каким приложением, но могут быть открыты в любой момент\&. Порты расцениваются как
не фильтрованные, когда они отвечают на запросы Nmap, но Nmap не может определить Ð and nmap.verbosity()-nmap.debugging()) or 0
end
'\" t
.\" Title: nmap
.\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 08/06/2025
.\" Manual: Nmap Reference Guide
.\" Source: Nmap
.\" Language: English
.\"
.TH "NMAP" "1" "08/06/2025" "Nmap" "Nmap Reference Guide"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
nmap \- Network exploration tool and security / port scanner
.SH "SYNOPSIS"
.HP \w'\fBnmap\fR\ 'u
\fBnmap\fR [\fIScan\ Type\fR...] [\fIOptions\fR] {\fItarget\ specification\fR}
.SH "DESCRIPTION"
.PP
Nmap (\(lqNetwork Mapper\(rq) is an open source tool for network exploration and security auditing\&. It was designed to rapidly scan large networks, although it works fine against single hosts\&. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics\&. While Nmap is commonly used fzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV
BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx
MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U
cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA
IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ
N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW
BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK
BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X
57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM
eQ==
-----END CERTIFICATE-----
Certum Trusted Network CA
=========================
-----BEGIN CERTIFICATE-----
MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK
ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv
biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy
MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU
ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC
l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J
J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4
fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0
cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB
Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw
DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj
jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1
mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj
Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
0vFSDJ3gyICh3WZlXi/EjJKSZp4A==
-----END CERTIFICATE-----
GlobalSign Root CA - R2
=======================
-----BEGIN CERTIFICATE-----
MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv
YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT
aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln
bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6
ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp
s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN
S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL
TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C
ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E
FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i
YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN
BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp
9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu
01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7
9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
-----END CERTIFICATE-----
Verisign Class 3 Public Primary Certification Authority - G3
============================================================
-----BEGIN CERTIFICATE-----
MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
CQYDVQ"] = {
cmd = "EXPN",
success = {
[250] = "Requested mail action okay, completed",
},
errors = {
[550] = "Requested action not taken: mailbox unavailable",
[500] = "Syntax error, command unrecognised",
[501] = "Syntax error in parameters or arguments",
[502] = "Command not implemented",
[504] = "Command parameter not implemented",
[421] = " Service not available, closing transmission channel",
},
},
}
---
-- Returns a domain to be used in the SMTP commands that need it.
--
-- If the user specified one through the script argument
-- smtp.domain this function will return it. Otherwise it will try
-- to find the domain from the typed hostname and from the rDNS name. If it
-- still can't find one it will return the nmap.scanme.org by default.
--
-- @param host The host table
-- @return The hostname to be used by the different SMTP commands.
get_domain = function(host)
local nmap_domain = "nmap.scanme.org"
-- Use the user provided options.
local result = stdnse.get_script_args("smtp.domain")
if not result then
if type(host) == "table" then
if host.targetname then
result = host.targetname
elseif (host.name and #host.name ~= 0) then
result = host.name
end
end
end
return result or nmap_domain
end
--- Gets the authentication mechanisms that are listed in the response
-- of the client's EHLO command.
--
-- @param response The response of the client's EHLO command.
-- @return An array of authentication mechanisms on success, or nil
-- when it can't find authentication.
get_auth_mech = function(response)
local list = {}
for _, line in pairs(stringaux.strsplit("\r?\n", response)) do
local authstr = line:match("%d+%-AUTH%s(.*)$")
if authstr then
for mech in authstr:gmatch("[^%s]+") do
table.insert(list, mech)
end
return list
end
end
return nil
end
--- Checks the SMTP server reply to name=src_path})
.. encode_path({type=PATH_TYPE.UTF8Name, name=dst_path})
.. encode_path({type=PATH_TYPE.UTF8Name, name=new_name})
packet = self:create_fp_packet( REQUEST.Command, data_offset, data )
self:send_fp_packet( packet )
return self:read_fp_packet()
end,
--- Sends an GetStatus DSI request (which is basically a FPGetSrvrInfo
-- AFP request) to the server and handles the response
--
-- @return status (true or false)
-- @return table with server information (if status is true) or error string
-- (if status is false)
fp_get_server_info = function(self)
local packet
local data_offset = 0
local response, result = {}, {}
local offsets = {}
local pos
local status
local data = string.pack("Bx", COMMAND.FPGetSrvrInfo)
packet = self:create_fp_packet(REQUEST.GetStatus, data_offset, data)
self:send_fp_packet(packet)
response = self:read_fp_packet()
if response:getErrorCode() ~= ERROR.FPNoErr then
return response
end
packet = response.packet
-- parse and store the offsets in the 'header'
offsets.machine_type, offsets.afp_version_count,
offsets.uam_count, offsets.volume_icon_and_mask, pos
= string.unpack(">I2I2I2I2", packet.data)
-- the flags are directly in the 'header'
result.flags = {}
result.flags.raw, pos = string.unpack(">I2", packet.data, pos)
-- the short server name is stored directly in the 'header' as
-- well
result.server_name, pos = string.unpack("s1", packet.data, pos)
-- Server offset should begin at an even boundary see link below
-- http://developer.apple.com/mac/library/documentation/Networking/Reference/AFP_Reference/Reference/reference.html#//apple_ref/doc/uid/TP40003548-CH3-CHDIEGED
if (pos + 1) % 2 ~= 0 then
pos = pos + 1
end
-- and some more offsets
offsets.server_signature, offsets.network_addresses_count,
offsets.directory_names_count, offsets.utf8_servuipmentUri = response['body']:find("equipmentUri",nextequipmentUri)
table.insert(devices, device)
count = count + 1
end
output["devices"] = devices
end
end
stdnse.debug2("status-line: "..response['status-line'])
local error = response['status-line']:match('Error')
if error then
stdnse.debug2("Request returned a network error.")
return nil, "Request returned a network error."
end
-- Set the port version
port.version.name = "http"
port.version.name_confidence = 10
port.version.product = output["productName"]
port.version.version = output["productVersion"]
port.version.devicetype = output["hardwareType"]
table.insert(port.version.cpe, "cpe:/h:".. output["vendorName"] .. ":" .. output["productName"])
nmap.set_port_version(host, port, "hardmatched")
return output
end
end
action = function(host,port)
-- Identify servers that answer 200 to invalid HTTP requests and exit as these would invalidate the tests
local status_404, result_404, _ = http.identify_404(host,port)
if ( status_404 and result_404 == 200 ) then
stdnse.debug1("Exiting due to ambiguous response from web server on %s:%s. All URIs return status 200.", host.ip, port.number)
return nil
end
return GetInformation(host, port)
end
local shortport = require "shortport"
local netbios = require "netbios"
local nmap = require "nmap"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
description = [[
Retrieves IP addresses of the target's network interfaces via NetBIOS NS.
Additional network interfaces may reveal more information about the target,
including finding paths to hidden non-routed networks via multihomed systems.
]]
---
-- @usage
-- nmap -sU -p 137 --script nbns-interfaces
--
-- @output
-- PORT STATE SERVICE
-- 137/udp open netbios-ns
-- | nbns-interfaces:
-- | hostname: NOTEBOOK-NB3
-- | interfaces:
-- | 10.5.4.89
-- | 192.168.56.1
-- |_ [0x024E] = 0x024F, -- LATIN CAPITAL LETTER Y WITH STROKE
[0x024F] = {status="valid"}, -- LATIN SMALL LETTER Y WITH STROKE
-- LATIN SMALL LETTER S WITH SWASH TAIL..LATIN SMALL LETTER Z WITH SWASH TAIL
[0x023F] = {status="valid"},
[0x0240] = {status="valid"},
[0x02B0] = 0x0068, -- MODIFIER LETTER SMALL H
[0x02B1] = 0x0266, -- MODIFIER LETTER SMALL H WITH HOOK
[0x02B2] = 0x006A, -- MODIFIER LETTER SMALL J
[0x02B3] = 0x0072, -- MODIFIER LETTER SMALL R
[0x02B4] = 0x0279, -- MODIFIER LETTER SMALL TURNED R
[0x02B5] = 0x027B, -- MODIFIER LETTER SMALL TURNED R WITH HOOK
[0x02B6] = 0x0281, -- MODIFIER LETTER SMALL CAPITAL INVERTED R
[0x02B7] = 0x0077, -- MODIFIER LETTER SMALL W
[0x02B8] = 0x0079, -- MODIFIER LETTER SMALL Y
-- MODIFIER LETTER LEFT ARROWHEAD..MODIFIER LETTER DOWN ARROWHEAD
[0x02C2] = {status="disallowed"},
[0x02C3] = {status="disallowed"},
[0x02C4] = {status="disallowed"},
[0x02C5] = {status="disallowed"},
[0x02D8] = {status="disallowed"}, -- BREVE
[0x02D9] = {status="disallowed"}, -- DOT ABOVE
[0x02DA] = {status="disallowed"}, -- RING ABOVE
[0x02DB] = {status="disallowed"}, -- OGONEK
[0x02DC] = {status="disallowed"}, -- SMALL TILDE
[0x02DD] = {status="disallowed"}, -- DOUBLE ACUTE ACCENT
[0x02DE] = {status="disallowed"}, -- MODIFIER LETTER RHOTIC HOOK
[0x02DF] = {status="disallowed"}, -- MODIFIER LETTER CROSS ACCENT
[0x02E0] = 0x0263, -- MODIFIER LETTER SMALL GAMMA
[0x02E1] = 0x006C, -- MODIFIER LETTER SMALL L
[0x02E2] = 0x0073, -- MODIFIER LETTER SMALL S
[0x02E3] = 0x0078, -- MODIFIER LETTER SMALL X
[0x02E4] = 0x0295, -- MODIFIER LETTER SMALL REVERSED GLOTTAL STOP
[0x02EC] = {status="valid"}, -- MODIFIER LETTER VOICING
[0x02ED] = {status="disallowed"}, -- MODIFIER LETTER UNASPIRATED
[0x02EE] = {status="valid"}, -- MODIFIER LETTER DOUBLE APOSTROPHE
[0x0340] = 0x0300, -- COMBINING GRAVE TONE MARK
[0x0341] = 0x0301, -- COMBINING ACUTE TONE MARK
[0x0342] = {status="valid"}, -- COMBINING GREEK PERISPOMENI
[0x0343] = 0x0313,hreads) do
if ( coroutine.status(t) == "dead" ) then threads[t] = nil end
end
if ( next(threads) ) then
condvar "wait"
end
until( next(threads) == nil )
-- urls that could not be retrieved due to low level errors, such as
-- failure in socket send or receive
local failure_urls = {}
-- urls that elicited a 200 OK response
local success_urls = {}
-- urls that got some non-404-type response
local urls_by_code = {}
for _, r in ipairs(result) do
if ( r.status == -1 ) then
table.insert(failure_urls, r.url)
elseif ( r.status == 200 ) then
table.insert(success_urls, r.url)
elseif r.status ~= status_404 then
local s = tostring(r.status)
urls_by_code[s] = urls_by_code[s] or {}
table.insert(urls_by_code[s], r.url)
end
end
local output = stdnse.output_table()
if next(failure_urls) then
output.errors = failure_urls
end
if next(success_urls) then
output.discovered = success_urls
end
if next(urls_by_code) then
output["other responses"] = urls_by_code
end
if #output > 0 then
return output
end
end
local brute = require "brute"
local creds = require "creds"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
description = [[
Performs brute force password auditing against the pcAnywhere remote access protocol.
Due to certain limitations of the protocol, bruteforcing
is limited to single thread at a time.
After a valid login pair is guessed the script waits
some time until server becomes available again.
]]
---
-- @usage
-- nmap --script=pcanywhere-brute
--
-- @output
-- 5631/tcp open pcanywheredata syn-ack
-- | pcanywhere-brute:
-- | Accounts
-- | administrator:administrator - Valid credentials
-- | Statistics
-- |_ Performed 2 guesses in 55 seconds, average tps: 0
--
-- @args pcanywhere-brute.timeout socket timeout for connecting to PCAnywhere (default,
.. msrpctypes.marshall_winreg_AccessMask('MAXIMUM_ALLOWED_ACCESS')
-- [out,ref] policy_handle *handle
-- Do the call
status, result = call_function(smbstate, 0x01, arguments)
if(status ~= true) then
return false, result
end
stdnse.debug3("MSRPC: OpenHKCU() returned successfully")
-- Make arguments easier to use
arguments = result['arguments']
pos = 1
-- [in] uint16 *system_name,
-- [in] winreg_AccessMask access_mask,
-- [out,ref] policy_handle *handle
pos, result['handle'] = msrpctypes.unmarshall_policy_handle(arguments, pos)
pos, result['return'] = msrpctypes.unmarshall_int32(arguments, pos)
if(result['return'] == nil) then
return false, "Read off the end of the packet (winreg.openhkcu)"
end
if(result['return'] ~= 0) then
return false, smb.get_status_name(result['return']) .. " (winreg.openhkcu)"
end
return true, result
end
---Calls the Windows registry function EnumKey, which returns a single key
-- under the given handle, at the index of 'index'.
--
--@param smbstate The SMB state table
--@param handle A handle to hive or key. winreg_openhku provides a usable key, for example.
--@param index The index of the key to return. Generally you'll start at 0 and increment until
-- an error is returned.
--@param name The name buffer. This should be set to the empty string; however, setting to 'nil' can have
-- interesting effects on Windows 2000 (I experienced crashes).
--@return (status, result) If status is false, result is an error message. Otherwise, result is a table of values, the most
-- useful one being 'name', which is the name of the current key
function winreg_enumkey(smbstate, handle, index, name)
local status, result
local arguments
local pos, align
stdnse.debug2("MSRPC: Calling EnumKey(%d) [%s]", index, smbstate['ip'])
-- [in,ref] policy_handle *handle,
a elseif ( comm.version < 3 ) then
status, data = comm:GetAdditionalBytes( data, pos, 32 )
if (not(status)) then
return false, "Mount: Failed to call GetAdditionalBytes"
end
fhandle, pos = string.unpack( "c32", data, pos )
else
return false, "Mount failed"
end
return true, fhandle
end,
--- Attempts to unmount a remote export in order to get the filehandle
--
-- @param comm object handles rpc program information and
-- low-level packet manipulation
-- @param path string containing the path to mount
-- @return status success or failure
-- @return error string containing error if status is false
Unmount = function(self, comm, path)
local packet, status
local _, pos, data, header, fhandle = "", 1, "", "", {}
data = Util.marshall_vopaque(path)
packet = comm:EncodePacket( nil, Mount.Procedure.UMNT, { type=Portmap.AuthType.UNIX }, data )
if (not(comm:SendPacket(packet))) then
return false, "Unmount: Failed to send data"
end
status, data = comm:ReceivePacket( )
if ( not(status) ) then
return false, "Unmount: Failed to read data from socket"
end
pos, header = comm:DecodeHeader( data, pos )
if not header then
return false, "Unmount: Failed to decode header"
end
if header.type ~= Portmap.MessageType.REPLY then
return false, "Unmount: Packet was not a reply"
end
if header.state ~= Portmap.State.MSG_ACCEPTED then
if (Portmap.RejectMsg[header.denied_state]) then
return false, string.format("Unmount: RPC call failed: %s",
Portmap.RejectMsg[header.denied_state])
else
return false, string.format("Unmount: RPC call failed: code %d",
header.state)
end
end
if header.accept_state ~= Portmap.AcceptState.SUCCESS then
if (Portmap.AcceptMsg[header.accept_state]) then
return false, string.format("Unmount (%s): RPC accepted state: %s",
path, Portma-byte string.
-- @return An 8-byte string.
function DES_string_to_key(data)
local table = require 'table'
--[[
This is compiled list of known IKE vendor IDs.
Most of the VIDs have been copied from ike-scan with permission from
the original author, Roy Hills, so a big 'thank you' is in order.
-- http://www.nta-monitor.com/wiki/index.php/Ike-scan_Documentation
Unknown ids:
ab926d9ee113a0219557fcc54e52865c (Citrix NetScaler ?)
5062b335bc20db32c0d54465a2f70100 (fortigate ?)
4f4540454371496d7a684644 (linksys ?)
9436e8d67174ef9aed068d5ad5213f187a3f8ba6000000160000061e (Netscreen 5XP running ScreenOS 4.0.r3)
]]
author = {"Jesper Kueckelhahn", "Roy Hills"}
license = "Simplified (2-clause) BSD license--See https://nmap.org/svn/docs/licenses/BSD-simplified"
fingerprints = {};
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Vendor ID Fingerprints
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Avaya
--------------------------------------------------------------------------------
table.insert(fingerprints, {
category = 'vendor',
vendor = 'Avaya',
version = nil,
ostype = nil,
devicetype = 'security-misc',
cpe = nil,
fingerprint = '^4485152d18b6bbcc0be8a8469579ddcc'
});
--------------------------------------------------------------------------------
-- Checkpoint
--------------------------------------------------------------------------------
table.insert(fingerprints, {
category = 'vendor',
vendor = 'Checkpoint VPN-1 / Firewall-1',
version = '4.1 Base',
ostype = nil,
devicetype = 'security-misc',
cpe = nil,
fingerprint = '^f4ed19e0c114eb516faaac0ee37daf2807b4381f00000001000000020000000000000000........'
});
table apresentados de uma forma organizada e compreensível\&. Dado o número de formas que o Nmap é utilizado pelas pessoas e por outros softwares, nenhum formato irá agradar a todos\&. Então o Nmap oferece diversos formatos incluindo o modo interativo para humanos lerem diretamente e o XML para fácil interpretação por um software\&.
.PP
Além de oferecer diversos formatos de saída, o Nmap fornece opções para controlar a verbosidade da saída assim como as mensagens de depuração\&. Os tipos de saída podem ser enviados para a saída padrão (standard output) ou para arquivos, o qual o Nmap pode acrescentar ou então sobrescrever\&. Arquivos de saída também podem ser utilizados para se retomar rastreios(scans) abortados\&.
.PP
O Nmap torna a saída disponível em cinco formatos diferentes\&. O default é chamado de
saída interativa (interactive output)
e é enviada para a saída padrão (stdout)\&. Há também a
saída normal (normal output)
que é similar à
interativa
excepto pelo facto de mostrar menos informações e alertas sobre a execução uma vez que se espera que seja feita uma análise somente após o rastreio(scan) completar, ao invés de interativamente\&.
.PP
A saída XML é um dos tipos de saída mais importantes pois permite a conversão para HTML, é facilmente analisada por programas como a interface gráfica do Nmap ou pode ser importada em banco de dados\&.
.PP
Os dois tipos restantes de saída são a simples
saída para o grep (grepable output)
que inclui a maioria das informações de um anfitrião(host)\-alvo em uma única linha e a
s4íd4 sCRiPt KiDDi3 (sCRiPt KiDDi3 0utPUt)
para usuários que se consideram 1r4d0z (|<\-r4d)\&.
.PP
Embora a saída interativa seja a default e não tenha associada nenhuma opção de linha de comando, as outras quatro opções de formato utilizam a mesma sintaxe\&. Elas recebem um argumento que é o nome do arquivo onde os resultados devem ser armazenados\&. Formatos múltiplos podem ser especificados £o da aplicação) esses anfitriões(hosts) estão disponibilizando, que sistemas operativos (e versões de SO) estão em uso, que tipo de filtros de pacotes/firewalls estão em uso e dezenas de outras características\&. Enquanto o Nmap é frequentemente usado para auditorias de segurança, muitos sistemas e administradores de redes consideram\-no útil para as tarefas de rotina como o inventário da rede, gestão de actualizações de serviços e monitorizar o uptime de anfitriões ou serviços\&.
.PP
A saída do Nmap é uma lista de alvos rastreados(scanned) com informações adicionais de cada um dependendo das opções utilizadas\&. Uma informação chave é a
\(lqtabela de portas interessantes\(rq\&. Essa tabela lista o número da porta e o protocolo, o nome do serviço e o estado\&. O estado pode ser
aberto (open),
filtrado (filtered),
fechado (closed), ou
não\-filtrado (unfilterd)\&. Aberto (open) significa que uma aplicação na máquina\-alvo está escutando as conexões/pacotes nessa porta\&.
Filtrado (filtered)
significa que o firewall, filtro ou outro obstáculo de rede está bloqueando a porta de forma que o Nmap não consegue dizer se ela está
aberta (open)
ou
fechada (closed)\&. Portas
fechadas (closed)não possuem uma aplicação escutando nelas embora possam abrir a qualquer instante\&. Portas são classificadas como
não filtradas (unfiltered)quando elas respondem às sondagens do Nmap mas o Nmap não consegue determinar se as portas estão abertas ou fechadas\&. O Nmap reporta as combinações
aberta|filtrada (open|filtered)e
fechada|filtrada (closed|filtered)quando não consegue determinar qual dos dois estados descrevem melhor a porta\&. A tabela de portas também pode incluir detalhes de versão de software quando a detecção de versão for solicitada\&. Quando um rastreio(scan) do protocolo IP é solicitado (\fB\-sO\fR) o Nmap fornece informações dos protocolos IP suportados ao invés de portas que estejam abertas\&.
.PP
Além da tabelsword, database, servername )
local loginPacket = LoginPacket:new()
local status, result, data, errorDetail, token
local servername = servername or "DUMMY"
local pos = 1
local ntlmAuth = false
if ( not self.stream ) then
return false, "Not connected to server"
end
loginPacket:SetUsername(username)
loginPacket:SetPassword(password)
loginPacket:SetDatabase(database)
loginPacket:SetServer(servername)
local domain = stdnse.get_script_args("mssql.domain")
if (domain) then
if ( not(HAVE_SSL) ) then return false, "mssql: OpenSSL not present" end
ntlmAuth = true
-- if the domain was specified without an argument, set a default domain of "."
if (domain == 1 or domain == true ) then
domain = "."
end
loginPacket:SetDomain(domain)
end
status, result = self.stream:Send( loginPacket:ToString() )
if ( not(status) ) then
return false, result
end
status, data, errorDetail = self.stream:Receive()
if ( not(status) ) then
-- When logging in via named pipes, SQL Server will sometimes
-- disconnect the pipe if the login attempt failed (this only seems
-- to happen with non-"sa") accounts. At this point, having
-- successfully connected and sent a message, we can be reasonably
-- comfortable that a disconnected pipe indicates a failed login.
if ( errorDetail == "NT_STATUS_PIPE_DISCONNECTED" ) then
return false, "Bad username or password", LoginErrorType.InvalidUsernameOrPassword
end
return false, data
end
local doNTLM = ntlmAuth
while( pos < data:len() ) do
pos, token = Token.ParseToken( data, pos )
if ( -1 == pos ) then
return false, token
end
if ( token.type == TokenType.ErrorMessage ) then
local errorMessageLookup = {
[LoginErrorType.AccountLockedOut] = "Account is locked out",
[LoginErrorType.NotAssociatedWithTrustedConed'] = s:match("(.-)")
end
return settings
end
--- Parses the appdata XML response
--
-- @param xmldata string response from request_appdata
-- @return table containing nestled tables closely resembling the DOM model of the XML response
function parse_appdata_response(xmldata)
local apps = {}
xmldata = xmldata:gsub("\r?\n",""):gsub(">%s+<", "><")
for AppData in xmldata:gmatch("(.-)") do
local app_name = AppData:match("(.-)") or ""
local app = {}
app['FName'] = app_name
app['AccessList'] = extract_appdata_acls(AppData)
app['Settings'] = extract_appdata_settings(AppData)
table.insert(apps, app)
end
return apps
end
--
--
-- @param flags string, should be any of following: alt-addr, no-load-bias
--
function request_address(host, port, flags, appname)
local xmldata = {
'\r\n\z
\r\n\z
'
}
if flags then
xmldata[#xmldata+1] = "" .. flags .. ""
end
if appname then
xmldata[#xmldata+1] = "" .. appname .. ""
end
xmldata[#xmldata+1] = "\r\n"
return send_citrix_xml_request(host, port, table.concat(xmldata))
end
--- Request information about the Citrix protocol
--
-- Consult the NFuse.DTD for a complete list of supported parameters
-- This function implements all the supported parameters described in:
-- Version 5.0 (draft 1) 24 January 2008
--
-- @param host string or host table which is to be queried
-- @param port number or port table of the XML service
-- @param params table with parameters
-- @return string HTTP response data
--
function request_server_data(host, port, params)
local params = params or {}
local server_type = params.ServerType or {"all"}
local client_type = params.ClientType server_name for use with the TLS Server Name Indication extension.
--
-- This returns the value of the script argument "tls.servername" if given. Otherwise, it
-- returns the target name of the host parameter.
--
-- @param host Host table as received by the action function
-- @return String of the selected host name
function servername(host)
local script_arg = stdnse.get_script_args("tls.servername")
if script_arg then
return script_arg
elseif type(host) == "table" then
return host.targetname
end
end
local unittest = require "unittest"
if not unittest.testing() then
return _ENV
end
test_suite = unittest.TestSuite:new()
for name, code in pairs(CIPHERS) do
test_suite:add_test(unittest.not_nil(cipher_info(name).kex), name .. ".kex")
end
return _ENV;
local anyconnect = require('anyconnect')
local shortport = require('shortport')
local vulns = require('vulns')
local sslcert = require('sslcert')
local stdnse = require "stdnse"
description = [[
Detects whether the Cisco ASA appliance is vulnerable to the Cisco ASA ASDM
Privilege Escalation Vulnerability (CVE-2014-2126).
]]
---
-- @see http-vuln-cve2014-2127.nse
-- @see http-vuln-cve2014-2128.nse
-- @see http-vuln-cve2014-2129.nse
--
-- @usage
-- nmap -p 443 --script http-vuln-cve2014-2126
--
-- @output
-- PORT STATE SERVICE
-- 443/tcp open https
-- | http-vuln-cve2014-2126:
-- | VULNERABLE:
-- | Cisco ASA ASDM Privilege Escalation Vulnerability
-- | State: VULNERABLE
-- | Risk factor: High CVSSv2: 8.5 (HIGH) (AV:N/AC:M/AU:S/C:C/I:C/A:C)
-- | Description:
-- | Cisco Adaptive Security Appliance (ASA) Software 8.2 before 8.2(5.47), 8.4 before 8.4(7.5), 8.7 before 8.7(1.11), 9.0 before 9.0(3.10), and 9.1 before 9.1(3.4) allows remote authenticated users to gain privileges by leveraging level-0 ASDM access, aka Bug ID CSCuj33496.
-- |
-- | References:
-- | http://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-2014040R k °–( ¹š ˜\a , €{f ¬ žê \1g ? ÄP À\a H •b @Žg Z y× ‡d —? Pw }‹ è‚d ÓÏ T|g
ƥ @{ Ná NRh J÷ …h # ` À€d X Ÿg у € d n ¼ @èe i \Ç Žsa ‚ f_ TÏc d™ @Õg ¶D ôSa ¯9 ¦g Wâ À„g " 4' LÜb Ž °+ Z]a X• ‚?e : “€ Ìd 1 ÏR 2g B# ÀŠg h Mc Œ‡g ;‘ wf " ~^ €èh ¥ Àvb c ©G @c i u— Ji $ åi FÃd
”F ˆ—g £_ @�h ¬ Õó R|d ` £× d{g ^a @Áb ü ÃÐ Ðn %Ñ À�e è dî Ðï( ÿs ÀØg E
_€ Ùc ³ ñ Ähf ‰ XÙ ³¤ @Öc % º# žg w ®[ Èf Õ @† ‰g ã2 hÌh k Àßh ¶ Ók pg �[ R˜g 9 ðf
³° Æçf Q ;¾ ße ç ÐÌ à¯ ˆ Äß jh &