Repository navigation
Feature: IP scanner host info - #3691
Merged
Merged
Conversation
…les and groups (W1) The credentials (use credentials, username, domain, password, warning if the profile file is not encrypted) were written out in the profile and the group dialog, and their validation was repeated in three MultiDataTriggers each for the Save button and the error icon of the tab (ElementName bindings to the text boxes). WindowsCredentialsControl / WindowsCredentialsViewModel (like the SNMP credentials control) hold them, with HasError (same rules as the validators) and the values to save (empty if not used). Preparation for the Windows credentials of the IP Scanner. No behaviour change, no change of the profile file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New profile / group values IPScanner_UseWindowsCredentials, IPScanner_WindowsUsername, IPScanner_WindowsDomain and IPScanner_WindowsPassword (saved in the profile file like the Remote Desktop password, encrypted with profile file encryption), edited with the shared WindowsCredentialsControl in the IP Scanner tab of the profile and group dialog (section "Windows" after SNMP). GetWindowsCredentials returns the ones of the profile, otherwise of its group, otherwise null: the user running the application (no Windows credentials in the settings). WindowsCredentials keeps the password as SecureString (copy), ToString without the password. Preparation for the Windows host information of the scan. Unit tests like the SNMP override (order, saved / loaded, copy constructors, old profile file). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t credentials (W3a) SMBInfoResolver connects to TCP 445 and sends an SMB2 NEGOTIATE (dialects 2.0.2 - 3.1.1, preauth integrity context) and a SESSION_SETUP with an NTLM NEGOTIATE message in an SPNEGO token. The NTLM CHALLENGE of the answer contains the version of the operating system (major.minor.build), the NetBIOS / DNS computer and domain names, the forest and the time of the host; the negotiate response the dialect, signing required, the server GUID and the system time (time offset corrected by half the round trip time). The connection is closed after the challenge: no credentials are sent, no logon is attempted. Exception-free (null), cancellation is passed on. WindowsVersionHelper names the version by its build (10.0.26200 = Windows 11 25H2, 26100 = Windows 11 24H2 / Server 2025 unless the role is known, ...), no name for Samba (build 0). Not used by the scan yet. Unit tests for the requests, the parsing (MS-NLMP example, SPNEGO answer, invalid / truncated answers) and the version names. Checked against Samba 4.23 (SMB 3.1.1, challenge parsed, version 6.1.0 without a name). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…i (W3b) WindowsNetApiResolver reads with the credentials of the calling thread: NetServerGetInfo 101 (role: workstation / server / domain controller, domain member, description), NetWkstaGetInfo 100 (workgroup), NetWkstaUserEnum 1 (logged-on users without computer / DWM / UMFD accounts, needs admin rights) and, only if the users could be read, the remote registry (build with patch level, display version e.g. 25H2, edition, installation type). Buffers are freed with NetApiBufferFree, IPv6 hosts use the ipv6-literal.net name. The calls are blocking (run by the scan on limited threads with a timeout). WindowsLogon: LogonUser with LOGON32_LOGON_NEW_CREDENTIALS (like runas /netonly) - the credentials are only used for outgoing SMB / RPC, no privileges needed, no SMB session of the user is changed (no conflict with mapped drives like WNetAddConnection2). The password goes from the SecureString to unmanaged memory (zeroed after the call), never to a managed string. "DOMAIN\user" and UPNs without a domain are supported. WindowsHostInfo combines the SMB / NTLM values (no credentials) and the NetApi values: OS name (registry version, otherwise NTLM build; the role decides shared builds), edition, domain / workgroup, computer name, time offset, users, errors (logon failure detection). Not used by the scan yet. Unit tests for the username split, UNC names, roles, user filter, editions and the combined values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New settings IPScanner_WindowsEnabled ("Read Windows host information",
default off, section "Windows" after SNMP with a help icon, also in the
options menu) and IPScanner_WindowsTimeout (5000 ms). For reachable hosts -
with the port scan and 445 in its ports only if 445 is open, otherwise every
found host (D-P5) - after the port scan: the SMB / NTLM request (no
credentials), then, if the host answered on 445, the NetApi requests. These
are blocking: each runs on its own thread (max. 16 at the same time, a call
that exceeds the timeout keeps its slot until Windows returns, its result is
ignored) with the network logon of the scan.
Credentials: the Windows credentials of the profile / group the tab was
opened with (WindowsLogon, created once per scan; if it fails every host
gets the error instead of using another user), otherwise the user running
the application. The options menu shows 'Windows credentials of "X"
(DOMAIN\user)' like the SNMP credentials.
Target of the NetApi requests (D-P8): the DNS hostname if its first label is
the computer name of the NTLM challenge (Kerberos; a stale PTR record can't
point to another computer), otherwise the IP address; a name that can't be
found falls back to the IP address.
The result is IPScannerHostInfo.Windows with IsWindowsPending ("...", ended
on cancel, CopyFrom). Not shown yet (next commit). Docs: setting, timeout,
options menu; changelog.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(W4) New columns (only for a scan with Read Windows host information): Windows (version name, version number in the tooltip), Domain, Time offset (+1.2 s, -3 min 5 s, ...; highlighted above 5 minutes, the Kerberos limit) and Logged-on users (one per line in the tooltip, or why they could not be read). The row details get a fifth column "Windows" (1*, D-P7): operating system, edition, version, role, computer name, domain, description, time offset, users, SMB version / signing and the error of the NetApi requests; a note if the setting was disabled. WindowsHostInfoToStringConverter (one converter, the value as parameter) for the columns and the row details. Copy > Windows > Operating system / Domain / Logged-on users, search (version, edition, computer name, domain, description, users) and export (WindowsOS ... SMBServerGuid at the end; time offset in seconds, NetApi error as Win32 code; empty values if disabled). A status message if the logon with the Windows credentials of the profile / group failed (D-P11, once per scan with the number of hosts). DateTimeHelper.TimeSpanToOffsetString + unit tests, export tests for the new columns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th the same name (review #1) GetWindowsTarget used the DNS hostname (PTR) if its first label was the computer name of the NTLM challenge. A stale PTR record of a computer with the same name in another domain (e.g. srv01.lab.example.com for SRV01 in corp.example.com) resolved to another host: it got the credentials and the row showed its role, users and patch level. The hostname is only used if it is the full DNS name the host sends in the NTLM challenge, otherwise the IP address (also for a computer in a workgroup, which has no DNS domain). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…f for the application (review #2) The 16 slots for the blocking NetApi calls were per IPScanner instance, but a call that exceeds the timeout keeps its thread after the scan is completed. Every repeated scan (Automatically scan every), rescan or other tab got 16 new slots, so hosts that don't answer RPC could pile up blocked threads. The semaphore is shared by all scans now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…review #3) After a rescan of selected hosts, the message "The logon with the Windows credentials ... failed on n host(s)" counted every row of the result, also the ones that were not rescanned (they keep the result of the last scan). A rescan of one host showed e.g. "failed on 19 host(s)". Only the rescanned rows are counted now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ssword (review #4) If WindowsLogon.Create failed with an exception other than a Win32Exception (e.g. a disposed password), every host got ERROR_LOGON_FAILURE (1326): the rows and the status message said the username or password is wrong. These errors get ERROR_GEN_FAILURE (31) now, no logon failure message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#5) For a build that is not in the list, "(build N)" was replaced by the display version of the registry. A newer server ("Windows (build 28000)") became "Windows 25H2": it looked like a client and the build was gone. Only an unknown Windows 11 build gets the display version ("Windows 11 26H1"), other unknown builds keep the build number. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#7) The docs say the search matches the Windows version, but only the name (e.g. "Windows 11 25H2") was searched - "26200" or "10.0.26200.6584" (e.g. to find hosts without an update) found nothing. The version number is searched as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p of the negotiate request (review #8) If the negotiate response has no system time, the time of the NTLM challenge is used - but it was compared with the local time of the negotiate request (one round trip earlier), so the offset grew by the session setup delay on a slow connection. Each time is compared with the middle of its own round trip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (review #9) IsSMBPortOpenOrNotScanned searched the ports of the port scan for 445 up to twice per found host (up to 65535 ports), the answer doesn't change during a scan - computed once per scan now. The SMB port is one public constant (SMBInfoResolver.SMBPort) instead of a copy in the scanner. No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ck the account (B1)
The NetApi requests ran on up to 16 hosts at the same time with the
credentials of the profile / group. With a wrong password every host in a
domain made the domain controller count a failed logon - a /24 with many
Windows hosts reached the lockout threshold in seconds, and Automatically
scan every repeated it every interval.
WindowsLogonGate checks the credentials on one host first, the other hosts
wait (at most twice the timeout):
- Accepted (success, or access denied = logged on without rights): all hosts
run in parallel.
- Logon failure on a host in the domain of the credentials (NetBIOS / DNS
domain of the NTLM challenge, domain or UPN suffix of the credentials), or
the third logon failure on hosts of other domains: rejected. The other hosts
are not tried ("Not tried: ..." in the row details, WindowsError -1).
- Timeout / other errors: the next host checks.
Computers in a workgroup (no domain controller) and local accounts are not
gated, a logon failure there only affects the host itself.
Rejected credentials are not used again in the tab (next scans, repeat,
rescan, also after a canceled scan); one message instead of the count of
failed hosts.
Unit tests for the gate (order, domain matching, failure cap, workgroup /
local accounts, timeout, rejected in an earlier scan).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Windows host information needs the port scan (TCP 445) like the web page: it follows the port scan in the settings (section after Port scanner), the options menu, the result columns (after Port status), the row details (Ping / hostnames | Ports | Windows | Web | NetBIOS / SNMP), the Copy menu and the docs. The export columns stay at the end (fixed order). The docs anchor of the SNMP timeout is updated (timeout-ms-6). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… translation (L1) The options line 'Windows credentials of "Site A" (CORP\admin)' appended the user in the code, so a translation couldn't change its position. The user is a placeholder of the string now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Options > Windows credentials... sets the Windows credentials of the tab (WindowsCredentialsChildWindow with the shared credentials control, not saved, discarded with the tab): they replace the ones of the profile / group, "Use credentials" off uses the user running the application. Works also for a tab without a profile (no Windows credentials in the settings). They are used for the following scans, Automatically scan every and Rescan (a rescan uses the current credentials of the tab, not the ones of the last scan); credentials that were rejected are used again after they were set. The options show 'Windows credentials of this tab (CORP\admin)'. Scan as... in the context menu of a profile asks for the credentials (the ones of the profile / group as default) and scans the profile with them in a new tab, like Connect as... of the Remote Desktop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every host that answers on port 445 receives a logon with the credentials of the scan (also the user running NETworkManager) - with NTLM (asked by IP address) a malicious host could relay it or crack the password offline. Warning in the docs of Read Windows host information and in its help tooltip: only scan trusted networks with privileged accounts, least privilege, SMB signing on servers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…boolean (C1)
WindowsTimeOffset, WindowsError and SMBSigningRequired were exported as
strings ("-185.500", "5", "True" in JSON), unlike WebStatusCode /
WebCertificateSelfSigned. They are numbers / booleans now (null without a
value). The CSV file formats values with the invariant culture, so the time
offset keeps its decimal point (a decimal comma would split the column).
No change for the other columns.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t SMB (P1) The connection of SMBInfoResolver used Socket.ConnectAsync with a token: a refused or unanswered port 445 threw a SocketException / an OperationCanceledException for every found host (with the port scan disabled) - slow with a debugger attached, which PortProbe and NetBIOSResolver avoid. The connect uses SocketOperation now (SocketError instead of an exception). Checked against Samba (answer in 35 ms, refused port: null at once, no answer: null after the timeout). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"3.1.1 (signing required)" looked like a problem, also on hosts where the logon worked. The row details show SMB (the version) and SMB signing (Required / Not required, a setting of the SMB server of the host) in two rows; the docs explain that it is not an error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…right (S2b) The grid of the dialog had a fixed width of 500 plus a margin of 10, the child window is 500 wide (ChildWindowWidth of DefaultChildWindow): the text and the Cancel button were cut off. The grid uses the width of the dialog like the other child windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (K1) Both columns mostly repeated the status icon of the host: the probes that answered are in its tooltip, the status icons of ping and NetBIOS in the headers of the row details, the values (time, TTL, NetBIOS name and workgroup) in the row details and the NetBIOS name is used for Hostname. The result is two columns narrower. Sorting by ping status / NetBIOS reachable is gone (Time sorts the hosts that answered the ping). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…roup dialog not styled (W2b) The labels of WindowsCredentialsControl relied on the implicit TextBlock style the dialogs set in the resources of their grids. In the IP Scanner tab of the profile and group dialog the control is not in such a grid: the labels were black and smaller than the other rows. The control sets the style itself (CenterTextBlock, like the dialogs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The OS (guess) column and the Windows column showed the same kind of value side by side. One OS column now: the Windows version if it was read (Windows logo, edition and version number in the tooltip), otherwise the guess from the TTL as before (icon, hops in the tooltip); "..." while the ping or the Windows host information is still running. Shown if the guess or Read Windows host information is enabled for the scan (IsOSShown), sorted by OSName (Windows version, otherwise the guess). Copy > OS (guess), search and export are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Windows credentials..." was in the middle of the scan options (after Read Windows host information) and looked like another option. The options menu has a credentials section after the options: the SNMP version and credentials of the profile / group (moved from below the SNMP option), the Windows credentials of the tab and "Set Windows credentials...". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Port status column only showed whether any port is open (icon), the ports were in the tooltip. The column shows the open ports (e.g. "22, 80, 443"; "..." while the port scan is running, "-/-" without open port), the tooltip the services as before; sorted by the number of open ports (OpenPortCount). Search, Copy and export (PortStatus, Ports) are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IPScannerStatusToolTipConverter formatted the tooltips of the Ping status and NetBIOS reachable columns, which are removed (K1). The ports (Open ports column) and the answered / no answer tooltips of the row details stay. No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Domain column was only shown with Read Windows host information. It shows the domain / workgroup of the Windows host information, otherwise the workgroup / domain of the NetBIOS answer (shown if one of them is enabled for the scan, IsDomainShown; "..." while a source is still running). Search matches this value (also the NetBIOS workgroup now). Copy > Windows > Domain and the export are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ected on another host" (K12) A host that is not gated (workgroup computer, local account) is skipped in the next scans after its own logon failure (J2). Its row showed the same text as a host skipped by the rejection on the domain hosts: "rejected on another host" - wrong for this host. The text (and the documented WindowsError -1) now names both cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ckout protection (K13) - Changelog: the entry names what the lockout protection does now (only a host in the domain accepts, failures counted per account for all tabs, Max. logon failures, local accounts with the computer name, log file). - Options menu: Read Windows host information (beta); credentials set again are checked again, the failures of the account stay counted. - NetApi step: also the credentials of the tab. - Workgroup computers / local accounts: the sentence about hosts without NTLM names no longer splits it (K1 put it between the statement and its explanation). - Comments of the gate in the tab / options: failures per account. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lockout protection grew too detailed for a note in Read Windows host information. New FAQ page that explains it: why it is needed, how one host checks the credentials, which result accepts / rejects them (table per host in / outside the domain / without domain), when a host is in the domain of the credentials, why successes elsewhere and unknown errors don't accept them, how the failed logons are counted (per account, Max. logon failures, reset, checked once when set again), what happens after a rejection, which hosts are not gated, what is logged, what is not covered and recommendations. The IP Scanner page keeps a short summary and links to it (also from the Options menu and Max. logon failures). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…entials to the domain controller (K15) Workgroup computers and local accounts are not gated: they use the credentials in parallel, a failure only counts on the host. But a host whose DNS name matched the full name it sends in the NTLM challenge (e.g. a NAS "nas.home.lan") was asked by its hostname: Windows can then use Kerberos and first asks the KDC of the credentials (e.g. CORP\admin) for a ticket - a wrong password counted at the domain controller for every such host, in parallel and without limit. A host that is not gated is always asked by its IP address (NTLM only), the hostname (Kerberos) only for gated hosts and without credentials. Found by the independent review of the lockout protection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er tab (K16) The turn (one host checks the credentials at a time) and the rejection were per gate, i.e. per tab; only the logon failures were shared (K4). Several tabs with a wrong password (e.g. Scan profile for 5 profiles of a group) checked it at the same time - 5 tabs, 5 failed logons at once - and every new tab tried a rejected password again. "CORP.example.com\admin" and "admin@corp.example.com" were also counted as two accounts. The state is kept per account (domain\user, the UPN suffix as domain) for all gates until the application is closed: - One turn per account: one host of all tabs checks them at a time. - A rejected password stays rejected: a gate with it starts rejected (also takes a rejection by another tab while it waited). A gate with another password (e.g. corrected in the profile) or with credentials the user entered (Set Windows credentials..., Scan as..., also unchanged) checks them again. - To recognize a password without keeping it: a keyed hash (HMAC-SHA256, random key per start of the application) in memory only; the password is copied to a pinned buffer that is zeroed right away. Found by the independent review of the lockout protection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Windows credentials (K17)
A success on a host in the domain of the credentials accepted them for
all hosts. A Samba server or NAS that is a member of the domain and maps a
wrong password to guest ("map to guest = bad password") answers a wrong
password with a success: all domain hosts then got it in parallel.
Only a Windows host (build in its NTLM challenge; Samba / NAS devices send
none or 0) accepts them; a success on another host is used by this host
only, the next host checks them. A logon failure on such a host still
rejects them.
Found by the independent review of the lockout protection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e Windows credentials (K18) Every exception of the NetApi call became ERROR_GEN_FAILURE (31), which was in the list of errors without a logon decision - also a 31 that a host returned after the logon (e.g. NT_STATUS_UNSUCCESSFUL of Samba): the next host checked them, a failed logon would not be counted. The call reports to the lockout protection only if the requests were sent with the logon; a call that didn't send them (e.g. the logon was disposed, the local logon of a host failed) reports nothing (not decided, the next host checks them; the row still shows the error). 31 is no longer in the list, so a 31 of a host counts as a logon failure. Found by the independent review of the lockout protection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(K19) After a host accepted the credentials, the other hosts used them in parallel without reporting their result: a failed logon in the domain later in the scan (the password was changed or expired, the account was locked, or the accept was wrong) didn't stop the hosts that didn't start yet - all of them tried a wrong password. Gated hosts that use the accepted credentials report their result (ReportAccepted): a logon failure on a host in the domain of the credentials rejects them (counted, shared with the other gates of the account, Rejected event, logged); the hosts that didn't start yet skip them (at most 16 run at the same time). Failures on hosts of other domains don't (expected also with a correct password, e.g. a domain that is not trusted). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the next failure (K20) With K17 / K19 a host that pretends to be in the domain must also look like a Windows host, and the next failed logon in the domain stops the credentials again - only the hosts that already started (max. 16) still try them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… label of the Ping Monitor (K21) The Beta label (K10) was an accent badge of its own, the Ping Monitor shows the protocol of a host (ICMP) as accent text on a gray background - two looks for the same kind of label. New style TagTextBlock (based on AccentTextBlock: Gray8 background, padding 5, centered) for both; the label in the Options menu of the IP Scanner with less padding (height of a menu item). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…formation (K22) On the settings page, the Beta label was aligned to the top of the whole toggle switch (header and switch) and is higher than the header text, so it was not centered on the header line. It is in the header of the toggle switch now, centered next to its text (padding of the menu label). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings > Update had an Experimental features switch that no feature reads any more. Features in testing are marked per setting with a Beta label now (e.g. Read Windows host information of the IP Scanner, see K10). Removed the setting (SettingsInfo / GlobalStaticConfiguration), its view model property, the Experimental section of the settings page, its English strings (translations come from Transifex) and the docs section. An existing value in the settings file is ignored when it is loaded and dropped when the settings are saved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dows credentials (K24) Since K18, every exception after the requests were sent was reported to the lockout protection as ERROR_GEN_FAILURE (31), which counts as a failed logon. An exception after NetServerGetInfo succeeded (e.g. while reading the workgroup or the users) rejected correct credentials on a host in the domain - for all hosts, the next scans and new tabs of the profile. A host reports a failed logon as an error code, never as an exception: a call that ended with an exception reports nothing to the lockout protection (not decided, the next host checks them; the row shows the error). A 31 returned by a host still counts. Found by the final code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…credentials (K25) The message that the Windows credentials were rejected was shown when any scan of the tab completed, also a scan that didn't use them: e.g. a new tab of a profile whose password was rejected before (its gate starts rejected, K16) showed "The logon ... failed" after a scan with Read Windows host information turned off - no logon at all. Only the completion of a scan that used the credentials (Read Windows host information enabled) shows it; a rejection reported after the scan still shows it (K6). Found by the final code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ss (K26)
The OS column is sorted by OSName: the Windows version, otherwise the name
of the guess value ("LinuxUnix", "NetworkDevice", "Windows"), while the
cell shows the translated name (e.g. "Netzwerkgerät") - in another
language the order didn't match the shown text.
OSName uses IPScannerHostInfo.OSGuessToString (the Models project has no
translations), set by the IP Scanner to the same translation as the cell.
Found by the final code review.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WindowsUsers joined the users on every read; the Logged-on users column is sorted by it and the search reads it for every row (also again with live filtering). Computed once when the Windows host information is set, like WindowsOS. Found by the final code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot disposed (K28) Set Windows credentials... and Scan as... copy an entered password into the credentials of the tab, but the SecureString of the password box stayed in memory until it was finalized - every other copy of the password is disposed (G8). The dialog disposes the entered password after OK (the credentials have a copy) and on Cancel, not the password of the credentials it was opened with (owned by the caller). Found by the final code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…can't be read (K29) The Windows host information only sends an SMB2 negotiate (2.0.2 - 3.1.1) and reads the NetApi / registry after an SMB2 answer. Windows XP and Server 2003 only know SMB1: no version is ever read for them, the names for 5.1 / 5.2 were dead code that suggested support the feature doesn't have. Vista / Server 2008 (SMB 2.0.2) and later stay. Found by the final code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r Scan as... (K30) Scan as... repeated the code of AddTab(ProfileInfo): the SNMP version and credentials of the profile / group and the names of the SNMP / Windows credentials sources. Both use AddProfileTab now, with the Windows credentials, whether they are the ones of the profile / group (shown as the source) and whether the user entered them. Found by the final code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…res setting (K31) The changelog of 2023.11.28.0 linked to /docs/settings/update#experimental-features, removed with the setting (K23) - the website build fails on broken anchors (onBrokenAnchors: throw). Links to the page, with a note that the setting was replaced by the Beta label. Found by the final code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Set Windows credentials... didn't check if the tab was closed while the dialog was open (OnClose disposed the password of the tab): OK with unchanged credentials created a new lockout protection whose password fingerprint read the disposed password (ObjectDisposedException in the fire-and-forget task); changed credentials stayed on the closed tab with their password copy never disposed. After the dialog, a closed tab ignores the credentials and disposes the password of new ones (like the confirmation of a scan). Found by the final code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…credentials first (K33) Whichever gated host got the turn first checked the credentials. If the first hosts of a scan were in a domain that is not trusted (a logon failure also with a correct password), Max. logon failures (default 2) rejected correct credentials before a host of their domain checked them - for all hosts, the next scans and (K16) every tab with this password. A host of another domain (or without NTLM values) first waits up to half of its time for the decision of a host in the domain of the credentials, then checks them itself (e.g. no such host in the scan). Not for credentials without domain (no host is in their domain). Found by the final code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er accepted (K34) Credentials were only accepted on a host whose NetBIOS / DNS domain or forest matched the domain of the credentials. With a UPN suffix that is not a domain name (e.g. admin@company.com for corp.local - common), no host was ever "in the domain": the gated hosts stayed one at a time for the whole scan and most of them were not tried (waited longer than twice the timeout); with K33 every host also waited first. For a UPN, a Windows member of a domain accepts them too (it passes the UPN to its domain controller; a Windows member doesn't log a wrong password of a domain account on as guest - Samba / NAS still don't accept, K17), it doesn't wait for the domain (K33), and a logon failure on it after the accept stops them (K19). Credentials without domain stay one host at a time (local accounts of the same name, documented). Found by the final code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WindowsHostInfo.GetErrorMessage used Win32Exception, which only knows the messages of the system. The NetApi errors (NERR_*, 2100 - 2999, e.g. 2114 NERR_ServerNotStarted, 2102 NERR_WkstaNotStarted - both in the list of the lockout protection) are in netmsg.dll: the row details and the log showed "Unknown error (0x842)". NERR errors are read from netmsg.dll (loaded once as data file, FormatMessage), otherwise (or if not found / not on Windows) the message of the system as before. Found by the final code review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… configurable The max. number of hosts whose NetApi requests run at the same time (was a constant 16) is a setting now (default 16, 1-64). The slots stay shared by all scans; the limit is passed with every request, so a changed value applies to the next requests while blocked calls of earlier scans still count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…000) 26H2 was shown as "Windows (build 26300)". 26H1 only ships on new devices with new chips (e.g. Snapdragon X2). The host info tests used 28000 as an unknown newer build, now 29000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
See commits
Related issue
#3609
#149
Type of change