Skip to content

Add TCP SYN Host Check#23

Merged
pilsnerfrajz merged 5 commits into
mainfrom
syn-discovery
Sep 11, 2025
Merged

Add TCP SYN Host Check#23
pilsnerfrajz merged 5 commits into
mainfrom
syn-discovery

Conversation

@pilsnerfrajz
Copy link
Copy Markdown
Owner

Add TCP SYN Host Check

Add TCP SYN to the current methods for checking the status of targets for more robust discovery and user-control.

SYN and CLI Options

If the target and scanner are not on the same subnet, ARP will fail. The same is true if ping probes are blocked by a firewall. This is were a simple SYN scan comes into play. This adds a fallback (or option) that scans port 22, 80 and 443 on the target system. These packets are likely to bypass any firewall as they are legitimate ports to connect to.

This addition adds even more fine-grained control for the user in deciding which method to use. By specifying --syn-only or -S as options to the program, ARP and ICMP can be skipped completely. Otherwise, ARP is tried first, followed by ping and finally SYN if any of the previous fail. The protocols are used in falling order from the fastest performing to ensure efficiency.

File Changes

  • src/cli.c and include/cli.h
    • Update CLI options
    • Update usage
    • Update header to accomodate new option
  • src/main.c
    • Add logic for default behavior
    • Add logic for --syn-only option
  • src/syn_scan.c and include/syn_scan.h
    • Add boolean flag to store if target has replied
  • tests/syn_scan_test.c and tests/cli_test.c
    • Update arguments to work with new addition

@pilsnerfrajz pilsnerfrajz added the enhancement New feature or request label Sep 11, 2025
@pilsnerfrajz pilsnerfrajz merged commit efb4a07 into main Sep 11, 2025
2 checks passed
@pilsnerfrajz pilsnerfrajz deleted the syn-discovery branch September 11, 2025 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant