<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by nullt3r on Medium]]></title>
        <description><![CDATA[Stories by nullt3r on Medium]]></description>
        <link>https://medium.com/@nullt3r?source=rss-38aab6e27722------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ApPdfjhr8yDwzU73.jpg</url>
            <title>Stories by nullt3r on Medium</title>
            <link>https://medium.com/@nullt3r?source=rss-38aab6e27722------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 05:16:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nullt3r/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Port scanning and service discovery in 2022 — we have failed as a humanity]]></title>
            <link>https://medium.com/@nullt3r/port-scanning-and-service-discovery-in-2022-we-have-failed-as-a-humanity-9d0fe4503c18?source=rss-38aab6e27722------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d0fe4503c18</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[port-scanner]]></category>
            <category><![CDATA[scanner]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[nullt3r]]></dc:creator>
            <pubDate>Sat, 16 Apr 2022 10:22:23 GMT</pubDate>
            <atom:updated>2022-04-21T10:42:30.238Z</atom:updated>
            <content:encoded><![CDATA[<h3>Port Scanning and Service Discovery in 2022</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YiO-G3RycJ0LArvt.jpg" /></figure><p>There have been a lot of popular port scanning projects lately. In particular, these are projects that seek to combine fast port scans and Nmap’s ability to obtain information about discovered services. The idea behind this is understandable — to quickly scan large networks and find some low-hanging fruit.</p><p>When running a standalone Nmap on large networks you will probably not going to see any result in a few hours, days or... maybe never.</p><p>Nmap implements a lot of optimisation mechanisms to find as many open ports as possible and the speed is secondary. Although it can be set to scan faster by suppressing optimisation mechanisms, it still does not behave as many would like. Nmap is trying to be smart, and this kills most of the real world use-cases. For more information I recommend to follow this documentation (<a href="https://nmap.org/book/man-performance.html">https://nmap.org/book/man-performance.html</a>).</p><p>Generally speaking, time and network limitations are not problem that can be solved, but rather reality you have to work with. If you care only about the speed - completeness or consistency not being important factor for you, just combine some “dump” port scanner and utilise Nmap only for the dirty job.</p><p>The concept of running the Nmap over the discovered ports is just a silly approach, but if it fits your need, why not.</p><p>I myself was looking for a suitable solution for performing internal &amp; external scans faster, but I did not find any that would suit my needs. There is few popular projects, but for most of the time, they are popular just because of how colourful the output is. Some projects, that caught my attention were the following:</p><ul><li>Naabu (<a href="https://github.com/projectdiscovery/naabu">https://github.com/projectdiscovery/naabu</a>)</li><li>Rustscan (<a href="https://github.com/RustScan/RustScan">https://github.com/RustScan/RustScan</a>)</li><li>ScanCannon (<a href="https://github.com/johnnyxmas/ScanCannon">https://github.com/johnnyxmas/ScanCannon</a>)</li></ul><p>Both, Naabu and Rustscan seem very popular. The Naabu seems actually interesting in terms of options, input and output processing. What I like is possibility to exclude ports and already prepared port lists. Additionally, the possibility to specify custom resolvers for domains is a great feature. But what would you expect from ProjectDiscovery, right?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/0*IBQirN49WXhBw-8S.png" /></figure><p>However, what kills it for me is their own port scanning engine, as it is multiple times slower than Masscan. Also there is no possibility to output NMap results to some standard format (e. g. Nmap’s -oX XML format).</p><p>The Rustscan is something from different world. It reminds me one those buses in India, as can be seen below. At least from graphical perspective :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*OlKAZqtWJE9yUcAj.jpg" /></figure><p>But seriously, probably the most interesting thing about RustScan is that you are able to create hooks when port of your interest is found to be open. This seems to be similar to Nmap’s Lua scripting engine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/0*lvYkT1A-AwZivoiB.gif" /></figure><p>Overall, RustScan’s main purpose is to run Nmap over discovered ports and that’s it. Not much technical options either. Regarding the speed, it seemed to me slower than Naabu itself.</p><p>I don’t understand why everyone is implementing their own scanning engine with a lot of ballast today. The GO and Rust language, in which those tools are written, leads to reinventing everything. To be fair, what they both actually address is domain resolving and managing input/output in usable way — and that’s the real reason these projects are popular.</p><p>The only project that used the Masscan as the scanning engine was the ScanCannon, but there was a fairly limited form of output and lacked enough basic settings. But it seems like really interesting project and it does what it says.</p><p><em>If you know about some cool project, let me know in the comments. I will include it.</em></p><h4>My Approach</h4><p>Anyway, I try to avoid this under any circumstances, but in this case, the problem bothered me so much that I started looking into creating some tool which would fit my needs. But would be based on some good old projects — Masscan and Nmap.</p><p>What were my needs?</p><ul><li>scan networks really fast (internal also)</li><li>tool has to work in stdin/stdout mode — pipe results to other tools etc.</li><li>scan domains, CIDRs, IPs</li><li>specify resolvers</li><li>control packet speed</li><li>some form of a single report from the Nmap</li></ul><p>So I started putting something together. As I mentioned, my idea was to use Masscan, as I don’t need to reinvent the wheel. The Masscan implements its own TCP / IP stack and is able to scan the entire Internet in minutes. By default, Masscan also randomizes addresses and ports. This can help bypass firewalls since scans are not focused on a single host or networks.</p><p>After few days, I created the tool called JFScan — Just Fu*ing Scan.</p><blockquote>I’m not proud of what I created, but it just works. — nullt3r</blockquote><p>The JFScan (<a href="https://github.com/nullt3r/jfscan">https://github.com/nullt3r/jfscan</a>) is a simple cli utility in Python, it handles domain resolving, offers transparent settings and basic forms of output that can be processed or imported. It combines Masscan and Nmap, in between there is few hundreds lines of code that solve the translation of domains, pairing to ports, etc.</p><h4>Killing features</h4><ul><li>Perform a large-scale scans using Nmap! Allows you to use Masscan to scan targets and execute Nmap on detected ports with custom settings. Nmap on steroids.</li><li>Scans targets in variety of formats, including domain names and URLs!</li><li>Results can be produced in domain:port format.</li><li>It works in stdin/stdout mode, allowing you to stream results to/from other tools.</li><li>Auto-adjusts a packet rate for masscan so you don’t have to.</li><li>Produces a standard Nmap XML report (combines all nmap -oX outputs into a single one).</li></ul><p>Running masscan and utilising nmap to discover information about services:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LGuWp1-E6rRBwkO5wQXOgw.png" /><figcaption>Running nmap over discovered ports by masscan</figcaption></figure><p>Just using Masscan with help of JFScan’s input processing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*j19rtFBUFhWiMyxq.png" /><figcaption>Running just the masscan with quite output</figcaption></figure><p>For complete documentation &amp; how to install, follow a readme on <a href="https://github.com/nullt3r/jfscan">https://github.com/nullt3r/jfscan</a>.</p><p>I sincerely hope that in time a more interesting project will be created, which will be integrated within the masscan or nmap. All this is simply not effective.</p><p>But hey, it works…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d0fe4503c18" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>