Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding udp scan #460

Merged
merged 11 commits into from
Nov 29, 2022
Merged

Adding udp scan #460

merged 11 commits into from
Nov 29, 2022

Conversation

Mzack9999
Copy link
Member

@Mzack9999 Mzack9999 commented Oct 30, 2022

Description

This PR adds support for connect/raw packets UDP scan with basic UDP empty probe:

Example (192.168.1.86:75 exposes echo udp server):

$ cat targets.txt 
192.168.1.86
scanme.sh
$ cat targets.txt | go run . -p u:75,22,80 -debug -verbose
...
[INF] Running CONNECT scan with non root privileges
[INF] Found 2 ports on host scanme.sh (128.199.158.128)
scanme.sh:22
scanme.sh:80
[INF] Found 1 ports on host 192.168.1.86 (192.168.1.86)
192.168.1.86:75

Notes:

  • Unclear why GH actions fails on -race test (works locally)

@Mzack9999 Mzack9999 marked this pull request as draft October 30, 2022 15:22
@Mzack9999 Mzack9999 self-assigned this Oct 31, 2022
@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Oct 31, 2022
@Mzack9999 Mzack9999 linked an issue Oct 31, 2022 that may be closed by this pull request
}

udp := layers.UDP{
SrcPort: layers.UDPPort(s.SourcePort),

Check failure

Code scanning / CodeQL

Incorrect conversion between integer types

Incorrect conversion of an integer with architecture-dependent bit size from [strconv.Atoi](1) to a lower bit size type uint16 without an upper bound check.
}

udp := layers.UDP{
SrcPort: layers.UDPPort(s.SourcePort),

Check failure

Code scanning / CodeQL

Incorrect conversion between integer types

Incorrect conversion of an integer with architecture-dependent bit size from [strconv.Atoi](1) to a lower bit size type uint16 without an upper bound check.
@Mzack9999 Mzack9999 marked this pull request as ready for review October 31, 2022 14:32
Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflict ^

@ehsandeep ehsandeep removed the request for review from Ice3man543 November 29, 2022 08:14
@ehsandeep ehsandeep merged commit b1bd3ae into dev Nov 29, 2022
@ehsandeep ehsandeep deleted the issue-305-udp-scan branch November 29, 2022 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UDP Scan
2 participants