diff --git a/scripts/HTTPAuth.nse b/scripts/HTTPAuth.nse index ce9d24599..4d8400d9f 100644 --- a/scripts/HTTPAuth.nse +++ b/scripts/HTTPAuth.nse @@ -1,3 +1,8 @@ +--- +--@output +-- | HTTP Auth: HTTP Service requires authentication\n +-- |_ Auth type: Basic, realm = DSL Router\n + -- HTTP authentication information gathering script -- rev 1.1 (2007-05-25) diff --git a/scripts/ircServerInfo.nse b/scripts/ircServerInfo.nse index 2584b7e5f..07c54c8ba 100644 --- a/scripts/ircServerInfo.nse +++ b/scripts/ircServerInfo.nse @@ -1,3 +1,14 @@ +--- Gather information from an IRC server. It uses STATS, LUSERS, and other +-- queries to obtain this information. +--@output +-- 6665/tcp open irc\n +-- | IRC Server Info: Server: foo.bar.net\n +-- | Version: hyperion-1.0.2b(381). foo.bar.net \n +-- | Lservers/Lusers: 0/4204\n +-- | Uptime: 106 days, 2:46:30\n +-- | Source host: bar.foo.net\n +-- |_ Source ident: OK n=nmap\n + id = "IRC Server Info" description = "Gets information from an IRC server by issuing STATS, LUSERS, etc queries." diff --git a/scripts/netbios-smb-os-discovery.nse b/scripts/netbios-smb-os-discovery.nse index f5470bfef..db4d25fd0 100644 --- a/scripts/netbios-smb-os-discovery.nse +++ b/scripts/netbios-smb-os-discovery.nse @@ -1,18 +1,18 @@ ------------------------------------------------------------------------ --- This script probes a target for its operating system version sending --- traffic via UDP port 137 and TCP port 139/445. First, we need to +--- This script probes a target for its operating system version. +-- It sends traffic via UDP port 137 and TCP port 139/445.\n\n +-- == Implementation Information ==\n +-- First, we need to -- elicit the NetBIOS share name associated with a workstation share. -- Once we have that, we need to encode the name into the "mangled" -- equivalent and send TCP 139/445 traffic to connect to the host and -- in an attempt to elicit the OS version name from an SMB Setup AndX --- response. +-- response.\n\n -- -- Thanks to Michail Prokopyev and xSharez Scanner for required -- traffic to generate for OS version detection. -- --- Command line to run this script like following: --- --- sudo nmap -sU -sS --script osversion.nse -p U:137,T:139 10.4.12.224 +--@usage +-- sudo nmap -sU -sS --script netbios-smb-os-discovery.nse -p U:137,T:139 127.0.0.1 ----------------------------------------------------------------------- id = "Discover OS Version over NetBIOS and SMB" @@ -70,7 +70,6 @@ end ----------------------------------------------------------------------- -- A NetBIOS wildcard query is sent to a host in an attempt to discover -- any NetBIOS shares on the host. ------------------------------------------------------------------------ function udp_query(host) @@ -111,7 +110,6 @@ end -- type/code can be queried later for the OS version. The workstation -- type/code is 0x44 0x00 for OS versions prior to Vista. The type/code -- for Vista is 0x04 0x00. ------------------------------------------------------------------------ function extract_sharename(resp) @@ -150,7 +148,6 @@ end ----------------------------------------------------------------------- -- Extract multiple bytes from a string and return concatenated result ------------------------------------------------------------------------ function string_concatenate(mystring, start, stop) local x, temp, newname @@ -178,7 +175,6 @@ end -- in the string "chars" is the corresponding position in the trtable -- table. The character " had to be handled separately as it is used -- to delimit the value of chars. ------------------------------------------------------------------------ encode = function(name) @@ -235,7 +231,6 @@ end -- The workstation share name extracted from the UDP wildcard NetBIOS -- response must be used in the SMB session initiation request(payload 1). -- Payload for the requests that follow is static. ------------------------------------------------------------------------ function tcp_session(ename, host) @@ -331,7 +326,6 @@ end -- Response from Session Setup AndX Request (TCP payload 3) -- Must be SMB response. Extract the OS version from it from a fixed -- offset in the payload. ------------------------------------------------------------------------ function extract_version(line)