News for hackers. Stuff that matters.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by wfn on Tuesday September 28, 2021 @01:30PM (#28685274)
A very nice and well-built tool. Excellent use of sequence numbers for stateless send/receive (SYN cookies): https://github.com/robertdavidgraham/masscan/blob/master/src... (very well-documented source too, a pleasure to read).

I once (2016) used it to scan port 22 on the whole ipv4 (had to experiment with rate limits to not trigger alarms and get complaints forwarded by my VPS provider; the clever ip+port randomization technique helps a lot with that). Then took the ~22m (iirc) IPs which responded and ran ssh-keyscan on them to extract and analyze some ~15m ssh banners and public keys (a bunch of them broken, through debianized PRNG etc.) I think most of the scanning + extraction was done overnight, via ~13 VPS rented hourly (whole thing cost < $10, and very few complaints). Fun times :) I should write it up some time, and do it again.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by DLA on Wednesday September 29, 2021 @09:47AM (#28693591)
"A very nice and well-built tool. .... (very well-documented source too, a pleasure to read)" Could not agree more. This code is really nicely organized and commented. Such a pleasure to read and learn about how this tool works. I wish more codebases had comments like this! Great work and thank you @ErrataRob.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by dosshell on Tuesday September 28, 2021 @02:15PM (#28685761)
What is "22m" ?

22 meter?

22 millies of something.

I do not follow?

Re:Masscan: TCP port scanner, scanning entire Internet in un... by howenterprisey on Tuesday September 28, 2021 @02:16PM (#28685772)
22 million.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by sigg3 on Tuesday September 28, 2021 @02:38PM (#28685984)
22 million meters of IP.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by RobRivera on Tuesday September 28, 2021 @03:20PM (#28686376)
at the cost of a rod per hogshead
Re:Masscan: TCP port scanner, scanning entire Internet in un... by peakaboo on Tuesday September 28, 2021 @03:50PM (#28686709)
The irony of saving 6 characters in the word million, but people don't understand his post and use many more keystrokes asking what he means.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by jasonwatkinspdx on Tuesday September 28, 2021 @05:58PM (#28688011)
"mm" is a common abbreviation for million in the context of accounting. It refers back to the latin "mille mille" which means "thousand thousand" literally. "Mille" is still used for thousand in French and Italian. The abbreviation is reasonably common in english, though I also would not be surprised by anyone not having run into it before.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by herpderperator on Tuesday September 28, 2021 @11:16PM (#28689918)
The Latin numeral M denotes thousands. Thus, MM is the same as writing "M multiplied by M," which is equal to "1,000 times 1,000", which equals 1,000,000 (one million).

So, we should refrain from using lowercase m for this.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by IncRnd on Wednesday September 29, 2021 @01:24AM (#28690552)
> So, we should refrain from using lowercase m for this.

Except that mm is already used by a number of industries and people to mean million.

What you did was quote from the first result of a google search without attribution and then pretend the quote means the opposite of what was written. See: https://corporatefinanceinstitute.com/resources/knowledge/ot...

Your quote left out the first part, which is italicized in the full quote below:

In finance and accounting, MM (or lowercase “mm”) denotes that the units of figures presented are in millions. The Latin numeral M denotes thousands. Thus, MM is the same as writing “M multiplied by M,” which is equal to “1,000 times 1,000”, which equals 1,000,000 (one million).

Re:Masscan: TCP port scanner, scanning entire Internet in un... by herpderperator on Wednesday September 29, 2021 @03:21AM (#28691109)
Why do you think it's in parentheses? Because it's not the main, correct way to write this. Lazy people didn't capitalize, and now you see it in the wild. Given the origin is Latin numerals, I see no argument here.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by Friedduck on Thursday September 30, 2021 @12:17AM (#28703131)
Lower-Case use of mm in accounting and finance is incredibly common. If you worked in those industries it’s understandable you’d think everyone followed that convention.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by wfn on Wednesday September 29, 2021 @04:57AM (#28691619)
Yeah, maybe wasn't clearest notation in retrospect :) I somehow felt too humble to actually write out "million"
Re:Masscan: TCP port scanner, scanning entire Internet in un... by jodrellblank on Tuesday September 28, 2021 @04:18PM (#28687000)
What is “22 million”? I don’t understand. Is it length? Thousandths? An ion grinder? An exotic big cat? A tiny On?

“People don’t understand”, none of those were at all plausible even without the context of scanning the entire IPv4 address space.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by RedNifre on Wednesday September 29, 2021 @03:37AM (#28691198)
The OP clearly states that it's about 22m responding internet protocols.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by Leparamour on Wednesday September 29, 2021 @06:17AM (#28691970)
That surely is a lot of protocols.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by rburhum on Tuesday September 28, 2021 @08:50PM (#28689156)
22 cats. Go with cats.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by pineaux on Wednesday September 29, 2021 @01:14AM (#28690509)
Is that an abstraction of 22m meaning 22 mice, resulting in 22 cats? Clever. Very clever.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by btown on Tuesday September 28, 2021 @06:19PM (#28688164)
Internet pipe!
Re:Masscan: TCP port scanner, scanning entire Internet in un... by Leparamour on Wednesday September 29, 2021 @06:19AM (#28691983)
Internet pipe version 6 is clearly superior with its larger throughput.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by mike_d on Tuesday September 28, 2021 @03:44PM (#28686636)
A quick plug for my friends over at GreyNoise... they have honeypots all over the internet and identify various scanners as well as their observed intentions.

Here is everyone running masscan against the internet: https://www.greynoise.io/viz/query/?gnql=tags%3A%22Masscan%2...

Re:Masscan: TCP port scanner, scanning entire Internet in un... by mod on Tuesday September 28, 2021 @05:14PM (#28687611)
All the results on the first page (as much as it would show me) are just VPS providers.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by cyber_sm on Wednesday September 29, 2021 @09:51AM (#28693646)
Hey there I manager our Community at GreyNoise - those are the Organizations that the IP is originating from! Our "Actor" Classification gives better insight into /who/ is actually conducting the activity (i.e. https://www.greynoise.io/viz/ip/92.154.95.236)

You can look up IPs in GreyNoise to know if they are scanning the internet (if no results are returned, the answer is likely no or not at scale.)

Happy to answer any q's :)

Re:Masscan: TCP port scanner, scanning entire Internet in un... by mod on Thursday September 30, 2021 @01:56PM (#28709111)
I knew, of course, that they were originating from those VPS providers. That makes perfect sense--I wouldn't run masscan on my residential IP, either.

I went back to the page linked by the GP post. I clicked through all 10 items and the actor was "Unknown" on all of them.

I don't really expect you guys to be able to know who is renting AWS servers or something. I don't know how that would be possible, honestly.

It's a cool site, though.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by unixhero on Tuesday September 28, 2021 @12:53PM (#28684878)
Warning. Masscan is the best scanner I have ever seen.

We have also managed to take down the entire corporate network by using it with a too high rate limit. So tread lightly around massscan and its power. Our pentesters did the same 6 months later. The managed service provider is not able to solve the routing table loop which causes the firewall to DOS when a rapid masscan is triggered.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by Socketier on Tuesday September 28, 2021 @06:18PM (#28688160)
Yeah I managed to do the same, it filled up the firewall state table and nobody was able to initiate new connections, only existing ones continued to work. And that's how I learned about stateful firewalls!
Re:Masscan: TCP port scanner, scanning entire Internet in un... by aoms on Tuesday September 28, 2021 @08:38PM (#28689096)
Thanks, this made me laugh
Re:Masscan: TCP port scanner, scanning entire Internet in un... by LeonidBugaev on Tuesday September 28, 2021 @02:20PM (#28685819)
Question: how do you actually run it without getting banned?

I've got banned pretty hard by both my local home ISP and using Linode servers, when tried such scanners. Mass port scanning is easy to track, and it usually forbidden all ISP ToC.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by jonaslejon on Tuesday September 28, 2021 @02:27PM (#28685882)
You need to have a really good relationship with your ISP and get their acknowledge prior to the scanning
Re:Masscan: TCP port scanner, scanning entire Internet in un... by Ms-J on Tuesday September 28, 2021 @03:20PM (#28686384)
Use a no-logs, anonymous VPN. I do it all the time.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by michaelbuckbee on Tuesday September 28, 2021 @03:35PM (#28686526)
Follow up question: can you recommend a no-logs, anonymous VPN?
Re:Masscan: TCP port scanner, scanning entire Internet in un... by eurasiantiger on Tuesday September 28, 2021 @05:21PM (#28687684)
Next time you’re visiting any place, install a proxy on their network.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by doubled112 on Tuesday September 28, 2021 @06:03PM (#28688041)
Raspberry Pi on their wall, you say?
Re:Masscan: TCP port scanner, scanning entire Internet in un... by flowmode on Wednesday September 29, 2021 @01:28AM (#28690573)
mullvad
Re:Masscan: TCP port scanner, scanning entire Internet in un... by Leparamour on Wednesday September 29, 2021 @06:21AM (#28691985)
Please don't try to kill mullvad.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by leadingthenet on Tuesday September 28, 2021 @06:07PM (#28688069)
IVPN
Re:Masscan: TCP port scanner, scanning entire Internet in un... by heywherelogingo on Tuesday September 28, 2021 @04:18PM (#28686999)
What do ISPs consider an acceptable rate?
Re:Masscan: TCP port scanner, scanning entire Internet in un... by nothis on Tuesday September 28, 2021 @02:47PM (#28686071)
Hyper-naive question: If something can run in 5 minutes, how can it bother an ISP?
Re:Masscan: TCP port scanner, scanning entire Internet in un... by jandrese on Tuesday September 28, 2021 @03:26PM (#28686452)
It triggers bans of your netblocks for bad behavior. 5 minutes to generate hundreds of complaints.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by kblev on Tuesday September 28, 2021 @07:02PM (#28688474)
Is it a timed ban or they cancel your contract?
Re:Masscan: TCP port scanner, scanning entire Internet in un... by pantulis on Tuesday September 28, 2021 @02:50PM (#28686094)
Because it sends a lot of traffic in such a small time frame. Also, it has obvious nefarious purposes and the ISP may face legal consecuences in case someone lawyers up.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by prox on Tuesday September 28, 2021 @02:27PM (#28685880)
Question: why would you run this?
Re:Masscan: TCP port scanner, scanning entire Internet in un... by captn3m0 on Tuesday September 28, 2021 @04:24PM (#28687053)
My ISP had a misconfiguration that let all the customers ping each other (Routers usually). The address space was too large to scan any other way except masscan, which worked very well (and fast).

https://medium.com/@captn3m0/i-scanned-all-of-act-bangalore-...

Re:Masscan: TCP port scanner, scanning entire Internet in un... by Godel_unicode on Tuesday September 28, 2021 @03:18PM (#28686364)
Research. Ever wonder how many telnet servers are exposed to the internet (hint: way too many)?
Re:Masscan: TCP port scanner, scanning entire Internet in un... by ansible on Tuesday September 28, 2021 @03:27PM (#28686461)
I wonder how many of those are just MUDs (text-mode dungeon games) where it was common to use telnet.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by loeg on Tuesday September 28, 2021 @04:11PM (#28686932)
MUDs usually run on a non-standard port (not 23).
Re:Masscan: TCP port scanner, scanning entire Internet in un... by prox on Tuesday September 28, 2021 @03:57PM (#28686795)
Those would be running for a while now then
Re:Masscan: TCP port scanner, scanning entire Internet in un... by nebulous1 on Tuesday September 28, 2021 @03:23PM (#28686418)
I did a CTF a while back and it was used to find the real IP of a missconfigured .onion site. I didn't actually do it as I was worried about burning a VPS provider.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by itslennysfault on Tuesday September 28, 2021 @02:58PM (#28686161)
To hack a gibson, baby.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by jihadjihad on Tuesday September 28, 2021 @01:34PM (#28685318)
If masscan is of interest to you, be sure to check out zmap [0] as well. It can scan the entire IPv4 address space in around 45 minutes.

0: https://github.com/zmap/zmap

Re:Masscan: TCP port scanner, scanning entire Internet in un... by WelcomeShorty on Wednesday September 29, 2021 @06:01AM (#28691905)
I love zdns! Super fast and cool options.

0: https://github.com/zmap/zdns

Re:Masscan: TCP port scanner, scanning entire Internet in un... by ABraidotti on Tuesday September 28, 2021 @11:02AM (#28683606)
I enjoy Rob Graham on Twitter too: https://twitter.com/ErrataRob

He often discusses current events in infosec if you're into that.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by amatecha on Tuesday September 28, 2021 @04:20PM (#28687015)
Yeah, I appreciate his willingness to share "inconvenient truths" that may run counter to the running narrative of whatever tech/security story of the moment. Lots of interesting perspectives, even if maybe I didn't "want" to hear it ;)
Re:Masscan: TCP port scanner, scanning entire Internet in un... by danilonc on Tuesday September 28, 2021 @10:34AM (#28683279)
Old discussing about the tool:

https://news.ycombinator.com/item?id=8803498

Re:Masscan: TCP port scanner, scanning entire Internet in un... by dang on Tuesday September 28, 2021 @01:23PM (#28685204)
Thanks! Expanded:

Some idiot is using your tool to mass scan our network - https://news.ycombinator.com/item?id=24728123 - Oct 2020 (182 comments)

MASSCAN: Mass IP port scanner - https://news.ycombinator.com/item?id=12260809 - Aug 2016 (33 comments)

Masscan: Scan the entire Internet in under 5 minutes - https://news.ycombinator.com/item?id=8803498 - Dec 2014 (29 comments)

Masscan: scan the entire Internet in under 6 minutes, 10 million packets/second - https://news.ycombinator.com/item?id=6391266 - Sept 2013 (30 comments)

Masscan: The entire internet in 3 minutes - https://news.ycombinator.com/item?id=6388222 - Sept 2013 (12 comments)

Re:Masscan: TCP port scanner, scanning entire Internet in un... by Aissen on Tuesday September 28, 2021 @11:37AM (#28684078)
Awesome tool. Rob added IPv6 support last year, which can be really useful if you know what you're doing (ex: want to scan a single subnet for given OUI without privacy extensions).
Re:Masscan: TCP port scanner, scanning entire Internet in un... by sneak on Tuesday September 28, 2021 @10:58AM (#28683563)
FWIW I think the late Dan Kaminsky is the person who originally invented this two process userspace TCP scan technique 2001-2002ish in his tool Paketto Keiretsu.

It's a good one.

I sometimes wonder if it inspired some of the TCP-in-userspace stuff that is done in go (gvisor lib, I think it was).

I'm glad Rob is continuing the development of this idea and continues to scan the whole internet. Scanning the whole internet is cool. It's a shame it's de facto illegal these days (and will get most internet connections in the USA terminated near-instantly).

Re:Masscan: TCP port scanner, scanning entire Internet in un... by tptacek on Tuesday September 28, 2021 @11:12AM (#28683744)
Decoupled sender/receiver scanners date back to the 1990s (we did one in CASL, our misbegotten packet programming language from 1997, the script for which I think shipped with Ballista --- and we stole the scanner design from someone else, probably from CORE SDI), as do userland TCP libraries (LWIP is a famous one, or at least a library that got used for that purpose, that predates all this stuff).
Re:Masscan: TCP port scanner, scanning entire Internet in un... by OrvalWintermute on Tuesday September 28, 2021 @11:38AM (#28684088)
The other userland discreteTCP/IP stack mass-scanner of note is Unicornscan [1] from Jack C Louis (RIP)

[1] https://defcon.org/images/defcon-13/dc13-presentations/DC_13...

I know this came a few years later, but it really advanced the state of the art for widescale scanning at that time, particularly once it made its way into Kali.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by tptacek on Tuesday September 28, 2021 @01:13PM (#28685089)
For a long time, unicornscan was the preferred scanner for pentests (nmap is venerable and impressive but it has a lot of weird failure modes on real networks). I had no idea the author had died.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by xinniethepooh on Tuesday September 28, 2021 @01:27PM (#28685247)
Source on it being de-facto illegal?

I've not seen anything that says simply scanning for open ports is illegal, doing vulnerability scans may be though.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by xenadu02 on Tuesday September 28, 2021 @03:29PM (#28686478)
They mean a lot of ISPs and VPS providers will flag & terminate your account for launching port scans so it is difficult to find somewhere to run such a scan at any kind of speed.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by sneak on Tuesday September 28, 2021 @07:36PM (#28688704)
No, I meant national police from several countries will investigate you.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by samstave on Tuesday September 28, 2021 @11:27AM (#28683948)
>the late Dan Kaminsky

Ehhh... I forgot he was the "the late Dan Kaminsky"

:-(

Re:Masscan: TCP port scanner, scanning entire Internet in un... by sneak on Tuesday September 28, 2021 @11:31AM (#28684002)
Yeah, it's a real bummer.

2021 has not been a great year. Too many, too young.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by _wldu on Tuesday September 28, 2021 @02:15PM (#28685750)
I wrote netscan years ago and still use it. It's pretty fast too: https://github.com/62726164/netscan
Re:Masscan: TCP port scanner, scanning entire Internet in un... by bobek on Wednesday September 29, 2021 @01:20AM (#28690539)
Massacan is awesome. One of the usecases is to periodically scan your own servers to see if you have not accidentally opened some new ports in firewalls.

https://github.com/bobek/masscan_as_a_service

Re:Masscan: TCP port scanner, scanning entire Internet in un... by chaz6 on Tuesday September 28, 2021 @11:02AM (#28683614)
I am not sure any computer is capable of sending and processing 2^126 packets (assuming global unicast, 1 packet out, 1 packet in) in under 5 minutes.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by jerf on Tuesday September 28, 2021 @11:10AM (#28683712)
Well, 5 minutes is about 2^8 seconds, you can get about 2^32 cycles per core per second nowadays, and you can have about 2^6 cores maximum, so with an incredibly, unspeakably generous "scan one IP in one cycle" a 64-core computer should be able to scan about 2^(8+32+6) = 2^46 addresses in a little under five minutes.

We seem to be a wee bit short of 2^126, yes.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by lol768 on Tuesday September 28, 2021 @11:22AM (#28683870)
Lots of people like to pretend the "entire internet" is synonymous with the IPv4 address space...
Re:Masscan: TCP port scanner, scanning entire Internet in un... by ehPReth on Tuesday September 28, 2021 @12:16PM (#28684496)
My ISP for one…
Re:Masscan: TCP port scanner, scanning entire Internet in un... by birdyrooster on Tuesday September 28, 2021 @03:10PM (#28686266)
Well you can understand why in the case of masscan, it would be a pretty boring claim to say that masscan is “scanning the entire internet in 100 years from a single machine!”
Re:Masscan: TCP port scanner, scanning entire Internet in un... by gitfan86 on Tuesday September 28, 2021 @11:12AM (#28683746)
Large blocks of IPs are not part of the internet. 10. 172. Etc...
Re:Masscan: TCP port scanner, scanning entire Internet in un... by jerf on Tuesday September 28, 2021 @11:27AM (#28683949)
The IPv4 internet is merely 2^32, and people have been scanning that whole thing for years now. The /112 is referring to IPv6 addresses.

Plus the copy about not hammering other networks won't matter when you're trying to scan entire /64s that are behind one home router or something. That's gonna get noticed. You can't really scan IPv6 like you can scan IPv4, the math I gave is part of why. The code to do it is trivial, but the hardware just isn't there.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by londons_explore on Tuesday September 28, 2021 @11:43AM (#28684138)
I'm really surprised shady figures aren't publishing lists of active IPv6 addresses to allow scanning.

For example, someone with access to a backbone internet router could easily log src and destination ipv6 addresses, and sell the complete list sorted and compressed. Malware authors could then use the list to portscan for badly firewalled stuff.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by pixl97 on Tuesday September 28, 2021 @11:49AM (#28684202)
With IPv6 privacy extensions this gets really big really fast and is mostly empty.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by dadrian on Tuesday September 28, 2021 @01:19PM (#28685159)
People absolutely do this, they're just not going to post it for free.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by ryanlol on Tuesday September 28, 2021 @12:01PM (#28684347)
It’s not surprising. Malware authors aren’t going to pay for something that’ll have no meaningful effect on their infection rates.

There’s more than enough stuff on IPv4, IPv6 isn’t worth the effort.

FWIW shodan was setting up their own public ntp servers to track down v6 users.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by pjf on Tuesday September 28, 2021 @05:47PM (#28687922)
https://ipv6hitlist.github.io/

First time to be called shady, though ;)

Re:Masscan: TCP port scanner, scanning entire Internet in un... by sva_ on Tuesday September 28, 2021 @03:00PM (#28686175)
I'm pretty sure the IPv4 internet is constantly being scanned. I blocked ICMP echo request (ping) in my firewall, and saw it throws a warning of an attempted ping every other minute.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by hsbauauvhabzb on Tuesday September 28, 2021 @06:42PM (#28688330)
Scanning 2^32 wasn’t exactly viable 30 years ago, so never say never.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by jerf on Tuesday September 28, 2021 @10:26PM (#28689643)
Yes, people often say this about IPv6 thinking they're being clever. It's not. 2^128 is big, relative to the universe itself.

It is an accident of history that computing spent so much time at binary orders of magnitude that technology could catch up and make the previous limits seem small. At some point, the exponential curve takes off and no amount of physical resources can catch up to it, because our universe taps out at O(n^3). 2^128 is pretty much on the other side of that takeoff point. You can almost catch up to it... at the cost of the resources of an entire galaxy... or more.

(Technically it's even sooner than O(n^3) if you also have to avoid black holes, but since the relevant comparison here is "exponential" the details hardly matter here.)

Re:Masscan: TCP port scanner, scanning entire Internet in un... by hsbauauvhabzb on Wednesday September 29, 2021 @07:23AM (#28692317)
Fair point, I just did the math and even with a botnet of 13m (pulled from googling ‘largest botnet’) it’d still take e+22 years, give or take a few billion.

Still, network address obfuscation really shouldn’t be a security control.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by signa11 on Tuesday September 28, 2021 @11:18AM (#28683822)
all non-routeable addresses, multicast etc. etc.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by helge9210 on Tuesday September 28, 2021 @11:46AM (#28684167)
You can do it in parallel from several computers. Masscan has capability of dividing workload across multiple processes.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by martini333 on Tuesday September 28, 2021 @12:06PM (#28684398)
> It can scan the entire Internet in under 5 minutes, transmitting 10 million packets per second, from a single machine
Re:Masscan: TCP port scanner, scanning entire Internet in un... by birdyrooster on Tuesday September 28, 2021 @03:08PM (#28686246)
Definitely but then click bait wouldn’t be click bait without some misleading information
Re:Masscan: TCP port scanner, scanning entire Internet in un... by bmicraft on Tuesday September 28, 2021 @04:11PM (#28686930)
I would argue that most interesting (and unpatched?) servers do at least have an ipv4 address as well, if not exclusively
Re:Masscan: TCP port scanner, scanning entire Internet in un... by zamadatix on Tuesday September 28, 2021 @01:50PM (#28685485)
"Only" about a /15 worth of v6 is actively advertised on the internet. Still, good luck sending that many packets.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by dmw_ng on Tuesday September 28, 2021 @11:22AM (#28683879)
The v6 space has structure and is much smaller than that
Re:Masscan: TCP port scanner, scanning entire Internet in un... by kalleboo on Tuesday September 28, 2021 @11:28AM (#28683956)
Aside from Shodan's neat trick of infiltrating the NTP pool, are there any papers/blogs on successfully exploiting known properties of IPv6 (network prefixes, MAC vendors etc)? However I think about it it seems too massive
Re:Masscan: TCP port scanner, scanning entire Internet in un... by dmw_ng on Tuesday September 28, 2021 @11:53AM (#28684251)
I was mostly thinking about the sparse structure of upper bits (which are easily enumerable e.g. by downloading a RIPE database dump). As for the lower 64, MAC address OUIs contribute at most around 15 bits, and the distribution is likely strongly skewed towards only a handful of vendors, so actual randomness is probably lower still.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by pjf on Tuesday September 28, 2021 @05:49PM (#28687941)
Re:Masscan: TCP port scanner, scanning entire Internet in un... by tux3 on Tuesday September 28, 2021 @11:49AM (#28684196)
....infiltrating the NTP pool!

Oh my, that is clever =)

Re:Masscan: TCP port scanner, scanning entire Internet in un... by lima on Tuesday September 28, 2021 @12:47PM (#28684832)
Many providers sell netflow data.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by OnlyMortal on Tuesday September 28, 2021 @12:04PM (#28684377)
Amateur!
Re:Masscan: TCP port scanner, scanning entire Internet in un... by londons_explore on Tuesday September 28, 2021 @11:18AM (#28683820)
Impressive that the bitcoin donation address has received $20k!
Re:Masscan: TCP port scanner, scanning entire Internet in un... by sva_ on Tuesday September 28, 2021 @03:02PM (#28686189)
Most of it was sent when Bitcoin was worth a lot less.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by dmos62 on Tuesday September 28, 2021 @11:34AM (#28684040)
I like that you checked it!
Re:Masscan: TCP port scanner, scanning entire Internet in un... by londons_explore on Tuesday September 28, 2021 @11:46AM (#28684164)
I'm always interested how much revenue peoples hobby projects earn.

The vast majority of projects seem to take someone months of work, get 50 github stars, and $25 worth of donations... Which is really sad - it basically means the vast majority of opensource authors have to have another job to pay the bills.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by shadycuz on Tuesday September 28, 2021 @12:08PM (#28684418)
I just started to try and monetize. I'm a bit early, less than 50 stars. But my expectations are pretty much what you stated. Though my actual plan is to try and build a following like Jeff feeling and then sell training courses and ebooks.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by slim on Tuesday September 28, 2021 @01:23PM (#28685208)
That adress could be used for different transactions unrelated to this project
Re:Masscan: TCP port scanner, scanning entire Internet in un... by quickthrower2 on Tuesday September 28, 2021 @04:44PM (#28687259)
And bitcoin has increased in value in the last 2 years
Re:Masscan: TCP port scanner, scanning entire Internet in un... by trutannus on Tuesday September 28, 2021 @11:01AM (#28683600)
Funny this would show up here. I keep seeing this on a bot profiling project of mine. Infrequent requests, but persistent.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by SavantIdiot on Tuesday September 28, 2021 @04:28PM (#28687098)
Rather than have everyone who can run this (without getting banned) actually run it, couldn't someone just post the results to a file for us once per day or week? Seems inefficient to have millions of people run this when it results in (mostly) the same data.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by nbk_2000 on Tuesday September 28, 2021 @05:19PM (#28687667)
Not as a file but as a searchable index, yes. Here's a few: shodan.io spyse.com zoomeye.org
Re:Masscan: TCP port scanner, scanning entire Internet in un... by palebluedot on Tuesday September 28, 2021 @05:30PM (#28687773)
Re:Masscan: TCP port scanner, scanning entire Internet in un... by johnnyApplePRNG on Tuesday September 28, 2021 @11:07AM (#28683671)
Was curious the other day and couldn't find a real answer... does AWS allow portscanning from their infrastructure?

All I could find was statements from them that they do not allow port scanning OF their infrastructure.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by Cantinflas on Tuesday September 28, 2021 @11:12AM (#28683743)
They don't, I got a company acc banned scanning my own local infra from an aws instance
Re:Masscan: TCP port scanner, scanning entire Internet in un... by slenk on Tuesday September 28, 2021 @12:10PM (#28684428)
You used to be able to let them know you were going to do certain kinds of pen-tests, unless port scanning is just one of those things never allowed
Re:Masscan: TCP port scanner, scanning entire Internet in un... by nkellenicki on Tuesday September 28, 2021 @01:15PM (#28685114)
You still can, but that's for pentests _targetting_ AWS hosted infrastructure. They've always frowned upon using AWS to target _other_ services, however.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by bowmessage on Tuesday September 28, 2021 @11:37AM (#28684071)
oof, how was that ultimately resolved? Hopefully a warning from support and a re-enabled account?
Re:Masscan: TCP port scanner, scanning entire Internet in un... by Cantinflas on Tuesday September 28, 2021 @12:45PM (#28684806)
Nope! Afaik they did not get the account re-enabled, at least for the next few months!
Re:Masscan: TCP port scanner, scanning entire Internet in un... by samstave on Tuesday September 28, 2021 @11:24AM (#28683906)
Sort-of.

You can port scan your own infra/vpcs etc -- but YOU MUST tell them you are doing so and why you are doing it, else they will block it.

again, as with anything AWS (and other providers) have a good rapport with your rep, and SEs in AWS and you have a lot more freedom than you expect just from boilerplate ULA TOS stuff.

You may not scan anything other than your own infra. And you can get your external monitors whitelisted as well...

Just talk to your rep.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by mindcrime on Tuesday September 28, 2021 @11:40AM (#28684099)
And if Amazon doesn't, are there any hosting providers that do allow port-scanning from their infrastructure? I'm assuming the big providers like AWS, Google and Azure all have these limits in place, but I wonder if you can do it from some of the smaller providers? Even if means going down to some fly-by-night outfit in Belize or something...
Re:Masscan: TCP port scanner, scanning entire Internet in un... by throwaway39489 on Tuesday September 28, 2021 @12:04PM (#28684387)
Smaller ones allow yes, they only frown when scanning ports relating to infrastructure stuff
Re:Masscan: TCP port scanner, scanning entire Internet in un... by helge9210 on Tuesday September 28, 2021 @11:42AM (#28684130)
Practically, no. Unsure about actual implementation, but looks like packets disappear right after leaving the interface.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by dadrian on Tuesday September 28, 2021 @01:21PM (#28685170)
If you bring your own IPs they don't care. However, the bandwidth fees are egregious.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by nunez on Tuesday September 28, 2021 @12:07PM (#28684403)
Perfect for finding publicly-accessible Kubernetes API servers.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by 1-6 on Tuesday September 28, 2021 @12:22PM (#28684576)
I created a honeypot once and they started crypto mining on mine.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by bogomipz on Tuesday September 28, 2021 @03:47PM (#28686679)
The author states:

>"A mutex on the fast path of a program severely limits scalability. Instead, Masscan uses "rings" to synchronize things, such as when the user-mode TCP stack in the receive thread needs to transmit a packet without interfering with the transmit thread."

Is "rings" here referring to PF_RING mentioned in the preceding paragraph or is it referring to a specific synchronization primitive?

Re:Masscan: TCP port scanner, scanning entire Internet in un... by emerged on Tuesday September 28, 2021 @07:39PM (#28688715)
I would have fun optimizing this. The performance discussion toward the end of the readme was pretty basic, no assembly language or multi threading optimizations, etc.

But I have told myself to stop spending time optimizing things for no reason..

Re:Masscan: TCP port scanner, scanning entire Internet in un... by dheera on Tuesday September 28, 2021 @11:39AM (#28684091)
> This increases the rate to 100,000 packets/second, which will scan the entire Internet (minus excludes) in about 10 hours per port (or 655,360 hours if scanning all ports).

So 655360 hours, not 5 minutes

Re:Masscan: TCP port scanner, scanning entire Internet in un... by wfn on Tuesday September 28, 2021 @01:08PM (#28685046)
Well, keep reading the README, then :) see PF_RING: https://github.com/robertdavidgraham/masscan#pf_ring
Re:Masscan: TCP port scanner, scanning entire Internet in un... by marcodiego on Tuesday September 28, 2021 @10:33AM (#28683268)
Makes me wonder if there are still some netbus servers alive.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by 1-6 on Tuesday September 28, 2021 @12:21PM (#28684562)
Seems like ports can use a bit of updating. Can't an encoded message be sent to a port before it opens up and exchanges its presence?
Re:Masscan: TCP port scanner, scanning entire Internet in un... by mcpherrinm on Tuesday September 28, 2021 @12:56PM (#28684913)
The Wireguard VPN protocol doesn’t reply to any packets that aren’t cryptographically authenticated, so that’s a good option if you want something “unscannable” on the internet.

For a regular, publicly accessible server, you do want people to be able to connect to it, so it must be scannable.

I don’t know offhand, but with HTTP/3’s udp based protocol, it ought to be possible to at least make scanning a bit trickier. By requiring a valid QUIC client hello packet, with a valid SNI header for that server, the scanner must know the name of the server it’s trying to talk to. I don’t have any experience with HTTP/3 yet so I am probably wrong.

Re:Masscan: TCP port scanner, scanning entire Internet in un... by EamonnMR on Tuesday September 28, 2021 @12:33PM (#28684683)
Re:Masscan: TCP port scanner, scanning entire Internet in un... by dropalltables on Tuesday September 28, 2021 @03:53PM (#28686737)
I love this project and Robert is one of the most awesome, thoughtful people in the security world.
Re:Masscan: TCP port scanner, scanning entire Internet in un... by lazyeye on Tuesday September 28, 2021 @01:57PM (#28685549)
Im sure the primary use for this tool will be ethical /s