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

UDP Scan #22

Open
DanNegrea opened this issue Jul 23, 2020 · 11 comments
Open

UDP Scan #22

DanNegrea opened this issue Jul 23, 2020 · 11 comments

Comments

@DanNegrea
Copy link

More of a feature request: UDP port scanning is taking exponentially longer than TCP port scanning.
Would your approach help reduce the scan time?

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.90. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@bee-san
Copy link
Member

bee-san commented Jul 23, 2020

Hey @DanNegrea , it would reduce the time for sure but I don't currently support UDP (I think, anyway, unless the sockets library does and I don't know about it). But it's on the TO-DO list! :D

@cocoonkid
Copy link

UDP would be a great addition. I root for it here 🎏

@cocoonkid
Copy link

I am still rooting flags :}

@homelyseven250
Copy link

Yes please

@fropert
Copy link

fropert commented Feb 27, 2023

+1

@bee-san
Copy link
Member

bee-san commented Feb 27, 2023

👋🏻

The sockets library does support UDP:
https://doc.rust-lang.org/std/net/struct.UdpSocket.html

I think the PR would be a case of just doing an if statement and either doing TCP or UDP.

I'll timebox it for this weekend, not sure how to test but I'll figure it out :D

@BrendanGlancy
Copy link

@bee-san I've been working on this, did you ever get anywhere with it?

@bee-san
Copy link
Member

bee-san commented May 20, 2024

@bee-san I've been working on this, did you ever get anywhere with it?

Hey there!

I did not get anywhere with this, feel free to contribute! 🥳

@BrendanGlancy
Copy link

BrendanGlancy commented May 21, 2024

@bee-san I don't know if we should open a discussion or something, but what I am finding is that UDP scanning is a little bit more complicated than TCP scanning. I can submit a pull request with what I have now that works for like 60-70% of cases and is much faster than nmap -sU.

The part that is difficult on this is that, essentially, even if we did the 20 most common UDP ports and didn't mess with the wait time for the response, which seems to actually matter in a lot of the testing I did, we'd have to scan each port 20 times. Multiple this by 3 or 4 different timeout lengths and ...

Anyway, like I said I'm happy to submit a pull request, as I'd love some criticism on my shitty junior dev Rust code. But the goal of this would be more or less getting some feedback from people more knowledgeable than me on how to improve this.

@bee-san
Copy link
Member

bee-san commented May 21, 2024

@bee-san I don't know if we should open a discussion or something, but what I am finding is that UDP scanning is a little bit more complicated than TCP scanning. I can submit a pull request with what I have now that works for like 60-70% of cases and is much faster than nmap -sU.

The part that is difficult on this is that, essentially, even if we did the 20 most common UDP ports and didn't mess with the wait time for the response, which seems to actually matter in a lot of the testing I did, we'd have to scan each port 20 times. Multiple this by 3 or 4 different timeout lengths and ...

Anyway, like I said I'm happy to submit a pull request, as I'd love some criticism on my shitty junior dev Rust code. But the goal of this would be more or less getting some feedback from people more knowledgeable than me on how to improve this.

Sure, submit the code! :) I'd love to read it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants